Skip to content

Commit 67a8ea5

Browse files
committed
switch __field__ hack to <unnamed_field>
avoids conflict with fields actually named `__field__`
1 parent 331d2d6 commit 67a8ea5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/libsyntax/parse/token.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ fn mk_fresh_ident_interner() -> @ident_interner {
436436
"blk", // 26
437437
"static", // 27
438438
"__foreign_mod__", // 28
439-
"__field__", // 29
439+
"<unnamed_field>", // 29
440440
"C", // 30
441441
"Self", // 31
442442

src/test/debug-info/tuple-struct.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434

3535

3636
// This test case mainly makes sure that no field names are generated for tuple structs (as opposed
37-
// to all fields having the name "__field__"). Otherwise they are handled the same a normal structs.
37+
// to all fields having the name "<unnamed_field>"). Otherwise they are handled the same a normal
38+
// structs.
3839

3940
struct NoPadding16(u16, i16);
4041
struct NoPadding32(i32, f32, u32);

0 commit comments

Comments
 (0)