diff options
author | Florian Diebold <[email protected]> | 2021-03-13 13:44:51 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-13 15:17:15 +0000 |
commit | 6c32bbf3ca5980fb33c1ea28dd1c5a1524ce81cb (patch) | |
tree | f81c7438f67de3c292a233887e56c7e99bcc0a01 /crates/hir_ty/src/infer/path.rs | |
parent | 7accf6bc37c059a83a58c82f463f02a02ed2226f (diff) |
Separate `Ty` and `TyKind` like in Chalk
Currently `Ty` just wraps `TyKind`, but this allows us to change most
places to already use `intern` / `interned`.
Diffstat (limited to 'crates/hir_ty/src/infer/path.rs')
-rw-r--r-- | crates/hir_ty/src/infer/path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs index ae3554bac..392952178 100644 --- a/crates/hir_ty/src/infer/path.rs +++ b/crates/hir_ty/src/infer/path.rs | |||
@@ -9,7 +9,7 @@ use hir_def::{ | |||
9 | }; | 9 | }; |
10 | use hir_expand::name::Name; | 10 | use hir_expand::name::Name; |
11 | 11 | ||
12 | use crate::{method_resolution, Substs, Ty, ValueTyDefId}; | 12 | use crate::{method_resolution, Interner, Substs, Ty, TyKind, ValueTyDefId}; |
13 | 13 | ||
14 | use super::{ExprOrPatId, InferenceContext, TraitRef}; | 14 | use super::{ExprOrPatId, InferenceContext, TraitRef}; |
15 | 15 | ||
@@ -144,7 +144,7 @@ impl<'a> InferenceContext<'a> { | |||
144 | remaining_segments_for_ty, | 144 | remaining_segments_for_ty, |
145 | true, | 145 | true, |
146 | ); | 146 | ); |
147 | if let Ty::Unknown = ty { | 147 | if let TyKind::Unknown = ty.interned(&Interner) { |
148 | return None; | 148 | return None; |
149 | } | 149 | } |
150 | 150 | ||
@@ -209,7 +209,7 @@ impl<'a> InferenceContext<'a> { | |||
209 | name: &Name, | 209 | name: &Name, |
210 | id: ExprOrPatId, | 210 | id: ExprOrPatId, |
211 | ) -> Option<(ValueNs, Option<Substs>)> { | 211 | ) -> Option<(ValueNs, Option<Substs>)> { |
212 | if let Ty::Unknown = ty { | 212 | if let TyKind::Unknown = ty.interned(&Interner) { |
213 | return None; | 213 | return None; |
214 | } | 214 | } |
215 | 215 | ||