E0184 Update error format #35275

- Fixes #35275
- Part of #35233

r? @jonathandturner
This commit is contained in:
Gavin Baker
2016-08-29 13:05:06 +10:00
parent 28c5edb9f6
commit 2967dcc4d7
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -348,9 +348,11 @@ fn check_implementations_of_copy(&self) {
.emit();
}
Err(CopyImplementationError::HasDestructor) => {
span_err!(tcx.sess, span, E0184,
struct_span_err!(tcx.sess, span, E0184,
"the trait `Copy` may not be implemented for this type; \
the type has a destructor");
the type has a destructor")
.span_label(span, &format!("Copy not allowed on types with destructors"))
.emit();
}
}
});
+2
View File
@@ -9,6 +9,8 @@
// except according to those terms.
#[derive(Copy)] //~ ERROR E0184
//~| NOTE Copy not allowed on types with destructors
//~| NOTE in this expansion of #[derive(Copy)]
struct Foo;
impl Drop for Foo {