-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add E0417, E0424, E0425, E0426, E0430, E0431 and E0432 error explanations #27230
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
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
} | ||
``` | ||
|
||
Compiler needs to know the pattern value at compile's time, which is |
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 needs to know the value of the pattern at compile time,
``` | ||
|
||
The compiler needs to know the value of the pattern at compile time, | ||
which is not possible with a `static` variable. Please verify that 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.
nit: saying "is not possible" may be re-opening a can of worms by implicitly inviting back those who were arguing, back when we first split up the two forms, that the static
/ const
distinction was unnecessary.
I would prefer something like:
The compiler needs to know the value of the pattern at compile time; compile-time patterns can defined via
const
orenum
items. Please verify that the identifier is spelled correctly, and if so, use aconst
instead ofstatic
to define it.
Example:
...
} | ||
``` | ||
|
||
Please check if the method's argument list should have contained self, |
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.
self
, &self
or &mut self
.
@bors r+ |
📌 Commit fc65f55 has been approved by |
Part of #24407.
cc @Manishearth