Skip to content
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

Type mismatch with tuple keys in DefaultHashMap #12488

Closed
danielhuang opened this issue Jun 8, 2022 · 3 comments
Closed

Type mismatch with tuple keys in DefaultHashMap #12488

danielhuang opened this issue Jun 8, 2022 · 3 comments
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@danielhuang
Copy link

rust-analyzer version: rust-analyzer version: 9490120 2022-05-01 dev

rustc version: rustc 1.60.0 (7737e0b5c 2022-04-04)

relevant settings:

"rust-analyzer.diagnostics.experimental.enable": true,

Given the following code:

defaultmap = "0.5.0"
use defaultmap::DefaultHashMap;

fn main() {
    let mut map = DefaultHashMap::new(0);
    map[(0, 0)] = 1;
}

rust-analyzer reports an error:
image

@flodiebold flodiebold added A-ty type system / type inference / traits / method resolution C-bug Category: bug labels Jun 8, 2022
@danielhuang
Copy link
Author

May be related to #12675

@flodiebold
Copy link
Member

Yeah, this is probably the same problem.

@flodiebold flodiebold changed the title Type mismatch Type mismatch with tuple keys in DefaultHashMap Jul 6, 2022
@danielhuang
Copy link
Author

Fixed along with #12675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants