diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-02-22 01:24:55 +0400 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-03-13 17:31:54 +0400 |
| commit | 901f1c9c6265168b910b4c5eac4f71ca61621134 (patch) | |
| tree | 9c2f8ead06b2fc38ee000e882f1affddd647cb65 | |
| parent | 17127f3e781a97c791f00b8d3cd6aab3d686246a (diff) | |
| download | rust-901f1c9c6265168b910b4c5eac4f71ca61621134.tar.gz rust-901f1c9c6265168b910b4c5eac4f71ca61621134.zip | |
resolve: Partially remove `item_attrs_untracked`
| -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()) }, ); |
