aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/coerce.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer/coerce.rs')
-rw-r--r--crates/hir_ty/src/infer/coerce.rs4
1 files changed, 2 insertions, 2 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`