diff options
Diffstat (limited to 'src/test/ui/consts/const-blocks/run-pass.rs')
-rw-r--r-- | src/test/ui/consts/const-blocks/run-pass.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/consts/const-blocks/run-pass.rs b/src/test/ui/consts/const-blocks/run-pass.rs new file mode 100644 index 000000000..e11f69bab --- /dev/null +++ b/src/test/ui/consts/const-blocks/run-pass.rs @@ -0,0 +1,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>]); +} |