diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index cff55b640..2a907c9f1 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -25,8 +25,7 @@ use crate::{ | |||
25 | BodySourceMap, | 25 | BodySourceMap, |
26 | }, | 26 | }, |
27 | ids::LocationCtx, | 27 | ids::LocationCtx, |
28 | name, | 28 | path::known, |
29 | path::{PathKind, PathSegment}, | ||
30 | resolve::{ScopeDef, TypeNs, ValueNs}, | 29 | resolve::{ScopeDef, TypeNs, ValueNs}, |
31 | ty::method_resolution::implements_trait, | 30 | ty::method_resolution::implements_trait, |
32 | AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HasBody, HirFileId, MacroDef, | 31 | AsName, AstId, Const, Crate, DefWithBody, Either, Enum, Function, HasBody, HirFileId, MacroDef, |
@@ -433,14 +432,7 @@ impl SourceAnalyzer { | |||
433 | /// Checks that particular type `ty` implements `std::future::Future`. | 432 | /// Checks that particular type `ty` implements `std::future::Future`. |
434 | /// This function is used in `.await` syntax completion. | 433 | /// This function is used in `.await` syntax completion. |
435 | pub fn impls_future(&self, db: &impl HirDatabase, ty: Ty) -> bool { | 434 | pub fn impls_future(&self, db: &impl HirDatabase, ty: Ty) -> bool { |
436 | let std_future_path = Path { | 435 | let std_future_path = known::std_future_future(); |
437 | kind: PathKind::Abs, | ||
438 | segments: vec![ | ||
439 | PathSegment { name: name::STD, args_and_bindings: None }, | ||
440 | PathSegment { name: name::FUTURE_MOD, args_and_bindings: None }, | ||
441 | PathSegment { name: name::FUTURE_TYPE, args_and_bindings: None }, | ||
442 | ], | ||
443 | }; | ||
444 | 436 | ||
445 | let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) { | 437 | let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) { |
446 | Some(it) => it, | 438 | Some(it) => it, |