rust-analyzer subtree update#155046
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();
}
```
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
|
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 |
|
|
@bors r+ p=1 |
`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
`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 comment has been minimized.
This comment has been minimized.
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 dd82fd2 (parent) -> 7659cec (this PR) Test differencesShow 120 test diffsStage 0
Stage 1
(and 16 additional test diffs) Additionally, 4 doctest diffs were found. These are ignored, as they are noisy. Job group index Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7659cec4ed1457bc0d1f636127e66e8fe5008928 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (7659cec): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (secondary 7.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 488.849s -> 492.281s (0.70%) |
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@64ddb54.Created using https://github.com/rust-lang/josh-sync.
r? @ghost