Skip to content

wrong prompt in nalgebra library with rust analyzer #9006

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

Closed
topazus opened this issue May 26, 2021 · 1 comment
Closed

wrong prompt in nalgebra library with rust analyzer #9006

topazus opened this issue May 26, 2021 · 1 comment

Comments

@topazus
Copy link

topazus commented May 26, 2021

vscode version: 1.56.2, rust-analyzer: get it from vscode marketplace.

when I type the following code in vscode,

extern crate nalgebra as na;
use na::{Matrix3x4, Vector3};

fn main() {
    let v = Vector3::new(1, 2, 3);
    print!("{}", v);
    let m = Matrix3x4::new(11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34);
    print!("{}", m);
}

It gaves the following error prompt: expected 4 arguments, found 3. Here is the screenshot:

Screenshot from 2021-05-26 22-37-25

But I run code in a cargo package with cargo run, it works and get the correct answer.

$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `target/debug/matrices`

  ┌   ┐
  │ 1 │
  │ 2 │
  │ 3 │
  └   ┘


  ┌             ┐
  │ 11 12 13 14 │
  │ 21 22 23 24 │
  │ 31 32 33 34 │
  └             ┘
@lnicola
Copy link
Member

lnicola commented May 26, 2021

Duplicate of #8654.

@lnicola lnicola closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants