diff options
author | Florian Diebold <[email protected]> | 2021-04-08 13:35:15 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-08 13:36:14 +0100 |
commit | d992736e796501b2a5ae232644924a3dfefede92 (patch) | |
tree | 5af343156b092f0e2a3cd0c26390428d1f1a3983 /crates/hir_ty/src/infer | |
parent | 8040f4a5e3792f95b3194e21b3f6d375fb7499c5 (diff) |
Remove unused
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/coerce.rs | 4 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 1 | ||||
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs index 26dc6ceba..1f463a425 100644 --- a/crates/hir_ty/src/infer/coerce.rs +++ b/crates/hir_ty/src/infer/coerce.rs | |||
@@ -73,11 +73,11 @@ impl<'a> InferenceContext<'a> { | |||
73 | // Pointer weakening and function to pointer | 73 | // Pointer weakening and function to pointer |
74 | match (from_ty.kind(&Interner), to_ty.kind(&Interner)) { | 74 | match (from_ty.kind(&Interner), to_ty.kind(&Interner)) { |
75 | // `*mut T` -> `*const T` | 75 | // `*mut T` -> `*const T` |
76 | (TyKind::Raw(m1, inner), TyKind::Raw(m2 @ Mutability::Not, ..)) => { | 76 | (TyKind::Raw(_, inner), TyKind::Raw(m2 @ Mutability::Not, ..)) => { |
77 | from_ty = TyKind::Raw(*m2, inner.clone()).intern(&Interner); | 77 | from_ty = TyKind::Raw(*m2, inner.clone()).intern(&Interner); |
78 | } | 78 | } |
79 | // `&mut T` -> `&T` | 79 | // `&mut T` -> `&T` |
80 | (TyKind::Ref(m1, lt, inner), TyKind::Ref(m2 @ Mutability::Not, ..)) => { | 80 | (TyKind::Ref(_, lt, inner), TyKind::Ref(m2 @ Mutability::Not, ..)) => { |
81 | from_ty = TyKind::Ref(*m2, lt.clone(), inner.clone()).intern(&Interner); | 81 | from_ty = TyKind::Ref(*m2, lt.clone(), inner.clone()).intern(&Interner); |
82 | } | 82 | } |
83 | // `&T` -> `*const T` | 83 | // `&T` -> `*const T` |
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 5f03079e8..cbbfa8b5c 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -24,7 +24,6 @@ use crate::{ | |||
24 | utils::{generics, Generics}, | 24 | utils::{generics, Generics}, |
25 | AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner, | 25 | AdtId, Binders, CallableDefId, FnPointer, FnSig, FnSubst, InEnvironment, Interner, |
26 | ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyExt, TyKind, | 26 | ProjectionTyExt, Rawness, Scalar, Substitution, TraitRef, Ty, TyBuilder, TyExt, TyKind, |
27 | TypeWalk, | ||
28 | }; | 27 | }; |
29 | 28 | ||
30 | use super::{ | 29 | use super::{ |
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index 3b9c4a495..a887e20b0 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs | |||
@@ -12,7 +12,7 @@ use super::{DomainGoal, InferenceContext}; | |||
12 | use crate::{ | 12 | use crate::{ |
13 | fold_tys, static_lifetime, AliasEq, AliasTy, BoundVar, Canonical, CanonicalVarKinds, | 13 | fold_tys, static_lifetime, AliasEq, AliasTy, BoundVar, Canonical, CanonicalVarKinds, |
14 | DebruijnIndex, FnPointer, FnSubst, InEnvironment, InferenceVar, Interner, Scalar, Substitution, | 14 | DebruijnIndex, FnPointer, FnSubst, InEnvironment, InferenceVar, Interner, Scalar, Substitution, |
15 | Ty, TyExt, TyKind, TypeWalk, WhereClause, | 15 | Ty, TyExt, TyKind, WhereClause, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | impl<'a> InferenceContext<'a> { | 18 | impl<'a> InferenceContext<'a> { |