-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Allowing raw ptr dereference in const fn #75578
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Change `UnsafetyViolationKind::General` to `UnsafetyViolationKind::GeneralAndConstFn` in check_unsafety.rs Remove unsafe in min_const_fn_unsafe_bad.rs Bless min_const_fn Add the test case from issue 75340 Co-authored-by: lzutao <taolzu@gmail.com>
@bors r+ rollup Thanks! |
📌 Commit be1fc40 has been approved by |
Dosn't this entirely fix that issue? |
Rollup of 8 pull requests Successful merges: - rust-lang#75389 (attempt to improve span_label docs) - rust-lang#75392 (Add `as_uninit`-like methods to pointer types and unify documentation of `as_ref` methods) - rust-lang#75464 (Move to intra doc links for ascii.rs and panic.rs) - rust-lang#75578 (Allowing raw ptr dereference in const fn) - rust-lang#75613 (Add explanation for `&mut self` method call when expecting `-> Self`) - rust-lang#75626 (Clean up E0754 explanation) - rust-lang#75629 (Use intra-doc links in `std::env`, `std::alloc` and `std::error`) - rust-lang#75634 (Mark x86_64-linux-kernel as *) Failed merges: r? @ghost
Reflect on issue #75340
Discussion in previous PR #75425
Updates
Change
UnsafetyViolationKind::General
toUnsafetyViolationKind::GeneralAndConstFn
in check_unsafety.rsRemove
unsafe
in min_const_fn_unsafe_bad.rsBless min_const_fn
Add the test case from issue 75340
Sorry for the chaos. I messed up and ended up deleting the repo in the last PR. I have to create a new PR for the new repo. I will make a feature branch next time. I will edit the old PR once I receive the commends.
@RalfJung Thank you all for your replies. They are helpful!
r? @oli-obk