-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Stabilize maybe_uninit_write_slice
#148048
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
Stabilize maybe_uninit_write_slice
#148048
Conversation
|
Note that this feature is one day into the FCP, so this is almost, but not quite, ready to merge. |
This comment has been minimized.
This comment has been minimized.
8780eda to
5088b38
Compare
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.
|
The FCP passed, so I believe this is now ready to merge |
| #![feature(allow_internal_unstable)] | ||
| #![feature(decl_macro)] | ||
| #![feature(maybe_uninit_write_slice)] | ||
| #![cfg_attr(bootstrap, feature(maybe_uninit_write_slice))] |
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.
Is this actually required? I thought we stopped needing most of these after the latest bootstrap reworks…
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.
It appears necessary. With that line removed:
error[E0658]: use of unstable library feature `maybe_uninit_write_slice`
--> compiler/rustc_proc_macro/../../library/proc_macro/src/bridge/arena.rs:105:27
|
105 | let bytes = alloc.write_copy_of_slice(string.as_bytes());
| ^^^^^^^^^^^^^^^^^^^
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.
Hmm, that's extra strange considering the weird relative library path, but it is what it is. Thanks for verifying.
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.
@jieyouxu Is this behavior expected?
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.
Yes, proc-macros can be one of those special cases, because see
rust/compiler/rustc_proc_macro/Cargo.toml
Lines 1 to 5 in 6e41e61
| # We need to use a separate crate including library/proc_macro as opposed to a | |
| # direct path dependency on library/proc_macro because doing the latter will | |
| # cause two copies of libproc_macro.rlib to end up in the sysroot, breaking | |
| # proc-macro crates. In addition it confuses the workspace_members function of | |
| # bootstrap. |
So I believe library/proc_macro can still need cfg-bootstrap bits, but other parts of library should (generally) not need it anymore.
|
r? libs |
|
@bors r+ rollup |
…write-slice, r=Mark-Simulacrum Stabilize `maybe_uninit_write_slice` Stabilize feature `maybe_uninit_write_slice` (closes rust-lang#79995). Note that this also const-stabilizes `<[MaybeUninit<_>]>::write_copy_of_slice`. That method depends on `<[_]>::copy_from_slice`, which is already const-stable, and `<[MaybeUninit<_>]>::assume_init_mut` which is now also stable.
…write-slice, r=Mark-Simulacrum Stabilize `maybe_uninit_write_slice` Stabilize feature `maybe_uninit_write_slice` (closes rust-lang#79995). Note that this also const-stabilizes `<[MaybeUninit<_>]>::write_copy_of_slice`. That method depends on `<[_]>::copy_from_slice`, which is already const-stable, and `<[MaybeUninit<_>]>::assume_init_mut` which is now also stable.
…write-slice, r=Mark-Simulacrum Stabilize `maybe_uninit_write_slice` Stabilize feature `maybe_uninit_write_slice` (closes rust-lang#79995). Note that this also const-stabilizes `<[MaybeUninit<_>]>::write_copy_of_slice`. That method depends on `<[_]>::copy_from_slice`, which is already const-stable, and `<[MaybeUninit<_>]>::assume_init_mut` which is now also stable.
Rollup of 19 pull requests Successful merges: - #148048 (Stabilize `maybe_uninit_write_slice`) - #148641 (Add a diagnostic attribute for special casing const bound errors for non-const impls) - #148765 (std: split up the `thread` module) - #149074 (Add Command::get_env_clear) - #149097 (num: Implement `uint_gather_scatter_bits` feature for unsigned integers) - #149131 (optimize `slice::Iter::next_chunk`) - #149190 (Forbid `CHECK: br` and `CHECK-NOT: br` in codegen tests (suggest `br {{.*}}` instead)) - #149239 (clarify float min/max behavios for NaNs and signed zeros) - #149243 (Fix typo and clarify bootstrap change tracker entry) - #149270 (implement `Iterator::{exactly_one, collect_array}`) - #149295 (Suggest _bytes versions of endian-converting methods) - #149301 (Motor OS: make decode_error_kind more comprehensive) - #149306 (bootstrap: Miri now handles jemalloc like everything else) - #149325 (rustdoc: add regression test for #140968) - #149332 (fix rustdoc search says “Consider searching for "null" instead.” #149324) - #149349 (Fix typo in comment.) - #149353 (Tidying up UI tests [3/N]) - #149355 (Document that `build.description` affects symbol mangling and crate IDs) - #149360 (Enable CI download for windows-gnullvm) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 12 pull requests Successful merges: - #147115 (More robust stack protector testing) - #148048 (Stabilize `maybe_uninit_write_slice`) - #148641 (Add a diagnostic attribute for special casing const bound errors for non-const impls) - #149074 (Add Command::get_env_clear) - #149097 (num: Implement `uint_gather_scatter_bits` feature for unsigned integers) - #149131 (optimize `slice::Iter::next_chunk`) - #149190 (Forbid `CHECK: br` and `CHECK-NOT: br` in codegen tests (suggest `br {{.*}}` instead)) - #149239 (clarify float min/max behavios for NaNs and signed zeros) - #149243 (Fix typo and clarify bootstrap change tracker entry) - #149301 (Motor OS: make decode_error_kind more comprehensive) - #149306 (bootstrap: Miri now handles jemalloc like everything else) - #149325 (rustdoc: add regression test for #140968) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #148048 - thaliaarchi:stabilize-maybeuninit-write-slice, r=Mark-Simulacrum Stabilize `maybe_uninit_write_slice` Stabilize feature `maybe_uninit_write_slice` (closes #79995). Note that this also const-stabilizes `<[MaybeUninit<_>]>::write_copy_of_slice`. That method depends on `<[_]>::copy_from_slice`, which is already const-stable, and `<[MaybeUninit<_>]>::assume_init_mut` which is now also stable.
Stabilize feature
maybe_uninit_write_slice(closes #79995).Note that this also const-stabilizes
<[MaybeUninit<_>]>::write_copy_of_slice. That method depends on<[_]>::copy_from_slice, which is already const-stable, and<[MaybeUninit<_>]>::assume_init_mutwhich is now also stable.