mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Nicer API for attrs
This commit is contained in:
parent
1956d57ed4
commit
4b74fb1d89
4 changed files with 39 additions and 33 deletions
|
@ -288,7 +288,7 @@ impl Completions {
|
|||
}
|
||||
|
||||
fn is_deprecated(node: impl HasAttrs, db: &impl HirDatabase) -> bool {
|
||||
node.attrs(db).has_atom("deprecated")
|
||||
node.attrs(db).by_key("deprecated").exists()
|
||||
}
|
||||
|
||||
fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue