Skip to content

Rollup of 4 pull requests#156881

Merged
rust-bors[bot] merged 17 commits into
rust-lang:mainfrom
jhpratt:rollup-Z5cqxkd
May 24, 2026
Merged

Rollup of 4 pull requests#156881
rust-bors[bot] merged 17 commits into
rust-lang:mainfrom
jhpratt:rollup-Z5cqxkd

Conversation

@jhpratt
Copy link
Copy Markdown
Member

@jhpratt jhpratt commented May 24, 2026

Successful merges:

r? @ghost

Create a similar rollup

Teufelchen1 and others added 17 commits May 21, 2026 18:07
The lint suggestion now removes the `+` joiner adjacent to a redundant
`use<...>` clause, so applying the suggestion does not leave a dangling
`+` that fails to parse.

The existing `tests/ui/impl-trait/precise-capturing/redundant.stderr`
baseline emits the same diagnostic with the expanded suggestion span and
is blessed along with the new `run-rustfix` test.

Tested:
- ./x test tests/ui/impl-trait/precise-capturing/redundant.rs --force-rerun
- ./x test tests/ui/impl-trait/precise-capturing/redundant-machine-applicable.rs --force-rerun
- ./x test tidy
…se, r=Urgau,jhpratt

Parse `mut` restrictions

