Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary attribute from a diagnostic #111239

Merged
merged 1 commit into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_hir_analysis/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ pub enum ImplNotMarkedDefault {
#[note]
Err {
#[primary_span]
#[label]
span: Span,
cname: Symbol,
ident: Symbol,
Expand Down
11 changes: 11 additions & 0 deletions tests/ui/specialization/issue-111232.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions tests/ui/specialization/issue-111232.stderr
Original file line number Diff line number Diff line change
@@ -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`.