1
Fork 0

Rename Generics::params to Generics::own_params

This commit is contained in:
Michael Goulet 2024-05-09 20:56:44 -04:00
parent 8c7c151a7a
commit 1c19b6ad60
54 changed files with 177 additions and 169 deletions

View file

@ -2507,7 +2507,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
let generics = self.tcx.generics_of(lifetime_scope);
let mut used_names =
iter::successors(Some(generics), |g| g.parent.map(|p| self.tcx.generics_of(p)))
.flat_map(|g| &g.params)
.flat_map(|g| &g.own_params)
.filter(|p| matches!(p.kind, ty::GenericParamDefKind::Lifetime))
.map(|p| p.name)
.collect::<Vec<_>>();

View file

@ -522,7 +522,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
infer_subdiags.push(SourceKindSubdiag::GenericLabel {
span,
is_type,
param_name: generics.params[argument_index].name.to_string(),
param_name: generics.own_params[argument_index].name.to_string(),
parent_exists,
parent_prefix,
parent_name,