Skip to content

rust-analyzer cries (sometimes) when it sees unclosed braces while typing #22175

@Lyude

Description

@Lyude

Since upgrading from rust-analyzer 1.90 to 1.94, trying to input an opening brace anywhere in rust source files appears to cause rust-analyzer to be upset and spit out this message:

(Update: it's not a regression. It's just completely broken on only this specific file apparently)

rust-analyzer: -32603: request handler panicked: should have `ExpressionStore::expr_only`

rust-analyzer version: rust-analyzer-1.94.1-1.fc43
editor or extension: neovim-0.11.6-1.fc43
rustc version: rustc 1.94.1 (e408947bf 2026-03-25) (Fedora 1.94.1-1.fc43)
repository link: https://gitlab.freedesktop.org/lyudess/linux/-/tree/rust-upstream/r-a-bug-20260428
code snippet to reproduce: just a brace :)

Reproducer instructions

  • Setup rust-analyzer with the linked kernel repository:

(to be clear, I committed the .config I'm using - so no need to run through kernel config stuff if you run everything below)

make rustavailable
make olddefconfig
make -j$(nproc) CLIPPY=1
make rust-analyzer
  • Open rust/kernel/drm/gem/shmem.rs
  • Try to input a opening brace anywhere in the file

Additional info

The 1.90 version of rust-analyzer definitely doesn't seem to have this issue yes it does

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions