diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-07-15 14:18:42 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-07-15 14:18:42 +0100 |
commit | 9783726c85e530df67ad952d4ed2dbf9f59da274 (patch) | |
tree | b20d4207d4005eb4d6843f0bc30c0f79cac70591 /gcc | |
parent | 089e62f33c328afea756ec4b92f5823584b08a3a (diff) | |
download | gcc-9783726c85e530df67ad952d4ed2dbf9f59da274.zip gcc-9783726c85e530df67ad952d4ed2dbf9f59da274.tar.gz gcc-9783726c85e530df67ad952d4ed2dbf9f59da274.tar.bz2 |
Add missing test case to close out unit-structs
Unit structs can be initilized in two ways this test case will cover
future updates to catch any regressions.
Fixes #155
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/compile/torture/unit_type5.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/torture/unit_type5.rs b/gcc/testsuite/rust/compile/torture/unit_type5.rs new file mode 100644 index 0000000..3c4323a --- /dev/null +++ b/gcc/testsuite/rust/compile/torture/unit_type5.rs @@ -0,0 +1,8 @@ +struct Foo; + +fn main() { + let a = Foo {}; + // { dg-warning "unused name" "" { target *-*-* } .-1 } + let b = Foo; + // { dg-warning "unused name" "" { target *-*-* } .-1 } +} |