Moved test on E0493 from compile-fail to ui.
This commit is contained in:
parent
ed5e5df596
commit
059094f3f2
2 changed files with 11 additions and 3 deletions
|
|
@ -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() {
|
||||
}
|
||||
11
src/test/ui/span/E0493.stderr
Normal file
11
src/test/ui/span/E0493.stderr
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue