Skip to content

Consider confirming that the TypeIds used in a crate are unique #17179

Closed
@huonw

Description

@huonw

If two TypeIds of different types collide, we can get unsoundness, since Any relies on TypeId being unique for safe downcasts. We could have the compiler double check that any TypeIds it computes haven't occured before from another type.

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