From 24e876b52ed76710593895bc37bb8ed303075193 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 5 Apr 2021 02:03:37 +0200 Subject: Intern more `TypeRef`s in generics Saves ~3 MB --- crates/hir_def/src/path/lower.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_def/src/path/lower.rs') diff --git a/crates/hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs index 28f6244da..7b29d9d4f 100644 --- a/crates/hir_def/src/path/lower.rs +++ b/crates/hir_def/src/path/lower.rs @@ -69,7 +69,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option match trait_ref { // ::foo None => { - type_anchor = Some(Box::new(self_type)); + type_anchor = Some(Interned::new(self_type)); kind = PathKind::Plain; } // >::Foo desugars to Trait::Foo -- cgit v1.2.3