Skip to content

Rollup of 9 pull requests #141561

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 32 commits into from
Closed

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented May 25, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Mallets and others added 30 commits March 20, 2025 11:59
There only needs to be one `Fn` per symbol, not multiple.
Some are too long (> 100 chars), some are too short, some are missing
full stops, some are missing upper-case letters at the start of
sentences.
In several files they are entirely unnecessary, with the relevant names
already imported. And in a few I have added the necessary `use` item.
…=workingjubilee

Implement `normalize_lexically`

Implements rust-lang#134694

This is, I think, the most straightforward implementation I could do, which will hopefully more easily allow experimentation if we decide to change the design here.
…=dtolnay

Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678)

rust-lang#94678 was closed because of time constraints of the original author (`@kckeiks).`

This PR is a refresh of rust-lang#94678 where the original proposed changes are ported to the current status of the standard library.

In addition, this PR:
- implements the change suggested in rust-lang#94678 (comment)
- defines `set_multicast_hop_limit_v6` and `multicast_hop_limit_v6 ` only for UDP sockets and not for TCP sockets as originally proposed

Issue: rust-lang#139166
…ups, r=jdonszelmann

Simplify `attribute_groups`

It's more complicated than it needs to be.

r? `@jdonszelmann`
…der, r=lolbinarycat

[rustdoc] Unify type aliases rendering with other ADT

Fixes rust-lang#140739.

Better reviewed one commit at a time.

Just one thing I'm wondering: should we also render non-`repr` attributes? If so, I wonder if we shouldn't simply change `clean::TypeAlias` to contain the other ADT directly (`Struct`, `Enum` and `Union`) and remove the `TypeAlias::generics` field.

Can be done in a follow-up too.

cc `@camelid`
r? `@notriddle`
…kingjubilee

Clarify WTF-8 safety docs

This PR is a follow-up to PR rust-lang#140159, which clarifies ~~two things~~:
- the WTF-8 safety comment [was confusing](rust-lang#140159 (comment)), either surrogate condition is actually sufficient for safety, both are not required
- ~~the private `os_str::Slice` type name is easily confused with `std::slice`~~

~~Happy to bikeshed the `OsSlice` name, other alternatives are `OsStrSlice` and `StrSlice`. Now it's got a distinct name from `std::slice`, it's easy to search and replace.~~

cc `@thaliaarchi` `@workingjubilee`
…tion, r=dtolnay

Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace
Attempt to improve the `std::fs::create_dir_all` docs related to atomicity

The original paragraph was added in rust-lang#124520. It doesn't match the actual code logic. It says "function returns an error" if "the parent components" _(which also implies directories)_ "have been created already". The code is as follows:

https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3146
https://github.com/rust-lang/rust/blob/e88e85463468ce5d5ce468414eb69e3b15fa8d42/library/std/src/fs.rs#L3160

These lines suppress all errors if any path component is a directory. I've updated the paragraph to mirror this.
jhpratt added 2 commits May 25, 2025 23:56
…ld, r=Kobzol

ci: move PR job x86_64-gnu-tools to codebuild
…_unstable, r=compiler-errors

const-check: stop recommending the use of rustc_allow_const_fn_unstable

I have seen way too many people see the compiler suggest this attribute and then just apply it without a second thought. This is bad. So let's just stop recommending it; for the rare case where someone needs it, they'll eventually ask us and that way we can be sure that it is truly needed. The dev-guide still also explains `rustc_allow_const_fn_unstable`.

Cc `@rust-lang/wg-const-eval`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. rollup A PR which is a rollup labels May 25, 2025
@jhpratt
Copy link
Member Author

jhpratt commented May 25, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 25, 2025

📌 Commit 8fcd1a7 has been approved by jhpratt

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

bors commented May 26, 2025

⌛ Testing commit 8fcd1a7 with merge 33e2813...

bors added a commit that referenced this pull request May 26, 2025
Rollup of 9 pull requests

Successful merges:

 - #134696 (Implement `normalize_lexically`)
 - #138744 (Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678))
 - #140539 (Simplify `attribute_groups`)
 - #140863 ([rustdoc] Unify type aliases rendering with other ADT)
 - #140936 (Clarify WTF-8 safety docs)
 - #140952 (Specify that split_ascii_whitespace uses the same definition as is_ascii_whitespace)
 - #141472 (Attempt to improve the `std::fs::create_dir_all` docs related to atomicity)
 - #141502 (ci: move PR job x86_64-gnu-tools to codebuild)
 - #141559 (const-check: stop recommending the use of rustc_allow_const_fn_unstable)

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

The job dist-various-2 failed! Check out the build log: (web) (plain)

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

error[E0425]: cannot find value `IPV6_MULTICAST_HOPS` in crate `c`
   --> library/std/src/sys/net/connection/socket.rs:817:53
    |
817 |         setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
    |                                                     ^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `IPV6_MULTICAST_LOOP`
    |
   ::: /rust/deps/libc-0.2.172/src/wasi/p2.rs:117:1
    |
117 | pub const IPV6_MULTICAST_LOOP: c_int = 19;
    | ------------------------------------ similarly named constant `IPV6_MULTICAST_LOOP` defined here

error[E0425]: cannot find value `IPV6_MULTICAST_HOPS` in crate `c`
   --> library/std/src/sys/net/connection/socket.rs:821:70
    |
821 |         let raw: c_int = getsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS)?;
    |                                                                      ^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `IPV6_MULTICAST_LOOP`
    |
   ::: /rust/deps/libc-0.2.172/src/wasi/p2.rs:117:1
    |
117 | pub const IPV6_MULTICAST_LOOP: c_int = 19;
    | ------------------------------------ similarly named constant `IPV6_MULTICAST_LOOP` defined here

@bors
Copy link
Collaborator

bors commented May 26, 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 26, 2025
@jhpratt jhpratt closed this May 26, 2025
@jhpratt jhpratt deleted the rollup-1yjbnkh branch May 26, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.