Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Dec 15, 2025

Subtree update of rust-analyzer to rust-lang/rust-analyzer@3d78b3f.

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

r? @ghost

A4-Tacks and others added 30 commits September 27, 2025 11:48
Fixes:
- loses label for `convert_while_to_loop` and `convert_for_to_while_let`
- loses attributes for `convert_while_to_loop` and `convert_for_to_while_let`
- bad indent for `convert_while_to_loop`

Examples
---
```rust
fn main() {
    #[allow(unused)]
    #[deny(unsafe_code)]
    'a: while$0 let Some(x) = cond {
        foo();
        break 'a;
    }
}
```

**Before this PR**:

```rust
fn main() {
    loop {
        if let Some(x) = cond {
            foo();
            break 'a;
        } else {
            break;
        }
    }
}
```

**After this PR**:

```rust
fn main() {
    #[allow(unused)]
    #[deny(unsafe_code)]
    'a: loop {
        if let Some(x) = cond {
            foo();
            break 'a;
        } else {
            break;
        }
    }
}
```

---

```rust
fn main() {
    let mut x = vec![1, 2, 3];
    #[allow(unused)]
    #[deny(unsafe_code)]
    'a: for $0v in x {
        v *= 2;
        break 'a;
    };
}
```

**Before this PR**:

```rust
fn main() {
    let mut x = vec![1, 2, 3];
    let mut tmp = x.into_iter();
    while let Some(v) = tmp.next() {
        v *= 2;
        break 'a;
    };
}
```

**After this PR**:

```rust
fn main() {
    let mut x = vec![1, 2, 3];
    let mut tmp = x.into_iter();
    #[allow(unused)]
    #[deny(unsafe_code)]
    'a: while let Some(v) = tmp.next() {
        v *= 2;
        break 'a;
    };
}
```
- Add `make::untyped_param`
- Add some basic make tests

Example
---
```rust
make::unnamed_param(make::ty("Vec<T>")),

```

**Before this PR**

```text
PARAM@0..4
  IDENT_PAT@0..4
    NAME@0..4
      IDENT@0..4 "Vec"
```

**After this PR**

```text
PARAM@0..6
  PATH_TYPE@0..6
    PATH@0..6
      PATH_SEGMENT@0..6
        NAME_REF@0..3
          IDENT@0..3 "Vec"
        GENERIC_ARG_LIST@3..6
          L_ANGLE@3..4 "<"
          TYPE_ARG@4..5
            PATH_TYPE@4..5
              PATH@4..5
                PATH_SEGMENT@4..5
                  NAME_REF@4..5
                    IDENT@4..5 "T"
          R_ANGLE@5..6 ">"
```

---

Assist: `Generate a type alias for function with unnamed params`

```rust
fn foo$0(x: Vec<i32>) {}
```

**Before this PR**

```rust
type FooFn = fn(Vec);

fn foo(x: Vec<i32>) {}
```

**After this PR**

```rust
type FooFn = fn(Vec<i32>);

fn foo(x: Vec<i32>) {}
```
Example
---
```rust
mod indent {
    #[test$0]
    fn test() {}
}
```

**Before this PR**

```rust
mod indent {
    #[test]
#[ignore]
    fn test() {}
}
```
And re-enable
```rust
mod indent {
    #[test]
fn test() {}
}
```

**After this PR**

```rust
mod indent {
    #[test]
    #[ignore]
    fn test() {}
}
```
Operators were explicitly filtered out, both when filtering tokens to
search definitions for and when searching for actual definitions.
Bumps  and [jws](https://github.com/brianloveswords/node-jws). These dependencies needed to be updated together.

Updates `jws` from 3.2.2 to 3.2.3
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v3.2.2...v3.2.3)

