rust/tests/ui/consts/const-blocks/run-pass.rs
2023-01-11 09:32:08 +00:00

12 lines
201 B
Rust

// 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>]);
}