Skip to content

Auto completion failed with nalgebra #21220

@Niwol

Description

@Niwol

rust-analyzer version: 0.3.2693 / 0.3.2702

rustc version: rustc 1.91.1 (ed61e7d7e 2025-11-07)

editor or extension: VSCode

relevant settings: None

repository link (if public, optional): -

code snippet to reproduce:

use nalgebra as na;

fn main() {
    let a = na::dvector![1.0, 2.0];
    // popup show here
    a.
}

I have a very specific error with the nalgebra crate which fails to autocomplete on nalgebra stucts. Whenever I try to access a method or member variable of a nalgebra struct I don't have any autocompletion anymore and a popup shows in VSCode with the message: "Request textDocument/completion failed. Source: rust-analyzer"
if I click on "Go to output":
[Error - 11:27:17 AM] Request textDocument/completion failed.
Message: request handler panicked: cannot find !BoundConst { var: 4 } in param-env: ParamEnv {
clauses: [
...

This error only appeared with nalgebra, other crates just work fine. I have entirely reinstalled Rust and VSCode but this didn't help. The only way to fix this error for me was to switch back the rust-analyzer extension in VSCode to 0.3.2683.
I hope this is enough information to reproduce the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions