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 {
14
14
15
15
impl Drop for Foo {
16
16
fn drop ( & mut self ) { }
17
- //~^ NOTE destructor defined here
18
17
}
19
18
20
19
struct Bar {
@@ -26,8 +25,6 @@ impl Drop for Bar {
26
25
}
27
26
28
27
const F : Foo = Foo { a : 0 } ;
29
- //~^ ERROR constants are not allowed to have destructors [E0493]
30
- //~| NOTE constants cannot have destructors
31
28
32
29
fn main ( ) {
33
30
}
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