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