diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-31267-additional.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-31267-additional.rs b/src/test/ui/issues/issue-31267-additional.rs new file mode 100644 index 000000000..7f0cbd658 --- /dev/null +++ b/src/test/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); +} |