diff options
Diffstat (limited to 'crates/ra_hir_ty/src/utils.rs')
-rw-r--r-- | crates/ra_hir_ty/src/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/utils.rs b/crates/ra_hir_ty/src/utils.rs index fabf45b53..0049d3c6f 100644 --- a/crates/ra_hir_ty/src/utils.rs +++ b/crates/ra_hir_ty/src/utils.rs | |||
@@ -10,7 +10,7 @@ use hir_def::{ | |||
10 | type_ref::TypeRef, | 10 | type_ref::TypeRef, |
11 | ContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId, VariantId, | 11 | ContainerId, GenericDefId, Lookup, TraitId, TypeAliasId, TypeParamId, VariantId, |
12 | }; | 12 | }; |
13 | use hir_expand::name::{Name, N}; | 13 | use hir_expand::name::{name, Name}; |
14 | 14 | ||
15 | fn direct_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { | 15 | fn direct_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { |
16 | let resolver = trait_.resolver(db); | 16 | let resolver = trait_.resolver(db); |
@@ -22,7 +22,7 @@ fn direct_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { | |||
22 | .where_predicates | 22 | .where_predicates |
23 | .iter() | 23 | .iter() |
24 | .filter_map(|pred| match &pred.type_ref { | 24 | .filter_map(|pred| match &pred.type_ref { |
25 | TypeRef::Path(p) if p.as_ident() == Some(&N![Self]) => pred.bound.as_path(), | 25 | TypeRef::Path(p) if p.as_ident() == Some(&name![Self]) => pred.bound.as_path(), |
26 | _ => None, | 26 | _ => None, |
27 | }) | 27 | }) |
28 | .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) { | 28 | .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) { |