rust/tests/ui/structs-enums/struct-new-as-field-name.rs
2023-01-11 09:32:08 +00:00

11 lines
120 B
Rust

// run-pass
struct Foo {
new: isize,
}
pub fn main() {
let foo = Foo{ new: 3 };
assert_eq!(foo.new, 3);
}