-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Cleanup error handlers: round 5 #119538
Cleanup error handlers: round 5 #119538
Commits on Jan 3, 2024
-
Rename some
Diagnostic
setters.`Diagnostic` has 40 methods that return `&mut Self` and could be considered setters. Four of them have a `set_` prefix. This doesn't seem necessary for a type that implements the builder pattern. This commit removes the `set_` prefixes on those four methods.
Configuration menu - View commit details
-
Copy full SHA for 505c137 - Browse repository at this point
Copy the full SHA 505c137View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fe5d5d - Browse repository at this point
Copy the full SHA 5fe5d5dView commit details -
Remove forward for
downgrade_to_delayed_bug
.It's not used, and doesn't quite fit the general pattern. Also, `Diagnostic::downgrade_to_delayed_bug` doesn't need to return `&mut Self` for the same reason.
Configuration menu - View commit details
-
Copy full SHA for 096b844 - Browse repository at this point
Copy the full SHA 096b844View commit details -
- Move comments onto corresponding `Diagnostic` methods. - Make formatting more consistent.
Configuration menu - View commit details
-
Copy full SHA for caefa55 - Browse repository at this point
Copy the full SHA caefa55View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4a6239 - Browse repository at this point
Copy the full SHA b4a6239View commit details -
Remove unused
DiagnosticBuilder::struct_almost_fatal
.`create_almost_fatal` and `emit_almost_fatal` are always used instead.
Configuration menu - View commit details
-
Copy full SHA for 1e92223 - Browse repository at this point
Copy the full SHA 1e92223View commit details
Commits on Jan 4, 2024
-
Avoid some
rustc_errors::
qualifiers.These are misleading, because the mixture of `Level` and `rustc_errors::Level` makes it look like there are two different types involved.
Configuration menu - View commit details
-
Copy full SHA for 9560c58 - Browse repository at this point
Copy the full SHA 9560c58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d35981 - Browse repository at this point
Copy the full SHA 4d35981View commit details -
Inline and remove
StringReader::struct_fatal_span_char
.It has a single call site.
Configuration menu - View commit details
-
Copy full SHA for 8e6bca6 - Browse repository at this point
Copy the full SHA 8e6bca6View commit details -
Remove
is_lint
field fromLevel::Error
.Because it's redundant w.r.t. `Diagnostic::is_lint`, which is present for every diagnostic level. `struct_lint_level_impl` was the only place that set the `Error` field to `true`, and it's also the only place that calls `Diagnostic::is_lint()` to set the `is_lint` field.
Configuration menu - View commit details
-
Copy full SHA for 8388112 - Browse repository at this point
Copy the full SHA 8388112View commit details