-
Notifications
You must be signed in to change notification settings - Fork 13.3k
library: Move unstable API of new_uninit to new features #129416
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
library: Move unstable API of new_uninit to new features #129416
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
be94ff0
to
275a526
Compare
Further extracted from #129401 as that PR is now waiting on a Tuesday. |
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.
Thanks!
@bors r+ |
…tabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#126985 (Implement `-Z embed-source` (DWARFv5 source code embedding extension)) - rust-lang#128935 (More work on `zstd` compression) - rust-lang#129263 (Add a missing compatibility note in the 1.80.0 release notes) - rust-lang#129386 (Use a LocalDefId in ResolvedArg.) - rust-lang#129408 (Fix handling of macro arguments within the `dropping_copy_types` lint) - rust-lang#129410 (Miri subtree update) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) r? `@ghost` `@rustbot` modify labels: rollup
I suppose there isn't a way for Rust-for-Linux to be updated from our repository, huh. |
Hey, I opened Rust-for-Linux/linux#1106 but if that PR isn't good enough can one of you take over fixing RfL so we can later land the stabilization of the features you want? Thanks. @rustbot ping rust-for-linux |
...Rustbot is being disobedient so cc @alex @bjorn3 @Darksonn @dingxiangfei2009 @fbq @maurer @metaspace @nbdd0121 @ojeda @tgross35 @vincenzopalazzo @wedsonaf @y86-dev |
I see there's a thread on the RfL side, but I do think this points out the need for a clearer process when rust changes "break" rfl's use of unstable apis. We shouldn't assume rust contributors will be familiar with the kernel contribution process |
honestly the kernel itself certainly seems like it could benefit from more clearly paving and marking the path here, I didn't expect to wind up in a situation where I feel things like "I seem to be too and it seems that RfL does still use PRs, but mostly as a way to borrow the GitHub UI for a slightly less onerous review flow than mailing lists, and then those are routed to the mailing list? |
Agreed to this, I think this is the first case we have encountered it.
That is accurate; we usually suggest that changes in early stages can go through a GH PR to collect some loose feedback before being sent to the list, but everything needs to go through the list for review and eventually getting picked up. We can of course help wherever needed - helping anyone figure out how to send patches, or forwarding patches for anyone who has a fix but doesn't know mailing list flow, or just doing the fix as needed. |
We have a Rust for Linux page in the rustc-dev-guide. We should make sure that this link is shared when the job breaks. |
Thanks!
As far as I understood it from the discussions, the idea was to ping us, i.e. it is not expected that Rust contributors need to get familiar with the kernel or its development process. But, of course, if they want to contribute, that is great! [1] https://rust-lang.zulipchat.com/#narrow/stream/425075-rust-for-linux/topic/building.20on.20Rust.20CI/near/447162810 |
In general, I do not consult the rustc-dev-guide every time a build breaks. It generally does not change so often that such is useful, and for better or worse, it is rare that a test job is specifically documented inside it. (So Darksonn's idea seems persuasive.) |
#129479 (comment) |
@bors r=dtolnay |
…tabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#127021 (Add target support for RTEMS Arm) - rust-lang#128467 (Detect `*` operator on `!Sized` expression) - rust-lang#128735 (Add a special case for `CStr`/`CString` in the `improper_ctypes` lint) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) - rust-lang#129418 (rustc: Simplify getting sysroot library directory) - rust-lang#129429 (Print the generic parameter along with the variance in dumps.) - rust-lang#129430 (rustdoc: show exact case-sensitive matches first) - rust-lang#129449 (Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods) - rust-lang#129481 (Update `compiler_builtins` to `0.1.121`) - rust-lang#129482 (Add myself to the review rotation for libs) r? `@ghost` `@rustbot` modify labels: rollup
…tabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
Rollup of 8 pull requests Successful merges: - rust-lang#126985 (Implement `-Z embed-source` (DWARFv5 source code embedding extension)) - rust-lang#128935 (More work on `zstd` compression) - rust-lang#129134 (bootstrap: improve error recovery flags to curl) - rust-lang#129190 (Add f16 and f128 to tests/ui/consts/const-float-bits-conv.rs) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) - rust-lang#129418 (rustc: Simplify getting sysroot library directory) - rust-lang#129459 (handle stage0 `cargo` and `rustc` separately) - rust-lang#129511 (Update minifier to 0.3.1) r? `@ghost` `@rustbot` modify labels: rollup
…tabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#128919 (Add an internal lint that warns when accessing untracked data) - rust-lang#129134 (bootstrap: improve error recovery flags to curl) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) - rust-lang#129459 (handle stage0 `cargo` and `rustc` separately) - rust-lang#129487 (repr_transparent_external_private_fields: special-case some std types) - rust-lang#129511 (Update minifier to 0.3.1) - rust-lang#129523 (Make `rustc_type_ir` build on stable) - rust-lang#129546 (Get rid of `predicates_defined_on`) r? `@ghost` `@rustbot` modify labels: rollup
…tabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#129091 (add Box::as_ptr and Box::as_mut_ptr methods) - rust-lang#129134 (bootstrap: improve error recovery flags to curl) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) - rust-lang#129459 (handle stage0 `cargo` and `rustc` separately) - rust-lang#129487 (repr_transparent_external_private_fields: special-case some std types) - rust-lang#129511 (Update minifier to 0.3.1) - rust-lang#129523 (Make `rustc_type_ir` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#129091 (add Box::as_ptr and Box::as_mut_ptr methods) - rust-lang#129134 (bootstrap: improve error recovery flags to curl) - rust-lang#129416 (library: Move unstable API of new_uninit to new features) - rust-lang#129459 (handle stage0 `cargo` and `rustc` separately) - rust-lang#129487 (repr_transparent_external_private_fields: special-case some std types) - rust-lang#129511 (Update minifier to 0.3.1) - rust-lang#129523 (Make `rustc_type_ir` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#129416 - workingjubilee:partial-move-from-stabilization, r=dtolnay library: Move unstable API of new_uninit to new features - `new_zeroed` variants move to `new_zeroed_alloc` - the `write` fn moves to `box_uninit_write` The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
Upstream Rust's libs-api team has consensus for stabilizing some of `feature(new_uninit)`, but not for `Box<MaybeUninit<T>>::write`. Instead, we can use `MaybeUninit<T>::write`, so Rust for Linux can drop the feature after stabilization. That will happen after merging, as the FCP has completed [1]. This is required before stabilization because remaining-unstable API will be divided into new features. This code doesn't know about those yet. It can't: they haven't landed, as the relevant PR is blocked on rustc's CI testing Rust-for-Linux without this patch. [ The PR has landed [2], so we could conditionally enable the new unstable feature (`box_uninit_write` [3]) instead, but just for a single `unsafe` block it is probably not worth it. For the time being, I added it to the "nice to have" section of our unstable features list. - Miguel ] Link: rust-lang/rust#63291 (comment) [1] Link: rust-lang/rust#129416 [2] Link: rust-lang/rust#129397 [3] Signed-off-by: Jubilee Young <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
Upstream Rust's libs-api team has consensus for stabilizing some of `feature(new_uninit)`, but not for `Box<MaybeUninit<T>>::write`. Instead, we can use `MaybeUninit<T>::write`, so Rust for Linux can drop the feature after stabilization. That will happen after merging, as the FCP has completed [1]. This is required before stabilization because remaining-unstable API will be divided into new features. This code doesn't know about those yet. It can't: they haven't landed, as the relevant PR is blocked on rustc's CI testing Rust-for-Linux without this patch. [ The PR has landed [2] and will be released in Rust 1.82.0 (expected on 2024-10-17), so we could conditionally enable the new unstable feature (`box_uninit_write` [3]) instead, but just for a single `unsafe` block it is probably not worth it. For the time being, I added it to the "nice to have" section of our unstable features list. - Miguel ] Link: rust-lang/rust#63291 (comment) [1] Link: rust-lang/rust#129416 [2] Link: rust-lang/rust#129397 [3] Signed-off-by: Jubilee Young <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
Upstream Rust's libs-api team has consensus for stabilizing some of `feature(new_uninit)`, but not for `Box<MaybeUninit<T>>::write`. Instead, we can use `MaybeUninit<T>::write`, so Rust for Linux can drop the feature after stabilization. That will happen after merging, as the FCP has completed [1]. This is required before stabilization because remaining-unstable API will be divided into new features. This code doesn't know about those yet. It can't: they haven't landed, as the relevant PR is blocked on rustc's CI testing Rust-for-Linux without this patch. [ The PR has landed [2] and will be released in Rust 1.82.0 (expected on 2024-10-17), so we could conditionally enable the new unstable feature (`box_uninit_write` [3]) instead, but just for a single `unsafe` block it is probably not worth it. For the time being, I added it to the "nice to have" section of our unstable features list. - Miguel ] Link: rust-lang/rust#63291 (comment) [1] Link: rust-lang/rust#129416 [2] Link: rust-lang/rust#129397 [3] Signed-off-by: Jubilee Young <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Reviewed-by: Trevor Gross <[email protected]> [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
new_zeroed
variants move tonew_zeroed_alloc
write
fn moves tobox_uninit_write
The remainder will be stabilized in upcoming patches, as it was decided to only stabilize
uninit*
andassume_init
.new_zeroed_alloc
#129396box_uninit_write
#129397