Skip to content

Commit f3270ce

Browse files
mateusz834alexrp
authored andcommitted
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.
1 parent 5cb72fc commit f3270ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/std/zig/AstGen.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13361,16 +13361,16 @@ fn detectLocalShadowing(
1336113361
scope: *Scope,
1336213362
ident_name: Zir.NullTerminatedString,
1336313363
name_token: Ast.TokenIndex,
13364-
token_bytes: []const u8,
13364+
ident_name_raw: []const u8,
1336513365
id_cat: Scope.IdCat,
1336613366
) !void {
1336713367
const gpa = astgen.gpa;
13368-
if (token_bytes[0] != '@' and isPrimitive(token_bytes)) {
13368+
if (ident_name_raw[0] != '@' and isPrimitive(ident_name_raw)) {
1336913369
return astgen.failTokNotes(name_token, "name shadows primitive '{s}'", .{
13370-
token_bytes,
13370+
ident_name_raw,
1337113371
}, &[_]u32{
1337213372
try astgen.errNoteTok(name_token, "consider using @\"{s}\" to disambiguate", .{
13373-
token_bytes,
13373+
ident_name_raw,
1337413374
}),
1337513375
});
1337613376
}

0 commit comments

Comments
 (0)