summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-39161-bogus-error.rs
blob: a954385da41a4856eafc26e338db73da1618f1f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// check-pass

pub struct X {
    pub a: i32,
    pub b: i32,
}

fn main() {
    const DX: X = X { a: 0, b: 0 };
    const _X1: X = X { a: 1, ..DX };
    let _x2 = X { a: 1, b: 2, ..DX };
    const _X3: X = X { a: 1, b: 2, ..DX };
}