diff options
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r-- | crates/ra_hir_ty/src/infer/path.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/path.rs b/crates/ra_hir_ty/src/infer/path.rs index 3bae0ca6c..402a89386 100644 --- a/crates/ra_hir_ty/src/infer/path.rs +++ b/crates/ra_hir_ty/src/infer/path.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | use std::iter; | 3 | use std::iter; |
4 | 4 | ||
5 | use hir_def::{ | 5 | use hir_def::{ |
6 | path::{Path, PathKind, PathSegment}, | 6 | path::{Path, PathSegment}, |
7 | resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs}, | 7 | resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs}, |
8 | AssocItemId, ContainerId, Lookup, | 8 | AssocItemId, ContainerId, Lookup, |
9 | }; | 9 | }; |
@@ -32,7 +32,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
32 | path: &Path, | 32 | path: &Path, |
33 | id: ExprOrPatId, | 33 | id: ExprOrPatId, |
34 | ) -> Option<Ty> { | 34 | ) -> Option<Ty> { |
35 | let (value, self_subst) = if let PathKind::Type(type_ref) = path.kind() { | 35 | let (value, self_subst) = if let Some(type_ref) = path.type_anchor() { |
36 | if path.segments().is_empty() { | 36 | if path.segments().is_empty() { |
37 | // This can't actually happen syntax-wise | 37 | // This can't actually happen syntax-wise |
38 | return None; | 38 | return None; |