small cleanups in rustc_errors / emitter#83427
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 25, 2021
Merged
Conversation
Contributor
|
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
estebank
reviewed
Mar 23, 2021
Comment on lines
-1473
to
-1474
| if multilines.get(&depth).is_some() { | ||
| multilines.remove(&depth); |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
If depth was Some(_), it would have gotten removed 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.
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit f180721 has been approved by |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Mar 24, 2021
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.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 25, 2021
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is either moving code around so it gets called less often or using if let instead of match in a few cases.