]> git.lizzy.rs Git - rust.git/blob - tests/ui/zero-sized/zero-sized-tuple-struct.rs
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / zero-sized / zero-sized-tuple-struct.rs
1 // run-pass
2 #![allow(unused_braces)]
3 #![allow(unused_assignments)]
4
5 // Make sure that the constructor args are codegened for zero-sized tuple structs
6
7 struct Foo(());
8
9 fn main() {
10     let mut a = 1;
11     Foo({ a = 2 });
12     assert_eq!(a, 2);
13 }