Skip to content

Commit

Permalink
Add MaybeUninit type
Browse files Browse the repository at this point in the history
The standard library's `MaybeUninit` type does not currently support
wrapping unsized types. This commit introduces a polyfill with the same
behavior as `MaybeUninit` which does support wrapping unsized types.

In this commit, the only supported types are sized types and slice
types. Later (as part of #29), we will add the ability to derive the
`AsMaybeUninit` trait, which will extend support to custom DSTs.

TODO: Figure out how to get rid of KnownLayout<MaybeUninit =
mem::MaybeUninit<T>> bounds.

Makes progress on #29
  • Loading branch information
joshlf committed Sep 6, 2023
1 parent 87c2b56 commit 557dac0
Show file tree
Hide file tree
Showing 2 changed files with 484 additions and 21 deletions.
Loading

0 comments on commit 557dac0

Please sign in to comment.