File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ struct Foo {
1414
1515impl Drop for Foo {
1616 fn drop ( & mut self ) { }
17- //~^ NOTE destructor defined here
1817}
1918
2019struct Bar {
@@ -26,8 +25,6 @@ impl Drop for Bar {
2625}
2726
2827const F : Foo = Foo { a : 0 } ;
29- //~^ ERROR constants are not allowed to have destructors [E0493]
30- //~| NOTE constants cannot have destructors
3128
3229fn main ( ) {
3330}
Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments