Skip to content

transmute_mut! documents looser requirements than what is implemented #1046

Closed
@kupiakos

Description

@kupiakos

transmute_mut! documents the requirements that:

  • T: Sized + IntoBytes
  • U: Sized + FromBytes
  • align_of::<T>() >= align_of::<U>()

However, this is less strict that what is actually required:

  • T: FromBytes + IntoBytes + NoCell
  • U: FromBytes + IntoBytes + NoCell
  • size_of::<T>() == size_of::<U>()
  • align_of::<T>() >= align_of::<U>()

The size and NoCell requirements are also similarly missing from transmute_ref!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions