Skip to content

Rollup of 6 pull requests - #166397

Merged
rust-bors[bot] merged 84 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-20jrOKj
Nov 23, 2026
Merged

rust-bors[bot] merged 84 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-20jrOKj

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

A4-Tacks and others added 30 commits October 22, 2026 17:41
Example
---
**Before this PR**

```rust
use itertools::Itertools;
fn main() {
    [1, 2, 3].into_iter() // <- IntoIter<i32, 3>
        .merge_by([2, 4, 6], |a,b|a<b) // <- MergeBy<IntoIter<i32, 3>, IntoIter<i32, 3>, impl FnMut(&i32, &i32) -> bool>
        .next();
}
```

**After this PR**

```rust
use itertools::Itertools;
fn main() {
    [1, 2, 3].into_iter() // <- IntoIter<i32, 3>
        .merge_by([2, 4, 6], |a,b|a<b) // <- impl Iterator<Item = i32>
        .next();
}
```
This is the stored variant of Term, just like StoredGenericArg is the
stored variant of GenericArg.
This is heavily inspired from hir_def::hir::ExprOrPatId and its packed
variant, to wrap either a TypeRefId or a ConstRef.
This replaces InferenceResult::type_of_type_placeholder with
term_of_term_placeholder to additionally record which const a given
const or type placeholder gets resolved to.

Note that while surprising, TypeRef::Placeholder may indeed resolve to
a const because, except for arrays, the parser doesn't know ahead of
time if a _ will resolve to a type or a const.

In the case of an array, we have an Expr::Underscore:
```
let a: [_; _] = [4, 5, 6];
      //^ TypeRef::Placeholder which resolves to the type i32
         //^ Expr::Underscore which resolves to the const 3
```

But for a struct we have a TypeRef::Placeholder:
```
struct S<T, const N: usize>([T; N]);

let s: S<_, _> = S([1, 2, 3]);
       //^ TypeRef::Placeholder which resolves to the type i32
          //^ TypeRef::Placeholder which resolves to the const 3
```
This fixes SourceAnalyzer::type_of_type to replace const infer vars in
types with their resolved value.
add tests for `Pool` and fix ordering issue
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
This environment variable is provided by default.

See: https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
This environment variable is provided by default.

See: https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables

Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Example
---
**Before this PR**
```text
Roots Scanned 15/16: /home/user/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std 93%
```

**After this PR**

```text
Roots Scanned 15/16: library/std 93%
```
minor: short too long roots scanned std path
Previously, r-a didn't implement well-formedness (WF) checks on any types,
treating them all as ambiguous.

Unfortunately, we try to resolve obligations after essentially every
expression:

https://github.com/rust-lang/rust-analyzer/blob/ff7105dd728897503481c79727cd6ead881d80a6/crates/hir-ty/src/infer/expr.rs#L867

and when we resolve obligations, we collect all obligations and then
re-register ambiguous ones:

https://github.com/rust-lang/rust-analyzer/blob/ff7105dd728897503481c79727cd6ead881d80a6/crates/hir-ty/src/next_solver/fulfill.rs#L213

So given N expressions containing closures, we end up doing O(N^2)
work (1 obligation after the first expression, 2 obligations after the
second expression, etc).

Instead, treat all types as well-formed. This also allows
normalisation to work in more scenarios, hence one unit test now
showing a concrete type instead of `impl Trait`.

For reference, the WF implementation in rustc is here:

https://github.com/rust-lang/rust/blob/58cf8f9c35b355199727627d07ae34a4e2846d67/compiler/rustc_trait_selection/src/solve/delegate.rs#L338-L352

https://github.com/rust-lang/rust/blob/58cf8f9c35b355199727627d07ae34a4e2846d67/compiler/rustc_trait_selection/src/traits/wf.rs#L93-L125

AI disclosure: Initial investigation and implementation with an LLM,
but final implementation and review by me. Comments are written by me
or copied from rustc verbatim.
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ba0fe0e 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 Nov 23, 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 Nov 23, 2026
@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

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

@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 960ba7c (parent) -> 2772402 (this PR)

Test differences

Show 118 test diffs

