diff options
author | Florian Diebold <[email protected]> | 2021-04-08 17:25:18 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-04-08 21:48:47 +0100 |
commit | be03db0e3a75533f34d48c3014d532919b30a9e9 (patch) | |
tree | 3742a817b8238043a3a855d92532c7342815210e /crates/hir_ty/src/infer/path.rs | |
parent | a169fa6a832a513cd1534d1a6566e4584ca5fb6a (diff) |
Intern Substitutions
(Costs a bit of performance, reduces memory usage on RA by ~10%.)
Diffstat (limited to 'crates/hir_ty/src/infer/path.rs')
-rw-r--r-- | crates/hir_ty/src/infer/path.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs index f8955aa32..495282eba 100644 --- a/crates/hir_ty/src/infer/path.rs +++ b/crates/hir_ty/src/infer/path.rs | |||
@@ -101,7 +101,7 @@ impl<'a> InferenceContext<'a> { | |||
101 | let substs = ctx.substs_from_path(path, typable, true); | 101 | let substs = ctx.substs_from_path(path, typable, true); |
102 | let ty = TyBuilder::value_ty(self.db, typable) | 102 | let ty = TyBuilder::value_ty(self.db, typable) |
103 | .use_parent_substs(&parent_substs) | 103 | .use_parent_substs(&parent_substs) |
104 | .fill(substs.interned()[parent_substs.len(&Interner)..].iter().cloned()) | 104 | .fill(substs.as_slice(&Interner)[parent_substs.len(&Interner)..].iter().cloned()) |
105 | .build(); | 105 | .build(); |
106 | Some(ty) | 106 | Some(ty) |
107 | } | 107 | } |