Skip to content

In layout::CastFrom, support ZST DSTs #2954

@joshlf

Description

@joshlf

We should be able to treat ZST DSTs as "sized-ish" for the purposes of equivalence. In particular:

  • ZST DST -> Sized is fine if the source type's "effective size" is equal to the destination type's size
  • Sized -> ZST DST is fine if the source type's size is equal to the destination type's "effective size"
  • ZST DST -> Unsized is equivalent to Sized -> Unsized
  • Unsized -> ZST DST is still banned

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