-
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
small cleanups in rustc_errors / emitter #83427
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
if multilines.get(&depth).is_some() { | ||
multilines.remove(&depth); |
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.
I'll wait for CI to complete because I'm surprised that changing these two lines don't affect the output (I'm guessing it was dead code).
Otherwise, r=me.
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.
If depth
was Some(_)
, it would have gotten remove
d in the then branch, but remove
also returns the previous value, which should explain why there is no difference. Note that remove
returns None
if the value wasn't there previously.
@bors r+ rollup |
📌 Commit f180721 has been approved by |
small cleanups in rustc_errors / emitter This is either moving code around so it gets called less often or using if let instead of match in a few cases.
Rollup of 8 pull requests Successful merges: - rust-lang#83041 (stabilize debug_non_exhaustive) - rust-lang#83349 (Remove Option::{unwrap_none, expect_none}.) - rust-lang#83420 (Add documentation for rustdoc-gui tests) - rust-lang#83421 (Add Result::into_err where the Ok variant is the never type) - rust-lang#83427 (small cleanups in rustc_errors / emitter) - rust-lang#83434 (Update RELEASES.md) - rust-lang#83440 (Use intra-doc link in core::cell) - rust-lang#83442 (LLVMWrapper: attractive nuisance macros) Failed merges: - rust-lang#83438 (Update RELEASES.md) r? `@ghost` `@rustbot` modify labels: rollup
This is either moving code around so it gets called less often or using if let instead of match in a few cases.