Skip to content

Rollup of 12 pull requests #140562

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

Closed
wants to merge 50 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

pudongair and others added 30 commits March 26, 2025 15:28
These methods now return Result<(), TryLockError> instead of
Result<bool, Error> to make their use less errorprone
If you want to logically split an iterator after `n` items, you might first
discover `take`. Before this change, you'd find that `take` consumes the
iterator, and you'd probably be stuck. The answer involves `by_ref`, but that's
hard to discover, especially since `by_ref` is a bit abstract and `Iterator`
has many methods.

After this change, you'd see the example showing `take` along with `by_ref`,
which allows you to continue using the rest of the iterator. `by_ref` had a
good example involving `take` already, so this change just duplicates that
existing example under `take`.
* "while until either" could also be changed to "for a while until either", but I just deleted "while".
* fixed sentence with incorrect "at" and "has/have".
* linked [*currently allocated*] similar to other methods.
I found "Rustc dev guide subtree update awkward"
It was observed that some people were missing the `edition20xx` rustdoc
attribute. Although this probably won't solve that problem, I'd still
like to highlight it as something to be aware of.
…rary

Based on lessons learned from 2024. There's probably still more details
to say here since it was a ton of work. These are the major points that
I remember.
This updates to the latest version of mdbook which has had a variety
of fixes of new features since the last update.

Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0448
This adds documentation on how to stabilize the edition in the compiler.
Refactor the dependency structure from a nested unordered list to a single-level ordered list.

IMO, this is clearer, but happy to close this PR without merging, if the change is not desired.
Also, these are normal Rust things (crates/packages), so remove the word *normal*.
…ple, r=workingjubilee

docs: Add example to `Iterator::take` with `by_ref`

If you want to logically split an iterator after `n` items, you might first discover `take`. Before this change, you'd find that `take` consumes the iterator, and you'd probably be stuck. The answer involves `by_ref`, but that's hard to discover, especially since `by_ref` is a bit abstract and `Iterator` has many methods.

After this change, you'd see the example showing `take` along with `by_ref`, which allows you to continue using the rest of the iterator. `by_ref` had a good example involving `take` already, so this change just duplicates that existing example under `take`.
…, r=workingjubilee

Fix some grammar errors and hyperlinks in doc for `trait Allocator`

I was reading the allocator docs and noticed some weird sentences and missing hyperlink, so I fixed them and made this small PR.

* "while until either" could also be changed to "for a while until either", but I just deleted "while".
* fixed sentence with incorrect "at" and "has/have".
* linked [*currently allocated*] similar to other methods. All other hyperlinks are fine.
…ng, r=workingjubilee

simd_select_bitmask: the 'padding' bits in the mask are just ignored

Fixes rust-lang#137942: we documented simd_select_bitmask to require the 'padding' bits in the mask (the mask can sometimes be longer than the vector; I am referring to these extra bits as 'padding' here)  to be zero, mostly because nobody felt like doing the research for what should be done when they are non-zero. However, codegen is already perfectly happy just ignoring them, so in practice they can have any value. Some of the intrinsic wrappers in stdarch have trouble ensuring that they are zero. So let's just adjust the docs and Miri to permit non-zero 'padding' bits.

Cc ```@Amanieu``` ```@workingjubilee```
…bilee

std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into

Closes rust-lang#139958

The current documentation for `std::fs::remove_dir_all` function does not explicitly mention the error types that may be returned in concurrent scenarios. Specifically, when one thread attempts to remove a directory tree while another thread simultaneously writes files to that directory, the function may return an `io::ErrorKind::DirectoryNotEmpty` error, but this behavior is not clearly mentioned in the current documentation.

r? libs
…=GuillaumeGomez

rustdoc: Fix doctest heuristic for main fn wrapping

Fixes rust-lang#140412 which regressed in rust-lang#140220 that I reviewed. As mentioned in rust-lang#140220 (comment), at the time I didn't have the time to re-review its latest changes and should've therefore invalided my previous "r=me" and blocked the PR on another review given the fragile nature of the doctest impl. This didn't happen which is my fault.

Contains some other small changes. Diff best reviewed modulo whitespace.
r? `@GuillaumeGomez`
Fix handling of LoongArch target features not supported by LLVM 19

Fixes rust-lang#140455
rustc-dev-guide subtree update

r? `@ghost`
…d_internal_symbol, r=bjorn3

allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`

The need for this came up in rust-lang/compiler-builtins#897, but in general this seems useful and valid to allow.

Based on a quick scan, I don't think changes to the generated assembly are needed.

cc `@bjorn3`
…-tool-error-output, r=clubby789

Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite

Fixes rust-lang#138134.

It now looks like this:

![Screenshot From 2025-05-01 17-41-12](https://github.com/user-attachments/assets/ae7f2b37-3619-47ff-941d-5d9a7cdd9b6b)

cc `@kpreid`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels May 1, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented May 1, 2025

📌 Commit 633788e has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors 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 May 1, 2025
@bors
Copy link
Collaborator

bors commented May 1, 2025

⌛ Testing commit 633788e with merge 9033d60...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 1, 2025
…llaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#138703 (chore: remove redundant words in comment)
 - rust-lang#139186 (Refactor `diy_float`)
 - rust-lang#139343 (Change signature of File::try_lock and File::try_lock_shared)
 - rust-lang#139780 (docs: Add example to `Iterator::take` with `by_ref`)
 - rust-lang#139802 (Fix some grammar errors and hyperlinks in doc for `trait Allocator`)
 - rust-lang#140034 (simd_select_bitmask: the 'padding' bits in the mask are just ignored)
 - rust-lang#140062 (std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concurrently written into)
 - rust-lang#140420 (rustdoc: Fix doctest heuristic for main fn wrapping)
 - rust-lang#140460 (Fix handling of LoongArch target features not supported by LLVM 19)
 - rust-lang#140538 (rustc-dev-guide subtree update)
 - rust-lang#140552 (allow `#[rustc_std_internal_symbol]` in combination with `#[naked]`)
 - rust-lang#140556 (Improve error output in case `nodejs` or `npm` is not installed for rustdoc-gui test suite)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job arm-android failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Collaborator

bors commented May 1, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.