mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Generics -> GenericParams
This commit is contained in:
parent
9e4b5ecec4
commit
969f588025
7 changed files with 41 additions and 41 deletions
|
@ -18,14 +18,14 @@ pub struct GenericParam {
|
|||
|
||||
/// Data about the generic parameters of a function, struct, impl, etc.
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Default)]
|
||||
pub struct Generics {
|
||||
pub struct GenericParams {
|
||||
pub(crate) params: Vec<GenericParam>,
|
||||
}
|
||||
|
||||
impl Generics {
|
||||
pub(crate) fn generics_query(db: &impl HirDatabase, def_id: DefId) -> Arc<Generics> {
|
||||
impl GenericParams {
|
||||
pub(crate) fn generic_params_query(db: &impl HirDatabase, def_id: DefId) -> Arc<GenericParams> {
|
||||
let (_file_id, node) = def_id.source(db);
|
||||
let mut generics = Generics::default();
|
||||
let mut generics = GenericParams::default();
|
||||
if let Some(type_param_list) = node.children().find_map(TypeParamList::cast) {
|
||||
for (idx, type_param) in type_param_list.type_params().enumerate() {
|
||||
let name = type_param
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue