-
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
Validate the formatting of extended errors. #24458
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -20,6 +20,9 @@ use parse::token; | |||
use ptr::P; | |||
use util::small_vector::SmallVector; | |||
|
|||
// Maximum width of any line in an extended error description (inclusive). | |||
static MAX_DESCRIPTION_WIDTH: usize = 80; |
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 probably makes more sense as a const
(we care about the value itself, not the memory location).
@huonw: Fixed. |
@bors r+ |
📌 Commit c17e78c has been approved by |
☔ The latest upstream changes (presumably #24512) made this pull request unmergeable. Please resolve the merge conflicts. |
I've updated the diagnostic registration plugin so that it validates error descriptions. An error description is only valid if it starts and ends with a newline, and contains no more than 80 characters per line. The plugin forced me to fix E0005 and E0006 which had escaped manual attention! I've also added errors for E0267, E0268, E0296, whilst updating E0303 as per discussion in rust-lang#24143. cc rust-lang#24407
@Manishearth: I was fixing this up with a rebase but it seems you have it covered? For the next batch of errors I could do one PR with everyone's commits? |
Sure; that would be nice. |
Closing in favor of the merged version at #24542 |
I did a manual merge of all the extended error PRs as we were getting merge conflicts yesterday. I think this is preferable to merging separately as I ended up having to manually merge @nham and @GuillaumeGomez's commits. Rollup of rust-lang#24458, rust-lang#24482 and rust-lang#24488. rust-lang#24482 and rust-lang#24488 were already re-approved, and would need to be cancelled if this is merged instead.
I've updated the diagnostic registration plugin so that it validates error descriptions. An error description is only valid if it starts and ends with a newline, and contains no more than 80 characters per line.
The plugin forced me to fix E0005 and E0006 which had escaped manual attention!
I've also added errors for E0267, E0268, E0296, whilst updating E0303 as per discussion in #24143.
cc #24407