aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-22 08:27:47 +0000
committerAleksey Kladov <[email protected]>2019-11-22 08:27:47 +0000
commite42f9627664cc3c44094e1c4f985270fbfd592b1 (patch)
tree81603da9c34f301cf82e1ceae80313b8eb9e10c4 /crates/ra_ide_api/src
parenta1346bba5c457d1aa0a35f44231bed8b494b7d60 (diff)
Encapsulate Attrs
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index b20329459..cbaf169bf 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -286,10 +286,7 @@ impl Completions {
286} 286}
287 287
288fn is_deprecated(node: impl Attrs, db: &impl HirDatabase) -> bool { 288fn is_deprecated(node: impl Attrs, db: &impl HirDatabase) -> bool {
289 match node.attrs(db) { 289 node.attrs(db).has_atom("deprecated")
290 None => false,
291 Some(attrs) => attrs.iter().any(|x| x.is_simple_atom("deprecated")),
292 }
293} 290}
294 291
295fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool { 292fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool {