Skip to content
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

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Mar 23, 2021

This is either moving code around so it gets called less often or using if let instead of match in a few cases.

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 23, 2021
Comment on lines -1473 to -1474
if multilines.get(&depth).is_some() {
multilines.remove(&depth);
Copy link
Contributor

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.

Copy link
Contributor Author

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 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.

@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 24, 2021

📌 Commit f180721 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2021
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
@bors bors merged commit 5ca3f0d into rust-lang:master Mar 25, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 25, 2021
@llogiq llogiq deleted the refactor-emitter branch March 25, 2021 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants