-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add trybuild test to ensure deprecated types are derivable. #1332
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1332 +/- ##
=======================================
Coverage 87.71% 87.71%
=======================================
Files 15 15
Lines 5138 5138
=======================================
Hits 4507 4507
Misses 631 631 ☔ View full report in Codecov by Sentry. |
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.
Thank you for this! Just a minor nit.
zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.rs
Outdated
Show resolved
Hide resolved
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.
Thanks for the PR!
Co-authored-by: Jack Wrenn <[email protected]>
I needed to update the line numbers in the trybuild test because the licence header changed them. I squashed the modifications and force pushed. |
Addresses #553.
#553 talks about warnings, but trybuild tests operate on compile errors. I think this change still manages to meet the spirit of #553. The docstring at the top of
absence_of_deprecated_warning.rs
explains the test. In short, there is "only" one compile error in the test.If you comment out the
#[allow(deprecated)]
attribute inzerocopy-derive/src/lib.rs
, then this test will fail.