diff options
Diffstat (limited to 'tests/ui/issues/issue-31267-additional.rs')
-rw-r--r-- | tests/ui/issues/issue-31267-additional.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-31267-additional.rs b/tests/ui/issues/issue-31267-additional.rs new file mode 100644 index 000000000..7f0cbd658 --- /dev/null +++ b/tests/ui/issues/issue-31267-additional.rs @@ -0,0 +1,20 @@ +// run-pass + +#[derive(Clone, Copy, Debug)] +struct Bar; + +const BAZ: Bar = Bar; + +#[derive(Debug)] +struct Foo(#[allow(unused_tuple_struct_fields)] [Bar; 1]); + +struct Biz; + +impl Biz { + const BAZ: Foo = Foo([BAZ; 1]); +} + +fn main() { + let foo = Biz::BAZ; + println!("{:?}", foo); +} |