rust-analyzer subtree update#153211
Merged
rust-bors[bot] merged 23 commits intorust-lang:mainfrom Feb 28, 2026
Merged
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
Migrate fix_visibility assist to use SyntaxEditor
Migrate `generate_derive` assist to SyntaxEditor
…n-parent Implement Span::SpanParent for proc-macro-srv
Collaborator
|
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
Member
Author
|
This sync is a little early, but it includes a fix that we plan to backport to beta. @bors r+ p=1 |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Feb 28, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@fbc7b76. Created using https://github.com/rust-lang/josh-sync. r? @ghost
This was referenced Feb 28, 2026
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 28, 2026
…uwer Rollup of 12 pull requests Successful merges: - #153211 (`rust-analyzer` subtree update) - #149027 (Improve cross-crate trait impl param mismatch suggestions ) - #152730 (add field representing types) - #153136 (Correctly handle `#[doc(alias = "...")]` attribute on inlined reexports) - #152165 (Normalize capture place `ty`s to prevent ICE) - #152615 (refactor 'valid for read/write' definition: exclude null) - #153109 (Fix LegacyKeyValueFormat report from docker build: aarch64-gnu-debug) - #153172 (Fix comment about placeholders) - #153187 (Fix ICE when macro-expanded extern crate shadows std) - #153190 (Don't allow subdiagnostic to use variables from their parent) - #153200 (Remove redundant clone) - #153216 (mark two polonius tests as known-bug)
rust-timer
added a commit
that referenced
this pull request
Feb 28, 2026
Rollup merge of #153211 - lnicola:sync-from-ra, r=lnicola `rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@fbc7b76. Created using https://github.com/rust-lang/josh-sync. r? @ghost
github-actions bot
pushed a commit
to rust-lang/rust-analyzer
that referenced
this pull request
Mar 2, 2026
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#153211 (`rust-analyzer` subtree update) - rust-lang/rust#149027 (Improve cross-crate trait impl param mismatch suggestions ) - rust-lang/rust#152730 (add field representing types) - rust-lang/rust#153136 (Correctly handle `#[doc(alias = "...")]` attribute on inlined reexports) - rust-lang/rust#152165 (Normalize capture place `ty`s to prevent ICE) - rust-lang/rust#152615 (refactor 'valid for read/write' definition: exclude null) - rust-lang/rust#153109 (Fix LegacyKeyValueFormat report from docker build: aarch64-gnu-debug) - rust-lang/rust#153172 (Fix comment about placeholders) - rust-lang/rust#153187 (Fix ICE when macro-expanded extern crate shadows std) - rust-lang/rust#153190 (Don't allow subdiagnostic to use variables from their parent) - rust-lang/rust#153200 (Remove redundant clone) - rust-lang/rust#153216 (mark two polonius tests as known-bug)
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.
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@fbc7b76.Created using https://github.com/rust-lang/josh-sync.
r? @ghost