Stage 0

  • handlers::auto_import::tests::carries_cfg_attr_from_macro: [missing] -> pass (J2)
  • handlers::extract_type_alias::tests::inferred_array_length: [missing] -> pass (J2)
  • handlers::extract_type_alias::tests::inferred_generic_const_parameter: [missing] -> pass (J2)
  • inlay_hints::chaining::tests::custom_iterator_adapter_chaining: [missing] -> pass (J2)
  • lang_item::tests::proc_macros_not_included: [missing] -> pass (J2)
  • tests::display_source_code::term_placeholders: [missing] -> pass (J2)
  • tests::display_source_code::type_placeholder_type: pass -> [missing] (J2)
  • thread::pool::tests::new_creates_empty_pool: [missing] -> pass (J2)
  • thread::pool::tests::scoped_executes_borrowing_function: [missing] -> pass (J2)
  • thread::pool::tests::scoped_executes_multiple_functions: [missing] -> pass (J2)
  • thread::pool::tests::scoped_handles_panicking_function: [missing] -> pass (J2)
  • thread::pool::tests::scoped_returns_result_after_tasks_finish: [missing] -> pass (J2)
  • thread::pool::tests::spawn_changes_thread_intent: [missing] -> pass (J2)
  • thread::pool::tests::spawn_executes_function: [missing] -> pass (J2)
  • thread::pool::tests::spawn_handles_panicking_function: [missing] -> pass (J2)
  • thread::pool::tests::zero_thread_pool_starts_empty: [missing] -> pass (J2)

Stage 1

  • handlers::auto_import::tests::carries_cfg_attr_from_macro: [missing] -> pass (J0)
  • handlers::extract_type_alias::tests::inferred_array_length: [missing] -> pass (J0)
  • handlers::extract_type_alias::tests::inferred_generic_const_parameter: [missing] -> pass (J0)
  • inlay_hints::chaining::tests::custom_iterator_adapter_chaining: [missing] -> pass (J0)
  • lang_item::tests::proc_macros_not_included: [missing] -> pass (J0)
  • tests::display_source_code::term_placeholders: [missing] -> pass (J0)
  • tests::display_source_code::type_placeholder_type: pass -> [missing] (J0)
  • thread::pool::tests::new_creates_empty_pool: [missing] -> pass (J0)
  • thread::pool::tests::scoped_executes_borrowing_function: [missing] -> pass (J0)
  • thread::pool::tests::scoped_executes_multiple_functions: [missing] -> pass (J0)
  • thread::pool::tests::scoped_handles_panicking_function: [missing] -> pass (J0)
  • thread::pool::tests::scoped_returns_result_after_tasks_finish: [missing] -> pass (J0)
  • thread::pool::tests::spawn_changes_thread_intent: [missing] -> pass (J0)
  • thread::pool::tests::spawn_executes_function: [missing] -> pass (J0)
  • thread::pool::tests::spawn_handles_panicking_function: [missing] -> pass (J0)
  • thread::pool::tests::zero_thread_pool_starts_empty: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/attributes/malformed-lint-reason.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/lint/lint-check-on-macro.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/view-types/field-access.rs#illegal: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/view-types/field-access.rs#legal: [missing] -> pass (J1)
  • [pretty] tests/pretty/lint-attrs-filtered-out.rs: [missing] -> pass (J2)
  • [ui] tests/ui/attributes/malformed-lint-reason.rs: [missing] -> pass (J4)
  • [ui] tests/ui/lint/lint-check-on-macro.rs: [missing] -> pass (J4)
  • [ui] tests/ui/view-types/field-access.rs#illegal: [missing] -> pass (J4)
  • [ui] tests/ui/view-types/field-access.rs#legal: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/attributes/malformed-lint-reason.rs: [missing] -> pass (J3)
  • [ui] tests/ui/lint/lint-check-on-macro.rs: [missing] -> pass (J3)
  • [ui] tests/ui/view-types/field-access.rs#illegal: [missing] -> pass (J3)
  • [ui] tests/ui/view-types/field-access.rs#legal: [missing] -> pass (J3)
  • [pretty] tests/pretty/lint-attrs-filtered-out.rs: [missing] -> pass (J5)

