Rollup merge of #139510 - nnethercote:name-to-ident, r=fee1-dead

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.

r? `@fee1-dead`
This commit is contained in:
Matthias Krüger 2025-04-10 17:27:14 +02:00 committed by GitHub
commit 79f357e63d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 241 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,