Rollup of 4 pull requests#158524
Conversation
…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...
add crashtests [2/N] Followup to rust-lang#158290.
|
@bors r+ rollup=never p=5 |
This comment has been minimized.
This comment has been minimized.
…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])
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
💔 Test for 7b53105 failed: CI. Failed job:
|
|
@bors retry |
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: b4486cacf5 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 differencesShow 29 test diffsStage 1
Stage 2
Additionally, 2 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 2574810b228d53518cc2a13f2ee473195932a999 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (2574810): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis 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.
CyclesResults (secondary 10.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 486.992s -> 485.934s (-0.22%) |
Successful merges:
Trait<A><B>in "consider further restricting this bound" suggestion #158454 (regression test forTrait<A><B>in "consider further restricting this bound" suggestion)r? @ghost
Create a similar rollup