-
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
Add test case for using slice::fill
with MaybeUninit
#88507
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dtolnay (or someone else) soon. Please see the contribution instructions for more information. |
library/core/tests/slice.rs
Outdated
#[test] | ||
fn test_slice_fill_with_uninit() { | ||
// This should not UB. See #87891 | ||
use core::mem::MaybeUninit; |
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.
Please put this use
at the top of the file.
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.
Gotcha, updated
Thanks! |
📌 Commit 5390ea4 has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#88202 (Add an example for deriving PartialOrd on enums) - rust-lang#88483 (Fix LLVM libunwind build for non-musl targets) - rust-lang#88507 (Add test case for using `slice::fill` with MaybeUninit) - rust-lang#88557 (small const generics cleanup) - rust-lang#88579 (remove redundant / misplaced sentence from docs) - rust-lang#88610 (Update outdated docs of array::IntoIter::new.) - rust-lang#88613 (Update primitive docs for rust 2021.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Adds test for #87891
Looks alright? @RalfJung
Fixes #87891