aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/infer
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-30 14:24:36 +0000
committerAleksey Kladov <[email protected]>2019-10-30 14:43:14 +0000
commite56433432057712086ca623c4a1ef40089004839 (patch)
treeff07a196ffcd7c6f298f6d0ef7563f05c2264d4e /crates/ra_hir/src/ty/infer
parentf8ddef875af08f6c67fe69f7803f3926bc6f66bb (diff)
remove forward pointer to Path
Diffstat (limited to 'crates/ra_hir/src/ty/infer')
-rw-r--r--crates/ra_hir/src/ty/infer/expr.rs6
-rw-r--r--crates/ra_hir/src/ty/infer/path.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs
index 7ef87bfe2..bc6437b44 100644
--- a/crates/ra_hir/src/ty/infer/expr.rs
+++ b/crates/ra_hir/src/ty/infer/expr.rs
@@ -3,7 +3,10 @@
3use std::iter::{repeat, repeat_with}; 3use std::iter::{repeat, repeat_with};
4use std::sync::Arc; 4use std::sync::Arc;
5 5
6use hir_def::name; 6use hir_def::{
7 name,
8 path::{GenericArg, GenericArgs},
9};
7 10
8use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch}; 11use super::{BindingMode, Expectation, InferenceContext, InferenceDiagnostic, TypeMismatch};
9use crate::{ 12use crate::{
@@ -11,7 +14,6 @@ use crate::{
11 expr::{self, Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp}, 14 expr::{self, Array, BinaryOp, Expr, ExprId, Literal, Statement, UnaryOp},
12 generics::{GenericParams, HasGenericParams}, 15 generics::{GenericParams, HasGenericParams},
13 nameres::Namespace, 16 nameres::Namespace,
14 path::{GenericArg, GenericArgs},
15 ty::{ 17 ty::{
16 autoderef, method_resolution, op, primitive, CallableDef, InferTy, Mutability, Obligation, 18 autoderef, method_resolution, op, primitive, CallableDef, InferTy, Mutability, Obligation,
17 ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk, 19 ProjectionPredicate, ProjectionTy, Substs, TraitRef, Ty, TypeCtor, TypeWalk,
diff --git a/crates/ra_hir/src/ty/infer/path.rs b/crates/ra_hir/src/ty/infer/path.rs
index db979353a..77aa35ce1 100644
--- a/crates/ra_hir/src/ty/infer/path.rs
+++ b/crates/ra_hir/src/ty/infer/path.rs
@@ -1,5 +1,7 @@
1//! Path expression resolution. 1//! Path expression resolution.
2 2
3use hir_def::path::PathSegment;
4
3use super::{ExprOrPatId, InferenceContext, TraitRef}; 5use super::{ExprOrPatId, InferenceContext, TraitRef};
4use crate::{ 6use crate::{
5 db::HirDatabase, 7 db::HirDatabase,
@@ -131,7 +133,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
131 fn resolve_trait_assoc_item( 133 fn resolve_trait_assoc_item(
132 &mut self, 134 &mut self,
133 trait_ref: TraitRef, 135 trait_ref: TraitRef,
134 segment: &crate::path::PathSegment, 136 segment: &PathSegment,
135 id: ExprOrPatId, 137 id: ExprOrPatId,
136 ) -> Option<(ValueNs, Option<Substs>)> { 138 ) -> Option<(ValueNs, Option<Substs>)> {
137 let trait_ = trait_ref.trait_; 139 let trait_ = trait_ref.trait_;
@@ -170,7 +172,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
170 fn resolve_ty_assoc_item( 172 fn resolve_ty_assoc_item(
171 &mut self, 173 &mut self,
172 ty: Ty, 174 ty: Ty,
173 segment: &crate::path::PathSegment, 175 segment: &PathSegment,
174 id: ExprOrPatId, 176 id: ExprOrPatId,
175 ) -> Option<(ValueNs, Option<Substs>)> { 177 ) -> Option<(ValueNs, Option<Substs>)> {
176 if let Ty::Unknown = ty { 178 if let Ty::Unknown = ty {