Skip to content

Rollup of 11 pull requests - #156378

Merged
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
matthiaskrgr:rollup-NO89xfV
May 10, 2026
Merged

Rollup of 11 pull requests#156378
rust-bors[bot] merged 24 commits into
rust-lang:mainfrom
matthiaskrgr:rollup-NO89xfV

Conversation

@matthiaskrgr

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

schneemsand others added 24 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.
specifically, do not allow NULL bytes and the empty string
We call `get_switch_int_data` once for the switch and then pass that
data to `apply_switch_int_edge_effect` for each switch target.
The only case in practice is `MaybePlacesSwitchIntData` which does an
awkward thing, maintaining an index into the discriminants and updating
it on each call to `apply_switch_int_edge_effect`.
This commit changes things to do more work up front in
`get_switch_int_data`, in order to then do less work in
`apply_switch_int_edge_effect`. This avoids the need for the `variants`
and `next_discr` methods and the discriminants index. Overall it's a
little simpler.
* 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
…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
…ff, r=cjgillot
Change `SwitchInt` handling in dataflow analysis.
We call `get_switch_int_data` once for the switch and then pass that data to `apply_switch_int_edge_effect` for each switch target.
The only case in practice is `MaybePlacesSwitchIntData` which does an awkward thing, maintaining an index into the discriminants and updating it on each call to `apply_switch_int_edge_effect`.
This commit changes things to do more work up front in `get_switch_int_data`, in order to then do less work in `apply_switch_int_edge_effect`. This avoids the need for the `variants` and `next_discr` methods and the discriminants index. Overall it's a little simpler.
r? @cjgillot
…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.
…literal, r=JonathanBrouwer
`rustc_attr_parsing`: add `AcceptContext::expect_string_literal`
@rust-borsrust-borsBot added the rollup A PR which is a rollup label May 10, 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 10, 2026
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request May 10, 2026
Rollup of 11 pull requests
Successful merges:
- #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)
- #156169 (Change `SwitchInt` handling in dataflow analysis.)
- #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)
- #156363 (`rustc_attr_parsing`: add `AcceptContext::expect_string_literal`)
@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::tests::body::array_element_cfg ... ok
test expr_store::scope::tests::while_let_adds_binding ... ok
test expr_store::tests::body::async_fn_weird_param_patterns ... 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 1:05:42
local time: Sun May 10 03:13:51 UTC 2026
network time: Sun, 10 May 2026 03:13:52 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 10, 2026
@rust-bors

rust-borsBot commented May 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 488aaf6 failed: CI. Failed job:

@matthiaskrgr

Copy link
Copy Markdown
MemberAuthor

@bors retry

@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 10, 2026
@rust-borsrust-borsBot mentioned this pull request May 10, 2026
@rust-bors

This comment has been minimized.

rust-borsBot pushed a commit that referenced this pull request May 10, 2026
Rollup of 11 pull requests
Successful merges:
- #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)
- #156169 (Change `SwitchInt` handling in dataflow analysis.)
- #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)
- #156363 (`rustc_attr_parsing`: add `AcceptContext::expect_string_literal`)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-x86_64-netbsd failed! Check out the build log: (web)(plain enhanced)(plain)

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

@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 10, 2026
@rust-bors

rust-borsBot commented May 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 16efdfa failed: CI. Failed job:

@matthiaskrgr

Copy link
Copy Markdown
MemberAuthor

@bors retry

@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 10, 2026
@rust-bors

This comment has been minimized.

@rust-borsrust-borsBot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 10, 2026
@rust-bors

rust-borsBot commented May 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: matthiaskrgr
Duration: 3h 21m 45s
Pushing d1961be to main...

@rust-bors
rust-borsBot merged commit d1961be into rust-lang:mainMay 10, 2026
12 checks passed
@rustbotrustbot added this to the 1.97.0 milestone May 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing ce89c89 (parent) -> d1961be (this PR)

Test differences

Show 346 test diffs

