From 7c0c713a102ee86ee32af115acba63a5c3b3a657 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 5 Apr 2021 03:50:10 +0200 Subject: Intern `GenericParams` Also share the same instance between `ItemTree` and `generic_params` query. --- crates/hir_ty/src/utils.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/hir_ty/src/utils.rs') diff --git a/crates/hir_ty/src/utils.rs b/crates/hir_ty/src/utils.rs index c85c328af..df0ea4368 100644 --- a/crates/hir_ty/src/utils.rs +++ b/crates/hir_ty/src/utils.rs @@ -9,6 +9,7 @@ use hir_def::{ generics::{ GenericParams, TypeParamData, TypeParamProvenance, WherePredicate, WherePredicateTypeTarget, }, + intern::Interned, path::Path, resolver::{HasResolver, TypeNs}, type_ref::TypeRef, @@ -158,7 +159,7 @@ pub(crate) fn generics(db: &dyn DefDatabase, def: GenericDefId) -> Generics { #[derive(Debug)] pub(crate) struct Generics { def: GenericDefId, - pub(crate) params: Arc, + pub(crate) params: Interned, parent_generics: Option>, } -- cgit v1.2.3