Skip to content

Rollup of 10 pull requests - #163227

Merged
rust-bors[bot] merged 33 commits into
rust-lang:mainfrom
jhpratt:rollup-jNR52me
Sep 23, 2026
Merged

rust-bors[bot] merged 33 commits into
rust-lang:mainfrom
jhpratt:rollup-jNR52me

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 23, 2026

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

Create a similar rollup

raushan728 and others added 30 commits August 30, 2026 10:04
Detect `ident: Type` or `self: Type` inside trait bodies to emit a clearer diagnostics.
A reflexive `'a: 'a` leaf is always satisfied, so filter it out in
`And::new` instead of pattern matching for it in the places which
happen to build such a constraint. An AND which ends up empty is
trivially true, which makes the OR containing it true.

This is how a reflexive candidate discharges a root type outlives
constraint, so `destructure_type_outlives_constraints_in_root` no
longer has to look at region outlives leaves at all.
Add this note to lifetime errors:

```text
error[E0521]: borrowed data escapes outside of function
  --> $DIR/static-impl-obligation.rs:163:9
   |
LL |     fn bar<'a>(x: &'a &'a u32) {
   |            --  - `x` is a reference that is only valid in the function body
   |            |
   |            lifetime `'a` defined here
LL |         let y: &dyn Foo = x;
LL |         y.hello();
   |         ^^^^^^^^^
   |         |
   |         `x` escapes the function body here
   |         argument requires that `'a` must outlive `'static`
   |
note: `'static` requirement for `<(dyn o::Foo + 'static)>::hello` introduced here
  --> $DIR/static-impl-obligation.rs:158:40
   |
LL |     impl dyn Foo + 'static where Self: 'static {
   |                                        ^^^^^^^ `'static` requirement introduced here
LL |         fn hello(&'static self) where Self: 'static {}
   |                                             ^^^^^^^ `'static` requirement introduced here
```

This currently only accounts for explicit bounds, other obligations like those arising from `Self` in a `impl dyn Trait {}` or from the receiver in `fn foo(&'static self)` are not accounted for.
```
note: `'static` lifetime requirement from `<(dyn b::Foo + 'static)>::hello` introduced here
  --> $DIR/static-impl-obligation.rs:16:18
   |
LL |     impl dyn Foo {
LL |         fn hello(&'static self) {}
   |                  ^^^^^^^^^^^^^ lifetime requirement introduced here
```
```
note: `'static` lifetime requirement from `<(dyn a::Foo + 'static)>::hello` introduced here
  --> $DIR/static-impl-obligation.rs:4:5
   |
LL |     impl dyn Foo {
   |     ^^^^^^^^^^^^ lifetime requirement introduced here
LL |         fn hello(&self) {}
   |
```
… lifetime

```
note: `'static` lifetime requirement from `<(dyn a::Foo + 'static)>::hello` introduced here
  --> $DIR/static-impl-obligation.rs:4:10
   |
LL |     impl dyn Foo {
   |          ^^^^^^^ `dyn Trait` introduces an implicit `'static` lifetime requirement
LL |         fn hello(&self) {}
   |
```
```
note: `'static` lifetime requirement from `<(dyn e::Foo + 'static)>::hello` introduced here
  --> $DIR/static-impl-obligation.rs:48:20
   |
LL |     impl dyn Foo + 'static {
   |                    ^^^^^^^ lifetime requirement introduced here
LL |         fn hello(&self) {}
   |
