std.zig.AstGen: rename token_bytes parameter to ident_name_raw

This method is called on an identifier token, so let's rename the parameter to make this clear.
This is also how it's named on most of the caller's sides.
This commit is contained in:
Mateusz Poliwczak 2025-11-07 10:43:47 +01:00
parent b2895f356f
commit 1227e06f90

View file

@ -13257,16 +13257,16 @@ fn detectLocalShadowing(
scope: *Scope, scope: *Scope,
ident_name: Zir.NullTerminatedString, ident_name: Zir.NullTerminatedString,
name_token: Ast.TokenIndex, name_token: Ast.TokenIndex,
token_bytes: []const u8, ident_name_raw: []const u8,
id_cat: Scope.IdCat, id_cat: Scope.IdCat,
) !void { ) !void {
const gpa = astgen.gpa; const gpa = astgen.gpa;
if (token_bytes[0] != '@' and isPrimitive(token_bytes)) { if (ident_name_raw[0] != '@' and isPrimitive(ident_name_raw)) {
return astgen.failTokNotes(name_token, "name shadows primitive '{s}'", .{ return astgen.failTokNotes(name_token, "name shadows primitive '{s}'", .{
token_bytes, ident_name_raw,
}, &[_]u32{ }, &[_]u32{
try astgen.errNoteTok(name_token, "consider using @\"{s}\" to disambiguate", .{ try astgen.errNoteTok(name_token, "consider using @\"{s}\" to disambiguate", .{
token_bytes, ident_name_raw,
}), }),
}); });
} }