Skip to content

Rollup of 4 pull requests#158524

Merged
rust-bors[bot] merged 12 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-75ZlceV
Jun 28, 2026
Merged

Rollup of 4 pull requests#158524
rust-bors[bot] merged 12 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-75ZlceV

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Albab-Hasan and others added 12 commits June 26, 2026 23:28
…ting this bound" suggestion

when a bound already has generic args (e.g. `impl Pair<Left = A>`) the "consider further restricting this bound" suggestion would generate invalid syntax by appending a new `<Right = B>` producing `Pair<Left = A><Right = B>`.

the fix detects when the insertion point immediately follows a `>` and merges into the existing arg list instead producing the valid `Pair<Left = A, Right = B>`.
The probe handles EMFILE (per-process fd limit) as a transient error and re-probes later, but lets ENFILE (system-wide fd limit) fall through to the catch-all arm meant for an old kernel without pidfd support, which permanently caches the pidfd path as unsupported. ENFILE is the same transient condition, so handle both.
…, r=joboet

std: treat ENFILE as transient in the pidfd support probe

The pidfd support probe special-cases `EMFILE` from `pidfd_open`: it returns the
error without caching anything, so the next spawn re-probes. `ENFILE` falls
through instead, into the fallback arm, so the probe caches pidfd as unsupported
for the rest of the process, even after descriptors free up.

Both errnos come from the same `pidfd_open` call and mean the same thing: the
process is out of file descriptors, just per-process (`EMFILE`) vs system-wide
(`ENFILE`). I don't see a reason to treat them differently here, so this handles
`ENFILE` the same way:

```rust
Err(e) if matches!(e.raw_os_error(), Some(libc::EMFILE | libc::ENFILE)) => {
```

