summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/union_constant.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/union_constant.rs')
-rw-r--r--tests/ui/consts/union_constant.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/consts/union_constant.rs b/tests/ui/consts/union_constant.rs
new file mode 100644
index 000000000..508ff7e0a
--- /dev/null
+++ b/tests/ui/consts/union_constant.rs
@@ -0,0 +1,11 @@
+// build-pass (FIXME(62277): could be check-pass?)
+
+union Uninit {
+ _never_use: *const u8,
+ uninit: (),
+}
+
+const UNINIT: Uninit = Uninit { uninit: () };
+const UNINIT2: (Uninit,) = (Uninit { uninit: () }, );
+
+fn main() {}