-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add E0323, E0324, E0325, E0369 and E0390 errors explanation #27586
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
Conversation
I don't think either of the suggestions are correct |
Me neither. I just opened it, I'll see tomorrow for the explanation. |
fn undefined<T>() -> T { unreachable!() }
fn main() {
match undefined() {
&ref x => {}
}
} No, actually this yields |
@arielb1: nice try however ! It reminds me that I still have to update the error explanation... |
☔ The latest upstream changes (presumably #27688) made this pull request unmergeable. Please resolve the merge conflicts. |
feef0b8
to
dadcfe6
Compare
dadcfe6
to
768111f
Compare
I need a review here (mostly on E0103 and E0390). |
@@ -1278,6 +1278,15 @@ fn main() { | |||
``` | |||
"##, | |||
|
|||
E0103: r##" | |||
You hit this error because the compiler the compiler lacks information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the compiler the compiler" :)
``` | ||
|
||
To fix this error, please verify you didn't misspell the associated type name | ||
and that your trait item implementation corresponds to the trait definition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please verify that the associated type name wasn't misspelled and your implementation corresponds to the trait definition.
@@ -2617,6 +2774,28 @@ For more information see the [opt-in builtin traits RFC](https://github.com/rust | |||
-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md). | |||
"##, | |||
|
|||
E0390: r##" | |||
You tried to implement methods for a mutable raw pointer (*mut T). Erroneous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is actually for implementing on any primitive, sorry.
In this case, using a trait to impl a method is the better suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"only a single inherent implementation marked with `#[lang = \"{}\"]` \ |
1f1e0ed
to
a37af48
Compare
@bors r+ rollup r=eddyb for my commit |
📌 Commit 0642d99 has been approved by |
Part of #24407. This PR doesn't have code example since I didn't find how to raise it. If someone finds a code which does, please say it ! cc @pnkfelix cc @eddyb r? @Manishearth
Part of #24407.
This PR doesn't have code example since I didn't find how to raise it. If someone finds a code which does, please say it !
cc @pnkfelix
cc @eddyb
r? @Manishearth