Skip to content

Confused function aliases #12218

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
harisraharjo opened this issue May 12, 2022 · 3 comments
Closed

Confused function aliases #12218

harisraharjo opened this issue May 12, 2022 · 3 comments

Comments

@harisraharjo
Copy link

So I'm trying to create a dynamic matrix with nalgebra like let dm3 = DMatrix::from_fn(3, 3, |r, c| if r == c { 1.0 } else { 0.0 }). This code is a copy from this official file.

Current Behaviour

Rust-analyzer is giving me this error eventhough the cargo check command says it works just fine

Expected Behaviour

Rust-analyzer should be able to know different types of function aliases and not show error

rust-analyzer version: 5d5bbec 2022-05-09 stable
rustc version: 1.60.0 (7737e0b5c 2022-04-04)
relevant settings: vscode { Check On Save: Command = clippy }

@harisraharjo harisraharjo changed the title Confused function Confused function aliases May 12, 2022
@lnicola
Copy link
Member

lnicola commented May 12, 2022

Probably a dupe of #544.

@lnicola lnicola closed this as completed May 12, 2022
@flodiebold
Copy link
Member

#5441, that is ;)

@harisraharjo
Copy link
Author

Just to add information:
rust-analyzer can detect it perfectly if it's inside a trait. E.g as default implementation

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

3 participants