This PR is part of the progress implementing `mut` restrictions proposed in [RFC 3323](https://rust-lang.github.io/rfcs/3323-restrictions.html), and linked to a [GSoC proposal](https://rust-lang.zulipchat.com/#narrow/channel/421156-gsoc/topic/Project.3A.20Implementing.20impl.20and.20mut.20restrictions/with/592352432).
This PR focuses solely on the parsing of `mut` restrictions.
The keyword order is `pub(...) mut(...) unsafe field`.
The new syntax is guared by `#[feature(mut_restriction)]` feature gate.
Tracking Issue: rust-lang#105077

r? @Urgau
cc @jhpratt
…apin

Fix doc typo in Vec::into_array and convert Arc/Box/Rc::into_arry to -> Result

Hello 🪼,

the first commit fixes a documentation mistake added in the recent PR rust-lang#156234

The second commit addresses three function signature changes as defined by the tracking issue rust-lang#148082
It converts all `.into_array() -> Option<>` into `.into_array() -> Result<>`

The third commit is a fixup for the second. The change is needed as calling `unwrap()` on `Err(E)` requires `E` to implement `Debug`. I thought `Vec<T, A> where T: Debug` is not an acceptable solution, so I tried to come up with my own. I am *NOT* confident in my `unsafe {}`  code due to lack of expierence, please check extra carefully.

Appreciating feedback & greetings from the RustWeek,
Thanks!
Add regression test for const parameter default ICE

Closes rust-lang#142913

This adds a UI regression test for a fixed ICE where a const generic parameter
type mentioned an earlier lifetime and also had a default value.

The reproducer is the minimized version posted in the issue.

Tested:
- ./x test tests/ui/const-generics/generic_const_parameter_types/region-parameter-out-of-range-ice-142913.rs --force-rerun
- ./x test tidy --bless
…6, r=cjgillot

Make impl_trait_redundant_captures suggestion remove adjacent +

Closes rust-lang#143216

The `impl_trait_redundant_captures` lint's machine-applicable suggestion only
spanned the `use<...>` syntax itself, leaving the adjacent `+` joiner behind.
Applying the suggestion produced uncompilable code, e.g.
`impl Sized + use<>` becoming `impl Sized + ` (stray trailing `+`).

This extends the removal span to also cover one adjacent `+`, preserving
valid syntax in the three bound-list positions covered by the regression test:

- `impl Sized + use<>` becomes `impl Sized`
- `impl use<> + Sized` becomes `impl Sized`
- `impl Sized + use<> + Send` becomes `impl Sized + Send`

A `//@ run-rustfix` UI test exercises all three positions, so the
rustfix-applied output is actually compiled — covering the gap the
existing `redundant.rs` test left (which only checks lint firing, not
suggestion correctness).

Tested:
- ./x test tests/ui/impl-trait/precise-capturing/redundant-machine-applicable.rs --bless
- ./x test tidy
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 24, 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. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels May 24, 2026
@jhpratt
Copy link
Copy Markdown
Member Author

jhpratt commented May 24, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 24, 2026

📌 Commit 794b44d 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 May 24, 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 May 24, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 24, 2026

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 15m 28s
Pushing 609b8c5 to main...

@rust-bors rust-bors Bot merged commit 609b8c5 into rust-lang:main May 24, 2026
12 checks passed
@rustbot rustbot added this to the 1.98.0 milestone May 24, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#156810 Fix doc typo in Vec::into_array and convert Arc/Box/Rc::int… 2b7d1c1150b2b3b09be812e403e6359abc60de6a (link)
#156824 Parse mut restrictions 7aa7d83de35bbca1bb80390ad6df741acc2e079e (link)
#156833 Add regression test for const parameter default ICE 42737172dd3611dd4efe6bcd6ec51320da71175a (link)
#156843 Make impl_trait_redundant_captures suggestion remove adjace… 39595d983d64d6212ac1a1fef839b87f4e80d9f4 (link)

previous master: 1d59f669f9

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 1d59f66 (parent) -> 609b8c5 (this PR)

Test differences

Show 1074 test diffs

Stage 1

  • [ui] tests/ui/const-generics/generic_const_parameter_types/lifetime_dependent_const_param_default.rs: [missing] -> pass (J1)
  • [ui] tests/ui/impl-trait/precise-capturing/redundant-machine-applicable.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mut-restriction/feature-gate-mut-restriction.rs#with_gate: [missing] -> pass (J1)
  • [ui] tests/ui/mut-restriction/feature-gate-mut-restriction.rs#without_gate: [missing] -> pass (J1)
  • [ui] tests/ui/mut-restriction/recover-incorrect-mut-restriction.rs: [missing] -> pass (J1)

Stage 2

  • [ui] tests/ui/const-generics/generic_const_parameter_types/lifetime_dependent_const_param_default.rs: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/precise-capturing/redundant-machine-applicable.rs: [missing] -> pass (J0)
  • [ui] tests/ui/mut-restriction/feature-gate-mut-restriction.rs#with_gate: [missing] -> pass (J0)
  • [ui] tests/ui/mut-restriction/feature-gate-mut-restriction.rs#without_gate: [missing] -> pass (J0)
  • [ui] tests/ui/mut-restriction/recover-incorrect-mut-restriction.rs: [missing] -> pass (J0)

Additionally, 1064 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 609b8c5cefb3932bbaf4497cb7f9195ca8a1eab6 --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. optional-x86_64-gnu-parallel-frontend: 1h 48m -> 2h 48m (+55.1%)
  2. x86_64-gnu-debug: 1h 36m -> 2h 13m (+38.3%)
  3. x86_64-gnu-llvm-22-1: 53m 28s -> 1h 11m (+34.4%)
  4. dist-arm-linux-gnueabi: 1h 30m -> 1h (-33.6%)
  5. pr-check-1: 26m 21s -> 34m 28s (+30.8%)
  6. x86_64-gnu-nopt: 1h 53m -> 2h 25m (+28.4%)
  7. dist-i686-linux: 1h 24m -> 1h 48m (+28.4%)
  8. x86_64-msvc-ext3: 1h 52m -> 1h 23m (-25.3%)
  9. dist-i586-gnu-i586-i686-musl: 1h 17m -> 1h 36m (+23.9%)
  10. x86_64-gnu-tools: 55m 59s -> 1h 8m (+22.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-bors rust-bors Bot mentioned this pull request May 24, 2026
@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (609b8c5): comparison URL.

Overall result: ❌ regressions - 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.

mean range count
Regressions ❌
(primary)
0.3% [0.2%, 0.4%] 11
Regressions ❌
(secondary)
0.2% [0.0%, 0.6%] 12
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-1.9%, -1.9%] 1
All ❌✅ (primary) 0.3% [0.2%, 0.4%] 11

Max RSS (memory usage)

Results (primary 3.3%, secondary -2.8%)

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

mean range count
Regressions ❌
(primary)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
1.9% [1.9%, 1.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-6.1%, -4.2%] 2
All ❌✅ (primary) 3.3% [3.3%, 3.3%] 1

Cycles

Results (primary -2.0%)

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

Binary size

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

Bootstrap: 510.511s -> 508.631s (-0.37%)
Artifact size: 400.71 MiB -> 400.68 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label May 24, 2026
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. perf-regression Performance regression. 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. T-rustfmt Relevant 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.

6 participants