mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Introduce hir::GenericParam
Unlike existing hir::GenericParams, this is a global ID.
This commit is contained in:
parent
ff609cc497
commit
c5a18c44e5
4 changed files with 19 additions and 9 deletions
|
@ -23,7 +23,7 @@ use crate::{
|
|||
adt::VariantDef,
|
||||
db::{AstDatabase, DefDatabase, HirDatabase},
|
||||
expr::{validation::ExprValidator, BindingAnnotation, Body, BodySourceMap, Pat, PatId},
|
||||
generics::HasGenericParams,
|
||||
generics::{GenericDef, HasGenericParams},
|
||||
ids::{
|
||||
AstItemDef, ConstId, EnumId, FunctionId, MacroDefId, StaticId, StructId, TraitId,
|
||||
TypeAliasId,
|
||||
|
@ -1121,3 +1121,9 @@ impl Local {
|
|||
src.map(|ast| ast.map(|it| it.cast().unwrap().to_node(&root), |it| it.to_node(&root)))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct GenericParam {
|
||||
pub(crate) parent: GenericDef,
|
||||
pub(crate) idx: u32,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue