Skip to content

core: Constify resumable_breakpoint and re-export it in std - #164608

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
tgross35:resumable_breakpoint-updates
Oct 27, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
tgross35:resumable_breakpoint-updates

Conversation

@tgross35

Copy link
Copy Markdown
Member

This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new resumable_breakpoint intrinsic
from breakpoint which has the behavior of continuing in Miri and CTFE.

cc @RalfJung

@rustbot

rustbot commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

⚠️ #[miri::intrinsic_fallback_is_spec] must only be used if the function actively checks for all UB cases,
and explores the possible non-determinism of the intrinsic.

cc @rust-lang/miri

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Any special-casing of Miri in the standard library requires review.

cc @rust-lang/miri

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 19, 2026
@rustbot

rustbot commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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: libs
  • libs expanded to 12 candidates

@rust-log-analyzer

This comment has been minimized.

@tgross35
tgross35 force-pushed the resumable_breakpoint-updates branch 2 times, most recently from 4256667 to 7caeaec Compare October 20, 2026 01:48
Comment thread library/core/src/intrinsics/mod.rs Outdated
@tgross35
tgross35 force-pushed the resumable_breakpoint-updates branch 2 times, most recently from 208fea3 to 4b08f8c Compare October 20, 2026 06:26
Comment thread library/core/src/intrinsics/mod.rs Outdated
/// Executes a breakpoint trap, for inspection by a debugger.
///
/// This intrinsic does not have a stable counterpart.
/// The stabilized version of this intrinsic is [`core::arch::breakpoint`].

@RalfJung RalfJung Oct 20, 2026 •

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.

Suggested change
/// The stabilized version of this intrinsic is [`core::arch::breakpoint`].
/// The public version of this intrinsic is [`core::arch::breakpoint`].

It's not stable yet, so maybe something like this?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We use "the stabilized version" for all the intrinsics, even what's not stable. Probably could be updated everywhere, but at least it's consistent and we don't need to update it when the wrapper stabilizes so there's not much motivation.

@RalfJung RalfJung Oct 20, 2026 •

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.

In the past we have specifically avoided saying "stabilized version" when it was not in fact stable yet, and then had to update the docs during stabilization. I do not recall a case where we said "stabilized" when it wasn't stable yet, but maybe things were handled inconsistently across intrinsics.

So, it's definitely not consistent to say "stabilized" here.

That's why I think we should use a different term.

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.

I don't have a super strong opinion, but I think I lean towards public here too.

r=me either way.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

"stabilized" was used historically, but it looks like we've actually since stabilized most of the intrinsics that did that. Changed to public since we have a few examples.

@Mark-Simulacrum Mark-Simulacrum 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 Oct 25, 2026
This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
@tgross35
tgross35 force-pushed the resumable_breakpoint-updates branch from 4b08f8c to d0e5a14 Compare October 26, 2026 20:18
@tgross35

Copy link
Copy Markdown
Member Author

@bors r=Mark-Simulacrum

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d0e5a14 has been tentatively approved by Mark-Simulacrum

It will be put into the queue for this repository once PR CI succeeds.

@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 Oct 26, 2026
tgross35 added a commit to tgross35/rust that referenced this pull request Oct 27, 2026
…tes, r=Mark-Simulacrum

core: Constify `resumable_breakpoint` and re-export it in `std`

This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 8 pull requests

Successful merges:

 - #159540 (Enable statx on all Linux targets and short-circuit it for musl)
 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
tgross35 added a commit to tgross35/rust that referenced this pull request Oct 27, 2026
…tes, r=Mark-Simulacrum

core: Constify `resumable_breakpoint` and re-export it in `std`

This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 8 pull requests

Successful merges:

 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164851 (Add behavior tests for `Arc` and `Rc`)
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 9 pull requests

Successful merges:

 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164848 (Add `strict_` methods to `NonZero`)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #164963 (fd-views: enable test on Miri)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 9 pull requests

Successful merges:

 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164848 (Add `strict_` methods to `NonZero`)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #164963 (fd-views: enable test on Miri)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 27, 2026
…tes, r=Mark-Simulacrum

core: Constify `resumable_breakpoint` and re-export it in `std`

This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup of 9 pull requests



Successful merges:

 - #164168 (Add tests for unsoundness involving alias liveness)
 - #164608 (core: Constify `resumable_breakpoint` and re-export it in `std`)
 - #164787 (cg_llvm: Use an invariant lifetime brand for LLVM contexts )
 - #164966 (x86-64-linux-gnu seems to have working f128 now)
 - #153893 (Lex lifetimes as identifiers, recover from emoji and emit appropriate error)
 - #164848 (Add `strict_` methods to `NonZero`)
 - #164895 (Disable recovery when attribute parser shouldn't emit)
 - #164963 (fd-views: enable test on Miri)
 - #165004 (docs: Nitpick change in `HashMap`'s `.insert_entry()` doc example)
rust-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Rollup merge of #164608 - tgross35:resumable_breakpoint-updates, r=Mark-Simulacrum

core: Constify `resumable_breakpoint` and re-export it in `std`

This function is documented as allowed to continue, which is useful
behavior during const eval. Split a new `resumable_breakpoint` intrinsic
from `breakpoint` which has the behavior of continuing in Miri and CTFE.
@rust-bors
rust-bors Bot merged commit ea997df into rust-lang:main Oct 27, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 27, 2026
@tgross35
tgross35 deleted the resumable_breakpoint-updates branch October 27, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-libs Relevant to the library 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