-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 8 pull requests #129663
Closed
Closed
Rollup of 8 pull requests #129663
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A partial stabilization that only affects: - AllocType<T>::new_uninit - AllocType<T>::assume_init - AllocType<[T]>::new_uninit_slice - AllocType<[T]>::assume_init where "AllocType" is Box, Rc, or Arc
Plus a tiny bit of reformatting.
…ion-of-stabilization, r=dtolnay Partially stabilize `feature(new_uninit)` Finished comment period: rust-lang#63291 (comment) The following API has been stabilized from rust-lang#63291 ```rust impl<T> Box<T> { pub fn new_uninit() -> Box<MaybeUninit<T>> {…} } impl<T> Rc<T> { pub fn new_uninit() -> Rc<MaybeUninit<T>> {…} } impl<T> Arc<T> { pub fn new_uninit() -> Arc<MaybeUninit<T>> {…} } impl<T> Box<[T]> { pub fn new_uninit_slice(len: usize) -> Box<[MaybeUninit<T>]> {…} } impl<T> Rc<[T]> { pub fn new_uninit_slice(len: usize) -> Rc<[MaybeUninit<T>]> {…} } impl<T> Arc<[T]> { pub fn new_uninit_slice(len: usize) -> Arc<[MaybeUninit<T>]> {…} } impl<T> Box<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Box<T> {…} } impl<T> Box<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Box<[T]> {…} } impl<T> Rc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Rc<T> {…} } impl<T> Rc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Rc<[T]> {…} } impl<T> Arc<MaybeUninit<T>> { pub unsafe fn assume_init(self) -> Arc<T> {…} } impl<T> Arc<[MaybeUninit<T>]> { pub unsafe fn assume_init(self) -> Arc<[T]> {…} } ``` The remaining API is split between new issues - `new_zeroed_alloc`: rust-lang#129396 - `box_uninit_write`: rust-lang#129397 All relevant code is thus either stabilized or split out of that issue, so this closes rust-lang#63291 as, with the FCP concluded, that issue has served its purpose. try-job: x86_64-rust-for-linux
exit: explain our expectations for the exit handlers registered in a Rust program This documents the position of `@Amanieu` and others in rust-lang#126600: a library with an atexit handler that destroys state that other threads could still be working on is buggy. We do not consider it acceptable for a library to say "you must call the following cleanup function before exiting from `main` or calling `exit`". I don't know if this is established `@rust-lang/libs-api` consensus so I presume this will have to go through FCP. Given that Rust supports concurrency, I don't think there is any way to write a sound Rust wrapper around a library that has such a required cleanup function: even if we made `exit` unsafe, and the Rust wrapper used the scope-with-callback approach to ensure it can run cleanup code before returning from the wrapper (like `thread::scope`), one could still call this wrapper in a second thread and then return from `main` while the wrapper runs. Making this sound would require `std` to provide a way to "block" returning from `main`, so that while the wrapper runs returning from `main` waits until the wrapper is done... that just doesn't seem feasible. The `exit` docs do not seem like the best place to document this, but I also couldn't think of a better one.
…tlarsan68 Fix tidy to allow `edition = "2024"` in `Cargo.toml` Needed to upgrade to edition 2024 eventually.
…pastorino Use unsafe extern blocks throughout the compiler Making this change in preparation for edition 2024. r? spastorino
Fix typos in floating-point primitive type docs Fixes a few typos. Also reflows the text of a couple of paragraphs in the source code to the standard line width to make the source easier to read (will have no effect on the rendered documentation).
…rgau More `unreachable_pub` Add `unreachable_pub` checking to some more compiler crates. A follow-up to rust-lang#126013. r? `@Urgau`
…r=petrochenkov ABI compat check: detect unadjusted ABI mismatches
fix Pointer to reference conversion docs The aliasing rules documented in rust-lang#128157 are wrong, this fixes them.
rustbot
added
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Aug 27, 2024
@bors r+ rollup=never p=8 |
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
Aug 27, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 27, 2024
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129401 (Partially stabilize `feature(new_uninit)`) - rust-lang#129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - rust-lang#129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - rust-lang#129635 (Use unsafe extern blocks throughout the compiler) - rust-lang#129645 (Fix typos in floating-point primitive type docs) - rust-lang#129648 (More `unreachable_pub`) - rust-lang#129649 (ABI compat check: detect unadjusted ABI mismatches) - rust-lang#129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
feature(new_uninit)
#129401 (Partially stabilizefeature(new_uninit)
)edition = "2024"
inCargo.toml
#129634 (Fix tidy to allowedition = "2024"
inCargo.toml
)unreachable_pub
#129648 (Moreunreachable_pub
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup