Skip to content

Support deriving AsBytes on generic repr(packed) structs #127

@joshlf

Description

@joshlf

We support deriving AsBytes on generic repr(transparent) structs because we don't need to explicitly check for padding, and so we don't need to emit code that's incompatible with generic type arguments. We ought to be able to use the same approach to support generic repr(packed) structs as well.

EDIT: Looks like we do support them, but there are no tests for that support, and our error messages imply that we don't support them. We should clean that up.

cc @djkoloski

Metadata

Metadata

Assignees

Labels

blocking-next-releaseThis issue should be resolved before we release on crates.io

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions