diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-22 09:27:13 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-22 09:27:13 +0000 |
commit | f24aa7a45ad6ffbbae56d5bca50afd6aefa1a4c7 (patch) | |
tree | 286d7f91a45aa132691729a98302b687f677b643 /crates/ra_ide_api/src/completion | |
parent | d59bf33b9e1c20d6ef3fd9b72f3cf4730172b5a8 (diff) | |
parent | a87e9145a67634a5ea8a893ab8b52b3c07108a13 (diff) |
Merge #2351
2351: Rename Atts trait r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index b20329459..bd464d193 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | //! This modules takes care of rendering various definitions as completion items. | 1 | //! This modules takes care of rendering various definitions as completion items. |
2 | 2 | ||
3 | use hir::{db::HirDatabase, Attrs, Docs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk}; | 3 | use hir::{db::HirDatabase, Docs, HasAttrs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk}; |
4 | use join_to_string::join; | 4 | use join_to_string::join; |
5 | use ra_syntax::ast::NameOwner; | 5 | use ra_syntax::ast::NameOwner; |
6 | use test_utils::tested_by; | 6 | use test_utils::tested_by; |
@@ -285,11 +285,8 @@ impl Completions { | |||
285 | } | 285 | } |
286 | } | 286 | } |
287 | 287 | ||
288 | fn is_deprecated(node: impl Attrs, db: &impl HirDatabase) -> bool { | 288 | fn is_deprecated(node: impl HasAttrs, 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 | ||
295 | fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool { | 292 | fn has_non_default_type_params(def: hir::GenericDef, db: &db::RootDatabase) -> bool { |