-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add E0102, E0412, E0413, E0415, E0416, E0419, E0423 and E0435 error explanation #27378
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'm not sure at all this is enough to fully explain this error. Waiting for opinions. |
// unit-like struct in scope | ||
``` | ||
|
||
To fix this error, you have to change the declaration's name or the |
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.
you have to change the name of the declaration of shadowed object
Leave out 424, the original error is wrong (it applies to both structs and struct variants, in positions other than function positions) |
|
||
|
||
To fix this error, you have to change the name of the declaration of | ||
shadowed object. Please also verify that neither name was misspelled. |
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.
s/shadowed object/the shadowed object/
Since #27491 has been merged. We can move forward on this PR. |
@@ -1118,6 +1118,36 @@ fn main() { | |||
``` | |||
"##, | |||
|
|||
E0102: 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 is duplicated
"##, | ||
|
||
E0423: r##" | ||
A `struct` variant name was used like a function name. Example of |
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.
struct
“variant”? Interestingly it was called so by yourself in c5f7c19. Stable and beta emit a better error message in this case.
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.
So should I change it or not ?
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.
I’m fine with merging this as it is currently and changing the explanation in the PR which updates the error message.
@@ -397,6 +397,102 @@ impl Bar { | |||
``` | |||
"##, | |||
|
|||
E0412: r##" | |||
An undeclared type name was used. Example of erroneous codes: |
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.
May want to say something about generics, e.g. fn foo(x: T) {}
needing to be fn foo<T>(x: T) {}
.
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.
Done !
@bors r+ |
📌 Commit c3d147e has been approved by |
💔 Test failed - auto-linux-32-opt |
@bors retry |
⚡ Previous build results for auto-win-msvc-32-opt, auto-win-msvc-64-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt... |
Part of #24407.
r? @Manishearth