Skip to content

Rollup of 10 pull requests - #156374

Closed
JonathanBrouwer wants to merge 22 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Orm2U9C
Closed

Rollup of 10 pull requests#156374
JonathanBrouwer wants to merge 22 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Orm2U9C

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

schneemsand others added 22 commits March 2, 2026 14:42
This addition allows an end-user to inspect the environment variables that are visible to the process when it boots.
…use lint
(or more accurately `Result<T, Uninhabited>`/`ControlFlow<Uninhabited, T>`).
This generalizes a previous change where we only did this for `T = ()`.
specifically, do not allow NULL bytes and the empty string
* Add `str::word_to_titlecase()` to `alloc`
* Address review comment
* Add mention of sendfile(2) and splice(2) to fs::copy() documentation.
* Oxford comma fix
…, r=fee1-dead
Consider `Result<T, Uninhabited>` and `ControlFlow<Uninhabited, T>` to be equivalent to `T` for must use lint
This is an extension to rust-lang#147382.
With this PR `Result<T, Uninhabited>` and `ControlFlow<Uninhabited, T>` considered as must use iif `T` must be used.
For such cases the lint will mention that `T` is wrapped in a `Result`/`ControlFlow` with an uninhabited error/break.
The reasoning here is that `Result<T, Uninhabited>` is equivalent to `T` in which values can be represented and thus the must-used-ness should also be equivalent.
Fixesrust-lang#65861
…s, r=Mark-Simulacrum
Add Command::get_resolved_envs
This addition allows an end-user to inspect the environment variables that are visible to the process when it boots.
Discussed in:
- Tracking issue: rust-lang#149070 (partially closes)
- ACP: rust-lang/libs-team#194
… r=Mark-Simulacrum
Add `str::word_to_titlecase()` to `alloc`
A small addition to rust-lang#153892.
Hasn't gone through ACP, so needs libs-API signoff.
@rustbot label A-Unicode T-libs-api
…riplett
Add mention of sendfile(2) and splice(2) to fs::copy() documentation.
Fixesrust-lang#155968 by adding mention of sendfile(2) and splice(2) from io::copy()
…=Mark-Simulacrum
Update a bunch of bootstrap dependencies to remove windows-target
Follow up to rust-lang#155444
…r=jdonszelmann
error on empty `export_name`
fixesrust-lang#155495
Using an empty string as the name makes LLVM make up a name. However this name can be inconsistent between compilation units, which is UB and can cause linking errors, and some parts of LLVM just crash on the empty name (see the linked issue).
As far as we know there is only one valid pattern that could use this, a `#[used]` static that is not referenced by the program at all. That is not UB, but the `export_name` is not required for that to work, just normal rust name mangling would do fine.
Technically this is a breaking change, but it seems unlikely that this actually breaks code in the wild that wasn't already broken. I'll leave it up to T-lang to determine what is required here (crater run, FCW, ...), but my gut feeling is that we could just merge this and nobody would notice.
…=mejrs
validate `#[link_name = "..."]` & `#[link(name = "...")]` parameters
fixesrust-lang#155776fixesrust-lang#155484
specifically, do not allow NULL bytes and the empty string in `#[link_name = "..."]` and `#[link(name = "...")]`.
Like some of the others I think this formally needs to be looked at by T-lang because these errors would not show up if not linking.
The LLVM erorr on `#[linke_name = "\0"]` is emitted here, it is not e.g. target-specific.
https://github.com/llvm/llvm-project/blob/d593279c0b2891f0b0c8af3f70a1a0383b4ad1b5/llvm/lib/IR/Value.cpp#L336-L342
On `#[link(name = "")]` we already error today. A NULL byte in `#[link(name = "\0")]` is caught by the linker (https://godbolt.org/z/vnz9sYbPs), using `#[link_name = ""]` makes LLVM generate a name (https://godbolt.org/z/1hWEo4cxf) which is not useful and likely to cause linker errors.
r? jdonszelmann
…acrum
remove turbofish notation + use None / Some instead of Option:: (in match documentation)
…r=Mark-Simulacrum
mark some panicking methods around Duration as track_caller
Currently when they panic it looks like this
```
0.005045 ---- instant_checked_duration_since_nopanic stdout ----
0.000039
0.000009 thread 'instant_checked_duration_since_nopanic' (2) panicked at /home/runner/work/miri-test-libstd/miri-test-libstd/rust-src-patched/library/std/src/time.rs:445:33:
0.000007 overflow when subtracting duration from instant
0.000006 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
0.000007 note: in Miri, you may have to set `MIRIFLAGS=-Zmiri-env-forward=RUST_BACKTRACE` for the environment variable to have an effect
```
That's pretty useless.
Also fix the panic message while we are at it.
@rust-borsrust-borsBot added the rollup A PR which is a rollup label May 9, 2026
@rustbotrustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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. labels May 9, 2026
@JonathanBrouwer

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors

rust-borsBot commented May 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 390a757 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 9, 2026
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request May 9, 2026
Rollup of 10 pull requests
try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request May 9, 2026
…uwer
Rollup of 10 pull requests
Successful merges:
- #148214 (Consider `Result<T, Uninhabited>` and `ControlFlow<Uninhabited, T>` to be equivalent to `T` for must use lint)
- #149362 (Add Command::get_resolved_envs)
- #155705 (Add `str::word_to_titlecase()` to `alloc`)
- #155970 (Add mention of sendfile(2) and splice(2) to fs::copy() documentation.)
- #156006 (Update a bunch of bootstrap dependencies to remove windows-target)
- #155188 (Add regression test for issue 144329)
- #155515 (error on empty `export_name`)
- #155817 (validate `#[link_name = "..."]` & `#[link(name = "...")]` parameters)
- #156107 (remove turbofish notation + use None / Some instead of Option:: (in match documentation))
- #156133 (mark some panicking methods around Duration as track_caller)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-1 failed! Check out the build log: (web)(plain enhanced)(plain)

Click to see the possible cause of the failure (guessed by this bot)
test expr_store::scope::tests::test_shadow_variable ... ok
test expr_store::tests::body::async_fn_weird_param_patterns ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::tests::body::block::inner_item_smoke ... ok
error: test failed, to rerun pass `-p hir-def --lib`
Caused by:
process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-c439368f2b64a049 '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 0:49:38
local time: Sat May 9 22:48:34 UTC 2026
network time: Sat, 09 May 2026 22:48:34 GMT
##[error]Process completed with exit code 1.

@rust-borsrust-borsBot 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 9, 2026
@rust-bors

rust-borsBot commented May 9, 2026

Copy link
Copy Markdown
Contributor

💔 Test for d9b9e50 failed: CI. Failed job:

@rust-bors

rust-borsBot commented May 9, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 791e112 (791e1129bd35136395285c2e4c432cc3f21c33bb, parent: 29155a4cd6e9ecddf1ce1c539711df678923d69a)

@rust-borsrust-borsBot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 10, 2026
@rustbotrustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
@rust-bors

rust-borsBot commented May 10, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@JonathanBrouwer
JonathanBrouwer deleted the rollup-Orm2U9C branch August 21, 2026 08:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)rollupA PR which is a rollupS-waiting-on-authorStatus: This is awaiting some action (such as code changes or more information) from the author.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

13 participants

@JonathanBrouwer@rust-log-analyzer@matthiaskrgr@rustbot@schneems@WaffleLapkin@folkertdev@DaniPopes@bjorn3@Cheese-Space@RalfJung@Jules-Bertholet@tomilepp