mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
14 lines
244 B
Rust
14 lines
244 B
Rust
//@ run-pass
|
|
#![allow(unused_braces)]
|
|
#![allow(unused_assignments)]
|
|
|
|
// Make sure that the constructor args are codegened for zero-sized tuple structs
|
|
|
|
struct Foo(());
|
|
|
|
fn main() {
|
|
let mut a = 1;
|
|
Foo({ a = 2 });
|
|
assert_eq!(a, 2);
|
|
}
|