aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-08 13:35:15 +0100
committerFlorian Diebold <[email protected]>2021-04-08 13:36:14 +0100
commitd992736e796501b2a5ae232644924a3dfefede92 (patch)
tree5af343156b092f0e2a3cd0c26390428d1f1a3983 /crates/hir_ty/src/infer
parent8040f4a5e3792f95b3194e21b3f6d375fb7499c5 (diff)
Remove unused
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/coerce.rs4
-rw-r--r--crates/hir_ty/src/infer/expr.rs1
-rw-r--r--crates/hir_ty/src/infer/unify.rs2
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
30use super::{ 29use 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};
12use crate::{ 12use 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
18impl<'a> InferenceContext<'a> { 18impl<'a> InferenceContext<'a> {