mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 21:43:37 +00:00
Rename the method that returns struct paramaters
This commit is contained in:
parent
9957bb361d
commit
4ee2e469a2
2 changed files with 3 additions and 3 deletions
|
@ -3384,7 +3384,7 @@ impl Type {
|
|||
}
|
||||
|
||||
/// Combines lifetime indicators, type and constant parameters into a single `Iterator`
|
||||
pub fn lifetime_and_type_arguments<'a>(
|
||||
pub fn lifetime_type_const_paramaters<'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_and_type_arguments(sema.db).peekable();
|
||||
let mut ty_args = ty.lifetime_type_const_paramaters(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_and_type_arguments(db).peekable();
|
||||
let mut ty_args = ty.lifetime_type_const_paramaters(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 a new issue