-
Notifications
You must be signed in to change notification settings - Fork 90
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
Improve IntoBytes derive error message #1713
Conversation
e38839b
to
b42cfb6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1713 +/- ##
=======================================
Coverage 88.79% 88.79%
=======================================
Files 16 16
Lines 5843 5846 +3
=======================================
+ Hits 5188 5191 +3
Misses 655 655 ☔ View full report in Codecov by Sentry. |
#[inline(always)] | ||
#[must_use] | ||
#[allow(clippy::needless_maybe_sized)] | ||
pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize { |
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.
This is such a cursed bound.
--> tests/ui-nightly/struct.rs:129:8 | ||
| | ||
129 | b: [u8], | ||
| ^^^^ `IntoBytes` needs all field types to be `Sized` in order to determine whether there is inter-field padding |
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.
NICE!
Closes #1708