-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[derive] Support deriving on unsized types
In order to test this support, add a new `Unsized` type in zerocopy's `test` module. Use this to test the derive and also to test `AsBytes`'s methods in `test_as_bytes_methods`. These tests supersede the previous unsized tests, which used slices, and have been removed. While we're here, expand `test_as_bytes_methods` to test the `write_to`, `write_to_prefix`, and `write_to_suffix` methods, which were not previously tested. Also in order to test this support, implement zerocopy traits for `PhantomData` and `ManuallyDrop` for unsized types. While we're here, add a new `test_impls` test to ensure that all expected zerocopy trait impls are emitted.
- Loading branch information
Showing
16 changed files
with
455 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.