Skip to content

Rollup of 12 pull requests#155519

Merged
rust-bors[bot] merged 33 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-P17uwTS
Apr 19, 2026
Merged

Rollup of 12 pull requests#155519
rust-bors[bot] merged 33 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-P17uwTS

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

folkertdev and others added 30 commits March 15, 2026 11:18
similar to how constants in those modules for numeric types have been deprecated
The test array is sorted by name at compile time. When `--exact` is
passed in, use binary search for O(f log n) lookups instead of an O(n)
linear scan, under the assumption that f << n (which is true for the
most relevant cases).

This is important for Miri, where the interpreted execution makes the
linear scan very expensive.

I measured this against a repo with 1000 empty tests, running
`cargo +stage1 miri nextest run test_00` (100 tests) under hyperfine:

* Before (linear scan): 49.7s ± 0.6s
* After (binary search): 41.9s ± 0.2s  (-15.7%)

I also tried a few other variations (particularly swapping matching tests to the front of the list + truncating the list), but the index + swap_remove approach proved to be the fastest.

Questions:

- [ ] To be conservative, I've assumed that test_main can potentially receive an unsorted list of tests. Is this assumption correct?
…parser

The spdx-rs crate is no longer maintained and is behind on its own dependency
updates. The only function that collect-license-metadata uses from it is
`spdx_rs::parsers::spdx_from_tag_value`, which parses the output of the `reuse`
tool to extract file names, licences and copyright text.

Replace this with a small minimal parser that handles just the subset
of the SPDX tag-value format that is needed: `Tag: Value` line pairs
and multi-line `<text>...</text>` blocks.

Coincidentally, this gets rid of the last transitive dependency on syn v1.
In `autolabel."T-compiler"`, several `./tests/*` dirs are listed.

But many of them are missing from `assign.owners`. Add them all to
`assign.owners` so reviewers are picked from the compiler group, and not
from the small `assign.adhoc_groups.fallback` group.
Dead code elimination used to fail when a Drop impl contained a panic
and a potentially-panicking external function was called after the value
was created. This was fixed since 1.82 but no regression test was added.

The test verifies that foo() compiles to just a call to unknown() and
ret void, with no panic or panicking call in the function body.

Signed-off-by: Naveen R. Iyer <iyernaveenr@gmail.com>
Addresses rust-lang#154406 in part.
assert_eq will be done in a separate PR.
…4532-needs-test, r=Mark-Simulacrum

Add regression test for dead code elimination with drop + panic

Add a codegen test for rust-lang#114532.

The bug was that dead code elimination failed when a `Drop` impl contained a `panic!` and a potentially-panicking external function was called after the value was created. This was fixed since 1.82 but no regression test was added.

The test verifies that `foo()` compiles to just a call to `unknown()` + `ret void`, with no panic or panicking call in the function body.

Closes rust-lang#114532
…Mark-Simulacrum

Replace the spdx-rs dependency with a minimal in-tree SPDX tag-value parser

