Skip to content

Rollup of 11 pull requests#153212

Closed
JonathanBrouwer wants to merge 58 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BkWLxhi
Closed

Rollup of 11 pull requests#153212
JonathanBrouwer wants to merge 58 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-BkWLxhi

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

JohnTitor and others added 30 commits February 17, 2026 20:32
- Remove some redundant `.clone_for_update()` and `.indent(IndentLevel::single())`

Example
---
```rust
fn main() {
    if true {
        $0if true
            && false
        {
            foo()
        }
    }
}
```

**Before this PR**

```rust
fn main() {
    if true {
        match true
                    && false {
            true => foo(),
            _ => (),
        }
    }
}
```

**After this PR**

```rust
fn main() {
    if true {
        match true
            && false {
            true => foo(),
            _ => (),
        }
    }
}
```
the `check_ptr_ptr_cast` function had an early return when the source and
destination dyn trait objects shared the same principal trait def id:

    if src_principal == dst_principal {
        return Ok(());
    }

this bypassed all three remaining checks that the code comment explicitly
listed as required: generic argument equality, projection equality, and
the auto-trait superset check. as a result, casts like
`*mut dyn Trait as *mut (dyn Trait + Send)` were silently accepted
instead of emitting E0804.

the fix removes the early return. `CastError::PtrPtrAddingAutoTraits` and
its diagnostic were already implemented — they just couldn't be reached.
the supertrait case (`trait Trait: Send`) continues to work correctly
because the auto-trait check already accounts for implied auto traits via
supertrait elaboration.
Currently the rustfmt slow test fails if you don't have a nightly
toolchain installed. We install a nightly toolchain on CI, but it's a
little confusing that tests can fail on a fresh checkout on a new
laptop.

Instead, skip this test if there's no nightly toolchain.
internal: Skip rustfmt test if nightly toolchain is missing
Example
---
```rust
enum Enum { TupleV(u32), RecordV { field: u32 }, UnitV }
use Enum::*;
fn func() {
    if let $0 = unknown {}
}
```

**Before this PR**

```text
...
ev RecordV
ev TupleV
ev UnitV
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…)            TupleV($1)$0
bn UnitV                     UnitV$0
kw mut
kw ref
```

**After this PR**

```text
...
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…)            TupleV($1)$0
bn UnitV                     UnitV$0
kw mut
kw ref
```
…on-panic

fix: Don't panic on invalid LSP notifications
…auto-trait-not-detected

fix: Detect E0804 when casting raw ptr-to-dyn adds auto traits
fix: Fix scrutinee expr indent for replace_if_let_with_match
…nt-pat

fix: no complete enum variant qualifier in pat
fix: Use -Zlockfile-path on every 1.95 nightly
@rustbot rustbot added A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-infra Relevant to the infrastructure 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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 28, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

📌 Commit c2961cd has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 28, 2026
@JonathanBrouwer
Copy link
Contributor Author

Trying commonly failed jobs
@bors try jobs=test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 28, 2026
@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 28, 2026
Rollup of 11 pull requests


try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 28, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

PR #153210, which is a member of this rollup, was unapproved.
This rollup was thus also unapproved.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 28, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 28, 2026

☀️ Try build successful (CI)
Build commit: 89ab39e (89ab39e1ea40e62b365d85fc2791e8c829cf2849, parent: 846cb1e850ae22b0abf853a4acdfe4b67c07aab1)

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-json Area: Rustdoc JSON backend A-rustdoc-search Area: Rustdoc's search feature A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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-infra Relevant to the infrastructure 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-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt 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.