Remove support for register_attr

This was removed in rustc in 2022: https://github.com/rust-lang/rust/pull/101123

Closes #20525.
This commit is contained in:
Wilfred Hughes 2025-09-08 15:56:56 +01:00
parent a91fb2b9a1
commit bca5d59627
7 changed files with 14 additions and 62 deletions

View file

@ -1062,8 +1062,7 @@ impl<'db> SourceAnalyzer<'db> {
// in this case we have to check for inert/builtin attributes and tools and prioritize
// resolution of attributes over other namespaces
if let Some(name_ref) = path.as_single_name_ref() {
let builtin =
BuiltinAttr::by_name(db, self.resolver.krate().into(), &name_ref.text());
let builtin = BuiltinAttr::builtin(&name_ref.text());
if builtin.is_some() {
return builtin.map(|it| (PathResolution::BuiltinAttr(it), None));
}