-
Notifications
You must be signed in to change notification settings - Fork 137
[derive] Test exact output of derives #1664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1664 +/- ##
=======================================
Coverage 88.01% 88.01%
=======================================
Files 16 16
Lines 5805 5805
=======================================
Hits 5109 5109
Misses 696 696 ☔ View full report in Codecov by Sentry. |
| // validities of its fields, so this is a sound implementation of | ||
| // `is_bit_valid`. | ||
| fn is_bit_valid<A: ::zerocopy::pointer::invariant::Aliasing + ::zerocopy::pointer::invariant::AtLeast<::zerocopy::pointer::invariant::Shared>>( | ||
| fn is_bit_valid<A: ::zerocopy::pointer::invariant::Aliasing + ::zerocopy::pointer::invariant::AtLeast<::zerocopy::pointer::invariant::Shared> >( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>> is the right-shift token while > > is two separate tokens. This matters because these tests care about the exact sequence of tokens.
| fn test_known_layout() { | ||
| test_derive! { | ||
| KnownLayout { | ||
| struct Foo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's exercise a bit more of the derive:
| struct Foo; | |
| struct UnitLike<const N: usize> | |
| where | |
| for<'a> Foo<N>: Sized; |
Makes progress on #367, #1634