diff options
| author | Kivooeo <Kivooeo123@gmail.com> | 2025-07-24 17:15:36 +0500 | 
|---|---|---|
| committer | Kivooeo <Kivooeo123@gmail.com> | 2025-07-24 17:15:36 +0500 | 
| commit | d636a6590ce1429ff011e04bb0b4d393dc382226 (patch) | |
| tree | 61a0e867f983df1630c3a986097d75fdc7e37812 /tests/ui/statics/enum-with-static-str-variant.rs | |
| parent | 3c30dbbe31bfbf6029f4534170165ba573ff0fd1 (diff) | |
| download | rust-d636a6590ce1429ff011e04bb0b4d393dc382226.tar.gz rust-d636a6590ce1429ff011e04bb0b4d393dc382226.zip | |
moved 35 tests to organized locations
Diffstat (limited to 'tests/ui/statics/enum-with-static-str-variant.rs')
| -rw-r--r-- | tests/ui/statics/enum-with-static-str-variant.rs | 22 | 
1 files changed, 22 insertions, 0 deletions
| 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() {} | 
