We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed5e5df commit 059094fCopy full SHA for 059094f
src/test/compile-fail/E0493.rs src/test/ui/span/E0493.rs
@@ -14,7 +14,6 @@ struct Foo {
14
15
impl Drop for Foo {
16
fn drop(&mut self) {}
17
- //~^ NOTE destructor defined here
18
}
19
20
struct Bar {
@@ -26,8 +25,6 @@ impl Drop for Bar {
26
25
27
28
const F : Foo = Foo { a : 0 };
29
-//~^ ERROR constants are not allowed to have destructors [E0493]
30
-//~| NOTE constants cannot have destructors
31
32
fn main() {
33
src/test/ui/span/E0493.stderr
@@ -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