diff options
author | Florian Diebold <[email protected]> | 2021-03-14 16:25:29 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-03-14 16:31:08 +0000 |
commit | af466f8542173002361eb134e66102908c7cd024 (patch) | |
tree | 75a970fa98bf1f67ae390ae5b6a71d09fd963641 /crates/hir_ty/src/traits/chalk | |
parent | 195414783402d6973f4e673e84be9b7bc19cbfa6 (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/traits/chalk')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/mapping.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/traits/chalk/mapping.rs b/crates/hir_ty/src/traits/chalk/mapping.rs index 05a4bf0df..2ab976190 100644 --- a/crates/hir_ty/src/traits/chalk/mapping.rs +++ b/crates/hir_ty/src/traits/chalk/mapping.rs | |||
@@ -24,7 +24,7 @@ use super::*; | |||
24 | impl ToChalk for Ty { | 24 | impl ToChalk for Ty { |
25 | type Chalk = chalk_ir::Ty<Interner>; | 25 | type Chalk = chalk_ir::Ty<Interner>; |
26 | fn to_chalk(self, db: &dyn HirDatabase) -> chalk_ir::Ty<Interner> { | 26 | fn to_chalk(self, db: &dyn HirDatabase) -> chalk_ir::Ty<Interner> { |
27 | match self.0 { | 27 | match self.into_inner() { |
28 | TyKind::Ref(m, parameters) => ref_to_chalk(db, m, parameters), | 28 | TyKind::Ref(m, parameters) => ref_to_chalk(db, m, parameters), |
29 | TyKind::Array(parameters) => array_to_chalk(db, parameters), | 29 | TyKind::Array(parameters) => array_to_chalk(db, parameters), |
30 | TyKind::Function(FnPointer { sig, substs, .. }) => { | 30 | TyKind::Function(FnPointer { sig, substs, .. }) => { |