Skip to content

Rollup of 19 pull requests#154092

Merged
rust-bors[bot] merged 52 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-GKNFJe0
Mar 19, 2026
Merged

Rollup of 19 pull requests#154092
rust-bors[bot] merged 52 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-GKNFJe0

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

mati865 and others added 30 commits February 19, 2026 22:25
Because rustc doesn't handle split debuginfo for these targets,
enabling that option causes them to be missing some of the debuginfo.
`-Zunpretty=expanded,hygiene` was not printing syntax context annotations
for identifiers and lifetimes inside `macro_rules!` bodies. These tokens
are printed via `print_tt()` → `token_to_string_ext()`, which converts
tokens to strings without calling `ann_post()`. This meant that
macro-generated `macro_rules!` definitions with hygienic metavar
parameters (e.g. multiple `$marg` distinguished only by hygiene) were
printed with no way to tell them apart.

This was fixed by adding a match on `token.kind` in `print_tt()` to call
`ann_post()` for `Ident`, `NtIdent`, `Lifetime`, and `NtLifetime`
tokens, matching how `print_ident()` and `print_lifetime()` already
handle AST-level identifiers and lifetimes.

Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
Add `unpretty-debug-shadow` test covering macro body tokens that
reference a shadowed variable, and simplify the `unpretty-debug-metavars`
test macro.

Signed-off-by: Andrew V. Teylu <andrew.teylu@vector.com>
Ubuntu 26.04 has `llvm-22` packages that we can test with.
The `Dockerfile` is otherwise the same as the `llvm-21` runners.
Match the other derive macros in the module (Ord, PartialEq, PartialOrd) by
linking to the section in the trait documentation about how the derive macro
works.
This is more consistent with what the trait is called elsewhere in tree
(specifically compiler-builtins and test-float-parse).
`RawFloat` is currently used specifically for the implementation of the
lemire algorithm, but it is useful for more than that. Split it into
three different traits:

* `Float`: Anything that is reasonably applicable to all floating point
  types.
* `FloatExt`: Items that should be part of `Float` but don't work for
  all float types. This will eventually be merged back into `Float`.
* `Lemire`: Items that are specific to the Lemire algorithm.
`Float` and `FloatExt` are already used by both parsing and printing, so
move them out of `dec2flt` to a new module in `num::imp`. `Int` `Cast`
have the potential to be used more places in the future, so move them
there as well. `Lemire` is the only remaining trait; since it is small,
move it into the `dec2flt` root.

The `fmt::LowerExp` bound is removed from `Float` here since the trait
is moving into a module without `#[cfg(not(no_fp_fmt_parse))]` and it
isn't implemented with that config (it's not easily possible to add
`cfg` attributes to a single supertrait, unfortunately). This isn't a
problem since it isn't actually being used.
Co-authored-by: BoxyUwU <rust@boxyuwu.dev>
When encountering an inference error where a return type must be known, like when calling `Iterator::sum::<T>()` without specifying `T`, look for all `T` that would satisfy `Sum<S>`. If only one, suggest it.

```
error[E0283]: type annotations needed
  --> $DIR/cannot-infer-iterator-sum-return-type.rs:4:9
   |
LL |     let sum = v
   |         ^^^
...
LL |         .sum(); // `sum::<T>` needs `T` to be specified
   |          --- type must be known at this point
   |
   = note: cannot satisfy `_: Sum<i32>`
help: the trait `Sum` is implemented for `i32`
  --> $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
  ::: $SRC_DIR/core/src/iter/traits/accum.rs:LL:COL
   |
   = note: in this macro invocation
note: required by a bound in `std::iter::Iterator::sum`
  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
   = note: this error originates in the macro `integer_sum_product` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider giving `sum` an explicit type, where the type for type parameter `S` is specified
   |
LL |     let sum: i32 = v
   |            +++++
```
When calling an fn that returns a return type as a returned expression, point at the return type to explain that it affects the expected type.

