Skip to content

DepGraph cleanups #110886

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 27, 2023
Merged

DepGraph cleanups #110886

merged 2 commits into from
Apr 27, 2023

Conversation

nnethercote
Copy link
Contributor

Currently it creates an `Option` and then does `map`/`unwrap_or` and
`map_or_else` on it, which is hard to read.

This commit simplifies things by moving more code into the two arms of
the if/else.
There are three very similar blocks in this function.
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 27, 2023
@nnethercote
Copy link
Contributor Author

@bors rollup

@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 27, 2023

📌 Commit 793b2ff has been approved by cjgillot

It is now in the queue for this repository.

@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 Apr 27, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 27, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#105745 (docs(std): clarify remove_dir_all errors)
 - rust-lang#106456 (Correct `std::prelude` comment)
 - rust-lang#106599 (Change memory ordering in System wrapper example)
 - rust-lang#110838 (More `Typefoldable`/`TypeVisitable` cleanups)
 - rust-lang#110851 (compiletest: emit assembly-output header in error)
 - rust-lang#110853 (compiletest: add bpf-linker assembly support)
 - rust-lang#110878 (Add `known-bug` tests for 4 unsound issues)
 - rust-lang#110886 (`DepGraph` cleanups)
 - rust-lang#110905 (Remove invalid value from scraped-examples.md)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 50ccd17 into rust-lang:master Apr 27, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 27, 2023
@nnethercote nnethercote deleted the dep-graph-cleanups branch April 28, 2023 06:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants