Skip to content

Commit

Permalink
switch __field__ hack to <unnamed_field>
Browse files Browse the repository at this point in the history
avoids conflict with fields actually named `__field__`
  • Loading branch information
thestinger committed Sep 2, 2013
1 parent 331d2d6 commit 67a8ea5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libsyntax/parse/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ fn mk_fresh_ident_interner() -> @ident_interner {
"blk", // 26
"static", // 27
"__foreign_mod__", // 28
"__field__", // 29
"<unnamed_field>", // 29
"C", // 30
"Self", // 31

Expand Down
3 changes: 2 additions & 1 deletion src/test/debug-info/tuple-struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@


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

struct NoPadding16(u16, i16);
struct NoPadding32(i32, f32, u32);
Expand Down

5 comments on commit 67a8ea5

@bors
Copy link
Contributor

@bors bors commented on 67a8ea5 Sep 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 67a8ea5 Sep 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging thestinger/rust/repr = 67a8ea5 into auto

@bors
Copy link
Contributor

@bors bors commented on 67a8ea5 Sep 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thestinger/rust/repr = 67a8ea5 merged ok, testing candidate = 7ff102a

@bors
Copy link
Contributor

@bors bors commented on 67a8ea5 Sep 2, 2013

@bors
Copy link
Contributor

@bors bors commented on 67a8ea5 Sep 2, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 7ff102a

Please sign in to comment.