From d636a6590ce1429ff011e04bb0b4d393dc382226 Mon Sep 17 00:00:00 2001 From: Kivooeo Date: Thu, 24 Jul 2025 17:15:36 +0500 Subject: moved 35 tests to organized locations --- tests/ui/statics/enum-with-static-str-variant.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/ui/statics/enum-with-static-str-variant.rs (limited to 'tests/ui/statics/enum-with-static-str-variant.rs') diff --git a/tests/ui/statics/enum-with-static-str-variant.rs b/tests/ui/statics/enum-with-static-str-variant.rs new file mode 100644 index 00000000000..8140ec943a0 --- /dev/null +++ b/tests/ui/statics/enum-with-static-str-variant.rs @@ -0,0 +1,22 @@ +//@ build-pass +#![allow(dead_code)] +// defining static with struct that contains enum +// with &'static str variant used to cause ICE + + +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() {} -- cgit 1.4.1-3-g733a5