mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Merge #2351
2351: Rename Atts trait r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
f24aa7a45a
7 changed files with 63 additions and 51 deletions
|
@ -1,6 +1,6 @@
|
|||
//! This modules takes care of rendering various definitions as completion items.
|
||||
|
||||
use hir::{db::HirDatabase, Attrs, Docs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk};
|
||||
use hir::{db::HirDatabase, Docs, HasAttrs, HasSource, HirDisplay, ScopeDef, Ty, TypeWalk};
|
||||
use join_to_string::join;
|
||||
use ra_syntax::ast::NameOwner;
|
||||
use test_utils::tested_by;
|
||||
|
@ -285,11 +285,8 @@ 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")),
|
||||
}
|
||||
fn is_deprecated(node: impl HasAttrs, db: &impl HirDatabase) -> bool {
|
||||
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