-
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
Make intrinsics::write_bytes
const
#90081
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
blocked on #90041 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think you can just point to the |
I just found the |
@bors r+ |
📌 Commit 15c2613a86a227937058a7d4ff68068cce5f4f1e has been approved by |
@bors rollup |
Isn't it still blocked? |
@bors r- uuuh gotta check. Sorry, thanks for the ping |
☔ The latest upstream changes (presumably #90041) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
library/core/src/intrinsics.rs
Outdated
#[cfg(not(bootstrap))] | ||
const fn compiletime_check<T>(_ptr: *mut T) { | ||
// The CTFE-engine checks if the pointer is correctly aligned and not null. | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similarly to the other PR, please just call this function nop
and mention on the const_eval_select call that it's just a debug assertion and so it's not a problem if CTFE does not check it, even if it checks some of the rules
@woppopo |
Thank you for telling me. I added |
@bors r+ rollup |
📌 Commit e8e02d9 has been approved by |
Make `intrinsics::write_bytes` const This is required to constify `MaybeUninit::zeroed` and `(*mut T)::write_bytes`. Tracking issue: rust-lang#86302
It seems this branch was pushed to after the PR was approved, so it needs a new review. |
@bors r- |
@bors r+ |
📌 Commit 89b2e0c has been approved by |
Make `intrinsics::write_bytes` const This is required to constify `MaybeUninit::zeroed` and `(*mut T)::write_bytes`. Tracking issue: rust-lang#86302
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#90081 (Make `intrinsics::write_bytes` const) - rust-lang#91643 (asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved by the current target) - rust-lang#91737 (Make certain panicky stdlib functions behave better under panic_immediate_abort) - rust-lang#91750 (rustdoc: Add regression test for Iterator as notable trait on &T) - rust-lang#91764 (Do not ICE when suggesting elided lifetimes on non-existent spans.) - rust-lang#91780 (Remove hir::Node::hir_id.) - rust-lang#91797 (Fix zero-sized reference to deallocated memory) - rust-lang#91806 (Make `Unique`s methods `const`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This is required to constify
MaybeUninit::zeroed
and(*mut T)::write_bytes
.Tracking issue: #86302