E0184 Update error format #35275
- Fixes #35275 - Part of #35233 r? @jonathandturner
This commit is contained in:
parent
28c5edb9f6
commit
2967dcc4d7
2 changed files with 6 additions and 2 deletions
|
@ -348,9 +348,11 @@ impl<'a, 'gcx, 'tcx> CoherenceChecker<'a, 'gcx, 'tcx> {
|
|||
.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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue