summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-31267-additional.rs
blob: 7f0cbd658f1177f05d2624082ae28dbe8bbf05c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass

#[derive(Clone, Copy, Debug)]
struct Bar;

const BAZ: Bar = Bar;

#[derive(Debug)]
struct Foo(#[allow(unused_tuple_struct_fields)] [Bar; 1]);

struct Biz;

impl Biz {
    const BAZ: Foo = Foo([BAZ; 1]);
}

fn main() {
    let foo = Biz::BAZ;
    println!("{:?}", foo);
}