-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
rust-analyzer subtree update
#152388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer subtree update
#152388
Conversation
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
}
```
fix: Fix more glob issues
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.
Since we can't read the real file size.
Implement the new homogeneous & heterogeneous try blocks
…date minor: Remove unnecessary `unsafe(non_update_types)`
feat: fallback let postfix completions in condition
Support else-branch for move_guard
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.
Have a separate query for it.
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-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-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
|
⌛ Testing commit 5ad44f2 with merge ed6f659... Workflow: https://github.com/rust-lang/rust/actions/runs/21834791093 |
`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-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
|
❗ 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 yield |
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152399. |
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-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
|
@bors yield |
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`)
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152399. |
1 similar comment
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152399. |
|
⌛ Testing commit 5ad44f2 with merge 40d6140... Workflow: https://github.com/rust-lang/rust/actions/runs/21837278149 |
`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
|
@bors yield |
|
Auto build cancelled. Cancelled workflows: The next pull request likely to be tested is #152388. |
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`)
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
Subtree update of
rust-analyzerto rust-lang/rust-analyzer@c75729d.Created using https://github.com/rust-lang/josh-sync.
r? @ghost