Skip to content

libs: make TypeId opaque #18104

Closed
Closed
@aturon

Description

@aturon

Currently, std::intrinsics::TypeId exposes equality testing and hashing, and the Any trait allows you to get a TypeId for any 'static data. Previously, Any hid these capabilities through a private supertrait, but changed to privacy rules have made that impossible.

We should consider exposing equality and hashing on TypeId only through a private, internal trait used by Any. This should mitigate ABI stability hazards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions