aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-18 16:41:33 +0000
committerAleksey Kladov <[email protected]>2019-12-18 16:41:33 +0000
commit04715cbe1caf92e55d393a352a12454ba958845e (patch)
tree8c4a839f9b3ac037429d20b568c5a573c7d65825 /crates/ra_hir_ty/src/infer
parent88c6109897417e7ab815ea1711f49545bff94601 (diff)
Forbid <T>::foo syntax in mod paths
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r--crates/ra_hir_ty/src/infer/path.rs4
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 @@
3use std::iter; 3use std::iter;
4 4
5use hir_def::{ 5use 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;