mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Use hir_def::builtin_attr::find_builtin_attr_idx
This commit is contained in:
parent
99b69525f4
commit
40c068f502
2 changed files with 4 additions and 9 deletions
|
@ -2697,9 +2697,7 @@ impl BuiltinAttr {
|
|||
}
|
||||
|
||||
fn builtin(name: &str) -> Option<Self> {
|
||||
hir_def::builtin_attr::INERT_ATTRIBUTES
|
||||
.iter()
|
||||
.position(|tool| tool.name == name)
|
||||
hir_def::builtin_attr::find_builtin_attr_idx(name)
|
||||
.map(|idx| BuiltinAttr { krate: None, idx: idx as u32 })
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue