Skip to content

Type mismatch with tuple keys in DefaultHashMap #12488

Closed
@danielhuang

Description

@danielhuang

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

Activity

added
A-tytype system / type inference / traits / method resolution
C-bugCategory: bug
on Jun 8, 2022
danielhuang

danielhuang commented on Jul 1, 2022

@danielhuang
Author

May be related to #12675

flodiebold

flodiebold commented on Jul 3, 2022

@flodiebold
Member

Yeah, this is probably the same problem.

changed the title [-]Type mismatch[/-] [+]Type mismatch with tuple keys in DefaultHashMap[/+] on Jul 6, 2022
danielhuang

danielhuang commented on Jul 17, 2022

@danielhuang
Author

Fixed along with #12675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tytype system / type inference / traits / method resolutionC-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @flodiebold@danielhuang

        Issue actions

          Type mismatch with tuple keys in DefaultHashMap · Issue #12488 · rust-lang/rust-analyzer