-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use &mut Diagnostic
instead of &mut DiagnosticBuilder
unless needed
#100351
Conversation
r? @fee1-dead (rust-highfive has picked a reviewer for you, use r? to override) |
5bbb278
to
a2b6744
Compare
err.delay_as_bug(); | ||
err.downgrade_to_delayed_bug(); |
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.
delay_as_bug
should emit the diagnostic. Is this a behavior change?
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.
There's an emit call already happening when this closure returns -- this closure really should just be mutating the diagnostic
@bors r+ Thanks |
Rollup of 11 pull requests Successful merges: - rust-lang#92744 (Check if enum from foreign crate has any non exhaustive variants when attempting a cast) - rust-lang#99110 (Determine match_has_guard from candidates instead of looking up thir table again) - rust-lang#100184 (Stabilize ptr_const_cast) - rust-lang#100192 ( Remove duplicated temporaries creating during box derefs elaboration) - rust-lang#100232 (Do not consider method call receiver as an argument in AST.) - rust-lang#100287 (linux: Use `pthread_setname_np` instead of `prctl`) - rust-lang#100351 (Use `&mut Diagnostic` instead of `&mut DiagnosticBuilder` unless needed) - rust-lang#100370 (Remove more Clean trait implementations) - rust-lang#100391 (Improve size assertions) - rust-lang#100398 (Improve `-Zhir-stats`) - rust-lang#100403 (Improve error messages when running rustdoc GUI tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This seems to be the established convention (02ff9e0) when
DiagnosticBuilder
was first added. I am guilty of introducing some of these.