Simplify Postorder customization. by nnethercote · Pull Request #137299 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits1 Checks6 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

nnethercote

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

@nnethercote

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

@rustbot

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added 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

Feb 20, 2025

@rustbot

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

compiler-errors

basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>,
visited: DenseBitSet,
visit_stack: Vec<(BasicBlock, Successors<'a>)>,
root_is_start_block: bool,
extra: C,
/// A non-empty `extra` allows for a precise calculation of the successors.
extra: Option<(TyCtxt<'tcx>, Instance<'tcx>)>,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preexisting: the variable name is a bit vague. would've been nice if it was called mono_-something.

@compiler-errors

r? compiler-errors @bors r+ rollup

@bors

📌 Commit cae9ebb has been approved by compiler-errors

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

Feb 20, 2025

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Feb 20, 2025

@workingjubilee

…tomization, r=compiler-errors

Simplify Postorder customization.

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 20, 2025

@bors

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Feb 20, 2025

@workingjubilee

…tomization, r=compiler-errors

Simplify Postorder customization.

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 20, 2025

@bors

Rollup of 12 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: test-various try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: i686-msvc-1 try-job: i686-msvc-2 try-job: i686-mingw-1 try-job: i686-mingw-2 try-job: i686-mingw-3 try-job: x86_64-gnu-nopt

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Feb 20, 2025

@workingjubilee

…tomization, r=compiler-errors

Simplify Postorder customization.

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 21, 2025

@bors

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

try-job: aarch64-gnu try-job: armhf-gnu try-job: i686-mingw-1 try-job: i686-mingw-2 try-job: i686-mingw-3 try-job: test-various try-job: x86_64-gnu-nopt try-job: x86_64-msvc-1 try-job: x86_64-msvc-2

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 21, 2025

@bors

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 21, 2025

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Feb 21, 2025

@rust-timer

Rollup merge of rust-lang#137299 - nnethercote:simplify-PostOrder-customization, r=compiler-errors

Simplify Postorder customization.

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

flip1995 pushed a commit to flip1995/rust that referenced this pull request

Feb 27, 2025

@matthiaskrgr

…tomization, r=compiler-errors

Simplify Postorder customization.

Postorder has a C: Customization<'tcx> parameter, that gives it flexibility about how it computes successors. But in practice, there are only two impls of Customization, and one is for the unit type.

This commit simplifies things by removing the generic parameter and replacing it with an Option.

r? @saethlin

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request

Mar 11, 2025

@bors

github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this pull request

Mar 11, 2025

@bors

Labels

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.