From 04715cbe1caf92e55d393a352a12454ba958845e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 18 Dec 2019 17:41:33 +0100 Subject: Forbid ::foo syntax in mod paths --- crates/ra_hir_ty/src/infer/path.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_ty/src/infer') 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 @@ use std::iter; use hir_def::{ - path::{Path, PathKind, PathSegment}, + path::{Path, PathSegment}, resolver::{ResolveValueResult, Resolver, TypeNs, ValueNs}, AssocItemId, ContainerId, Lookup, }; @@ -32,7 +32,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { path: &Path, id: ExprOrPatId, ) -> Option { - let (value, self_subst) = if let PathKind::Type(type_ref) = path.kind() { + let (value, self_subst) = if let Some(type_ref) = path.type_anchor() { if path.segments().is_empty() { // This can't actually happen syntax-wise return None; -- cgit v1.2.3