-
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 #[must_use] to core and std constructors #89729
Add #[must_use] to core and std constructors #89729
Conversation
Heads up, I threw core::mem::MaybeUninit<T> const fn uninit() -> MaybeUninit<T>;
core::mem::MaybeUninit<T> const fn uninit_array<const LEN: usize>() -> [Self; LEN];
core::mem::MaybeUninit<T> fn zeroed() -> MaybeUninit<T>; I left |
I do think it's reasonable to add the annotation to MaybeUninit::new as well, but that can happen in another PR. Suggesting mem::forget sounds good. |
@bors r+ |
📌 Commit 5b5c12b has been approved by |
…ctors, r=joshtriplett Add #[must_use] to core and std constructors Parent issue: rust-lang#89692 r? `@joshtriplett`
…laumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#89655 (bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts) - rust-lang#89726 (Add #[must_use] to alloc constructors) - rust-lang#89729 (Add #[must_use] to core and std constructors) - rust-lang#89743 (Fix RUSTC_LOG handling) - rust-lang#89753 (Add #[must_use] to from_value conversions) - rust-lang#89754 (Cleanup .item-table CSS) - rust-lang#89761 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…, r=joshtriplett Add #[must_use] to MaybeUninit::new As discussed in rust-lang#89729 (comment). Parent issue: rust-lang#89692 r? `@joshtriplett`
…, r=joshtriplett Add #[must_use] to MaybeUninit::new As discussed in rust-lang#89729 (comment). Parent issue: rust-lang#89692 r? ``@joshtriplett``
…r=joshtriplett Add #[must_use] to MaybeUninit::new As discussed in rust-lang#89729 (comment). Parent issue: rust-lang#89692 r? `@joshtriplett`
Parent issue: #89692
r? @joshtriplett