Stage 1

  • [ui] tests/ui/attributes/invalid-export-name.rs: [missing] -> pass (J0)
  • [ui] tests/ui/attributes/invalid-link-name.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/issues/issue-144329-niched-option-check.rs: [missing] -> pass (J2)

Stage 2

  • [codegen] tests/codegen-llvm/issues/issue-144329-niched-option-check.rs: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/invalid-export-name.rs: [missing] -> pass (J3)
  • [ui] tests/ui/attributes/invalid-link-name.rs: [missing] -> pass (J3)

Additionally, 340 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d1961bebe091816d8ce9771f29ad471dda398f5d --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-llvm-mingw: 1h 28m -> 1h 56m (+31.2%)
  2. x86_64-rust-for-linux: 47m 43s -> 34m 45s (-27.2%)
  3. x86_64-gnu: 2h 21m -> 1h 46m (-25.2%)
  4. armhf-gnu: 1h 7m -> 1h 23m (+23.4%)
  5. optional-x86_64-gnu-parallel-frontend: 1h 49m -> 2h 15m (+23.0%)
  6. i686-msvc-1: 3h 2m -> 2h 23m (-21.4%)
  7. x86_64-msvc-2: 2h 31m -> 1h 59m (-21.0%)
  8. dist-x86_64-apple: 2h 9m -> 1h 48m (-16.4%)
  9. x86_64-gnu-aux: 1h 47m -> 2h 4m (+16.3%)
  10. dist-aarch64-msvc: 1h 38m -> 1h 53m (+15.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#149362Add Command::get_resolved_envsf2b4b967fa93e468d6aef1ae5aefdad0a5d2c02b (link)
#155188Add regression test for issue 144329932c24b4f62b13c0f66edffdc5402f97b278a362 (link)
#155515error on empty export_name45a57c655ea0cb45b91b51ea2dfbeb54281b45de (link)
#155705Add str::word_to_titlecase() to alloca8e597004fc1cc8f8433b96d33db7b26f6f86319 (link)
#155817validate #[link_name = "..."] & #[link(name = "...")] p…a6023f4e23d7482c4b730fd67174f493e1a38178 (link)
#155970Add mention of sendfile(2) and splice(2) to fs::copy() docu…aeaffe02924ccb8ad336e2f53643395237e0c9db (link)
#156006Update a bunch of bootstrap dependencies to remove windows-…36ed88bafc81b853566984c9d2d8b18c316b30e0 (link)
#156107remove turbofish notation + use None / Some instead of Opti…d94019d3aa562cb884e0d587f0394bd031934c1d (link)
#156133mark some panicking methods around Duration as track_callerca161f098f237263c3dd33352aa4d6c9dbefa2e5 (link)
#156169Change SwitchInt handling in dataflow analysis.797fc5b3597e2bd8380c7d3e5418445b0f1f4536 (link)
#156363rustc_attr_parsing: add `AcceptContext::expect_string_lit…29b4222118c3491a82d51611f079421c9564bcf2 (link)

previous master: ce89c89857

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (d1961be): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 0.5%, secondary 1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
11.1%[11.1%, 11.1%]1
Regressions ❌
(secondary)
1.8%[1.8%, 1.8%]1
Improvements ✅
(primary)
-3.0%[-4.1%, -1.0%]3
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.5%[-4.1%, 11.1%]4

Cycles

This perf run didn't have relevant results for this metric.

Binary size

Results (primary 0.2%, secondary 0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

meanrangecount
Regressions ❌
(primary)
0.2%[0.1%, 0.4%]8
Regressions ❌
(secondary)
0.4%[0.4%, 0.4%]31
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.2%[0.1%, 0.4%]8

Bootstrap: 498.161s -> 499.009s (0.17%)
Artifact size: 397.12 MiB -> 397.20 MiB (0.02%)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupT-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.

14 participants

@matthiaskrgr@rust-log-analyzer@rust-timer@rustbot@schneems@folkertdev@DaniPopes@bjorn3@Cheese-Space@RalfJung@nnethercote@scrabsha@Jules-Bertholet@tomilepp