Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Oct 27, 2025

Subtree update of rust-analyzer to rust-lang/rust-analyzer@049767e.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost

A4-Tacks and others added 30 commits June 4, 2025 10:55
Example
---
```rust
struct Foo;
impl Foo {
    $0fn foo() {}
    fn bar() {}$0
    fn baz() {}
}
```

**Before this PR**:

```rust
struct Foo;
impl Foo {
    mod modname {
        pub(crate) fn foo() {}

        pub(crate) fn bar() {}
    }
    fn baz() {}
}
```

**After this PR**:

```rust
struct Foo;
impl Foo {
    fn baz() {}
}
mod modname {
    use super::Foo;

    impl Foo {
        pub(crate) fn foo() {}

        pub(crate) fn bar() {}
    }
}
```
Flips operands of a range expression.

Example
---
```rust
fn main() {
    let _ = 90..$02;
}
```
->
```rust
fn main() {
    let _ = 2..90;
}
```
---
```rust
fn main() {
    let _ = 90..$0;
}
```
->
```rust
fn main() {
    let _ = ..90;
}
```
Example
---
```rust
struct S { field: (i32, i32) }
fn main() {
    let S { $0field } = S { field: (2, 3) };
    let v = field.0 + field.1;
}
```

**Before this PR**:

```rust
struct S { field: (i32, i32) }
fn main() {
    let S { ($0_0, _1) } = S { field: (2, 3) };
    let v = _0 + _1;
}
```

**After this PR**:

```rust
struct S { field: (i32, i32) }
fn main() {
    let S { field: ($0_0, _1) } = S { field: (2, 3) };
    let v = _0 + _1;
}
```
Example
---
```rust
fn main() {
    if$0 let Ok(x) = Err(92)
        && let Ok(y) = Ok(37)
        && x < 30
        && let Some(y) = Some(8)
    {
        foo(x, y);
    }
}
```

**Before this PR**:

```rust
fn main() {
    let Ok(x) = Err(92) else { return };
    if !(let Ok(y) = Ok(37) && x < 30) {
        return;
    }
    let Some(y) = Some(8) else { return };
    foo(x, y);
}
```

**After this PR**:

```rust
fn main() {
    let Ok(x) = Err(92) else { return };
    let Ok(y) = Ok(37) else { return };
    if x >= 30 {
        return;
    }
    let Some(y) = Some(8) else { return };
    foo(x, y);
}
```
Example
---
```rust
fn f() {
    if cond {
        3 * 2
    } e$0lse {
        1
    }
}
```
->
```rust
fn f() {
    if !cond {
        1
    } else {
        3 * 2
    }
}
```
The bulk of the work is trait solving and cached in the trait solver's cache, and this will save memory.
minor: Fix creating `rust-analyzer/rust-analyzer` under target-dir
Fix compile error in `crates/cfg` tests due to `tt` feature
- And fix indent

Example
---
```rust
fn foo() {
    {
        match n {
            Some(n) $0=> foo(
                29,
                30,
            ),
            _ => ()
        };
    }
}
```

**Before this PR**:

```rust
fn main() {
    {
        match n {
            Some(n) => {
                foo(
                            29,
                            30,
                        )
            },
            _ => ()
        };
    }
}
```

**After this PR**:

```rust
fn foo() {
    {
        match n {
            Some(n) => {
                foo(
                    29,
                    30,
                )
            },
            _ => ()
        };
    }
}
```
- And fix indentations

Example
---
```rust
fn main() {
    match None$0 {
        None => {
            foo(
                "foo",
                "bar",
            );
        }
    }
}
```

**Before this PR**:

```rust
fn main() {
    match None {
        None => {
                foo(
                    "foo",
                    "bar",
                );
            }
        Some(_) => todo!(),
    }
}
```

**After this PR**:

```rust
fn main() {
    match None {
        None => {
            foo(
                "foo",
                "bar",
            );
        }
        Some(${1:_}) => ${2:todo!()},$0
    }
}
```
…iant-to-interner

Use FileId::MAX for id assertion in PathInterner::intern
chenyukang and others added 17 commits October 25, 2025 09:14
…anic

Use tracing error when received compiler message for unknown package
Example
---
```rust
fn f() {
    if $0foo.bar() {}
}
```

**Before this PR**

"let" not in completion list

**After this PR**

```rust
fn f() {
    if let $1 = $0foo.bar() {}
}
```
…to-guarded

Fix untyped syntax tree ans casts for convert_to_guarded_return
Fix not complete `let` before expr in condition
…else

Fix let-expr in lhs for convert_to_guarded_return
…hand

Fix shorthand field pat for destructure_tuple_binding
Fix extract multiple item in impl for extract_module
Example
---
```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && x.is_som$0e() {}
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    let x = Some(1);
    let cond = true;
    if cond && let Some(${0:x1}) = x {}
}
```
…method-with-if-let

Fix not applicable on let-chain for replace_is_method_with_if_let_method
Add regression tests for some fixed `A-ty` issues
@rustbot
Copy link
Collaborator

rustbot commented Oct 27, 2025

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Oct 27, 2025
@lnicola
Copy link
Member Author

lnicola commented Oct 27, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Oct 27, 2025

📌 Commit f7c1ad6 has been approved by lnicola

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2025
@bors
Copy link
Collaborator

bors commented Oct 27, 2025

⌛ Testing commit f7c1ad6 with merge 34a8c73...

@bors
Copy link
Collaborator

bors commented Oct 27, 2025

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 34a8c73 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 27, 2025
@bors bors merged commit 34a8c73 into rust-lang:master Oct 27, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Oct 27, 2025
@github-actions
Copy link
Contributor

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 23fced0 (parent) -> 34a8c73 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 34a8c7368c84fc699fc83a8851a02f93fd655931 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-1: 1931.4s -> 1402.0s (-27.4%)
  2. aarch64-msvc-2: 6228.7s -> 5187.2s (-16.7%)
  3. armhf-gnu: 5702.6s -> 4900.4s (-14.1%)
  4. dist-aarch64-apple: 6813.6s -> 7683.2s (12.8%)
  5. x86_64-gnu-tools: 3772.8s -> 3330.6s (-11.7%)
  6. i686-gnu-2: 6335.6s -> 5594.6s (-11.7%)
  7. x86_64-gnu-gcc: 3454.3s -> 3053.5s (-11.6%)
  8. i686-gnu-1: 8248.5s -> 7316.0s (-11.3%)
  9. dist-apple-various: 3608.6s -> 4016.2s (11.3%)
  10. x86_64-gnu-llvm-20-1: 3640.2s -> 3258.3s (-10.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.