summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-13214.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-13214.rs')
-rw-r--r--tests/ui/issues/issue-13214.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-13214.rs b/tests/ui/issues/issue-13214.rs
new file mode 100644
index 000000000..0cf8d0675
--- /dev/null
+++ b/tests/ui/issues/issue-13214.rs
@@ -0,0 +1,23 @@
+// build-pass
+#![allow(dead_code)]
+// defining static with struct that contains enum
+// with &'static str variant used to cause ICE
+
+// pretty-expanded FIXME #23616
+
+pub enum Foo {
+ Bar,
+ Baz(&'static str),
+}
+
+pub static TEST: Test = Test {
+ foo: Foo::Bar,
+ c: 'a'
+};
+
+pub struct Test {
+ foo: Foo,
+ c: char,
+}
+
+fn main() {}