diff options
Diffstat (limited to 'tests/ui/span/E0493.rs')
-rw-r--r-- | tests/ui/span/E0493.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/span/E0493.rs b/tests/ui/span/E0493.rs new file mode 100644 index 000000000..625da25a7 --- /dev/null +++ b/tests/ui/span/E0493.rs @@ -0,0 +1,21 @@ +struct Foo { + a: u32 +} + +impl Drop for Foo { + fn drop(&mut self) {} +} + +struct Bar { + a: u32 +} + +impl Drop for Bar { + fn drop(&mut self) {} +} + +const F : Foo = (Foo { a : 0 }, Foo { a : 1 }).1; +//~^ ERROR destructor of + +fn main() { +} |