resolve: Partially remove item_attrs_untracked

This commit is contained in:
Vadim Petrochenkov 2023-02-22 01:24:55 +04:00
parent 17127f3e78
commit 901f1c9c62

View File

@ -1216,15 +1216,11 @@ fn lookup_import_candidates_from_module<FilterFn>(
// 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())
},
);