-
Notifications
You must be signed in to change notification settings - Fork 13k
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 rustc_mir_dataflow::abs_domain
.
#134152
Merged
bors
merged 1 commit into
rust-lang:master
from
nnethercote:simplify-rustc_mir_dataflow-abs_domain
Dec 12, 2024
Merged
Simplify rustc_mir_dataflow::abs_domain
.
#134152
bors
merged 1 commit into
rust-lang:master
from
nnethercote:simplify-rustc_mir_dataflow-abs_domain
Dec 12, 2024
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
`rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`. But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait.
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
Dec 10, 2024
compiler-errors
approved these changes
Dec 11, 2024
r? compiler-errors @bors r+ rollup |
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
Dec 11, 2024
jieyouxu
added a commit
to jieyouxu/rust
that referenced
this pull request
Dec 12, 2024
…aflow-abs_domain, r=compiler-errors Simplify `rustc_mir_dataflow::abs_domain`. `rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`. But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait. r? `@pnkfelix`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2024
Rollup of 13 pull requests Successful merges: - rust-lang#122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets) - rust-lang#133122 (Add unpolished, experimental support for AFIDT (async fn in dyn trait)) - rust-lang#133859 (Move some alloc tests to the alloctests crate) - rust-lang#134070 (Some asm! diagnostic adjustments and a papercut fix) - rust-lang#134095 ([CI] Use a lockfile for installing the `datadog` package) - rust-lang#134144 (Properly consider APITs for never type fallback ascription fix) - rust-lang#134152 (Simplify `rustc_mir_dataflow::abs_domain`.) - rust-lang#134154 (suppress field expr with generics error message if it's a method) - rust-lang#134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd) - rust-lang#134173 (allow `symbol_intern_string_literal` lint in test modules) - rust-lang#134178 (Stabilize the Rust 2024 prelude) - rust-lang#134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.) - rust-lang#134187 (Remove `PErr`.) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2024
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#122003 (link libunwind dynamically and allow controlling it via `crt-static` on gnullvm targets) - rust-lang#133859 (Move some alloc tests to the alloctests crate) - rust-lang#134070 (Some asm! diagnostic adjustments and a papercut fix) - rust-lang#134144 (Properly consider APITs for never type fallback ascription fix) - rust-lang#134152 (Simplify `rustc_mir_dataflow::abs_domain`.) - rust-lang#134154 (suppress field expr with generics error message if it's a method) - rust-lang#134155 (Forbid `unsafe_op_in_unsafe_fn` for Hurd) - rust-lang#134173 (allow `symbol_intern_string_literal` lint in test modules) - rust-lang#134178 (Stabilize the Rust 2024 prelude) - rust-lang#134179 (Remove outdated consteval note from `<*mut T>::align_offset` docs.) - rust-lang#134187 (Remove `PErr`.) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 12, 2024
Rollup merge of rust-lang#134152 - nnethercote:simplify-rustc_mir_dataflow-abs_domain, r=compiler-errors Simplify `rustc_mir_dataflow::abs_domain`. `rustc_mir_dataflow` has a typedef `AbstractElem` that is equal to `ProjectionElem<AbstractOperand, AbstractType>`. `AbstractOperand` and `AbstractType` are both unit types. There is also has a trait `Lift` to convert a `PlaceElem` to an `AbstractElem`. But `rustc_mir_middle` already has a typedef `ProjectionKind` that is equal to `ProjectionElem<(), ()>`, which is equivalent to `AbstractElem`. So this commit reuses `ProjectionKind` in `rustc_mir_dataflow`, removes `AbstractElem`, and simplifies the `Lift` trait. r? ``@pnkfelix``
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.
rustc_mir_dataflow
has a typedefAbstractElem
that is equal toProjectionElem<AbstractOperand, AbstractType>
.AbstractOperand
andAbstractType
are both unit types. There is also has a traitLift
to convert aPlaceElem
to anAbstractElem
.But
rustc_mir_middle
already has a typedefProjectionKind
that is equal toProjectionElem<(), ()>
, which is equivalent toAbstractElem
. So this commit reusesProjectionKind
inrustc_mir_dataflow
, removesAbstractElem
, and simplifies theLift
trait.r? @pnkfelix