Skip to content

Incorrect type hint with itertools izip macro with 3+ arguments #13526

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
pgimalac opened this issue Nov 1, 2022 · 1 comment
Closed

Incorrect type hint with itertools izip macro with 3+ arguments #13526

pgimalac opened this issue Nov 1, 2022 · 1 comment

Comments

@pgimalac
Copy link

pgimalac commented Nov 1, 2022

rust-analyzer version: 0.3.1266-standalone

rustc version: rustc 1.64.0 (a55dd71d5 2022-09-19)

Any use of itertools::izip! with 3 or more arguments displays incorrect type for 3rd (and more) element (eg. here it display i32 instead of &str). The incorrectly displayed type is the one of argument 2 (here i32).

Minimal example:

let _e = itertools::izip!(vec![0.1], vec![1], vec![""]).collect::<Vec<_>>();

image

I can still use the result of izip with the correct types and everything runs correctly so I guess the issue is on how rust-analyzer generates the types of macros and not on itertools / rustc 's side.

@lnicola
Copy link
Member

lnicola commented Nov 2, 2022

Duplicate of #11681.

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