```
FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer
with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
…_region_constraints, r=BoxyUwU

trait solver: Handle reflexive region constraints

Fixes rust-lang/project-assumptions-on-binders#19

A reflexive placeholder constraint like `'a: 'a` can show up after we compute transitive region constraints. We then try to pull it out of the current universe by looking for lower-universe candidates. With none to choose from it becomes false, even though `'a: 'a` was true the whole time.

I first had this buried in the binder region work, which made a green test pretty meaningless because too much else was changing around it. Split out on its own, the fix is just to accept equal regions before doing the universe rewrite. I think that is the sensible place to stop: it handles the direct case and the reflexive edges made by the transitive pass. I added a regression for the direct case.

cc/ @BoxyUwU o/
…e, r=fee1-dead

Avoid ICEs when recovering malformed function parameters

Fixes rust-lang#160337
Fixes rust-lang#160490
revert rust-lang#162715 due to rust-lang#163149

cc rust-lang#163149
rust-lang#153947 also probably should be reopened, given that it'll go back to ICEing after the revert.

I'll probably start a zulip thread before reopening the PR, since this change ends up accepting _a lot_ of weird code that was previously accepted and I'm not sure what the desired behavior would be here.

r? oli-obk
Update deprecated rustc_hir imports 2

Followup to rust-lang#160336, see also rust-lang#163170 and rust-lang/rust-clippy/pull/17714

There is one more PR after this, they're split up to hopefully not be too conflict-y.
…r, r=Darksonn

Add `inline` attribute to `NonZero::from_str`

`<integer>::from_str`, `T::from_str_radix`, `T::from_ascii_bytes`, and `T::from_ascii_bytes_radix` has the `inline` attribute, buy `NonZero::from_str` does not.
…nthey

std::thread::available_parallelism merging linux/android/freebsd version

FreeBSD 13.1 had introduced a sched cpu affinity compatibility layer with Linux. 13.0 and even 13.1 being EOL, we can simplify here.
fix(parser): emit targeted diagnostic for fields inside traits

Fixes rust-lang#161815

Detect `ident: Type` or `self: Type` inside trait bodies to emit a clearer diagnostic.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 23, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Sep 23, 2026
@jhpratt

jhpratt commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@bors try jobs=dist-various-1,test-various,test-x86_64-gnu-aux,test-x86_64-gnu-llvm-21-3,test-x86_64-msvc-1,test-aarch64-apple-1,test-aarch64-apple-2,test-x86_64-mingw-1,test-i686-msvc,test-armhf-gnu

@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 81781bc has been approved by jhpratt

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
Rollup of 10 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-gnu-llvm-21-3
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 01d3458 (01d34589293de0840247a7dc76e4bca573c6d945)
Base parent: a92214c (a92214c92df8cc0261f5ab5c08c6376c2c03a958)

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

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 2m 27s
Pushing 6eeff9a 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 1a8fa55 (parent) -> 6eeff9a (this PR)

Test differences

Show 915 test diffs

Stage 1

  • [ui] tests/ui/assumptions_on_binders/reflexive-outlives-in-root.rs: [missing] -> pass (J1)
  • [ui] tests/ui/assumptions_on_binders/same-universe-placeholder-outlives.rs: [missing] -> pass (J1)
  • [ui] tests/ui/dropck/overlapping_impossible_drop.rs: pass -> [missing] (J1)
  • [ui] tests/ui/dropck/overlapping_impossible_drop_min_specialization.rs: pass -> [missing] (J1)
  • [ui] tests/ui/lifetimes/static-impl-obligation.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/recover-invalid-fn-trait-bound-pattern.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/recover-invalid-function-parameter-pattern-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/recover-invalid-function-parameter-pattern-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/trait-item-field-colon-syntax.rs: [missing] -> pass (J1)
  • [ui] tests/ui/proc-macro/span-first-token-file-48944.rs: [missing] -> pass (J1)
  • [ui] tests/ui/regions/regions-static-bound-on-type-param.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/assumptions_on_binders/reflexive-outlives-in-root.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/assumptions_on_binders/same-universe-placeholder-outlives.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/dropck/overlapping_impossible_drop.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/dropck/overlapping_impossible_drop_min_specialization.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/lifetimes/static-impl-obligation.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/parser/recover-invalid-fn-trait-bound-pattern.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/parser/recover-invalid-function-parameter-pattern-1.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/parser/recover-invalid-function-parameter-pattern-2.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/parser/trait-item-field-colon-syntax.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/proc-macro/span-first-token-file-48944.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/regions/regions-static-bound-on-type-param.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150387.rs: [missing] -> pass (J4)
  • [crashes] tests/crashes/153947.rs: [missing] -> pass (J4)
  • [crashes] tests/crashes/160490.rs: pass -> [missing] (J4)

Stage 2

  • [ui] tests/ui/assumptions_on_binders/reflexive-outlives-in-root.rs: [missing] -> pass (J0)
  • [ui] tests/ui/assumptions_on_binders/same-universe-placeholder-outlives.rs: [missing] -> pass (J0)
  • [ui] tests/ui/dropck/overlapping_impossible_drop.rs: pass -> [missing] (J0)
  • [ui] tests/ui/dropck/overlapping_impossible_drop_min_specialization.rs: pass -> [missing] (J0)
  • [ui] tests/ui/lifetimes/static-impl-obligation.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/recover-invalid-fn-trait-bound-pattern.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/recover-invalid-function-parameter-pattern-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/recover-invalid-function-parameter-pattern-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/parser/trait-item-field-colon-syntax.rs: [missing] -> pass (J0)
  • [ui] tests/ui/proc-macro/span-first-token-file-48944.rs: [missing] -> pass (J0)
  • [ui] tests/ui/regions/regions-static-bound-on-type-param.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150387.rs: [missing] -> pass (J3)
  • [crashes] tests/crashes/153947.rs: [missing] -> pass (J3)
  • [crashes] tests/crashes/160490.rs: pass -> [missing] (J3)

Additionally, 876 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 6eeff9a52c3e35c4c4cbf5651f342dcd2191866f --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. test-x86_64-gnu-gcc-core-tests: 9m 32s -> 18m 3s (+89.3%)
  2. test-x86_64-rust-for-linux: 34m 40s -> 58m 49s (+69.7%)
  3. test-x86_64-gnu-tools: 42m 40s -> 1h 11m (+66.8%)
  4. test-x86_64-gnu-stdlib-semver-check: 10m 40s -> 17m 38s (+65.3%)
  5. test-arm-android: 1h 20m -> 1h 53m (+40.7%)
  6. test-armhf-gnu: 58m 34s -> 1h 20m (+37.9%)
  7. test-x86_64-gnu-llvm-21-1: 56m 55s -> 35m 36s (-37.5%)
  8. test-x86_64-gnu-next-trait-solver-polonius: 44m 52s -> 1h 1m (+36.8%)
  9. test-x86_64-gnu-aux: 2h 36m -> 1h 40m (-35.6%)
  10. test-i686-gnu-2: 1h 43m -> 1h 8m (-34.0%)
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 (6eeff9a): comparison URL.

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.9%)

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

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.9% [-5.9%, -5.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-5.9%, 2.1%] 2

Cycles

Results (secondary 0.7%)

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.1% [5.1%, 5.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.5% [-2.5%, -0.5%] 2
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.2%, secondary -0.3%)

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)
-0.2% [-0.6%, -0.0%] 25
Improvements ✅
(secondary)
-0.3% [-0.6%, -0.0%] 71
All ❌✅ (primary) -0.2% [-0.6%, -0.0%] 25

Bootstrap: 490.745s -> 488.343s (-0.49%)
Artifact size: 406.33 MiB -> 406.24 MiB (-0.02%)

@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#161988 trait solver: Handle reflexive region constraints 9c26b59581c878f8503a8fb0eacf9abcfee6a91a
(link)
#162498 Avoid ICEs when recovering malformed function parameters 3987530f0a44b4755fa68b793191868985b7c897
(link)
#163181 revert #162715 due to #163149 99a3baef807d0e1d1f8f35d38126e7f2f4775520
(link)
#163207 Update deprecated rustc_hir imports 2 b7d213d51fbb5a7ea38aebfbc5b5a2cb36655ec3
(link)
#163216 Add inline attribute to NonZero::from_str bb78e5acade3a928f7a6a96fb9a7ec56fa08d3bd
(link)
#120589 std::thread::available_parallelism merging linux/android/fr… 5157b694ca12e3f6892fa6e0896255167333c946
(link)
#162103 fix(parser): emit targeted diagnostic for fields inside tra… 8824bb3424228c6e9ebf4b0727216169d9ff676e
(link)
#162340 When trying to recover from for<…> dyn … don't unconditio… 00ad881b82c884ab275502c3344dd39b77da7e32
(link)
#163094 Add regression test for first token source file from TokenS… 204d0abf9ca695484a90792dc9f081a477e61d36
(link)
#163115 Point at 'static obligations from an fn being called d6c08d4de5c9e3265a848c4b4ba1f82c07ec1298
(link)

parent commit: 1a8fa55580

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.

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. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.