-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilize const_black_box
#135414
Stabilize const_black_box
#135414
Conversation
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @rust-lang/wg-const-eval Some changes occurred in compiler/rustc_codegen_gcc |
@rfcbot fcp merge |
Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
Yeah this should be fine, even if we ever apply optimizations to const MIR we can just treat this function as an opaque call (and we should, since it'd be the same optimizations we apply for runtime MIR). |
@rfcbot reviewed |
Given that it's spec'd to not do anything, seems easy to support in const :) |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
☔ The latest upstream changes (presumably #135937) made this pull request unmergeable. Please resolve the merge conflicts. |
This has been unstably const since [1], but a tracking issue was never created. Per discussion on Zulip [2], there should not be any blockers to making this const-stable. The function does not provide any functionality at compile time but does allow code reuse between const- and non-const functions, so stabilize it here. [1]: rust-lang#92226 [2]: https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const_black_box
a854d75
to
395f0c9
Compare
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@bors r=dtolnay rollup |
Rollup of 8 pull requests Successful merges: - rust-lang#135414 (Stabilize `const_black_box`) - rust-lang#136150 (ci: use windows 2025 for i686-mingw) - rust-lang#136258 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 11)) - rust-lang#136270 (Remove `NamedVarMap`.) - rust-lang#136278 (add constraint graph to polonius MIR dump) - rust-lang#136287 (LLVM changed the nocapture attribute to captures(none)) - rust-lang#136291 (some test suite cleanups) - rust-lang#136296 (float::min/max: mention the non-determinism around signed 0) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135414 - tgross35:stabilize-const_black_box, r=dtolnay Stabilize `const_black_box` This has been unstably const since rust-lang#92226, but a tracking issue was never created. Per [discussion on Zulip][zulip], there should not be any blockers to making this const-stable. The function does not provide any functionality at compile time but does allow code reuse between const- and non-const functions, so stabilize it here. [zulip]: https://rust-lang.zulipchat.com/#narrow/channel/146212-t-compiler.2Fconst-eval/topic/const_black_box
This has been unstably const since #92226, but a tracking issue was never created. Per discussion on Zulip, there should not be any blockers to making this const-stable. The function does not provide any functionality at compile time but does allow code reuse between const- and non-const functions, so stabilize it here.
Cc @rust-lang/libs-api, @rust-lang/lang and @rust-lang/wg-const-eval for a newly const-stable intrinsic.