Update E0205 to the new error format
This commit is contained in:
parent
42903d9a8f
commit
0b248f1d29
@ -318,11 +318,13 @@ fn check_implementations_of_copy(&self) {
|
||||
name)
|
||||
}
|
||||
Err(CopyImplementationError::InfrigingVariant(name)) => {
|
||||
span_err!(tcx.sess, span, E0205,
|
||||
struct_span_err!(tcx.sess, span, E0205,
|
||||
"the trait `Copy` may not be \
|
||||
implemented for this type; variant \
|
||||
implemented for this type")
|
||||
.span_label(span, &format!("variant \
|
||||
`{}` does not implement `Copy`",
|
||||
name)
|
||||
name))
|
||||
.emit()
|
||||
}
|
||||
Err(CopyImplementationError::NotAnAdt) => {
|
||||
span_err!(tcx.sess, span, E0206,
|
||||
|
@ -13,9 +13,14 @@ enum Foo {
|
||||
Baz,
|
||||
}
|
||||
|
||||
impl Copy for Foo { } //~ ERROR E0205
|
||||
impl Copy for Foo { }
|
||||
//~^ ERROR E0205
|
||||
//~| NOTE variant `Bar` does not implement `Copy`
|
||||
|
||||
#[derive(Copy)] //~ ERROR E0205
|
||||
#[derive(Copy)]
|
||||
//~^ ERROR E0205
|
||||
//~| NOTE variant `Bar` does not implement `Copy`
|
||||
//~| NOTE in this expansion of #[derive(Copy)]
|
||||
enum Foo2<'a> {
|
||||
Bar(&'a mut bool),
|
||||
Baz,
|
||||
|
Loading…
Reference in New Issue
Block a user