I kept the raw `raw_os_error()` check rather than `ErrorKind::TooManyOpenFiles`
(rust-lang#158326, which maps both) to match the rest of this probe, but can switch if
you'd prefer.

I didn't add a test, since triggering it needs real fd exhaustion during the
probe, which isn't practical to reproduce. The `EMFILE` arm isn't tested either.

r? libs
…ble-angle, r=folkertdev

regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion

when a bound already has generic args (e.g. `impl Pair<Left = A>`) the "consider further restricting this bound" suggestion would generate invalid syntax by appending a new `<Right = B>` producing `Pair<Left = A><Right = B>`.

the fix detects when the insertion point immediately follows a `>` and merges into the existing arg list instead producing the valid `Pair<Left = A, Right = B>`.

fixes rust-lang#142803
…anBrouwer

Fix mixed use of "a" / "an" article in E0277

This PR fixes a tiny little annoyance typo in error E0277. Currently, this code fails to compile (correctly) with the following error:

```rs
struct A<F: Fn()>(F);

impl<F> A<F> {}

fn main() {}
```

```rs
error[E0277]: expected a `Fn()` closure, found `F`
 --> src/main.rs:3:9
  |
3 | impl<F> A<F> {}
  |         ^^^^ expected an `Fn()` closure, found `F`
  |
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }`
... truncated
```

Unfortunately, the first line of the error message uses the article "a", when it should be "an" for the `Fn` trait and friends. The help label does use the correct article, "an".

Unless if I have been pronouncing `Fn` incorrectly...
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 28, 2026
@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. 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 Jun 28, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 412fd6b 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 Jun 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 28, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #158486 (std: treat ENFILE as transient in the pidfd support probe)
 - #158454 (regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion)
 - #158518 (Fix mixed use of "a" / "an" article in E0277)
 - #158519 (add crashtests [2/N])
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-nopt failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [debuginfo-gdb] tests/debuginfo/zst-interferes-with-prologue.rs ... ok

failures:

---- [debuginfo-gdb] tests/debuginfo/function-call.rs stdout ----
NOTE: compiletest thinks it is using GDB version 12001000
------gdb stdout------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file /checkout/tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break

------gdb stderr------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.

------------------------------------------

error: gdb failed to execute
status: exit status: 1
command: PYTHONPATH="/checkout/src/etc" "/usr/bin/gdb" "-quiet" "-batch" "-nx" "-command=/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script"
--- stdout -------------------------------
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Breakpoint 1 at 0x1b42: file /checkout/tests/debuginfo/function-call.rs, line 36.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, function_call::main () at /checkout/tests/debuginfo/function-call.rs:36
36     zzz(); // #break
------------------------------------------
--- stderr -------------------------------
/checkout/obj/build/x86_64-unknown-linux-gnu/test/debuginfo/function-call.gdb/function-call.debugger.script:11: Error in sourced command file:
Couldn't write extended state status: Bad address.
------------------------------------------

@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 Jun 28, 2026
@rust-bors

rust-bors Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 7b53105 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
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 Jun 28, 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 Jun 28, 2026
@rust-bors

rust-bors Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 17m 13s
Pushing 2574810 to main...

@rust-bors rust-bors Bot merged commit 2574810 into rust-lang:main Jun 28, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 28, 2026
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#158454 regression test for Trait<A><B> in "consider further rest… 2b2bd08a3d16782690df23c84959da965916e650 (link)
#158486 std: treat ENFILE as transient in the pidfd support probe 2425f79425e98c460174d218ee5472d908da3b97 (link)
#158518 Fix mixed use of "a" / "an" article in E0277 8f89b230420d0b9b0093cd245efee5bf5df72cf0 (link)
#158519 add crashtests [2/N] 200c65fcfe2f2a52a227042c56a37580bc384ad1 (link)

previous master: b4486cacf5

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 b4486ca (parent) -> 2574810 (this PR)

Test differences

Show 29 test diffs

Stage 1

  • [crashes] tests/crashes/149748.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150040.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150049.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150128.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150296.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150387.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150403.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150517.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150545.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150749.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/150969.rs: [missing] -> pass (J2)
  • [crashes] tests/crashes/151069.rs: [missing] -> pass (J2)
  • [ui] tests/ui/suggestions/restrict-bound-already-has-generic-args.rs: [missing] -> pass (J3)
  • [ui (polonius)] tests/ui/suggestions/restrict-bound-already-has-generic-args.rs: [missing] -> pass (J4)

Stage 2

  • [crashes] tests/crashes/149748.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150040.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150049.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150128.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150296.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150387.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150403.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150517.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150545.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150749.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/150969.rs: [missing] -> pass (J0)
  • [crashes] tests/crashes/151069.rs: [missing] -> pass (J0)
  • [ui] tests/ui/suggestions/restrict-bound-already-has-generic-args.rs: [missing] -> pass (J1)

Additionally, 2 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 2574810b228d53518cc2a13f2ee473195932a999 --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-gnu-llvm-21-2: 56m 4s -> 1h 37m (+74.4%)
  2. dist-i686-msvc: 1h 7m -> 1h 55m (+70.9%)
  3. dist-x86_64-llvm-mingw: 1h 5m -> 1h 48m (+65.5%)
  4. dist-ohos-aarch64: 54m 39s -> 1h 18m (+43.2%)
  5. x86_64-gnu-stable: 1h 47m -> 2h 26m (+36.3%)
  6. dist-ohos-armv7: 1h 13m -> 58m 13s (-20.8%)
  7. dist-x86_64-freebsd: 1h 12m -> 1h 27m (+20.7%)
  8. x86_64-gnu-gcc-core-tests: 8m 52s -> 7m 30s (-15.4%)
  9. dist-powerpc-linux: 1h 18m -> 1h 29m (+13.9%)
  10. dist-x86_64-apple: 2h 1m -> 1h 45m (-13.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 (2574810): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (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)
- - 0
Regressions ❌
(secondary)
4.2% [1.6%, 6.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.0% [-8.2%, -4.6%] 3
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 486.992s -> 485.934s (-0.22%)
Artifact size: 393.11 MiB -> 395.62 MiB (0.64%)

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-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.

8 participants