mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Encapsulate Attrs
This commit is contained in:
parent
a1346bba5c
commit
e42f962766
6 changed files with 57 additions and 42 deletions
|
@ -286,10 +286,7 @@ impl Completions {
|
|||
}
|
||||
|
||||
fn is_deprecated(node: impl Attrs, db: &impl HirDatabase) -> bool {
|
||||
match node.attrs(db) {
|
||||
None => false,
|
||||
Some(attrs) => attrs.iter().any(|x| x.is_simple_atom("deprecated")),
|
||||
}
|
||||
node.attrs(db).has_atom("deprecated")
|
||||
}
|
||||
|
||||
fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue