Skip to content

Conversation

@lnicola
Copy link
Member

@lnicola lnicola commented Feb 9, 2026

Subtree update of rust-analyzer to rust-lang/rust-analyzer@c75729d.

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

r? @ghost

A4-Tacks and others added 30 commits January 22, 2026 22:56
Example
---
```rust
fn main() {
    match 92 {
        x @ 0..30 $0if x % 3 == 0 => false,
        x @ 0..30 if x % 2 == 0 => true,
        _ => false
    }
}
```

**Before this PR**

```rust
fn main() {
    match 92 {
        x @ 0..30 => if x % 3 == 0 {
            false
        },
        x @ 0..30 if x % 2 == 0 => true,
        _ => false
    }
}
```

**After this PR**

```rust
fn main() {
    match 92 {
        x @ 0..30 => if x % 3 == 0 {
            false
        } else if x % 2 == 0 {
            true
        },
        _ => false
    }
}
```
Easy to input other patterns, or bind variable in let-chain

Example
---
```rust
fn main() {
    let bar = 2;
    if bar.$0
}
```

**Before this PR**

No complete 'let'

**After this PR**

```rust
fn main() {
    let bar = 2;
    if let $1 = bar
}
```
Remove outdated SyntaxErrorKind FIXME comment
And refactor the mechanism to be more maintainable.
CargoCheckMessage and CargoCheckParser were misleading, because they
could apply to any tool that emits diagnostics. For example, it may be
rustc directly rather than via cargo.

Clarify this in the names. This is most noticeable when working on
custom check commands in rust-project.json.
PR rust-lang#18043 changed flycheck to be scoped to the relevant package. This
broke projects using check commands that invoke rustc directly,
because diagnostic JSON from rustc doesn't contain the package ID.

This was visible in the rust-analyzer logs when RA_LOG is set to
`rust_analyzer::flycheck=trace`.

Before:

    2026-02-02T07:03:48.020184937-08:00 TRACE diagnostic received flycheck_id=0 mismatched types package_id=None scope=Workspace
    ...
    2026-02-02T07:03:55.082046488-08:00 TRACE clearing diagnostics flycheck_id=0 scope=Workspace

After:

    2026-02-02T07:14:32.760707785-08:00 TRACE diagnostic received flycheck_id=0 mismatched types package_id=None scope=Package { package: BuildInfo { label: "fbcode//rust_devx/rust-guess-deps:rust-guess-deps" }, workspace_deps: Some({}) }
    ...
    2026-02-02T07:14:48.355981415-08:00 TRACE clearing diagnostics flycheck_id=0 scope=Package { package: BuildInfo { label: "fbcode//rust_devx/rust-guess-deps:rust-guess-deps" }, workspace_deps: Some({}) }

Previously r-a assumed that a diagnostic without a package ID applied
to the whole workspace. We would insert the diagnostic at the
workspace level, but then only clear diagnostics for the package.

As a result, red squiggles would get 'stuck'. Users who had fixed
compilation issues would still see the old red squiggles until they
introduced a new compilation error.

Instead, always apply diagnostics to the current package if flycheck
is scoped to a package and the diagnostic doesn't specify a
package. This makes CargoCheckEvent(None) and CargoCheckEvent(Some(_))
more consistent, as they now both match on scope.
Implement the new homogeneous & heterogeneous try blocks
…date

minor: Remove unnecessary `unsafe(non_update_types)`
feat: fallback let postfix completions in condition
The usage of normal `display()` caused it to emit `{unknown}` which then failed to parse in `make::ty()`.

Really we should not use stringly-typed things here, but that's a change for another day.
Unfortunately it obscures bugs, but it's necessary because of malformed code.
Example
---
```rust
fn foo(cond: bool) {
    if cond.$0
}
```

**Before this PR**

```text
...
sn deref         *expr
sn ref           &expr
...
```

**After this PR**

```text
...
sn deref         *expr
sn not           !expr
sn ref           &expr
...
```
In rust-lang#20327 we started truncating custom check commands so they render
nicely in the IDE. This was then accidentally undone in
9c18569d0c87d7f643db50b4806b59642762f1c3, and ended up making the
command summary longer (it included full paths).

