diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index c1938bd86..dad1c93c4 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -22,7 +22,7 @@ use crate::{ | |||
22 | U8, USIZE, | 22 | U8, USIZE, |
23 | }, | 23 | }, |
24 | nameres::{CrateModuleId, ImportId, ModuleScope, Namespace}, | 24 | nameres::{CrateModuleId, ImportId, ModuleScope, Namespace}, |
25 | resolve::Resolver, | 25 | resolve::{Resolver, TypeNs}, |
26 | traits::{TraitData, TraitItem}, | 26 | traits::{TraitData, TraitItem}, |
27 | ty::{ | 27 | ty::{ |
28 | primitive::{FloatBitness, FloatTy, IntBitness, IntTy, Signedness}, | 28 | primitive::{FloatBitness, FloatTy, IntBitness, IntTy, Signedness}, |
@@ -868,11 +868,9 @@ impl Trait { | |||
868 | } | 868 | } |
869 | _ => None, | 869 | _ => None, |
870 | }) | 870 | }) |
871 | .filter_map(|path| { | 871 | .filter_map(|path| match resolver.resolve_path_in_type_ns_fully(db, path) { |
872 | match resolver.resolve_path_without_assoc_items(db, path).take_types() { | 872 | Some(TypeNs::Trait(t)) => Some(t), |
873 | Some(crate::Resolution::Def(ModuleDef::Trait(t))) => Some(t), | 873 | _ => None, |
874 | _ => None, | ||
875 | } | ||
876 | }) | 874 | }) |
877 | .collect() | 875 | .collect() |
878 | } | 876 | } |