Skip to content

fix buggy MaybeDangling<&T> validation logic - #161125

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:MaybeDangling-validity
Aug 15, 2026
Merged

fix buggy MaybeDangling<&T> validation logic#161125
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
RalfJung:MaybeDangling-validity

Conversation

@RalfJung

@RalfJungRalfJung commented Aug 15, 2026

Copy link
Copy Markdown
Member

Fixes a critical regression in #160749.
This is what caused the trouble in rust-lang/miri#5252.
r? @oli-obk or @saethlin

@rustbot

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

@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 Aug 15, 2026
@RalfJung
RalfJungforce-pushed the MaybeDangling-validity branch from 44b1025 to 73d3b1cCompareAugust 15, 2026 13:09
@rustbot

Copy link
Copy Markdown
Collaborator

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

@RalfJung

Copy link
Copy Markdown
MemberAuthor

@WaffleLapkin or maybe you could take a look at this?
Would be nice to get this landed soon to unblock Miri syncs.

@saethlin

Copy link
Copy Markdown
Member

Oh 🤦

@bors r+

@rust-bors

rust-borsBot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 73d3b1c has been approved by saethlin

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 15, 2026
@RalfJung

Copy link
Copy Markdown
MemberAuthor

@bors p=1
blocks Miri sync

@RalfJung

Copy link
Copy Markdown
MemberAuthor

@bors rollup

rust-borsBot pushed a commit that referenced this pull request Aug 15, 2026
…uwer
Rollup of 2 pull requests
Successful merges:
- #161125 (fix buggy MaybeDangling<&T> validation logic)
- #159971 (Add regression test for #159890)
@rust-bors
rust-borsBot merged commit 337eccf into rust-lang:mainAug 15, 2026
13 checks passed
rust-timer added a commit that referenced this pull request Aug 15, 2026
Rollup merge of #161125 - RalfJung:MaybeDangling-validity, r=saethlin
fix buggy MaybeDangling<&T> validation logic
Fixes a critical regression in #160749.
This is what caused the trouble in rust-lang/miri#5252.
r? @oli-obk or @saethlin
@rustbotrustbot added this to the 1.100.0 milestone Aug 15, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 15, 2026
Rollup merge of #161125 - RalfJung:MaybeDangling-validity, r=saethlin
fix buggy MaybeDangling<&T> validation logic
Fixes a critical regression in #160749.
This is what caused the trouble in rust-lang/miri#5252.
r? @oli-obk or @saethlin
RalfJung pushed a commit to saethlin/miri that referenced this pull request Aug 16, 2026
…uwer
Rollup of 2 pull requests
Successful merges:
- rust-lang/rust#161125 (fix buggy MaybeDangling<&T> validation logic)
- rust-lang/rust#159971 (Add regression test for rust-lang/rust#159890)
@RalfJung
RalfJung deleted the MaybeDangling-validity branch August 16, 2026 08:36
@theemathas

Copy link
Copy Markdown
Contributor

Does this need a beta backport? @RalfJung

@RalfJung

Copy link
Copy Markdown
MemberAuthor

Has there been a beta cutoff between #160749 and this PR?
If yes then... I could imagine this being possible to trigger in const-eval so yeah a backport would be better.

@RalfJungRalfJung added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 17, 2026
@WaffleLapkin

Copy link
Copy Markdown
Member

Given that #160749 merged into 1.99, while this merged into 1.100, I would assume there indeed was a beta cutoff

@rustbot

Copy link
Copy Markdown
Collaborator

beta backport approved as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels are handled by them.

@rustbotrustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 18, 2026
@cuvipercuviper removed this from the 1.100.0 milestone Aug 20, 2026
@cuvipercuviper added this to the 1.99.0 milestone Aug 20, 2026
@cuvipercuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 20, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 22, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 25, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 25, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
- Uplift rustfmt macro formatting fix#161370
- Stop rustfmt deleting attributes in fn params #161709
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 27, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
- Uplift rustfmt macro formatting fix#161370
- Stop rustfmt deleting attributes in fn params #161709
- Bust sccache's cache #161384
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 27, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
- Uplift rustfmt macro formatting fix#161370
- Stop rustfmt deleting attributes in fn params #161709
- Bust sccache's cache #161384
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 27, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
- Uplift rustfmt macro formatting fix#161370
- Stop rustfmt deleting attributes in fn params #161709
- Bust sccache's cache #161384
r? me
rust-borsBot pushed a commit that referenced this pull request Aug 27, 2026
[beta] bump stage0, plus backports
- Bump stage0 to stable 1.98.0
- fix buggy MaybeDangling<&T> validation logic #161125
- resolving cyclic glob vis-max #161024
- Check for missing rustfmt in the stdarch intrinsic test step sooner #161641
- Uplift rustfmt macro formatting fix#161370
- Stop rustfmt deleting attributes in fn params #161709
- Bust sccache's cache #161384
r? me
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-acceptedAccepted for backporting to the compiler in the beta channel.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

@RalfJung@rustbot@saethlin@theemathas@WaffleLapkin@cuviper@oli-obk