-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add help notes (and improve some error explanations too) #28231
Conversation
msg.description()); | ||
span_help!(self.tcx.sess, msg.span, | ||
"Dividing by 0 always leads to an error and is \ | ||
certainly not what you want"); |
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.
"certainly not what you want" doesn't sound like a nice way to phrase it. In this case, there's no single suggestion for fixing that stands out, so we shouldn't be adding this help in the first place (that's what the long diagnostics are for)
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.
In this case, I found it useful because there is no case you might want to divide by 0. So instead of removing it, do you have a better sentence maybe ?
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.
But that's the point. In this case from the error itself that one should somehow fix it. This line doesn't really suggest anything and restates the obvious.
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.
Okay, I remove this one then.
r+ after you remove the first span_help |
af47cc4
to
771ab35
Compare
@Manishearth: Done ! |
@bors r+ rollup |
📌 Commit 771ab35 has been approved by |
r? @Manishearth