The spdx-rs crate [is no longer maintained](https://github.com/doubleopen-project/spdx-rs/pulls) and is behind on its own dependency updates. It is currently used in [the collect-license-metadata tool](https://github.com/rust-lang/rust/tree/main/src/tools/collect-license-metadata), employing a single function therefrom: `spdx_rs::parsers::spdx_from_tag_value`, which parses the output of the `reuse` tool to extract file names, licences and copyright text.

This PR replaces the use of said function with a small minimal parser that handles just the subset of the SPDX tag-value format that is needed: `Tag: Value` line pairs and multi-line `<text>...</text>` blocks.

Coincidentally, this gets rid of the last transitive dependency on syn v1.
Add test for coalescing of diagnostic attribute duplicates

There is an existing [test](github.com/rust-lang/rust/blob/main/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.rs) that warnings for duplicates are emitted, but not for the messages themselves.
triagebot.toml: Sync `assign.owners` with `autolabel."T-compiler"`

In `autolabel."T-compiler"`, several `./tests/*` dirs are listed.

But many of them are missing from `assign.owners`. Add them all to `assign.owners` so reviewers are picked from the compiler group, and not from the small `assign.adhoc_groups.fallback` group.

Discovered in rust-lang#153941 (comment).

CC fallback group @Mark-Simulacrum @jieyouxu who can maybe confirm that the old setup was not intentional? (Edit: I hope it was not intentional, because in that case I should have reached out to you personally beforehand.)
…-matches, r=Amanieu

Add temporary scope to assert_matches

Addresses rust-lang#154406 in part. `assert_eq` will be done in a separate PR.
…ark-Simulacrum

deprecate `std::char` constants and functions

similar to how constants in those modules for numeric types have been deprecated. The `std::char` module contains:

Three stable constants that this PR deprecates. These already link to their associated constant equivalents.

- `MAX`
- `REPLACEMENT_CHARACTER`
- `UNICODE_VERSION`

two unstable constants that this PR removes. The constants are already stablized as associated constants on `char`.

- `MAX_LEN_UTF8`
- `MAX_LEN_UTF16`

Four stable functions that this PR deprecates. These already link to their method equivalents.

- `fn decode_utf16`
- `fn from_digit`
- `fn from_u32`
- `fn from_u32_unchecked⚠`

discussion at [#t-libs > should &rust-lang#96;std::char::{MIN, MAX}&rust-lang#96; be deprecated?](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/should.20.60std.3A.3Achar.3A.3A.7BMIN.2C.20MAX.7D.60.20be.20deprecated.3F/with/579444750).

r? libs-api
…ark-Simulacrum

libtest: use binary search for --exact test filtering

When `--exact` is passed in, use binary search for O(f log n) lookups instead of an O(n) linear scan, under the assumption that f << n (which is true for the most relevant cases).

This is important for Miri, where the interpreted execution makes the linear scan very expensive.

I measured this against a repo with 1000 empty tests, running `cargo +stage1 miri nextest run test_00` (100 tests) under hyperfine:

* Before (linear scan): 49.7s ± 0.6s
* After (binary search): 41.9s ± 0.2s  (-15.7%)

I also tried a few other variations (particularly swapping matching tests to the front of the list + truncating the list), but the index + swap_remove approach proved to be the fastest.

Questions:

- [ ] To be conservative, I've assumed that test_main can potentially receive an unsorted list of tests. Is this assumption correct?
…jhpratt

add #[must_use] macros for floats

try resolve rust-lang#154854
…=RalfJung

c-variadic: add roundtrip test

tracking issue: rust-lang#44930

Test that our `va_arg` implementation matches (as in, can decode) how LLVM passes c-variadic arguments.

And some comment followup to rust-lang#152980 (cc @RalfJung, feel free to review this PR too btw).

r? tgross35
…d, r=JonathanBrouwer

Remove `AttributeLintKind` variants - part 2

Follow-up of rust-lang#154432.
Part of rust-lang#153099.

r? @JonathanBrouwer
…nBrouwer

codegen-options docs: remove -Csoft-float

This got removed in rust-lang#154106 but I didn't realize there are still docs mentioning it.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Apr 19, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool 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 Apr 19, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@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
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 19, 2026

📌 Commit cd8752b has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Apr 19, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 19, 2026
Rollup of 12 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-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 19, 2026

☀️ Try build successful (CI)
Build commit: 02c0117 (02c0117f5df886d6c69474b22aea038145063376, parent: ec2d669db8e5ca2cb1604c69a831ef244ebd9aa9)

@rust-bors rust-bors Bot 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 Apr 19, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 19, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 13m 19s
Pushing 38799a3 to main...

@rust-bors rust-bors Bot merged commit 38799a3 into rust-lang:main Apr 19, 2026
13 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 19, 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 22cc674 (parent) -> 38799a3 (this PR)

Test differences

Show 855 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/issues/issue-114532.rs: [missing] -> pass (J1)
  • macros::temporary_scope_introduction: [missing] -> pass (J1)
  • [ui] tests/ui/c-variadic/roundtrip.rs: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#both: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#label: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#note: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/c-variadic/roundtrip.rs: [missing] -> pass (J0)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#both: [missing] -> pass (J3)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#label: [missing] -> pass (J3)
  • [ui] tests/ui/diagnostic_namespace/duplicate_coalescing.rs#note: [missing] -> pass (J3)
  • [codegen] tests/codegen-llvm/issues/issue-114532.rs: [missing] -> pass (J4)
  • [ui] tests/ui/c-variadic/roundtrip.rs: [missing] -> ignore (gcc backend is marked as ignore) (J5)
  • macros::temporary_scope_introduction: [missing] -> pass (J6)

Additionally, 842 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 38799a320def5b1d32acc797d2eaf6bb6bf98445 --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. x86_64-gnu-miri: 1h 4m -> 1h 24m (+31.8%)
  2. dist-apple-various: 1h 28m -> 1h 54m (+29.9%)
  3. x86_64-msvc-ext3: 1h 22m -> 1h 44m (+26.6%)
  4. optional-x86_64-gnu-parallel-frontend: 2h 21m -> 1h 48m (-23.3%)
  5. i686-gnu-nopt-2: 2h 13m -> 1h 44m (-22.0%)
  6. dist-i686-msvc: 2h 23m -> 1h 52m (-21.8%)
  7. dist-i586-gnu-i586-i686-musl: 1h 35m -> 1h 16m (-20.1%)
  8. x86_64-gnu-aux: 2h 27m -> 2h 6m (-14.3%)
  9. aarch64-apple: 2h 44m -> 2h 22m (-13.7%)
  10. test-various: 2h 10m -> 1h 55m (-11.7%)
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# Message Perf Build Sha
#153873 deprecate std::char constants and functions eca31b3f7db71ff0b5e4027940e0731f09b87342 (link)
#154823 Replace the spdx-rs dependency with a minimal in-tree SPDX … 6ff3e550f25af1e72d421ad302c99c89ef086c79 (link)
#154865 libtest: use binary search for --exact test filtering bab50e18820ae70b10fe3c5e0acb1b63c3c93707 (link)
#154979 add #[must_use] macros for floats d78704b81d1b0a9b0c38d20b9076adc65f3a7265 (link)
#155294 Add test for coalescing of diagnostic attribute duplicates f0ff32a9c45e1f795e148ed447cfdfad8264112b (link)
#155352 triagebot.toml: Sync assign.owners with `autolabel."T-com… ba12d269f5bba4a1540d99a2d4c72fcb3a8c7019 (link)
#155370 Add regression test for dead code elimination with drop + p… 64280a09fb7117b492fb7e874ecab53897530d23 (link)
#155431 Add temporary scope to assert_matches 2e9f7ca0e06d04d83c7e3ed5ffa3669e88a323a9 (link)
#155486 c-variadic: add roundtrip test d159de92be52d72617cad82ae041562e1cfe5d0e (link)
#155504 Remove AttributeLintKind variants - part 2 42e04f44ae5e80fb4b4cc29a2f759fbb864394bd (link)
#155510 Update Tidy python executable path af83e769d73dc5ead035d44baf599dec39b46b5a (link)
#155514 codegen-options docs: remove -Csoft-float f96d9ce858486ae2f88b98d8ecba403e2d2c647e (link)

previous master: 22cc6747b1

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 (38799a3): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.3%, 0.5%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.6%, secondary 4.1%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.3% [3.8%, 7.2%] 5
Improvements ✅
(primary)
-1.6% [-2.1%, -1.0%] 2
Improvements ✅
(secondary)
-1.5% [-1.5%, -1.5%] 1
All ❌✅ (primary) -1.6% [-2.1%, -1.0%] 2

Cycles

Results (primary -3.1%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.1% [-3.1%, -3.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.1% [-3.1%, -3.1%] 1

Binary size

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

Bootstrap: 492.081s -> 490.954s (-0.23%)
Artifact size: 394.29 MiB -> 394.29 MiB (0.00%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.