aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/coerce.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-03-14 16:25:29 +0000
committerFlorian Diebold <[email protected]>2021-03-14 16:31:08 +0000
commitaf466f8542173002361eb134e66102908c7cd024 (patch)
tree75a970fa98bf1f67ae390ae5b6a71d09fd963641 /crates/hir_ty/src/infer/coerce.rs
parent195414783402d6973f4e673e84be9b7bc19cbfa6 (diff)
Make Ty wrap TyKind in an Arc
... like it will be in Chalk. We still keep `interned_mut` and `into_inner` methods that will probably not exist with Chalk. This worsens performance slightly (5ginstr inference on RA), but doesn't include other simplifications we can do yet.
Diffstat (limited to 'crates/hir_ty/src/infer/coerce.rs')
-rw-r--r--crates/hir_ty/src/infer/coerce.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/coerce.rs b/crates/hir_ty/src/infer/coerce.rs
index 36670043a..435f7d0db 100644
--- a/crates/hir_ty/src/infer/coerce.rs
+++ b/crates/hir_ty/src/infer/coerce.rs
@@ -71,7 +71,7 @@ impl<'a> InferenceContext<'a> {
71 } 71 }
72 72
73 // Pointer weakening and function to pointer 73 // Pointer weakening and function to pointer
74 match (&mut from_ty.0, to_ty.interned(&Interner)) { 74 match (from_ty.interned_mut(), to_ty.interned(&Interner)) {
75 // `*mut T` -> `*const T` 75 // `*mut T` -> `*const T`
76 // `&mut T` -> `&T` 76 // `&mut T` -> `&T`
77 (TyKind::Raw(m1, ..), TyKind::Raw(m2 @ Mutability::Not, ..)) 77 (TyKind::Raw(m1, ..), TyKind::Raw(m2 @ Mutability::Not, ..))