Simplify rustc_mir_dataflow::abs_domain. by nnethercote · Pull Request #134152 · 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

Conversation2 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

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

@nnethercote

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

@compiler-errors

r? compiler-errors @bors r+ rollup

@bors

📌 Commit 67df7cb 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

Dec 11, 2024

jieyouxu added a commit to jieyouxu/rust that referenced this pull request

Dec 12, 2024

@jieyouxu

…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

@bors

Rollup of 13 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

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

Dec 12, 2024

@bors

…iaskrgr

Rollup of 11 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

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

Dec 12, 2024

@rust-timer

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

@nnethercote nnethercote deleted the simplify-rustc_mir_dataflow-abs_domain branch

December 12, 2024 22:37

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.