Skip to content

Rollup of 7 pull requests - #155687

Merged
rust-bors[bot] merged 27 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-aZ7YrAD
Apr 23, 2026
Merged

Rollup of 7 pull requests#155687
rust-bors[bot] merged 27 commits into
rust-lang:mainfrom
GuillaumeGomez:rollup-aZ7YrAD

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

CoCo-Japan-panand others added 27 commits April 19, 2026 15:57
correctly parse `const unsafe trait` implementations.
* Fix E0191 suggestion for empty dyn trait args
* Fix tidy check
* address code nit
* fold test into existing E0191 test
…r=petrochenkov
Account for titlecase in casing lints
Puts rust-lang#153892 to work.
Also contains fixes for Greek final sigma casing.
There are probably still some edge cases left to fix. Ideally we would use https://www.unicode.org/reports/tr55/#Identifier-Chunks as a base.
@rustbot label A-Unicode A-diagnostics A-lints A-suggestion-diagnostics
…gation-2, r=petrochenkov
delegation: support self ty propagation for functions in free to trait reuse
This PR adds support for self types specified in free to trait reuse. Up to this point we always generated `Self` despite the fact whether self type was specified or not. Now we use it in signature inheritance. Moreover we no more generate `Self` for static methods. Part of rust-lang#118212.
```rust
trait Trait<T> {
fn foo<const B: bool>(&self) {}
fn bar() {}
}
impl<T> Trait<T> for usize {}
reuse <usize as Trait>::foo;
// Desugaring (no `Self` as usize is specified)
fn foo<T, const B: bool>(self: &usize) {
<usize as Trait::<T>>::foo::<B>(self)
}
reuse Trait::bar;
// Desugaring (no `Self` as static method)
fn bar<T>() {
Trait::<T>::bar(); //~ERROR: type annotations needed
}
```
r? @petrochenkov
Fix ICE when const closure appears inside a non-const trait method
Fixesrust-lang#153891
`hir_body_const_context()` unconditionally delegated to the parent's const context for const closures, returning `None` when the parent had no const context. This caused `mir_const_qualif()` to hit a `span_bug!`, since `mir_promoted()` had already decided to call it based on the closure's own syntactic constness. Fall back to `ConstContext::ConstFn` when the parent's const context is `None`, so that the const closure body is still properly const-checked rather than triggering an ICE.
Examining [another attempt](https://github.com/rust-lang/rust/pull/153900/changes) at this issue (which has already been closed), I thought that its approach represents a workaround fix to avoid inconsistencies in the caller of `mir_promoted()`, whereas I think the correct behavior is for `hir_body_const_context()` itself to return the proper value.
…order, r=Urgau,fmease,jhpratt
Change keyword order for `impl` restrictions
Based on rust-lang#155222, this PR reorders keywords in trait definitions to group restrictions with visibility. It changes the order from `pub(...) const unsafe auto impl(...) trait Foo {...}` to `pub(...) impl(...) const unsafe auto trait Foo {...}`.
Tracking issue for restrictions: rust-lang#105077
r? @Urgau
cc @jhpratt
…rscore-wording, r=adwinwhite
Use singular wording for single _ placeholders in type suggestions
While looking this part of code, I noticed this FIXME and fixed it :)
…-suggestion, r=fmease
Fix E0191 suggestion for empty dyn trait args
Fixesrust-lang#155578.
…d, r=JonathanBrouwer
Remove `AttributeLintKind` variants - part 6
Part of rust-lang#153099.
r? @JonathanBrouwer
@rust-borsrust-borsBot added the rollup A PR which is a rollup label Apr 23, 2026
@rustbotrustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2026
@rustbotrustbot added T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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. labels Apr 23, 2026
@GuillaumeGomez

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@rust-bors

rust-borsBot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0a4e73e has been approved by GuillaumeGomez

It is now in the queue for this repository.

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

rust-borsBot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: GuillaumeGomez
Duration: 3h 54m 52s
Pushing 36ba2c7 to main...

@rust-bors
rust-borsBot merged commit 36ba2c7 into rust-lang:mainApr 23, 2026
12 checks passed
@rustbotrustbot added this to the 1.97.0 milestone Apr 23, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#154957Fix ICE when const closure appears inside a non-const trait…5634b6265534c612edde617dfdc1bb51c44841a8 (link)
#155442Change keyword order for impl restrictions754d900ebd1750d1148b45794d3b7d30a5c7230c (link)
#155469Account for titlecase in casing lints8847b782c010e88e54fed00b41afbbe26276e10b (link)
#155561Use singular wording for single _ placeholders in type sugg…7b807f43e61cadf154d302070fa27c683174639d (link)
#155637Fix E0191 suggestion for empty dyn trait args393560a2204b8c9efc4ab09570924405ce3866f8 (link)
#155644delegation: support self ty propagation for functions in fr…6c3e3c5752cd196d47a2824a65fe1eccccefcc21 (link)
#155661Remove AttributeLintKind variants - part 665334c78eb934f21bcf336105489a99b7fac7eff (link)

