Skip to content

transmute has two restrictions I'm not sure you have added here: #1195

@philberty

Description

@philberty

transmute has two restrictions I'm not sure you have added here:

  1. Input and output size must be identical.
  2. Input and output size must be statically known before monomorphization so eg transmute::<T, U> is not allowed, but eg transmute::<PhantomData<T>, PhantomData<U>> is allowed. Note that types like [T; 0] are not considered to be of a fixed size for the purpose of this check.

Originally posted by @bjorn3 in #1194 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions