Skip to content

The mismatched-arg-count is giving wrong error indicators #12254

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
arthurguedes375 opened this issue May 14, 2022 · 2 comments
Closed

The mismatched-arg-count is giving wrong error indicators #12254

arthurguedes375 opened this issue May 14, 2022 · 2 comments

Comments

@arthurguedes375
Copy link

When using the nalgebra::DMatrix::from_vec(2, 2, vec![1.0, 1.0, 1.0, 1.0]) it indicates the following error:

expected 1 argument, found 3 rust-analyzer([mismatched-arg-count](https://rust-analyzer.github.io/manual.html#mismatched-arg-count))

But when i run the code using cargo run it runs perfectly well, ive tried to delete the target folder, etc... but nothing seems to work

@arthurguedes375 arthurguedes375 changed the title The mismatched-arg-count is not working The mismatched-arg-count is giving wrong error indicators May 14, 2022
@arthurguedes375
Copy link
Author

arthurguedes375 commented May 14, 2022

I think i know why it's not working. When i type DMatrix::from_vec and i press ctrl+space it shows me a lot of alternatives, even tho it is going to call only one of them, some of them have the right intellisense but some of them not,
image

In the image im selecting the alternative that has the right function signature, but the first alternative has the wrong signature, therefore making the whole file receive a red flag for the "mismatched-arg-count error"

@flodiebold
Copy link
Member

Duplicate of #5441.

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