Skip to content

How does TypeId work in the AM? #339

Open
@digama0

Description

@digama0

The interesting questions that TypeId presents are:

  • When are two types "definitely the same" for TypeId purposes? This should correspond roughly to equality of mangled type names, and involves erasure of lifetimes and some kind of valtree thing for constants.
  • How do we square this with the fact that TypeId is manifestly, observably finite? This is of course the underlying theoretical issue behind Collisions in type_id rust#10389 . I assume we want the spec to say that rustc is not conforming here, since otherwise proving the soundness of the type system goes out the window since it's demonstrably false, but we also don't want the spec to be literally unimplementable so we have to be careful.

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