Skip to content

Rollup of 7 pull requests - #163157

Merged
rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-E6PKhEB
Sep 22, 2026
Merged

rust-bors[bot] merged 14 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-E6PKhEB

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

saethlin and others added 14 commits September 19, 2026 10:47
`is_const_pat_that_looks_like_binding` matched the pattern snippet against a
plain identifier so the `#` in `let r#x = 0` rejected it and the binding lost
both the label pointing at `const x` and the `introduce a variable instead`
suggestion. strip a leading `r#` before the check and render the const name
with `to_ident_string` in the label so a keyword name prints as `r#fn`.

fixes rust-lang#162949
…typeck is tainted

We started to check typeck result's tainted_by_errors in check_pat for LateLint,
But ideally the check should be in a better place which all lints profit from it.
`DiagInner` impls `PartialEq` and `Hash`, as you'd expect for storing it
in a hash table. But there's a couple of strange things.

- We only store the hash value of the `DiagInner` to do deduplication,
  not the `DiagInner` itself, which means the `PartialEq` impl is
  unused.

- The `Hash` impl only considers some of the fields. Some of the ignored
  fields are clearly deliberate (there are comments) but for some it is
  unclear if it is deliberate.

This commit:

- Removes the unused `PartialEq` impl.

- Inlines and removes `keys` now that it's not needed for `PartialEq`.

- Uses struct deconstruction to ensure no fields can be accidentally
  ignored. I have preserved existing behaviour by assuming that all the
  ignored fields are supposed to be ignored.

- Renames `hash` as an inherent method `dedup_hash` to indicate that
  it's not a typical hash function, and simplifies it to just return
  `Hash128` instead of being generic.

- Replaces the unnecessary `collect` on `args` with `as_slice`.

- Improves the comment on `emitted_diagnostics`.
… r=oli-obk

Check tainted_by_error in LateLint

## Context
This PR continues from rust-lang#138679 (comment).
In the last PR, I introduced typeck result's tainted_by_error in check_pat. But as we've discussed, I should put the check to a better place which all lints get benefit from the check.

## Change
Since visit_nested_body in late.rs is the starting point of late lint for a nested body, I moved the error check to the function.
I also rename one ui test case which I introduced in the last PR. I think the new name describes what the test wants to check more.

This PR fixes rust-lang#138361 .

Note that we need to use actually_rustdoc to call typeck_body() in visit_nested_body. Otherwise rustdoc returns an error. However, as its comment describes we shouldn't use actually_rustdoc if there is an alternative solution. So far I only come up with using actually_rustdoc (this change), or checking tainted_by_error in each check_xxx functions (e.g., check on check_pat in rust-lang#138679, and on check_expr for rust-lang#138361).
Avoid generating overlapping assignments in DSE

This is a fix for rust-lang#162997.

Considering we also had rust-lang#155680, I really wonder if this pass should be using LivenessTransferFunction at all.
…=oli-obk

remove unnecessary restriction with next-solver

We previously FCP'd to forbid uses of opaque types which only differ in their lifetime arguments during MIR borrowck in rust-lang#116935 (comment). This actually did not end up being necessary after all. Will explain this a bit more in the stabilization documentation for the new solver

r? types
…-idents, r=oli-obk

emit the constant pattern note for raw identifier bindings

`is_const_pat_that_looks_like_binding` matched the pattern snippet against a plain identifier so the `#` in `let r#x = 0` rejected it and the binding lost both the label pointing at `const x` and the `introduce a variable instead` suggestion. strip a leading `r#` before the check and render the const name with `to_ident_string` in the label so a keyword name prints as `r#fn`.

fixes rust-lang#162949

r? @oli-obk
add `feature(field_projections)` fixme

see the added fixme :>

r? types
…r=oli-obk

Clean up diagnostic hashing

`DiagInner` impls `PartialEq` and `Hash`, as you'd expect for storing it in a hash table. But there's a couple of strange things.

- We only store the hash value of the `DiagInner` to do deduplication, not the `DiagInner` itself, which means the `PartialEq` impl is unused.

- The `Hash` impl only considers some of the fields. Some of the ignored fields are clearly deliberate (there are comments) but for some it is unclear if it is deliberate.

This commit:

- Removes the unused `PartialEq` impl.

- Inlines and removes `keys` now that it's not needed for `PartialEq`.

- Uses struct deconstruction to ensure no fields can be accidentally ignored. I have preserved existing behaviour by assuming that all the ignored fields are supposed to be ignored.

- Renames `hash` as an inherent method `dedup_hash` to indicate that it's not a typical hash function, and simplifies it to just return `Hash128` instead of being generic.

- Replaces the unnecessary `collect` on `args` with `as_slice`.

- Improves the comment on `emitted_diagnostics`.

