mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
E0184 Update error format #35275
- Fixes #35275 - Part of #35233 r? @jonathandturner
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user