Skip to content

interpret: fix mir::UnOp layout computation#157290

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:unop-layout
Jun 3, 2026
Merged

interpret: fix mir::UnOp layout computation#157290
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:unop-layout

Conversation

@RalfJung
Copy link
Copy Markdown
Member

@RalfJung RalfJung commented Jun 2, 2026

"The operand always has the same type as the result" was correct when I wrote the comment, but more UnOps have been added since, making this incorrect now. This hasn't caused issues yet because apparently the local variable layout cache means we hardly ever (never?) actually use the "known" layout.

r? @oli-obk

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 2, 2026

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to the CTFE machinery

cc @oli-obk, @lcnr

@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 Jun 2, 2026
Copy link
Copy Markdown
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

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

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Jun 3, 2026

📌 Commit 8dd7b1b has been approved by oli-obk

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot 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 Jun 3, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 3, 2026
interpret: fix mir::UnOp layout computation

"The operand always has the same type as the result" was correct when I wrote the comment, but more `UnOp`s have been added since, making this incorrect now. This hasn't caused issues yet because apparently the local variable layout cache means we hardly ever (never?) actually use the "known" layout.

r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Jun 3, 2026
Rollup of 12 pull requests

Successful merges:

 - #157085 (powerpc: warn against incorrect values for ABI-relevant target features)
 - #157170 (Use `impl` restrictions in `std`, `core`)
 - #157217 ([tiny] remove unecessary `.into()` calls)
 - #157262 (rustdoc: IXCRE: Preserve sizedness bounds on type params belonging to the parent item)
 - #157379 (Some more simple per-owner resolver changes)
 - #157381 (librustdoc: fix CSS border issue to support Firefox high contrast mode)
 - #155512 (interpreter: improve comments and error message in mir_assign_valid_types)
 - #157254 (Correct description of panic.rs)
 - #157290 (interpret: fix mir::UnOp layout computation)
 - #157332 (Rewrite target checking for `#[sanitize]`)
 - #157351 (Avoid leaking the query-job collection warning into the panic query stack)
 - #157389 (Add @clarfonthey to libs review rotation)
@rust-bors rust-bors Bot merged commit 80c5ad6 into rust-lang:main Jun 3, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 3, 2026
rust-timer added a commit that referenced this pull request Jun 3, 2026
Rollup merge of #157290 - RalfJung:unop-layout, r=oli-obk

interpret: fix mir::UnOp layout computation

"The operand always has the same type as the result" was correct when I wrote the comment, but more `UnOp`s have been added since, making this incorrect now. This hasn't caused issues yet because apparently the local variable layout cache means we hardly ever (never?) actually use the "known" layout.

r? @oli-obk
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants