diff --git a/src/test/compile-fail/E0493.rs b/src/test/ui/span/E0493.rs similarity index 81% rename from src/test/compile-fail/E0493.rs rename to src/test/ui/span/E0493.rs index e06da5ca7c55..ea4526b70f6a 100644 --- a/src/test/compile-fail/E0493.rs +++ b/src/test/ui/span/E0493.rs @@ -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() { } diff --git a/src/test/ui/span/E0493.stderr b/src/test/ui/span/E0493.stderr new file mode 100644 index 000000000000..afcc9a240eb4 --- /dev/null +++ b/src/test/ui/span/E0493.stderr @@ -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 +