We ended up with a `Display` implementation and a `display_command`
function that both tried to solve the same problem. I've merged and
simplified the logic and added tests.
fix: Fix not complete `.not` in condition
@rust-bors rust-bors bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 9, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

⌛ Testing commit 5ad44f2 with merge ed6f659...

Workflow: https://github.com/rust-lang/rust/actions/runs/21834791093

rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
@matthiaskrgr
Copy link
Member

@bors retry #152399

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

❗ You can only retry pull requests that are approved and have a previously failed auto build.

Hint: There is currently a pending auto build on this PR. To cancel it, run @bors cancel.

@matthiaskrgr
Copy link
Member

@bors yield

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152399.

rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
Rollup of 12 pull requests

Successful merges:

 - #152388 (`rust-analyzer` subtree update)
 - #151613 (Align `ArrayWindows` trait impls with `Windows`)
 - #152134 (Set crt_static_allow_dylibs to true for Emscripten target)
 - #152166 (cleanup some more things in `proc_macro::bridge`)
 - #152236 (compiletest: `-Zunstable-options` for json targets)
 - #152287 (Fix an ICE in the vtable iteration for a trait reference in const eval when a supertrait not implemented)
 - #142957 (std: introduce path normalize methods at top of `std::path`)
 - #145504 (Add some conversion trait impls)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
 - #152315 (fix: rhs_span to rhs_span_new)
 - #152327 (Check stalled coroutine obligations eagerly)
 - #152377 (Rename the query system's `JobOwner` to `ActiveJobGuard`, and include `key_hash`)
rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

⌛ Testing commit 5ad44f2 with merge 2c472e2...

@JonathanBrouwer
Copy link
Contributor

@bors yield
Yielding to enclosing rollup

rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
Rollup of 12 pull requests

Successful merges:

 - #152388 (`rust-analyzer` subtree update)
 - #151613 (Align `ArrayWindows` trait impls with `Windows`)
 - #152134 (Set crt_static_allow_dylibs to true for Emscripten target)
 - #152166 (cleanup some more things in `proc_macro::bridge`)
 - #152236 (compiletest: `-Zunstable-options` for json targets)
 - #152287 (Fix an ICE in the vtable iteration for a trait reference in const eval when a supertrait not implemented)
 - #142957 (std: introduce path normalize methods at top of `std::path`)
 - #145504 (Add some conversion trait impls)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
 - #152315 (fix: rhs_span to rhs_span_new)
 - #152327 (Check stalled coroutine obligations eagerly)
 - #152377 (Rename the query system's `JobOwner` to `ActiveJobGuard`, and include `key_hash`)
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152399.

1 similar comment
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152399.

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

⌛ Testing commit 5ad44f2 with merge 40d6140...

Workflow: https://github.com/rust-lang/rust/actions/runs/21837278149

rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
@JonathanBrouwer
Copy link
Contributor

@bors yield
Yielding to enclosing rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

Auto build cancelled. Cancelled workflows:

The next pull request likely to be tested is #152388.

rust-bors bot pushed a commit that referenced this pull request Feb 9, 2026
Rollup of 12 pull requests

Successful merges:

 - #152388 (`rust-analyzer` subtree update)
 - #151613 (Align `ArrayWindows` trait impls with `Windows`)
 - #152134 (Set crt_static_allow_dylibs to true for Emscripten target)
 - #152166 (cleanup some more things in `proc_macro::bridge`)
 - #152236 (compiletest: `-Zunstable-options` for json targets)
 - #152287 (Fix an ICE in the vtable iteration for a trait reference in const eval when a supertrait not implemented)
 - #142957 (std: introduce path normalize methods at top of `std::path`)
 - #145504 (Add some conversion trait impls)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
 - #152315 (fix: rhs_span to rhs_span_new)
 - #152327 (Check stalled coroutine obligations eagerly)
 - #152377 (Rename the query system's `JobOwner` to `ActiveJobGuard`, and include `key_hash`)
@rust-bors rust-bors bot merged commit 903f9fc into rust-lang:main Feb 9, 2026
11 of 12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 9, 2026
rust-timer added a commit that referenced this pull request Feb 9, 2026
Rollup merge of #152388 - lnicola:sync-from-ra, r=lnicola

`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@c75729d.

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

r? @ghost
@lnicola lnicola deleted the sync-from-ra branch February 10, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.