-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add E0327, E0395 and E0396 error explanations #26542
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? @Manishearth |
(rust_highfive has picked a reviewer for you, use r? to override) |
Part of #24407. |
// error: raw pointers cannot be compared in statics! | ||
``` | ||
|
||
To fix this error, please not assign this value to a constant expression. |
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/please not/please do not/
Updated! |
// error: raw pointers cannot be compared in statics! | ||
``` | ||
|
||
To fix this error, please do not assign this value to a constant |
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 is not the fix.
Avoid recommending catchall fixes like this, since they're not applicable to all situations (but the language makes them sound like it)
Mention common causes and suggest fixes for those instead.
e724c5c
to
5bc4557
Compare
@Manishearth: Updated. Does the new message seem good to you ? |
cc @nagisa |
Looks OK at a glance. |
r+ ? |
@@ -1457,6 +1457,42 @@ impl Foo for Bar { | |||
``` | |||
"##, | |||
|
|||
E0327: r##" | |||
You cannot use a method instead of a constant expression as a pattern. Example |
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.
Technically, "You cannot use associated items other than constant items as patterns. This includes method items". (methods aren't the only associated items)
r=me post squash |
@Manishearth: Yes, sure. Thanks for your help! |
@Manishearth: Squashed ! |
@bors r+ rollup |
📌 Commit 7b4eb1a has been approved by |
No description provided.