Skip to content

Commit

Permalink
Switch from hir().local_def_id_to_hir_id to query
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Nov 27, 2023
1 parent 8f4368d commit 4ce7864
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/preempt_count/annotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ memoize!(
return cx.preemption_count_annotation_fallback(def_id);
};

let hir_id = cx.hir().local_def_id_to_hir_id(local_def_id);
let hir_id = cx.local_def_id_to_hir_id(local_def_id);
for attr in cx.klint_attributes(hir_id).iter() {
match attr {
crate::attribute::KlintAttribute::PreemptionCount(pc) => {
Expand Down Expand Up @@ -186,7 +186,7 @@ memoize!(
return cx.preemption_count_annotation_fallback(def_id);
};

let hir_id = cx.hir().local_def_id_to_hir_id(local_def_id);
let hir_id = cx.local_def_id_to_hir_id(local_def_id);
for attr in cx.klint_attributes(hir_id).iter() {
match attr {
crate::attribute::KlintAttribute::DropPreemptionCount(pc) => {
Expand Down Expand Up @@ -214,7 +214,7 @@ memoize!(
return false;
};

let hir_id = cx.hir().local_def_id_to_hir_id(local_def_id);
let hir_id = cx.local_def_id_to_hir_id(local_def_id);
for attr in cx.klint_attributes(hir_id).iter() {
match attr {
crate::attribute::KlintAttribute::ReportPreeptionCount => return true,
Expand All @@ -232,7 +232,7 @@ memoize!(
return false;
};

let hir_id = cx.hir().local_def_id_to_hir_id(local_def_id);
let hir_id = cx.local_def_id_to_hir_id(local_def_id);
for attr in cx.klint_attributes(hir_id).iter() {
match attr {
crate::attribute::KlintAttribute::DumpMir => return true,
Expand Down

0 comments on commit 4ce7864

Please sign in to comment.