previous master: 2eaa5de4a3

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

@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 2eaa5de (parent) -> 36ba2c7 (this PR)

Test differences

Show 60 test diffs

Stage 1

  • [ui] tests/ui/delegation/generics/free-to-trait-self-reuse.rs: [missing] -> pass (J0)
  • [ui] tests/ui/delegation/generics/free-to-trait-static-reuse.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs#with_gate: pass -> [missing] (J0)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs#without_gate: pass -> [missing] (J0)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs#with_gate: pass -> [missing] (J0)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs#without_gate: pass -> [missing] (J0)
  • [ui] tests/ui/inference/need_type_info/underscore-placeholder-wording.rs: [missing] -> pass (J0)
  • [ui] tests/ui/lint/lint-nonstandard-style-unicode-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/const-closure-in-non-const-trait-impl-method.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/const-closure-in-non-const-trait-method.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/const-traits/const-unsafe-impl.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/delegation/generics/free-to-trait-self-reuse.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/generics/free-to-trait-static-reuse.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs#with_gate: pass -> [missing] (J1)
  • [ui] tests/ui/impl-restriction/recover-incorrect-impl-restriction.rs#without_gate: pass -> [missing] (J1)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs#with_gate: pass -> [missing] (J1)
  • [ui] tests/ui/impl-restriction/trait-alias-cannot-be-impl-restricted.rs#without_gate: pass -> [missing] (J1)
  • [ui] tests/ui/inference/need_type_info/underscore-placeholder-wording.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/lint-nonstandard-style-unicode-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-closure-in-non-const-trait-impl-method.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-closure-in-non-const-trait-method.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/const-traits/const-unsafe-impl.rs: [missing] -> pass (J1)

Additionally, 34 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 36ba2c7712052d731a7082d0eba5ed3d9d56c133 --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-rust-for-linux: 44m 32s -> 55m 6s (+23.7%)
  2. dist-ohos-armv7: 59m 59s -> 1h 11m (+18.8%)
  3. dist-sparcv9-solaris: 1h 18m -> 1h 31m (+17.1%)
  4. aarch64-apple: 3h 16m -> 3h 47m (+16.0%)
  5. i686-gnu-2: 1h 30m -> 1h 44m (+15.6%)
  6. arm-android: 1h 33m -> 1h 47m (+15.5%)
  7. x86_64-gnu-stable: 2h 15m -> 1h 54m (-15.1%)
  8. x86_64-gnu-llvm-21: 1h 9m -> 1h 20m (+15.0%)
  9. dist-x86_64-apple: 2h 11m -> 1h 51m (-14.7%)
  10. optional-x86_64-gnu-parallel-frontend: 2h 21m -> 2h 42m (+14.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

Finished benchmarking commit (36ba2c7): 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.

meanrangecount
Regressions ❌
(primary)
0.3%[0.2%, 0.5%]16
Regressions ❌
(secondary)
0.1%[0.1%, 0.1%]3
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-0.5%[-0.7%, -0.2%]14
All ❌✅ (primary)0.3%[0.2%, 0.5%]16

Max RSS (memory usage)

Results (primary 1.2%, secondary 3.3%)

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

meanrangecount
Regressions ❌
(primary)
1.2%[0.7%, 1.8%]2
Regressions ❌
(secondary)
3.3%[3.3%, 3.3%]1
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)1.2%[0.7%, 1.8%]2

Cycles

Results (secondary 3.5%)

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

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
3.5%[3.1%, 3.9%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Binary size

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

Bootstrap: 490.12s -> 490.512s (0.08%)
Artifact size: 394.30 MiB -> 394.34 MiB (0.01%)

@rustbotrustbot added the perf-regression Performance regression. label Apr 23, 2026
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.perf-regressionPerformance regression.rollupA PR which is a rollupT-clippyRelevant to the Clippy team.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustfmtRelevant 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.

9 participants

@GuillaumeGomez@rust-timer@rustbot@CoCo-Japan-pan@cijiugechu@lapla-cogito@aerooneqq@Jules-Bertholet@qaijuang