-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Simplify Postorder
customization.
#137299
Merged
bors
merged 1 commit into
rust-lang:master
from
nnethercote:simplify-PostOrder-customization
Feb 21, 2025
Merged
Simplify Postorder
customization.
#137299
bors
merged 1 commit into
rust-lang:master
from
nnethercote:simplify-PostOrder-customization
Feb 21, 2025
Conversation
This file contains 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
`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`.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
compiler-errors
approved these changes
Feb 20, 2025
basic_blocks: &'a IndexSlice<BasicBlock, BasicBlockData<'tcx>>, | ||
visited: DenseBitSet<BasicBlock>, | ||
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>)>, |
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.
preexisting: the variable name is a bit vague. would've been nice if it was called mono_
-something.
r? compiler-errors @bors r+ rollup |
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Feb 20, 2025
…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
…kingjubilee Rollup of 14 pull requests Successful merges: - rust-lang#131651 (Create a generic AVR target: avr-none) - rust-lang#136473 (infer linker flavor by linker name if it's sufficiently specific) - rust-lang#136608 (Pass through of target features to llvm-bitcode-linker and handling them) - rust-lang#136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited)) - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137270 (Fix `*-win7-windows-msvc` target since 26eeac1) - rust-lang#137298 (Check signature WF when lowering MIR body) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137312 (Update references to cc_detect.rs) - rust-lang#137313 (Some codegen_llvm cleanups) - rust-lang#137318 (Workaround Cranelift not yet properly supporting vectors smaller than 128bit) - rust-lang#137322 (Update docs for default features of wasm targets) - rust-lang#137324 (Make x86 QNX target name consistent with other Rust targets) r? `@ghost` `@rustbot` modify labels: rollup
workingjubilee
added a commit
to workingjubilee/rustc
that referenced
this pull request
Feb 20, 2025
…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
Rollup of 12 pull requests Successful merges: - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint) - rust-lang#135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB) - rust-lang#135630 (add more `s390x` target features) - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode) - rust-lang#136148 (Optionally add type names to `TypeId`s.) - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck) - rust-lang#137305 (Tweaks in and around `rustc_middle`) - rust-lang#137313 (Some codegen_llvm cleanups) - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux)) 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
…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
Rollup of 10 pull requests Successful merges: - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint) - rust-lang#135630 (add more `s390x` target features) - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode) - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck) - rust-lang#137305 (Tweaks in and around `rustc_middle`) - rust-lang#137313 (Some codegen_llvm cleanups) - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux)) 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
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint) - rust-lang#135630 (add more `s390x` target features) - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode) - rust-lang#137192 (Remove obsolete Windows ThinLTO+TLS workaround) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck) - rust-lang#137305 (Tweaks in and around `rustc_middle`) - rust-lang#137313 (Some codegen_llvm cleanups) - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux)) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 21, 2025
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128080 (Specify scope in `out_of_scope_macro_calls` lint) - rust-lang#135630 (add more `s390x` target features) - rust-lang#136089 (Reduce `Box::default` stack copies in debug mode) - rust-lang#137204 (Clarify MIR dialects and phases) - rust-lang#137299 (Simplify `Postorder` customization.) - rust-lang#137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck) - rust-lang#137305 (Tweaks in and around `rustc_middle`) - rust-lang#137313 (Some codegen_llvm cleanups) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 21, 2025
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````
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Postorder
has aC: Customization<'tcx>
parameter, that gives it flexibility about how it computes successors. But in practice, there are only twoimpls
ofCustomization
, and one is for the unit type.This commit simplifies things by removing the generic parameter and replacing it with an
Option
.r? @saethlin