summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-blocks/run-pass.rs
blob: e11f69babf79876afa4a892d563cb9eb38d48a36 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-pass

#[derive(Debug, Eq, PartialEq)]
struct Bar;

fn main() {
    const FOO: Option<Bar> = None;
    const ARR: [Option<Bar>; 2] = [FOO; 2];

    assert_eq!(ARR, [None::<Bar>, None::<Bar>]);
}