```
error[E0308]: mismatched types
    --> f56.rs:5:15
     |
   3 | fn main() {
     |          - the call expression's return type is influenced by this return type
   4 |     let a = 0;
   5 |     ptr::read(&a)
     |     --------- ^^ expected `*const ()`, found `&{integer}`
     |     |
     |     arguments to this function are incorrect
     |
     = note: expected raw pointer `*const ()`
                  found reference `&{integer}`
note: function defined here
    --> library/core/src/ptr/mod.rs:1681:21
     |
1681 | pub const unsafe fn read<T>(src: *const T) -> T {
     |                     ^^^^
```
The compiler is unaware of the restricted range of the input, so it is
unable to optimize out the final division and modulus. By doing this
manually, we get a nontrivial performance gain.
…ouxu

bootstrap: Allow `--bless`ing changes to editor settings files

Previously, on any change you would have to first edit all 4 settings files by hand, then run the tests 4 times in a row to discover what the new hashes are. After this change, you still need to edit the files by hand, but you can now run `x test --bless -- hash` to update the hashes without manually editing them.
@rustbot rustbot added A-CI Area: Our Github Actions CI 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-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. labels Mar 19, 2026
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 19, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

📌 Commit 71e463b 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 Mar 19, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 19, 2026
…uwer

Rollup of 19 pull requests

Successful merges:

 - #152870 (Do not enable split debuginfo for windows-gnu)
 - #153333 (Fix bootstrap rust build failure for vxworks)
 - #153681 (ci: add runners for vanilla LLVM 22)
 - #153727 (When single impl can satisfy inference error, suggest type)
 - #153824 (Add `Wake` diagnostic item for `alloc::task::Wake`)
 - #154077 (Optimize 128-bit integer formatting)
 - #154078 (`define_callbacks` tweaks)
 - #151905 (Split the `dec2flt::RawFloat` trait for easier reuse)
 - #153170 (Add is_disconnected functions to mpsc and mpmc channels)
 - #153308 (Add hygiene annotations for tokens in `macro_rules!` bodies)
 - #153557 (fix inference variables leaking into HIR const literal lowering logic)
 - #153804 (Derive Macro Eq: link to more detailed documentation)
 - #153913 (Fix some suggestions of the `for-loops-over-fallibles` lint)
 - #153974 (Point at return type when it is the source of the type expectation)
 - #153987 (mGCA: Lower const generic args to infer when needed)
 - #154018 (simplify and remove `tests/ui/kindck` and related tests)
 - #154036 (borrowck/type_check: remove helper left-over from unsized locals)
 - #154038 (merge `regions-outlives-nominal-type-*` tests into one file)
 - #154041 (bootstrap: Allow `--bless`ing changes to editor settings files)
@rust-bors rust-bors bot 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 Mar 19, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 19, 2026

💔 Test for 3b8dfcc failed: CI. Failed job:

@JonathanBrouwer
Copy link
Contributor Author

@bors retry

@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 Mar 19, 2026
@rust-bors rust-bors bot mentioned this pull request Mar 19, 2026
@rust-bors

This comment has been minimized.

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

rust-bors bot commented Mar 19, 2026

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 14m 31s
Pushing bcf3d36 to main...

@rust-bors rust-bors bot merged commit bcf3d36 into rust-lang:main Mar 19, 2026
12 checks passed
@github-actions
Copy link
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 1f7f8ea (parent) -> bcf3d36 (this PR)

Test differences

Show 418 test diffs

