mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Intern GenericParams
Also share the same instance between `ItemTree` and `generic_params` query.
This commit is contained in:
parent
adcf18e27d
commit
7c0c713a10
9 changed files with 47 additions and 82 deletions
|
@ -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<GenericParams>,
|
||||
pub(crate) params: Interned<GenericParams>,
|
||||
parent_generics: Option<Box<Generics>>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue