Skip to content

Commit 059094f

Browse files
committed
Moved test on E0493 from compile-fail to ui.
1 parent ed5e5df commit 059094f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/test/compile-fail/E0493.rs src/test/ui/span/E0493.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ struct Foo {
1414

1515
impl Drop for Foo {
1616
fn drop(&mut self) {}
17-
//~^ NOTE destructor defined here
1817
}
1918

2019
struct Bar {
@@ -26,8 +25,6 @@ impl Drop for Bar {
2625
}
2726

2827
const F : Foo = Foo { a : 0 };
29-
//~^ ERROR constants are not allowed to have destructors [E0493]
30-
//~| NOTE constants cannot have destructors
3128

3229
fn main() {
3330
}

src/test/ui/span/E0493.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0493]: constants are not allowed to have destructors
2+
--> $DIR/E0493.rs:27:17
3+
|
4+
16 | fn drop(&mut self) {}
5+
| --------------------- destructor defined here
6+
...
7+
27 | const F : Foo = Foo { a : 0 };
8+
| ^^^^^^^^^^^^^ constants cannot have destructors
9+
10+
error: aborting due to previous error
11+

0 commit comments

Comments
 (0)