Rename some name variables as ident.

It bugs me when variables of type `Ident` are called `name`. It leads to
silly things like `name.name`. `Ident` variables should be called
`ident`, and `name` should be used for variables of type `Symbol`.

This commit improves things by by doing `s/name/ident/` on a bunch of
`Ident` variables. Not all of them, but a decent chunk.
This commit is contained in:
Nicholas Nethercote 2025-04-08 12:23:07 +10:00
parent d4f880f8ce
commit 1b3fc585cb
52 changed files with 238 additions and 229 deletions

View file

@ -1988,7 +1988,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
{
let closure: Vec<_> = self
.tcx
.fn_arg_names(fn_def_id)
.fn_arg_idents(fn_def_id)
.iter()
.enumerate()
.map(|(i, ident)| {
@ -5397,7 +5397,7 @@ fn point_at_assoc_type_restriction<G: EmissionGuarantee>(
);
}
if let Some(new) =
tcx.associated_items(data.impl_or_alias_def_id).find_by_name_and_kind(
tcx.associated_items(data.impl_or_alias_def_id).find_by_ident_and_kind(
tcx,
Ident::with_dummy_span(name),
ty::AssocKind::Type,