Additionally, 72 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 277240238554297f93fa9ee3c7643dfa03ccbbb4 --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-i686-linux: -> 1h 31m (+inf%)
  2. dist-s390x-linux: -> 1h 7m (+inf%)
  3. test-x86_64-gnu-stable: -> 2h 44m (+inf%)
  4. test-x86_64-gnu-aux: -> 2h 21m (+inf%)
  5. test-aarch64-apple-1: -> 2h 49m (+inf%)
  6. dist-x86_64-illumos: -> 1h 32m (+inf%)
  7. dist-powerpc64-linux-musl: -> 1h 24m (+inf%)
  8. dist-riscv64-linux-musl: -> 1h 30m (+inf%)
  9. dist-x86_64-linux-alt: -> 1h 22m (+inf%)
  10. test-armhf-gnu: -> 1h 34m (+inf%)
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-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#164918 Move lint validation to attribute parsing 63eafa4c189b1479a69a5d1408dcdc2a74f3098b
(link)
#166381 rust-analyzer subtree update 6a86caea2ac3283356ca03de64fee7114b392bde
(link)
#166191 Enable static-pie on all Musl targets 8d6c5110a32879e47372c0ead663278785d39d1f
(link)
#166390 Turn gca into a macro 2.0 that expands to k#gca(..) 04a9ff0ddfbee9f5ba37b92ea5ea5a62a6d4989d
(link)
#165764 view-types: handle field accesses 393ed4778d774ba115f78949380a101c8ccbbacf
(link)
#166250 Add a reason suggestion for malformed lint attributes 9c1f76af3fbc3723ae6beacceba0477a2986d812
(link)

parent commit: 960ba7cf7e

In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: @rust-timer triage $SHA $SHA $SHA..., or run @rust-timer triage all to benchmark all rollup members.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (2772402): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 9
Improvements ✅
(secondary)
-0.6% [-1.1%, -0.1%] 14
All ❌✅ (primary) -0.2% [-0.3%, 0.4%] 10

Max RSS (memory usage)

Results (primary 1.2%, secondary -2.5%)

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

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 2
Regressions ❌
(secondary)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-4.4%, -2.4%] 5
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 2

Cycles

Results (secondary 2.2%)

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.5% [2.5%, 8.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-5.1%, -1.1%] 3
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 460.809s -> 462.881s (0.45%)
Artifact size: 406.40 MiB -> 405.81 MiB (-0.15%)

@rustbot rustbot added the perf-regression Performance regression. label Nov 23, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@rust-timer triage all

@rust-timer

rust-timer commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator
Running triage with 7 benchmarks

Triage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
For this rollup, these benchmarks are:

  • cargo-0.87.1
  • ctfe-stress-5
  • include-blob
  • syn-2.0.101
  • typenum-1.18.0
  • unicode-normalization-0.1.24
  • wg-grammar

#164918 63eafa4 Move lint validation to attribute parsing

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 8
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.1%] 9
All ❌✅ (primary) -0.2% [-0.3%, -0.1%] 8

Max RSS (memory usage)

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

Cycles

Results (secondary 2.8%)

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)
7.7% [6.1%, 8.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.8%, -4.2%] 2
All ❌✅ (primary) - - 0

Binary size

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


#166381 6a86cae rust-analyzer subtree update

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.1%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 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)
6.6% [4.9%, 8.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.0% [-4.6%, -3.4%] 2
All ❌✅ (primary) - - 0

Binary size

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


#166191 8d6c511 Enable static-pie on all Musl targets

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.1%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 3.0%)

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)
6.8% [4.5%, 8.9%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.9%, -4.0%] 2
All ❌✅ (primary) - - 0

Binary size

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


#166390 04a9ff0 Turn gca into a macro 2.0 that expands to k#gca(..)

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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.9% [-1.2%, -0.1%] 8
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Max RSS (memory usage)

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

Cycles

Results (secondary 2.9%)

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.8% [2.4%, 9.1%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.1% [-4.6%, -3.6%] 2
All ❌✅ (primary) - - 0

Binary size

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


#165764 393ed47 view-types: handle field accesses

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-1.2%, -0.1%] 14
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 1.8%)

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)
7.3% [5.5%, 8.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-5.2%, -2.2%] 3
All ❌✅ (primary) - - 0

Binary size

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


#166250 9c1f76a Add a reason suggestion for malformed lint attributes

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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-1.2%, -0.1%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (secondary 2.4%)

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)
7.0% [5.4%, 8.5%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.4% [-5.1%, -3.7%] 2
All ❌✅ (primary) - - 0

Binary size

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

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. rollup A PR which is a rollup T-clippy Relevant to the Clippy team. 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. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.