-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Document unsafety in core::{panicking, alloc::layout, hint, iter::adapters::zip} #71492
Conversation
30174ae
to
3a31589
Compare
@@ -81,10 +81,13 @@ pub fn spin_loop() { | |||
{ | |||
#[cfg(target_arch = "aarch64")] | |||
{ | |||
// SAFETY: the `cfg` attr ensures that we only execute this on aarch64 targets. |
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.
Why do we have this setup so strangely? Can we "unwrap" these inner cfg's?
AFAICT we should also be able to do the same for the x86/x86_64 cfg's, just gating on target_feature = "sse2" in the wrapper (or inlining that).
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.
This should probably be done in a separate PR?
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.
Yeah, just leaving feedback in case you're up for making that PR :)
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.
Seems like a low-effort low-hanging fruit. Yum!
@Mark-Simulacrum Resolved your review comments! |
r=me with commits squashed |
a603295
to
d515168
Compare
@Mark-Simulacrum Rebased! (I can't r+ myself I believe) |
I'll try anyway :D |
@LeSeulArtichaut: 🔑 Insufficient privileges: Not in reviewers |
@LeSeulArtichaut: 🔑 Insufficient privileges: not in try users |
@bors r+ rollup |
📌 Commit d515168 has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#70845 (Make the `structural_match` error diagnostic for const generics clearer) - rust-lang#71063 (Document unsafety in core::{option, hash}) - rust-lang#71068 (Stabilize UNICODE_VERSION (feature unicode_version)) - rust-lang#71426 (fix error code in E0751.md) - rust-lang#71459 (Add leading 0x to offset in Debug fmt of Pointer) - rust-lang#71492 (Document unsafety in core::{panicking, alloc::layout, hint, iter::adapters::zip}) Failed merges: r? @ghost
Helps with #66219.
r? @Mark-Simulacrum do you want to continue reading safety comments? :D