aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authoruHOOCCOOHu <[email protected]>2019-09-15 13:14:33 +0100
committeruHOOCCOOHu <[email protected]>2019-09-15 13:14:33 +0100
commit7ed3be32916facf3b709d5277381408cd3ec134a (patch)
tree7ac9169b41465315ca1c5541c096ea61ac789357 /crates/ra_hir/src/source_binder.rs
parentde9670fe456d89f97e8044d4e0919d2c16d1087f (diff)
Define known paths and group names
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 59053cda3..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,
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,10 +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::from_simple_segments( 435 let std_future_path = known::std_future_future();
437 PathKind::Abs,
438 vec![name::STD, name::FUTURE_MOD, name::FUTURE_TYPE],
439 );
440 436
441 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) {
442 Some(it) => it, 438 Some(it) => it,