internal: fix naming polarity

Type Constructors have *parameters*, when they are substituted with type
*arguments*, we have a type.
This commit is contained in:
Aleksey Kladov 2021-04-30 11:55:59 +03:00
parent cb3ef552e8
commit 1a01a5ae19
4 changed files with 6 additions and 6 deletions

View file

@ -304,11 +304,11 @@ fn module_def_doctest(sema: &Semantics<RootDatabase>, def: hir::ModuleDef) -> Op
let name = adt.name(sema.db);
let idx = path.rfind(':').map_or(0, |idx| idx + 1);
let (prefix, suffix) = path.split_at(idx);
let mut ty_params = ty.type_parameters().peekable();
let params = if ty_params.peek().is_some() {
let mut ty_args = ty.type_arguments().peekable();
let params = if ty_args.peek().is_some() {
format!(
"<{}>",
ty_params.format_with(", ", |ty, cb| cb(&ty.display(sema.db)))
ty_args.format_with(", ", |ty, cb| cb(&ty.display(sema.db)))
)
} else {
String::new()