diff options
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index adec7973671..13b93626d8f 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -1216,15 +1216,11 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { // a note about editions let note = if let Some(did) = did { let requires_note = !did.is_local() - && this.cstore().item_attrs_untracked(did, this.tcx.sess).any( + && this.tcx.get_attrs(did, sym::rustc_diagnostic_item).any( |attr| { - if attr.has_name(sym::rustc_diagnostic_item) { - [sym::TryInto, sym::TryFrom, sym::FromIterator] - .map(|x| Some(x)) - .contains(&attr.value_str()) - } else { - false - } + [sym::TryInto, sym::TryFrom, sym::FromIterator] + .map(|x| Some(x)) + .contains(&attr.value_str()) }, ); |
