Rename method to generic_parameters
This commit is contained in:
parent
f494d1199d
commit
af79491ae6
@ -3416,7 +3416,7 @@ pub fn type_and_const_arguments<'a>(
|
||||
}
|
||||
|
||||
/// Combines lifetime indicators, type and constant parameters into a single `Iterator`
|
||||
pub fn lifetime_type_const_paramaters<'a>(
|
||||
pub fn generic_parameters<'a>(
|
||||
&'a self,
|
||||
db: &'a dyn HirDatabase,
|
||||
) -> impl Iterator<Item = SmolStr> + 'a {
|
||||
|
@ -370,7 +370,7 @@ pub(crate) fn runnable_impl(
|
||||
let nav = def.try_to_nav(sema.db)?;
|
||||
let ty = def.self_ty(sema.db);
|
||||
let adt_name = ty.as_adt()?.name(sema.db);
|
||||
let mut ty_args = ty.lifetime_type_const_paramaters(sema.db).peekable();
|
||||
let mut ty_args = ty.generic_parameters(sema.db).peekable();
|
||||
let params = if ty_args.peek().is_some() {
|
||||
format!("<{}>", ty_args.format_with(",", |ty, cb| cb(&ty)))
|
||||
} else {
|
||||
@ -436,7 +436,7 @@ fn module_def_doctest(db: &RootDatabase, def: Definition) -> Option<Runnable> {
|
||||
let ty = imp.self_ty(db);
|
||||
if let Some(adt) = ty.as_adt() {
|
||||
let name = adt.name(db);
|
||||
let mut ty_args = ty.lifetime_type_const_paramaters(db).peekable();
|
||||
let mut ty_args = ty.generic_parameters(db).peekable();
|
||||
format_to!(path, "{}", name);
|
||||
if ty_args.peek().is_some() {
|
||||
format_to!(path, "<{}>", ty_args.format_with(",", |ty, cb| cb(&ty)));
|
||||
|
Loading…
Reference in New Issue
Block a user