Skip to content

miri: implement more restrictive trivial-ABI checks - #160658

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:trivial-abi
Aug 8, 2026
Merged

miri: implement more restrictive trivial-ABI checks#160658
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:trivial-abi

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 6, 2026

Copy link
Copy Markdown
Member

This implements the rules from #157973 in Miri. We unfortunately have to reject some code that we thought was okay. Let's land this in Miri ahead of anything official also to see if there's any major breakage from that.

r? @oli-obk

  • I did not use an LLM to create a change in this PR.
  • I used an LLM to create a change in this PR, and I have explained below how it was used.

@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @oli-obk, @lcnr

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

@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 6, 2026
@RalfJung
RalfJung force-pushed the trivial-abi branch 2 times, most recently from b9f4523 to 2c388de Compare August 6, 2026 21:35

@oli-obk oli-obk left a comment

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.

@rust-bors

rust-bors Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 2c388de has been approved by oli-obk

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 7, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 7, 2026
miri: implement more restrictive trivial-ABI checks

This implements the rules from rust-lang#157973 in Miri. We unfortunately have to reject some code that we thought was okay. Let's land this in Miri ahead of anything official also to see if there's any major breakage from that.

r? @oli-obk
@JonathanBrouwer

Copy link
Copy Markdown
Contributor

💔 I suspect this PR failed tests as part of a rollup
@bors r-

After fixing the problem, consider running a try job for the failed job before re-approving.

Link to failure: #160721 (comment)

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 7, 2026
@rust-bors

rust-bors Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved.

This PR was contained in a rollup (#160721), which was unapproved.

View changes since this unapproval

@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

How did that not show up in CI in this PR...? Strange.

@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@bors r=oli-obk

@rust-bors

rust-bors Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 179b9df has been approved by oli-obk

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 8, 2026
miri: implement more restrictive trivial-ABI checks

This implements the rules from rust-lang#157973 in Miri. We unfortunately have to reject some code that we thought was okay. Let's land this in Miri ahead of anything official also to see if there's any major breakage from that.

r? @oli-obk
rust-bors Bot pushed a commit that referenced this pull request Aug 8, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #160336 (Move attributes out of rustc_hir)
 - #160715 (ignore tests with the GCC backend if we can't find `libgccjit.so` for the target)
 - #157609 (fix: build-std on 32 bit arm with 64 bit time)
 - #160613 (Add regression test for unsized non-last struct field with overlapping impls)
 - #160658 (miri: implement more restrictive trivial-ABI checks)
 - #160704 (sort lint names in lint pass declarations)
 - #160707 (Add regression test for higher ranked fn pointer impl not general enough)
 - #160713 (Add regression test for #135287)
 - #160720 (triagebot: add ubiratan to infra-ci)
 - #160747 (rustc_errors: remove unused code)
 - #160751 (Add regression test for incremental borrowck ICE with generic const exprs)
 - #160753 (rustc_lint: remove unused rustc_attrs feature)

Failed merges:

 - #158835 (rustc_passes: lint unused `#[path]` attributes on inline modules)
@rust-bors
rust-bors Bot merged commit 945feb0 into rust-lang:main Aug 8, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 8, 2026
rust-timer added a commit that referenced this pull request Aug 8, 2026
Rollup merge of #160658 - RalfJung:trivial-abi, r=oli-obk

miri: implement more restrictive trivial-ABI checks

This implements the rules from #157973 in Miri. We unfortunately have to reject some code that we thought was okay. Let's land this in Miri ahead of anything official also to see if there's any major breakage from that.

r? @oli-obk
@Jules-Bertholet

Jules-Bertholet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

#157973 adresses only types available on stable. When considering unstable types, unsafe binders and pattern types should also be considered to have trivial ABI if wrapping a type that does.

@RalfJung

RalfJung commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

That makes sense, thanks: #160775

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.

5 participants