remove unnecessary attribute from a diagnostic
This commit is contained in:
parent
74c4821045
commit
0a64dac604
@ -657,7 +657,6 @@ pub enum ImplNotMarkedDefault {
|
|||||||
#[note]
|
#[note]
|
||||||
Err {
|
Err {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
#[label]
|
|
||||||
span: Span,
|
span: Span,
|
||||||
cname: Symbol,
|
cname: Symbol,
|
||||||
ident: Symbol,
|
ident: Symbol,
|
||||||
|
11
tests/ui/specialization/issue-111232.rs
Normal file
11
tests/ui/specialization/issue-111232.rs
Normal 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() {}
|
11
tests/ui/specialization/issue-111232.stderr
Normal file
11
tests/ui/specialization/issue-111232.stderr
Normal 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`.
|
Loading…
Reference in New Issue
Block a user