Skip to content

make trivial ABI check resilient against new repr - #161745

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:repr-exhaustive
Aug 25, 2026
Merged

make trivial ABI check resilient against new repr#161745
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:repr-exhaustive

Conversation

@RalfJung

Copy link
Copy Markdown
Member

There's currently no way to exhaustively match on "what basic repr is this", which is kind of fragile as it means a new repr will get whatever the else branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to assert! that we covered all the cases by adding an explicit way to check for repr(Rust).

@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

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 Aug 25, 2026
@rustbot

rustbot commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 75 candidates
  • Random selection from 16 candidates

@mati865 mati865 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.

Seems reasonable.

@bors r+

View changes since this review

@rust-bors

rust-bors Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8ff1a42 has been approved by mati865

It is now in the queue for this repository.

@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 Aug 25, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
make trivial ABI check resilient against new repr

There's currently no way to exhaustively match on "what basic `repr` is this", which is kind of fragile as it means a new repr will get whatever the `else` branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to `assert!` that we covered all the cases by adding an explicit way to check for `repr(Rust)`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
make trivial ABI check resilient against new repr

There's currently no way to exhaustively match on "what basic `repr` is this", which is kind of fragile as it means a new repr will get whatever the `else` branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to `assert!` that we covered all the cases by adding an explicit way to check for `repr(Rust)`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
make trivial ABI check resilient against new repr

There's currently no way to exhaustively match on "what basic `repr` is this", which is kind of fragile as it means a new repr will get whatever the `else` branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to `assert!` that we covered all the cases by adding an explicit way to check for `repr(Rust)`.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 25, 2026
make trivial ABI check resilient against new repr

There's currently no way to exhaustively match on "what basic `repr` is this", which is kind of fragile as it means a new repr will get whatever the `else` branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to `assert!` that we covered all the cases by adding an explicit way to check for `repr(Rust)`.
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #158874 (hir_ty_lowering: fix anon const type recovery)
 - #161443 (add internal DSL for testing binders)
 - #161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - #161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - #161729 (miri subtree update)
 - #161745 (make trivial ABI check resilient against new repr)
 - #160871 (Remove `#[rustc_reservation_impl]`)
 - #161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - #161522 (test `f16::mul_add` not double-rounding the result)
 - #161631 (Add two comments relating to new-solver performance)
 - #161724 (Add codegen test for static table search loop unrolling)
 - #161740 (do not compress debuginfo for Cygwin)
 - #161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
@rust-bors
rust-bors Bot merged commit 5110c24 into rust-lang:main Aug 25, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 25, 2026
Rollup merge of #161745 - RalfJung:repr-exhaustive, r=mati865

make trivial ABI check resilient against new repr

There's currently no way to exhaustively match on "what basic `repr` is this", which is kind of fragile as it means a new repr will get whatever the `else` branch happens to be everywhere. Changing this would be a major refactor, but let's at least make it possible to `assert!` that we covered all the cases by adding an explicit way to check for `repr(Rust)`.
@RalfJung
RalfJung deleted the repr-exhaustive branch August 25, 2026 20:03
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Aug 26, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158874 (hir_ty_lowering: fix anon const type recovery)
 - rust-lang/rust#161443 (add internal DSL for testing binders)
 - rust-lang/rust#161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - rust-lang/rust#161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - rust-lang/rust#161729 (miri subtree update)
 - rust-lang/rust#161745 (make trivial ABI check resilient against new repr)
 - rust-lang/rust#160871 (Remove `#[rustc_reservation_impl]`)
 - rust-lang/rust#161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - rust-lang/rust#161522 (test `f16::mul_add` not double-rounding the result)
 - rust-lang/rust#161631 (Add two comments relating to new-solver performance)
 - rust-lang/rust#161724 (Add codegen test for static table search loop unrolling)
 - rust-lang/rust#161740 (do not compress debuginfo for Cygwin)
 - rust-lang/rust#161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Aug 28, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#158874 (hir_ty_lowering: fix anon const type recovery)
 - rust-lang/rust#161443 (add internal DSL for testing binders)
 - rust-lang/rust#161617 (Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`)
 - rust-lang/rust#161726 (Fix debugger visualizer tuple child ordering w/ PDB debug info)
 - rust-lang/rust#161729 (miri subtree update)
 - rust-lang/rust#161745 (make trivial ABI check resilient against new repr)
 - rust-lang/rust#160871 (Remove `#[rustc_reservation_impl]`)
 - rust-lang/rust#161180 (Detect missing binding available: add a MaybeIncorrect suggestion)
 - rust-lang/rust#161522 (test `f16::mul_add` not double-rounding the result)
 - rust-lang/rust#161631 (Add two comments relating to new-solver performance)
 - rust-lang/rust#161724 (Add codegen test for static table search loop unrolling)
 - rust-lang/rust#161740 (do not compress debuginfo for Cygwin)
 - rust-lang/rust#161750 (vector ABI check: reword so it makes more sense for non-obviously-vector types)
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