Stage 1

  • [crashes] tests/crashes/147973.rs: pass -> [missing] (J0)
  • [ui] tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs: pass -> [missing] (J0)
  • [ui] tests/ui/const-generics/mgca/braced-const-infer.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs: [missing] -> pass (J0)
  • [ui] tests/ui/const-generics/mgca/macro-const-arg-infer.rs: [missing] -> pass (J0)
  • [ui] tests/ui/hygiene/unpretty-debug-metavars.rs: [missing] -> pass (J0)
  • [ui] tests/ui/hygiene/unpretty-debug-shadow.rs: [missing] -> pass (J0)
  • [ui] tests/ui/inference/cannot-infer-iterator-sum-return-type.rs: [missing] -> pass (J0)
  • [ui] tests/ui/kindck/kindck-copy.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-impl-type-params-2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-impl-type-params.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-inherited-copy-bound.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-nonsendable-1.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-send-object.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-send-object1.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-send-object2.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-send-owned.rs: pass -> [missing] (J0)
  • [ui] tests/ui/kindck/kindck-send-unsafe.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lint/for-loops-over-falibles/macro-issue-140747.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lint/for-loops-over-fallibles/external-macro-issue-148114.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/for-loops-over-fallibles/macro-issue-140747.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/for-loops-over-fallibles/macro-iterator-next.rs: [missing] -> pass (J0)
  • [ui] tests/ui/mismatched_types/expectation-from-return-type.rs: [missing] -> pass (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-region.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-type.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-region.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-type.rs: pass -> [missing] (J0)
  • [ui] tests/ui/regions/regions-outlives-nominal-type.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/basic-copyable-types.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/closure-rc-not-send.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/copy-bounds-impl-type-params.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/inherited-copy-bound.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/send-trait-objects-basic.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/borrowck/kindck-implicit-close-over-mut-var.rs: pass -> [missing] (J1)
  • [ui] tests/ui/const-generics/mgca/braced-const-infer.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/infer-vars-in-const-args-conflicting.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/infer-vars-in-const-args-correct.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/macro-const-arg-infer.rs: [missing] -> pass (J1)
  • [ui] tests/ui/hygiene/unpretty-debug-metavars.rs: [missing] -> pass (J1)
  • [ui] tests/ui/hygiene/unpretty-debug-shadow.rs: [missing] -> pass (J1)
  • [ui] tests/ui/inference/cannot-infer-iterator-sum-return-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/kindck/kindck-copy.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-impl-type-params-2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-impl-type-params.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-inherited-copy-bound.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-nonsendable-1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-send-object.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-send-object1.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-send-object2.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-send-owned.rs: pass -> [missing] (J1)
  • [ui] tests/ui/kindck/kindck-send-unsafe.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lint/for-loops-over-falibles/macro-issue-140747.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lint/for-loops-over-fallibles/external-macro-issue-148114.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/for-loops-over-fallibles/macro-issue-140747.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/for-loops-over-fallibles/macro-iterator-next.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/expectation-from-return-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-region-rev.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-region.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-type-rev.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-enum-type.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-region-rev.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-region.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-type-rev.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type-struct-type.rs: pass -> [missing] (J1)
  • [ui] tests/ui/regions/regions-outlives-nominal-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/basic-copyable-types.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/closure-rc-not-send.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/copy-bounds-impl-type-params.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/inherited-copy-bound.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/send-trait-objects-basic.rs: [missing] -> pass (J1)
  • [crashes] tests/crashes/147973.rs: pass -> [missing] (J2)
  • [crashes] tests/crashes/147973.rs: ignore (ignored if rustc wasn't built with debug assertions) -> [missing] (J3)

Additionally, 341 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 bcf3d36c997dd9b5db4bb7f40cb91dd4cf46a305 --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-apple-various: 1h 37m -> 1h 20m (-17.6%)
  2. dist-aarch64-msvc: 1h 52m -> 1h 33m (-17.6%)
  3. pr-check-1: 31m 20s -> 26m 6s (-16.7%)
  4. x86_64-msvc-1: 2h 24m -> 2h 42m (+12.8%)
  5. armhf-gnu: 1h 29m -> 1h 18m (-11.7%)
  6. optional-x86_64-gnu-parallel-frontend: 2h 38m -> 2h 20m (-11.3%)
  7. dist-x86_64-llvm-mingw: 1h 43m -> 1h 54m (+11.3%)
  8. dist-aarch64-llvm-mingw: 1h 33m -> 1h 42m (+9.7%)
  9. test-various: 1h 52m -> 1h 42m (-9.6%)
  10. dist-aarch64-apple: 2h -> 1h 48m (-9.6%)
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
Collaborator

Finished benchmarking commit (bcf3d36): 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.2% [0.1%, 0.3%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 1.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)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.5%)

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

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

Binary size

Results (primary 0.0%)

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

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

Bootstrap: 481.515s -> 483.892s (0.49%)
Artifact size: 394.79 MiB -> 394.73 MiB (-0.02%)

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

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc 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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.