Updates `jws` from 4.0.0 to 4.0.1
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](auth0/node-jws@v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
- dependency-name: jws
  dependency-version: 4.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Example
---
```rust
fn main() {
    let foobar = 1;
    format_args!("{{{f$0");
}
```

**Before this PR**

No complete

**After this PR**

```rust
fn main() {
    let foobar = 1;
    format_args!("{{{foobar");
}
```
---
```rust
fn main() {
    let foo_bar = 1;
    format_args!("{foo_$0}");
}
```

**Before this PR**

No complete

**After this PR**

```rust
fn main() {
    let foo_bar = 1;
    format_args!("{foo_bar}");
}
```
Example
---
```rust
//- /main.rs
mod foo;

fn main() {
    foo::Foo::Variant { bar: 3, $0baz: false};
}
//- /foo.rs
pub enum Foo {
    Variant {
        bar: i32
    }
}
```

**Before this PR**

```rust
pub enum Foo {
    Variant {
        bar: i32,
        pub(crate) baz: bool
    }
}
```

**After this PR**

```rust
pub enum Foo {
    Variant {
        bar: i32,
        baz: bool
    }
}
```
…delegate_trait

internal: migrate `generate_delegate_trait` to SyntaxEditor api
…ter_for_each_to_for

internal: migrate `convert_iter_for_each_to_for` to SyntaxEditor api
Fix pub in enum variant field for no_such_field
…yarn/editors/code/multi-d0f6e8601e

Bump jws in /editors/code
internal: Do not create stale expressions in body lowering
Remove `[no-mentions]` handler in our triagebot config
…ait-generic-args

fix: fixed Impl display to show trait generic args
…-fmt-str

Fix not complete `format!("{{{$0")` and underscore
Fix make::unnamed_param result a untyped_param
…aram-env-panic

fix: resolve const generic param-env panic in type projection
ChayimFriedman2 and others added 15 commits December 13, 2025 20:12
To prevent it from clashing with other names.
internal: Use a generated name in old format_args lowering, instead of `args`
Example
---
```rust
fn foo() {
    let _ = |$0x| 2;
}
```

**Before this PR**

```rust
fn foo() {
    let _ = x;
    let _ = |x| 2;
}
```

**After this PR**

Assist not applicable
Reverse the order of returned lint attributes for a `SyntaxNode` to
match rustc's behavior.

When multiple lint attributes are present, rustc overrides earlier ones
with the last defined attribute. The previous iteration order was
incorrect, causing earlier attributes to override the later ones.
fix(lsp): handle dynamic registration for didSave
minor: Emit `WorkspaceDiagnosticRefresh` when flycheck finished
…icable-on-closure

Fix bind_unused_param applicable on closure
internal: Give `FileSymbol` it's `'db` lifetime
fix: respect rustc's lint attribute application order
This updates the rust-version file to 0208ee0.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 0208ee0
Filtered ref: 69b2702db74151cd410a028fb347c6e4e3f779dc
Upstream diff: rust-lang/rust@dfe1b8c...0208ee0

This merge was created using https://github.com/rust-lang/josh-sync.
@rustbot
Copy link
Collaborator

rustbot commented Dec 15, 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 Dec 15, 2025
@lnicola
Copy link
Member Author

lnicola commented Dec 15, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Dec 15, 2025

📌 Commit 4e8f58c 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 Dec 15, 2025
@bors
Copy link
Collaborator

bors commented Dec 15, 2025

⌛ Testing commit 4e8f58c with merge 0160933...

@bors
Copy link
Collaborator

bors commented Dec 15, 2025

☀️ Test successful - checks-actions
Approved by: lnicola
Pushing 0160933 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 15, 2025
@bors bors merged commit 0160933 into rust-lang:main Dec 15, 2025
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 15, 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 ee44706 (parent) -> 0160933 (this PR)

Test differences

Show 48 test diffs

Stage 0

  • ast::make::tests::test_unnamed_param: [missing] -> pass (J0)
  • ast::make::tests::test_untyped_param: [missing] -> pass (J0)
  • cli::scip::test::operator_overload: [missing] -> pass (J0)
  • completions::format_string::tests::completes_unescaped_after_escaped: [missing] -> pass (J0)
  • completions::format_string::tests::no_completion_after_escaped: [missing] -> pass (J0)
  • expr_store::tests::body::desugar_builtin_format_args_before_1_93_0: [missing] -> pass (J0)
  • expr_store::tests::signatures::regression_21138: [missing] -> pass (J0)
  • handlers::bind_unused_param::tests::not_applicable_closure: [missing] -> pass (J0)
  • handlers::convert_for_to_while_let::tests::each_to_for_with_attributes: [missing] -> pass (J0)
  • handlers::convert_for_to_while_let::tests::each_to_for_with_label: [missing] -> pass (J0)
  • handlers::convert_while_to_loop::tests::convert_with_attributes: [missing] -> pass (J0)
  • handlers::convert_while_to_loop::tests::convert_with_label: [missing] -> pass (J0)
  • handlers::convert_while_to_loop::tests::indentation: [missing] -> pass (J0)
  • handlers::generate_fn_type_alias::tests::generate_fn_alias_named_complex_types: [missing] -> pass (J0)
  • handlers::generate_fn_type_alias::tests::generate_fn_alias_unnamed_complex_types: [missing] -> pass (J0)
  • handlers::no_such_field::tests::test_add_enum_variant_field_in_other_file_from_usage: [missing] -> pass (J0)
  • handlers::replace_method_eager_lazy::tests::replace_and_then_with_and_used_param: [missing] -> pass (J0)
  • handlers::replace_method_eager_lazy::tests::replace_then_with_then_some_needs_parens: [missing] -> pass (J0)
  • handlers::unused_variables::tests::apply_last_lint_attribute_when_multiple_are_present: [missing] -> pass (J0)
  • handlers::unused_variables::tests::prefer_closest_ancestor_lint_attribute: [missing] -> pass (J0)
  • hover::tests::hover_trait_impl_shows_generic_args: [missing] -> pass (J0)
  • mir::lower::tests::regression_21173_const_generic_impl_with_assoc_type: [missing] -> pass (J0)
  • tests::traits::default_assoc_types: [missing] -> pass (J0)

Stage 1

  • ast::make::tests::test_unnamed_param: [missing] -> pass (J1)
  • ast::make::tests::test_untyped_param: [missing] -> pass (J1)
  • cli::scip::test::operator_overload: [missing] -> pass (J1)
  • completions::format_string::tests::completes_unescaped_after_escaped: [missing] -> pass (J1)
  • completions::format_string::tests::no_completion_after_escaped: [missing] -> pass (J1)
  • expr_store::tests::body::desugar_builtin_format_args_before_1_93_0: [missing] -> pass (J1)
  • expr_store::tests::signatures::regression_21138: [missing] -> pass (J1)
  • handlers::bind_unused_param::tests::not_applicable_closure: [missing] -> pass (J1)
  • handlers::convert_for_to_while_let::tests::each_to_for_with_attributes: [missing] -> pass (J1)
  • handlers::convert_for_to_while_let::tests::each_to_for_with_label: [missing] -> pass (J1)
  • handlers::convert_while_to_loop::tests::convert_with_attributes: [missing] -> pass (J1)
  • handlers::convert_while_to_loop::tests::convert_with_label: [missing] -> pass (J1)
  • handlers::convert_while_to_loop::tests::indentation: [missing] -> pass (J1)
  • handlers::generate_fn_type_alias::tests::generate_fn_alias_named_complex_types: [missing] -> pass (J1)
  • handlers::generate_fn_type_alias::tests::generate_fn_alias_unnamed_complex_types: [missing] -> pass (J1)
  • handlers::no_such_field::tests::test_add_enum_variant_field_in_other_file_from_usage: [missing] -> pass (J1)
  • handlers::replace_method_eager_lazy::tests::replace_and_then_with_and_used_param: [missing] -> pass (J1)
  • handlers::replace_method_eager_lazy::tests::replace_then_with_then_some_needs_parens: [missing] -> pass (J1)
  • handlers::unused_variables::tests::apply_last_lint_attribute_when_multiple_are_present: [missing] -> pass (J1)
  • handlers::unused_variables::tests::prefer_closest_ancestor_lint_attribute: [missing] -> pass (J1)
  • hover::tests::hover_trait_impl_shows_generic_args: [missing] -> pass (J1)
  • mir::lower::tests::regression_21173_const_generic_impl_with_assoc_type: [missing] -> pass (J1)
  • tests::traits::default_assoc_types: [missing] -> pass (J1)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 0160933b1dd9547d46542b0ceedda00c37890c6d --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: 2057.8s -> 1674.5s (-18.6%)
  2. x86_64-gnu-miri: 5534.6s -> 4646.3s (-16.1%)
  3. x86_64-gnu-gcc: 3601.7s -> 3041.2s (-15.6%)
  4. x86_64-gnu-llvm-20: 2776.9s -> 2369.7s (-14.7%)
  5. x86_64-gnu-llvm-21-2: 6016.6s -> 5188.5s (-13.8%)
  6. aarch64-msvc-1: 7618.6s -> 6577.6s (-13.7%)
  7. i686-gnu-2: 6010.0s -> 5204.3s (-13.4%)
  8. aarch64-gnu-debug: 4631.8s -> 4018.9s (-13.2%)
  9. test-various: 7635.3s -> 6702.7s (-12.2%)
  10. dist-aarch64-apple: 6903.4s -> 7738.2s (+12.1%)
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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0160933): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -6.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.1% [-6.1%, -6.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -6.1% [-6.1%, -6.1%] 1

Cycles

Results (secondary -3.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 478.788s -> 480.115s (0.28%)
Artifact size: 390.22 MiB -> 390.24 MiB (0.01%)

@lnicola lnicola deleted the sync-from-ra branch December 15, 2025 20:29
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.