Encapsulate Attrs

This commit is contained in:
Aleksey Kladov 2019-11-22 11:27:47 +03:00
parent a1346bba5c
commit e42f962766
6 changed files with 57 additions and 42 deletions

View file

@ -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 {