diff options
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index fd30971b0..c013ff99b 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -986,11 +986,6 @@ impl Type { | |||
986 | None | 986 | None |
987 | } | 987 | } |
988 | 988 | ||
989 | // FIXME: remove | ||
990 | pub fn into_ty(self) -> Ty { | ||
991 | self.ty.value | ||
992 | } | ||
993 | |||
994 | pub fn as_adt(&self) -> Option<Adt> { | 989 | pub fn as_adt(&self) -> Option<Adt> { |
995 | let (adt, _subst) = self.ty.value.as_adt()?; | 990 | let (adt, _subst) = self.ty.value.as_adt()?; |
996 | Some(adt.into()) | 991 | Some(adt.into()) |
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 9efd0477c..44d185003 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -427,7 +427,7 @@ impl SourceAnalyzer { | |||
427 | 427 | ||
428 | /// Checks that particular type `ty` implements `std::future::Future`. | 428 | /// Checks that particular type `ty` implements `std::future::Future`. |
429 | /// This function is used in `.await` syntax completion. | 429 | /// This function is used in `.await` syntax completion. |
430 | pub fn impls_future(&self, db: &impl HirDatabase, ty: Ty) -> bool { | 430 | pub fn impls_future(&self, db: &impl HirDatabase, ty: Type) -> bool { |
431 | let std_future_path = known::std_future_future(); | 431 | let std_future_path = known::std_future_future(); |
432 | 432 | ||
433 | let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) { | 433 | let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) { |
@@ -440,7 +440,7 @@ impl SourceAnalyzer { | |||
440 | _ => return false, | 440 | _ => return false, |
441 | }; | 441 | }; |
442 | 442 | ||
443 | let canonical_ty = Canonical { value: ty, num_vars: 0 }; | 443 | let canonical_ty = Canonical { value: ty.ty.value, num_vars: 0 }; |
444 | implements_trait(&canonical_ty, db, &self.resolver, krate.into(), std_future_trait) | 444 | implements_trait(&canonical_ty, db, &self.resolver, krate.into(), std_future_trait) |
445 | } | 445 | } |
446 | 446 | ||