Skip to content

Commit 901f1c9

Browse files
committed
resolve: Partially remove item_attrs_untracked
1 parent 17127f3 commit 901f1c9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

compiler/rustc_resolve/src/diagnostics.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,15 +1216,11 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
12161216
// a note about editions
12171217
let note = if let Some(did) = did {
12181218
let requires_note = !did.is_local()
1219-
&& this.cstore().item_attrs_untracked(did, this.tcx.sess).any(
1219+
&& this.tcx.get_attrs(did, sym::rustc_diagnostic_item).any(
12201220
|attr| {
1221-
if attr.has_name(sym::rustc_diagnostic_item) {
1222-
[sym::TryInto, sym::TryFrom, sym::FromIterator]
1223-
.map(|x| Some(x))
1224-
.contains(&attr.value_str())
1225-
} else {
1226-
false
1227-
}
1221+
[sym::TryInto, sym::TryFrom, sym::FromIterator]
1222+
.map(|x| Some(x))
1223+
.contains(&attr.value_str())
12281224
},
12291225
);
12301226

0 commit comments

Comments
 (0)