Skip to content

Separate AnonConst from ConstBlock in HIR. - #109609

Merged
bors merged 1 commit into
rust-lang:masterfrom
cjgillot:split-anon-const
Jun 3, 2023
Merged

Separate AnonConst from ConstBlock in HIR.#109609
bors merged 1 commit into
rust-lang:masterfrom
cjgillot:split-anon-const

Conversation

@cjgillot

Copy link
Copy Markdown
Contributor

Their behaviours are different enough to justify having separate nodes.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @lcnr

(rustbot has picked a reviewer for you, use r? to override)

@rustbotrustbot 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 Mar 25, 2023
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Comment threadcompiler/rustc_passes/src/dead.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we still need the above visit_anon_const if const blocks should be handled in visit_inline_const instead?

@cjgillotcjgillotApr 21, 2023

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes. You still want to mark three as live in:

matchS::<3>{S::<{three()}> => {}}

@BoxyUwU

Copy link
Copy Markdown
Member

r? @BoxyUwU

@rustbotrustbot assigned BoxyUwU and unassigned lcnrMar 30, 2023
@bors

bors commented Apr 21, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #96840) made this pull request unmergeable. Please resolve the merge conflicts.

@BoxyUwU

BoxyUwU commented Apr 27, 2023

Copy link
Copy Markdown
Member

What are the differing behaviours of anon consts and inline const that motivate this? Off the top of my head inline consts get typeck'd with their parent item and have weirder generics/typeof to allow for that wheras other anon consts get typeckd by themselves 🤔

@bors

bors commented May 9, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #111402) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino

Copy link
Copy Markdown
Contributor

switching to author to reply to previous comment and rebase - thanks :)

@rustbot author

@rustbotrustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2023
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

@cjgillot

Copy link
Copy Markdown
ContributorAuthor

What are the differing behaviours of anon consts and inline const that motivate this? Off the top of my head inline consts get typeck'd with their parent item and have weirder generics/typeof to allow for that wheras other anon consts get typeckd by themselves thinking

Yes, the difference in typeck root is the main reason to separate those cases IMO. Most of the cases where we end-up with code duplication are in side passes, with much less complexity than type collection.

@cjgillotcjgillot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 24, 2023

@BoxyUwUBoxyUwU left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sorry for taking so long to get to looking at this properly. r=me after rebasing

Comment threadcompiler/rustc_metadata/src/rmeta/encoder.rs Outdated
@BoxyUwUBoxyUwU added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 31, 2023
@BoxyUwU

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jun 2, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit ca4d0d4 has been approved by BoxyUwU

It is now in the queue for this repository.

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 2, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 2, 2023
…mpiler-errors
Rollup of 6 pull requests
Successful merges:
- rust-lang#109609 (Separate AnonConst from ConstBlock in HIR.)
- rust-lang#112166 (bootstrap: Rename profile = user to profile = dist)
- rust-lang#112168 (Lower `unchecked_div`/`_rem` to MIR's `BinOp::Div`/`Rem`)
- rust-lang#112183 (Normalize anon consts in new solver)
- rust-lang#112211 (pass `--lib` to `x doc`)
- rust-lang#112223 (Don't ICE in new solver when auto traits have associated types)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 6c9b7d6 into rust-lang:masterJun 3, 2023
@rustbotrustbot added this to the 1.72.0 milestone Jun 3, 2023
@cjgillot
cjgillot deleted the split-anon-const branch June 3, 2023 07:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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.

7 participants

@cjgillot@rustbot@BoxyUwU@bors@apiraino@compiler-errors@lcnr