-
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
MaybeUninit
: use assume_init_drop()
in the partially initialized array example
#103447
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @scottmcm (rust-highfive has picked a reviewer for you, use r? to override) |
Ah, thanks, if the dedicated method is stable now then it's much better to use it. @bors r+ rollup=always |
Rollup of 11 pull requests Successful merges: - rust-lang#100462 (Clarify `array::from_fn` documentation) - rust-lang#101644 (Document surprising and dangerous fs::Permissions behaviour on Unix) - rust-lang#103005 (kmc-solid: Handle errors returned by `SOLID_FS_ReadDir`) - rust-lang#103140 (Add diagnostic for calling a function with the same name with unresolved Macro) - rust-lang#103254 (rustdoc: do not filter out cross-crate `Self: Sized` bounds) - rust-lang#103347 (bootstrap: also create rustc-src component in sysroot) - rust-lang#103402 (Fix wrapped valid-range handling in ty_find_init_error) - rust-lang#103414 (Pretty print lifetimes captured by RPIT) - rust-lang#103424 (rustdoc: remove no-op CSS `.code-header { border-bottom: none }`) - rust-lang#103434 (Use functions for jump-to-def-background rustdoc GUI test) - rust-lang#103447 (`MaybeUninit`: use `assume_init_drop()` in the partially initialized array example) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The
assume_init_drop()
method does the same thing as the pointer conversion, and makes the example more straightforward.