Moved test on E0493 from compile-fail to ui.

This commit is contained in:
Federico Ravasio 2016-09-02 19:55:14 +02:00
parent ed5e5df596
commit 059094f3f2
2 changed files with 11 additions and 3 deletions

View file

@ -14,7 +14,6 @@ struct Foo {
impl Drop for Foo {
fn drop(&mut self) {}
//~^ NOTE destructor defined here
}
struct Bar {
@ -26,8 +25,6 @@ impl Drop for Bar {
}
const F : Foo = Foo { a : 0 };
//~^ ERROR constants are not allowed to have destructors [E0493]
//~| NOTE constants cannot have destructors
fn main() {
}

View file

@ -0,0 +1,11 @@
error[E0493]: constants are not allowed to have destructors
--> $DIR/E0493.rs:27:17
|
16 | fn drop(&mut self) {}
| --------------------- destructor defined here
...
27 | const F : Foo = Foo { a : 0 };
| ^^^^^^^^^^^^^ constants cannot have destructors
error: aborting due to previous error