Clippy clean but rust-analyzer error

Hi! I have a new VS Code installation with rust-analyzer [1] installed, although this happens with the release version as well. I have a minimal program:

use autograd::ndarray::{s, array};

fn main() {
    let a = array![[1., 2.], [3., 4.]];
    println!("{:?}", a.slice(s![0, ..]));

... that has no problems reported by cargo clippy [2], but rust-analyzer says, "expected 3 arguments, found 2 [Ln 5, Col 5]". I saw similar looking bugs in github, but some are closed. I think this is a new bug.

I'm planning to create a new bug report, but anyone recognizing this, please let me know.

  1. rust-analyzer version: 0.4.1182-standalone (ca8093e28 2022-08-25)
  2. rustc 1.63.0 (4b91a6ea7 2022-08-08)

This is a known bug in rust-analyzer. It doesn't have very good support for const generics as used by ndarray.

Hi, thanks. Do you know of any workarounds? To learn more, I can search for "const generic" in github issues, but if you know of any references I should check or follow, please let me know.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.