diff options
Diffstat (limited to 'tests/ui/structs-enums/struct-new-as-field-name.rs')
-rw-r--r-- | tests/ui/structs-enums/struct-new-as-field-name.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/struct-new-as-field-name.rs b/tests/ui/structs-enums/struct-new-as-field-name.rs new file mode 100644 index 000000000..641fc3c58 --- /dev/null +++ b/tests/ui/structs-enums/struct-new-as-field-name.rs @@ -0,0 +1,10 @@ +// run-pass + +struct Foo { + new: isize, +} + +pub fn main() { + let foo = Foo{ new: 3 }; + assert_eq!(foo.new, 3); +} |