diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index afdcd5415..65b304b43 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -29,7 +29,7 @@ use crate::{ | |||
29 | path::{PathKind, PathSegment}, | 29 | path::{PathKind, PathSegment}, |
30 | ty::method_resolution::implements_trait, | 30 | ty::method_resolution::implements_trait, |
31 | AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HasBody, HirFileId, MacroDef, | 31 | AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HasBody, HirFileId, MacroDef, |
32 | Module, ModuleDef, Name, Path, PerNs, Resolution, Resolver, Static, Struct, Trait, Ty, | 32 | Module, Name, Path, PerNs, Resolver, Static, Struct, Trait, Ty, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | /// Locates the module by `FileId`. Picks topmost module in the file. | 35 | /// Locates the module by `FileId`. Picks topmost module in the file. |
@@ -426,11 +426,10 @@ impl SourceAnalyzer { | |||
426 | ], | 426 | ], |
427 | }; | 427 | }; |
428 | 428 | ||
429 | let std_future_trait = | 429 | let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) { |
430 | match self.resolver.resolve_path_segments(db, &std_future_path).into_fully_resolved() { | 430 | Some(it) => it, |
431 | PerNs { types: Some(Resolution::Def(ModuleDef::Trait(trait_))), .. } => trait_, | 431 | _ => return false, |
432 | _ => return false, | 432 | }; |
433 | }; | ||
434 | 433 | ||
435 | let krate = match self.resolver.krate() { | 434 | let krate = match self.resolver.krate() { |
436 | Some(krate) => krate, | 435 | Some(krate) => krate, |