r? @oli-obk
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 22, 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. labels Sep 22, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📌 Commit cecc101 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 Sep 22, 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 Sep 22, 2026
@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 7m 44s
Pushing b794652 to main...

@rust-bors
rust-bors Bot merged commit b794652 into rust-lang:main Sep 22, 2026
14 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 22, 2026
@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 e67cfe8 (parent) -> b794652 (this PR)

Test differences

Show 2001 test diffs

Stage 1

  • [ui] tests/ui/consts/do-not-ice-long-constant-evaluation-in-for-loop.rs: pass -> [missing] (J0)
  • [ui] tests/ui/consts/long-constant-evaluation-cause-dead-code.rs: [missing] -> pass (J0)
  • [ui] tests/ui/consts/long-constant-evaluation-cause-ice-in-sty.rs: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs: pass -> [missing] (J0)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs: pass -> [missing] (J0)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#current: [missing] -> pass (J0)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#next: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/consts/do-not-ice-long-constant-evaluation-in-for-loop.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/consts/long-constant-evaluation-cause-dead-code.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/consts/long-constant-evaluation-cause-ice-in-sty.rs: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#current: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#next: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs: pass -> [missing] (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#current: [missing] -> pass (J2)
  • [ui (polonius)] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#next: [missing] -> pass (J2)
  • [crashes] tests/crashes/138361.rs: pass -> [missing] (J4)

Stage 2

  • [ui] tests/ui/consts/do-not-ice-long-constant-evaluation-in-for-loop.rs: pass -> [missing] (J1)
  • [ui] tests/ui/consts/long-constant-evaluation-cause-dead-code.rs: [missing] -> pass (J1)
  • [ui] tests/ui/consts/long-constant-evaluation-cause-ice-in-sty.rs: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs: pass -> [missing] (J1)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/lifetime_mismatch.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs: pass -> [missing] (J1)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/type-alias-impl-trait/multiple-def-uses-in-one-fn-lifetimes.rs#next: [missing] -> pass (J1)
  • [crashes] tests/crashes/138361.rs: pass -> [missing] (J3)

Additionally, 1972 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 b794652dc70d72efc28970704c9ebe04d59fea5d --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-stdlib-semver-check: 9m -> 16m 55s (+88.0%)
  2. test-i686-gnu-2: 1h -> 1h 49m (+80.5%)
  3. test-x86_64-gnu-llvm-21-2: 1h 8m -> 1h 45m (+54.3%)
  4. test-x86_64-gnu-gcc-core-tests: 12m 28s -> 18m 31s (+48.5%)
  5. test-various: 1h 38m -> 2h 25m (+47.9%)
  6. test-x86_64-gnu-tools: 48m 48s -> 1h 11m (+45.6%)
  7. test-i686-gnu-nopt-2: 1h 38m -> 2h 18m (+40.5%)
  8. test-armhf-gnu: 1h 11m -> 1h 40m (+39.8%)
  9. dist-powerpc64-linux-musl: 1h 45m -> 1h 6m (-36.9%)
  10. test-x86_64-msvc-ext2: 1h 22m -> 1h 50m (+34.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 (b794652): 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 (primary 1.1%, secondary 3.2%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.8%, 3.0%] 2
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [-2.6%, 3.0%] 3

Cycles

Results (primary -3.2%, secondary -4.2%)

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

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.9% [-5.2%, -2.8%] 7
Improvements ✅
(secondary)
-4.2% [-9.6%, -2.2%] 11
All ❌✅ (primary) -3.2% [-5.2%, 2.2%] 8

Binary size

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

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.2%, -0.0%] 30
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 42
All ❌✅ (primary) -0.2% [-0.2%, -0.0%] 30

Bootstrap: 488.069s -> 491.265s (0.65%)
Artifact size: 406.51 MiB -> 406.42 MiB (-0.02%)

@rust-bors

rust-bors Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#147876 Check tainted_by_error in LateLint 922838c75ccefdebf6c5aaed0239b65f10f17c68
(link)
#162998 Avoid generating overlapping assignments in DSE 68da2c2f07336eeb980de1d72cc93205ffbb69e5
(link)
#163136 library: prune allowed lints 9fc31ec6a481e056aa26661c1f9a82889b979ec2
(link)
#163102 remove unnecessary restriction with next-solver aca10ce6952e6c160d78507cc5e289ce8e7a8de4
(link)
#163106 emit the constant pattern note for raw identifier bindings 9813f82aada60e7e32d87ed7d91a98b7f6012759
(link)
#163118 add feature(field_projections) fixme 52f41e935c14e4d3ae5cabfccceb35fa5fa7b16c
(link)
#163148 Clean up diagnostic hashing 4679a20c2b8e154cc0153e8f03210a8b57921402
(link)

parent commit: e67cfe858e

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants