mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
12 lines
202 B
Rust
12 lines
202 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>]);
|
|
}
|