about summary refs log tree commit diff
path: root/tests/ui/zero-sized/zero-sized-tuple-struct.rs
blob: 8eb56071033ec2cd8f89399a2959824c1bedacda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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);
}