-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
CTFE: support assert_zero_valid and assert_uninit_valid #91323
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
r? @oli-obk r=me with the intrinsics made const-unstable. If you want them to be stable immediately, then at least one caller should be stable, too and we should then nominate it for libs-api |
Oh, I did not know of this policy. |
Just use none for the tracking issue an invent a feature gate name. Const stabilizing any intrinsic needs lang team sign off as stated at the top of the doc. Even if it is trivial in this case, as we already have an intrinsic that is basically the same. Maybe someone from t-lang can just merge this without an fcp? r? rust-lang/lang |
Well fair, I can also make them unstable. (That "r?" does not seem to have done anything.) |
Nominating for T-lang discussion (which seems better than r?, regardless). But I'm not clear on the ask being presented, so it may be helpful for a more extensive summary to be put in the description. It sounds like this is just intending to enable usage of these two intrinsics in const code, which on the surface seems pretty harmless, but if there are reasons to not to do this, it would be helpful to call those out explicitly. |
Ah this is not worth the bureaucracy.^^ I will just make them unstable. Having the implementations all in rustc (rather than spread across rustc and Miri) is still worth it. |
63eb380
to
f830abe
Compare
@bors r=oli-obk |
📌 Commit f830abed669acd532c39c07ee2c002b3e45054d4 has been approved by |
This comment has been minimized.
This comment has been minimized.
@bors r- |
f830abe
to
6c3c3e0
Compare
@bors r=oli-obk |
📌 Commit 6c3c3e0 has been approved by |
CTFE: support assert_zero_valid and assert_uninit_valid This ensures the implementation of all three type-based assert_ intrinsics remains consistent in Miri. `assert_inhabited` recently got stabilized in rust-lang#90896 (meaning stable `const fn` can call it), so do the same with these other intrinsics. Cc `@rust-lang/wg-const-eval`
CTFE: support assert_zero_valid and assert_uninit_valid This ensures the implementation of all three type-based assert_ intrinsics remains consistent in Miri. `assert_inhabited` recently got stabilized in rust-lang#90896 (meaning stable `const fn` can call it), so do the same with these other intrinsics. Cc ``@rust-lang/wg-const-eval``
Rollup of 8 pull requests Successful merges: - rust-lang#91243 (Don't treat unnormalized function arguments as well-formed) - rust-lang#91250 (Refactor EmitterWriter::emit_suggestion_default ) - rust-lang#91317 (tests: Ignore `test/debuginfo/rc_arc.rs` on windows-gnu) - rust-lang#91323 (CTFE: support assert_zero_valid and assert_uninit_valid) - rust-lang#91358 (Fix small typo) - rust-lang#91360 (:arrow_up: rust-analyzer) - rust-lang#91368 (Don't re-export `MirPass`) - rust-lang#91383 (Add `drop_while` as doc alias to `Iterator::skip_while`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
rustup With rust-lang/rust#91323 landed, we can remove these intrinsics from Miri.
This ensures the implementation of all three type-based assert_ intrinsics remains consistent in Miri.
assert_inhabited
recently got stabilized in #90896 (meaning stableconst fn
can call it), so do the same with these other intrinsics.Cc @rust-lang/wg-const-eval