Skip to content

Implement AST -> HIR generics propagation in delegation#151864

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
aerooneqq:delegation-generics-propagation
Mar 3, 2026
Merged

Implement AST -> HIR generics propagation in delegation#151864
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
aerooneqq:delegation-generics-propagation

Conversation

@aerooneqq
Copy link
Contributor

@aerooneqq aerooneqq commented Jan 30, 2026

View all comments

This PR adds support for generics propagation during AST -> HIR lowering and is a part of #118212.

High-level design overview

Motivation

The task is to generate generics for delegations (i.e. in this context we assume a function that is created for reuse statements) during AST -> HIR lowering. Then we want to propagate those generated params to generated method call (or default call) in delegation. This will help to solve issues like the following:

mod to_reuse {
    pub fn consts<const N: i32>() -> i32 {
        N
    }
}

reuse to_reuse::consts;
//~^ ERROR  type annotations needed

// DESUGARED CURRENT:
#[attr = Inline(Hint)]
fn consts() -> _ { to_reuse::consts() }

// DESUGARED DESIRED:
#[attr = Inline(Hint)]
fn consts<const N: i32>() -> _ { to_reuse::consts::<N>() }

Moreover, user can specify generic args in reuse, we need to propagate them (works now) and inherit signature with substituted generic args:

mod to_reuse {
    pub fn foo<T>(t: T) -> i32 {
        0
    }
}

reuse to_reuse::foo::<i32>;
//~^ ERROR  mismatched types

fn main() {
    foo(123);
}

error[E0308]: mismatched types
  --> src/main.rs:24:17
   |
