Nicer API for attrs

This commit is contained in:
Aleksey Kladov 2019-11-24 16:03:02 +03:00
parent 1956d57ed4
commit 4b74fb1d89
4 changed files with 39 additions and 33 deletions

View file

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