Rollup of 11 pull requests#153212
Closed
JonathanBrouwer wants to merge 58 commits intorust-lang:mainfrom
Closed
Conversation
- 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
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Contributor
Author
|
Trying commonly failed jobs |
This comment has been minimized.
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
Contributor
|
PR #153210, which is a member of this rollup, was unapproved. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
rust-analyzersubtree update #153211 (rust-analyzersubtree update)#[doc(alias = "...")]attribute on inlined reexports #153136 (Correctly handle#[doc(alias = "...")]attribute on inlined reexports)tys to prevent ICE #152165 (Normalize capture placetys to prevent ICE)r? @ghost
Create a similar rollup