Open
Conversation
fix rust-lang/rust-analyzer#18578 I believe it won't break anything.
Example
---
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
$0self.f()+self.f()$0
}
}
```
**Before this PR**
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
fun_name(self)
}
}
fn $0fun_name(&self) -> i32 {
self.f()+self.f()
}
```
**After this PR**
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
fun_name(self)
}
}
fn $0fun_name(this: &impl Foo) -> i32 {
this.f()+this.f()
}
```
We can't use the flycheck scope, because that value varies depending on how the flycheck was triggered. See also rust-lang/rust-analyzer#21571, which was reverted due to issues with scope. Instead, treat empty diagnostics as a flycheck for the entire workspace, add comments explaining the JSON diagnostic format, and add an integration test.
Example
---
```rust
trait Marker {
fn foo();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}$0
fn baz() {}
}
```
**Before this PR**
```rust
trait Marker {
fn missing();
fn foo();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}
fn baz() {}
}
```
**After this PR**
```rust
trait Marker {
fn foo();
fn missing();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}
fn baz() {}
}
```
Example
---
```rust
struct Other;
struct String;
enum Foo {
String($0)
}
```
**Before this PR**
```text
en Foo Foo []
st Other Other []
sp Self Foo []
st String String []
```
**After this PR**
```text
st String String [name]
en Foo Foo []
st Other Other []
sp Self Foo []
```
Example
---
```rust
fn main() {
println!("{}", env!("CA$0"));
}
```
**Before this PR**
Cannot complete any env
**After this PR**
```rust
fn main() {
println!("{}", env!("CARGO_BIN_NAME"));
}
```
Example
---
Like `is_foo`, `.not`, `.if`
```rust
fn main() {
let is_foo = true;
!is_foo.$0
}
```
**Before this PR**
```rust
fn main() {
let is_foo = true;
!if is_foo {
$0
}
}
```
**After this PR**
```rust
fn main() {
let is_foo = true;
if !is_foo {
$0
}
}
```
Why? Because sometimes we work on resolving some bug that causes hang/consistent panics/stack overflows/etc., and we put it in a fixture for a test. Then r-a does exactly the same to us, and it's really hard to work this way.
feat: Allow disabling all fixture support
This updates the rust-version file to 80ad557.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@80ad557 Filtered ref: rust-lang/rust-analyzer@7f4e321 Upstream diff: rust-lang/rust@1174f78...80ad557 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…hims These branches reused the libc::write error string when arguments were absent. Assisted by an AI coding tool (see CONTRIBUTING.md). Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
…ng-args-messages fix: Correct missing-args messages for sched_getaffinity and getenv shims
For assist 'convert_to_guarded_return'
Example
---
```rust
fn main() -> i32 {
if$0 true {
foo();
} else {
bar()
}
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
fn main() -> i32 {
if false {
return bar();
}
foo();
}
```
…override Fix [env] in .cargo/config.toml overriding process environment variables
…generate-trait-from-impl Remove make with SyntaxFactory in generate_trait_from_impl
…de-placeholders feat: enhance runnable command placeholders
minor: Fix self kw is snippet in type location
internal: Fix lsp_ext field name for RecursiveMemoryLayoutNode
…aph-unwrap unwrap unnecessary result return type in view_crate_graph
…rms-message-2RJMd fix: Improve label on add_missing_match_arms assist
changes to build scripts and config.toml should always refresh
…oerce fix: Check coercion, not unification, in "Fill struct fields", as the criteria to use an existing local as the field's value
fix: Diagnose cfged-out crate
fix: Consider the context of the path for `ImportAssets`
fix: Disable the fix for missing-fields when the fields are private
…ke constructor directly
…-extract-struct-from-enum-variant Migrate extract struct from enum variant to new SyntaxEditor and Port whitespace heuristics to SyntaxEditor
This updates the rust-version file to 4c42051.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@4c42051 Filtered ref: rust-lang/rust-analyzer@ec550d4 Upstream diff: rust-lang/rust@80ad557...4c42051 This merge was created using https://github.com/rust-lang/josh-sync.
internal: sync from downstream
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 |
Collaborator
|
Member
Author
|
@bors r+ p=1 |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 9, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@64ddb54. Created using https://github.com/rust-lang/josh-sync. r? @ghost
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Apr 9, 2026
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@64ddb54. Created using https://github.com/rust-lang/josh-sync. r? @ghost
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@64ddb54.Created using https://github.com/rust-lang/josh-sync.
r? @ghost