Skip to content

Recent change in core::any::TypeId breaks the type_id_hasher unittest #49

@hlopko

Description

@hlopko

Howdy,

The size of TypeId changed in rust-lang/rust@9e5573a, and the unittest type_id_hasher no longer builds:

cannot transmute between types of different sizes, or dependently-sized types
    |
638 |         assert_eq!(hasher.finish(), unsafe { core::mem::transmute::<TypeId, u64>(type_id) });
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: source type: `TypeId` (128 bits)
    = note: target type: `u64` (64 bits)

It seems to me that the commit doesn't affect the behavior of the anymap crate, it only affects the unittest. Could you please confirm that that is the case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions