Rollup merge of #111239 - TaKO8Ki:fix-111232, r=compiler-errors

Remove unnecessary attribute from a diagnostic

Fixes #111232

ref: 06ff310cf9
This commit is contained in:
Yuki Okushi 2023-05-06 09:09:33 +09:00 committed by GitHub
commit bc4a1198fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View File

@ -657,7 +657,6 @@ pub enum ImplNotMarkedDefault {
#[note]
Err {
#[primary_span]
#[label]
span: Span,
cname: Symbol,
ident: Symbol,

View File

@ -0,0 +1,11 @@
#![feature(min_specialization)]
struct S;
impl From<S> for S {
fn from(s: S) -> S { //~ ERROR `from` specializes an item from a parent `impl`, but that item is not marked `default`
s
}
}
fn main() {}

View File

@ -0,0 +1,11 @@
error[E0520]: `from` specializes an item from a parent `impl`, but that item is not marked `default`
--> $DIR/issue-111232.rs:6:5
|
LL | fn from(s: S) -> S {
| ^^^^^^^^^^^^^^^^^^
|
= note: parent implementation is in crate `core`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0520`.