19 |     pub fn foo<T>(t: T) -> i32 {
   |                - found this type parameter
...
24 | reuse to_reuse::foo::<i32>;
   |                 ^^^
   |                 |
   |                 expected `i32`, found type parameter `T`
   |                 arguments to this function are incorrect
   |
   = note:        expected type `i32`
           found type parameter `T`

In this case we want the delegation to have signature that have one i32 parameter (not T parameter).
Considering all other cases, for now we want to preserve existing behavior, which was almost fully done (at this stage there are changes in behavior of delegations with placeholders and late-bound lifetimes).

Main approach overview

The main approach is as follows:

  • We determine generic params of delegee parent (now only trait can act as a parent as delegation to inherent impls is not yet supported) and delegee function,
  • Based on presence of user-specified args in reuse statement (i.e. reuse Trait::<'static, i32, 123>::foo::<String>) we either generate delegee generic params or not. If not, then we should include user-specified generic args into the signature of delegation,
  • The general order of generic params generation is as following:
    [DELEGEE PARENT LIFETIMES, DELEGEE LIFETIMES, DELEGEE PARENT TYPES AND CONSTS, DELEGEE TYPES AND CONSTS],
  • There are two possible generic params orderings (they differ only in a position of Self generic param):
    • When Self is after lifetimes, this happens only in free to trait delegation scenario, as we need to generate implicit Self param of the delegee trait,
    • When Self is in the beginning and we should not generate Self param, this is basically all other cases if there is an implicit Self generic param in delegation parent.
  • Considering propagation, we do not propagate lifetimes for child, as at AST -> HIR lowering stage we can not know whether the lifetime is late-bound or early bound, so for now we do not propagate them at all. There is one more hack with child lifetimes, for the same reason we create predicates of kind 'a: 'a in order to preserve all lifetimes in HIR, so for now we can generate more lifetimes params then needed. This will be partially fixed in one of next pull requests.

Implementation details

  • We obtain AST generics either from AST of a current crate if delegee is local or from external crate through generics_of of tcx. Next, as we want to generate new generic params we generate new node ids for them, remove default types and then invoke already existent routine for lowering AST generic params into HIR,
  • If there are user-specified args in either parent or child parts of the path, we save HIR ids of those segments and pass them to hir_analysis part, where user-specified args are obtained, then lowered through existing API and then used during signature and predicates inheritance,
  • If there are no user-specified args then we propagate generic args that correspond to generic params during generation of delegation,
  • During signature inheritance we know whether parent or child generic args were specified by the user, if so, we should merge them with generic params (i.e. cases when parent args are specified and child args are not: reuse Trait::<String>::foo), next we use those generic args and mapping for delegee parent and child generic params into those args in order to fold delegee signature and delegee predicates.

Tests

New tests were developed and can be found in ast-hir-engine folder, those tests cover all cases of delegation with different number of lifetimes, types, consts in generic params and different user-specified args cases (parent and child, parent/child only, none).

Edge cases

There are some edge cases worth mentioning.

Free to trait delegation.

Consider this example:

trait Trait<'a, T, const N: usize> {
    fn foo<'x: 'x, A, B>(&self) {}
}

reuse Trait::foo;

As we are reusing from trait and delegee has &self param it means that delegation must have Self generic param:

fn foo<'a, 'x, Self, T, const N: usize, A, B>(self) {}

We inherit predicates from Self implicit generic param in Trait, thus we can pass to delegation anything that implements this trait. Now, consider the case when user explicitly specifies parent generic args.

reuse Trait::<'static, String, 1>::foo;

In this case we do not need to generate parent generic params, but we still need to generate Self in delegation (DelegationGenerics::SelfAndUserSpecified variant):

fn foo<'x, Self, A, B>(self) {}

User-specified generic arguments should be used to replace parent generic params in delegation, so if we had param of type T in foo, during signature inheritance we should replace it with user-specified String type.

impl trait delegation

When we delegate from impl trait to something, we want the delegation to have signature that matches signature in trait. For this reason we already resolve delegation not to the actual delegee but to the trait method in order to inherit its signature. That is why when processing user-specified args when the caller kind is impl trait (FnKind::AssocTraitImpl), we discard parent user-specified args and replace them with those that are specified in trait header. In future we will also discard child_args but we need proper error handling for this case, so it will be addressed in one of future pull requests that are approximately specified in "Nearest future work" section.

Nearest future work (approximate future pull requests):

  • Late-bound lifetimes
  • impl Trait params in functions
  • Proper propagation of parent generics when generating method call
  • Fix diagnostics duplication during lowering of user-specified types
  • Support for recursive delegations
  • Self types support reuse <u8 as Trait<_>>::foo as generic_arguments2
  • Decide what to do with infer args reuse Trait::<_, _>::foo::<_>
  • Proper error handling when there is a mismatch between actual and expected args (impl trait case)

r? @petrochenkov

@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2026

HIR ty lowering was modified

cc @fmease

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 30, 2026
@rust-log-analyzer

This comment has been minimized.

@Kivooeo
Copy link
Member

Kivooeo commented Jan 30, 2026

would it be possible to split this pr to commits?

@petrochenkov
Copy link
Contributor

would it be possible to split this pr to commits?

@aerooneqq is sitting in the same office with me, we'll figure out how to review this better.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@aerooneqq aerooneqq force-pushed the delegation-generics-propagation branch from 94fa69b to a6d9e63 Compare February 4, 2026 14:42
@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@aerooneqq aerooneqq force-pushed the delegation-generics-propagation branch from a6d9e63 to 9033bc5 Compare February 5, 2026 15:18
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@aerooneqq aerooneqq force-pushed the delegation-generics-propagation branch from 9033bc5 to b398a09 Compare February 9, 2026 14:09
@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@aerooneqq aerooneqq force-pushed the delegation-generics-propagation branch from 9744189 to 558b07d Compare February 19, 2026 07:41
@rustbot

This comment has been minimized.

@petrochenkov
Copy link
Contributor

@aerooneqq
Left a written summary of our discussion.

Also, the test changes are better submitted as a separate PR to make this PR smaller, and to make snapshot of the current treatment of all those examples.

@petrochenkov
Copy link
Contributor

petrochenkov commented Feb 19, 2026

We are not sure that doing all this at AST -> HIR lowering stage is the right place, doing it at ty level may be better, then we'll need to leave stubs in GenericArgs of the delegated function bodies and fill them later.
@aerooneqq will explore that approach before continuing with "Nearest future work" based on HIR.

In any case we plan to merge this, and then possibly rework later, because the delegation logic is mostly contained in delegation.rs files and doesn't affect other parts of the compiler much, so it won't bother other people significantly.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 19, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 2, 2026
@aerooneqq aerooneqq force-pushed the delegation-generics-propagation branch from 2a40d46 to 0daab3a Compare March 2, 2026 12:29
@aerooneqq
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 2, 2026
@petrochenkov
Copy link
Contributor

This PR has both limitations caused by the transformation being performed at AST->HIR lowering time, and issues related to the generic parameter mapping itself (e.g. unspecified generic arguments and _ are treated very differently).

However, we'll merge this as is and address the issues after migrating from HIR to Type IR first (#151864 (comment)).

@petrochenkov
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 2, 2026

📌 Commit 0daab3a has been approved by petrochenkov

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 2, 2026
rust-bors bot pushed a commit that referenced this pull request Mar 2, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #153153 (add tests for thumb interworking)
 - #149328 (Add `String<A>` type with custom allocator parameter)
 - #151780 (Updated slice tests to pass for big endian hosts for `multiple-option-or-permutations.rs`)
 - #153015 (core: make atomic primitives type aliases of `Atomic<T>`)
 - #153292 (tests: codegen-llvm: vec-calloc: do not require the uwtable attribute)

Failed merges:

 - #151864 (Implement AST -> HIR generics propagation in delegation)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 2, 2026
…agation, r=petrochenkov

Implement AST -> HIR generics propagation in delegation

This PR adds support for generics propagation during AST -> HIR lowering and is a part of rust-lang#118212.

# High-level design overview

## Motivation
The task is to generate generics for delegations (i.e. in this context we assume a function that is created for `reuse` statements) during AST -> HIR lowering. Then we want to propagate those generated params to generated method call (or default call) in delegation. This will help to solve issues like the following:

```rust
mod to_reuse {
    pub fn consts<const N: i32>() -> i32 {
        N
    }
}

reuse to_reuse::consts;
//~^ ERROR  type annotations needed

// DESUGARED CURRENT:
#[attr = Inline(Hint)]
fn consts() -> _ { to_reuse::consts() }

// DESUGARED DESIRED:
#[attr = Inline(Hint)]
fn consts<const N: i32>() -> _ { to_reuse::consts::<N>() }
```

Moreover, user can specify generic args in `reuse`, we need to propagate them (works now) and inherit signature with substituted generic args:

```rust
mod to_reuse {
    pub fn foo<T>(t: T) -> i32 {
        0
    }
}

reuse to_reuse::foo::<i32>;
//~^ ERROR  mismatched types

fn main() {
    foo(123);
}

error[E0308]: mismatched types
  --> src/main.rs:24:17
   |
19 |     pub fn foo<T>(t: T) -> i32 {
   |                - found this type parameter
...
24 | reuse to_reuse::foo::<i32>;
   |                 ^^^
   |                 |
   |                 expected `i32`, found type parameter `T`
   |                 arguments to this function are incorrect
   |
   = note:        expected type `i32`
           found type parameter `T`
```
In this case we want the delegation to have signature that have one `i32` parameter (not `T` parameter).
Considering all other cases, for now we want to preserve existing behavior, which was almost fully done (at this stage there are changes in behavior of delegations with placeholders and late-bound lifetimes).

## Main approach overview
The main approach is as follows:
- We determine generic params of delegee parent (now only trait can act as a parent as delegation to inherent impls is not yet supported) and delegee function,
- Based on presence of user-specified args in `reuse` statement (i.e. `reuse Trait::<'static, i32, 123>::foo::<String>`)  we either generate delegee generic params or not. If not, then we should include user-specified generic args into the signature of delegation,
- The general order of generic params generation is as following:
   `[DELEGEE PARENT LIFETIMES, DELEGEE LIFETIMES, DELEGEE PARENT TYPES AND CONSTS, DELEGEE TYPES AND CONSTS]`,
- There are two possible generic params orderings (they differ only in a position of `Self` generic param):
  - When Self is after lifetimes, this happens only in free to trait delegation scenario, as we need to generate implicit Self param of the delegee trait,
  - When Self is in the beginning and we should not generate Self param, this is basically all other cases if there is an implicit Self generic param in delegation parent.
- Considering propagation, we do not propagate lifetimes for child, as at AST -> HIR lowering stage we can not know whether the lifetime is late-bound or early bound, so for now we do not propagate them at all. There is one more hack with child lifetimes, for the same reason we create predicates of kind `'a: 'a` in order to preserve all lifetimes in HIR, so for now we can generate more lifetimes params then needed. This will be partially fixed in one of next pull requests.

## Implementation details

- We obtain AST generics either from AST of a current crate if delegee is local or from external crate through `generics_of` of `tcx`. Next, as we want to generate new generic params we generate new node ids for them, remove default types and then invoke already existent routine for lowering AST generic params into HIR,
- If there are user-specified args in either parent or child parts of the path, we save HIR ids of those segments and pass them to `hir_analysis` part, where user-specified args are obtained, then lowered through existing API and then used during signature and predicates inheritance,
- If there are no user-specified args then we propagate generic args that correspond to generic params during generation of delegation,
- During signature inheritance we know whether parent or child generic args were specified by the user, if so, we should merge them with generic params (i.e. cases when parent args are specified and child args are not: `reuse Trait::<String>::foo`), next we use those generic args and mapping for delegee parent and child generic params into those args in order to fold delegee signature and delegee predicates.

## Tests

New tests were developed and can be found in `ast-hir-engine` folder, those tests cover all cases of delegation with different number of lifetimes, types, consts in generic params and different user-specified args cases (parent and child, parent/child only, none).

## Edge cases
There are some edge cases worth mentioning.

### Free to trait delegation.
Consider this example:
```rust
trait Trait<'a, T, const N: usize> {
    fn foo<'x: 'x, A, B>(&self) {}
}

reuse Trait::foo;
```

As we are reusing from trait and delegee has `&self` param it means that delegation must have `Self` generic param:
```rust
fn foo<'a, 'x, Self, T, const N: usize, A, B>(self) {}
```

We inherit predicates from Self implicit generic param in `Trait`, thus we can pass to delegation anything that implements this trait. Now, consider the case when user explicitly specifies parent generic args.
```rust
reuse Trait::<'static, String, 1>::foo;
```

In this case we do not need to generate parent generic params, but we still need to generate `Self` in delegation (`DelegationGenerics::SelfAndUserSpecified` variant):
```rust
fn foo<'x, Self, A, B>(self) {}
```
User-specified generic arguments should be used to replace parent generic params in delegation, so if we had param of type `T` in `foo`, during signature inheritance we should replace it with user-specified `String` type.

### impl trait delegation
When we delegate from impl trait to something, we want the delegation to have signature that matches signature in trait. For this reason we already resolve delegation not to the actual delegee but to the trait method in order to inherit its signature. That is why when processing user-specified args when the caller kind is `impl trait` (`FnKind::AssocTraitImpl`), we discard parent user-specified args and replace them with those that are specified in trait header. In future we will also discard `child_args` but we need proper error handling for this case, so it will be addressed in one of future pull requests that are approximately specified in "Nearest future work" section.

## Nearest future work (approximate future pull requests):
- Late-bound lifetimes
- `impl Trait` params in functions
- Proper propagation of parent generics when generating method call
- ~Fix diagnostics duplication during lowering of user-specified types~
- Support for recursive delegations
- Self types support `reuse <u8 as Trait<_>>::foo as generic_arguments2`
- Decide what to do with infer args `reuse Trait::<_, _>::foo::<_>`
- Proper error handling when there is a mismatch between actual and expected args (impl trait case)

r? @petrochenkov
rust-bors bot pushed a commit that referenced this pull request Mar 3, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #151864 (Implement AST -> HIR generics propagation in delegation)
 - #152941 (prefer actual ABI-controling fields over target.abi when making ABI decisions)
 - #153227 (Don’t report missing fields in struct exprs with syntax errors.)
 - #152966 (Migrate 11 tests from tests/ui/issues to specific directories)
 - #153003 (rustdoc: make `--emit` and `--out-dir` mimic rustc)
 - #153034 (Remove unhelpful hint from trivial bound errors)
 - #153221 (Add release notes for 1.94.0)
 - #153297 (Update the name of the Hermit operating system)
@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 3, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 3, 2026

☀️ Test successful - CI
Approved by: petrochenkov
Duration: 4h 20m 16s
Pushing d3877ec to main...

@rust-bors rust-bors bot merged commit d3877ec into rust-lang:main Mar 3, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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 ec818fd (parent) -> d3877ec (this PR)

Test differences

Show 54 test diffs

Stage 1

  • [ui] tests/ui/delegation/generics/free-fn-to-trait-infer.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/generics-aux-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/free-to-free-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/free-to-free.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/free-to-trait-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/free-to-trait.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-free.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-trait.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-free.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-trait.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-free-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-free.rs: pass -> [missing] (J0)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-trait.rs: pass -> [missing] (J0)

Stage 2

  • [ui] tests/ui/delegation/generics/free-fn-to-trait-infer.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/generics-aux-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/free-to-free-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/free-to-free.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/free-to-trait-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/free-to-trait.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-free-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-free.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-trait-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/impl-trait-to-trait.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-free-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-free.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-trait-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/inherent-impl-to-trait.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-free-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-free.rs: pass -> [missing] (J1)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-trait-pass.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/mapping/trait-to-trait.rs: pass -> [missing] (J1)

Additionally, 18 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 d3877ec33269edb7355ef8538d1cc5d157aa1ace --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-apple: 2h 1m -> 2h 35m (+27.8%)
  2. pr-check-1: 27m 30s -> 33m 10s (+20.6%)
  3. dist-aarch64-msvc: 1h 34m -> 1h 52m (+19.2%)
  4. x86_64-gnu-llvm-20: 1h 10m -> 1h 18m (+12.4%)
  5. aarch64-msvc-2: 1h 54m -> 2h 6m (+10.7%)
  6. test-various: 2h 6m -> 1h 52m (-10.5%)
  7. dist-x86_64-msvc-alt: 2h 35m -> 2h 48m (+8.2%)
  8. aarch64-apple: 3h 55m -> 4h 13m (+7.5%)
  9. aarch64-gnu-llvm-20-2: 53m 30s -> 49m 39s (-7.2%)
  10. pr-check-2: 45m 28s -> 42m 14s (-7.1%)
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 (d3877ec): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.6%, secondary -2.6%)

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)
-1.6% [-1.6%, -1.6%] 1
Improvements ✅
(secondary)
-2.6% [-3.0%, -2.1%] 2
All ❌✅ (primary) -1.6% [-1.6%, -1.6%] 1

Cycles

Results (primary 1.6%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 480.002s -> 478.656s (-0.28%)
Artifact size: 394.97 MiB -> 394.93 MiB (-0.01%)

@aerooneqq aerooneqq deleted the delegation-generics-propagation branch March 3, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants