Skip to content
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

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

atsuzaki
Copy link
Contributor

@atsuzaki atsuzaki commented Aug 30, 2021

Adds test for #87891

Looks alright? @RalfJung
Fixes #87891

@rust-highfive
Copy link
Collaborator

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.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 30, 2021
@m-ou-se m-ou-se assigned RalfJung and unassigned dtolnay Aug 31, 2021
#[test]
fn test_slice_fill_with_uninit() {
// This should not UB. See #87891
use core::mem::MaybeUninit;
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, updated

@RalfJung
Copy link
Member

RalfJung commented Sep 3, 2021

Thanks!
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 3, 2021

📌 Commit 5390ea4 has been approved by RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 3, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 3, 2021
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
@bors bors merged commit 80b572b into rust-lang:master Sep 3, 2021
@rustbot rustbot added this to the 1.56.0 milestone Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined behaviour in slice::fill specialization.
6 participants