Skip to content
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

Merged
merged 1 commit into from
May 21, 2024

Conversation

daniel-levin
Copy link
Contributor

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 in zerocopy-derive/src/lib.rs, then this test will fail.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.71%. Comparing base (7b77668) to head (5c31d15).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jswrenn jswrenn left a 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.

Copy link
Collaborator

@jswrenn jswrenn left a 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!

@daniel-levin
Copy link
Contributor Author

daniel-levin commented May 21, 2024

I needed to update the line numbers in the trybuild test because the licence header changed them. I squashed the modifications and force pushed.

@jswrenn jswrenn enabled auto-merge May 21, 2024 13:38
@jswrenn jswrenn added this pull request to the merge queue May 21, 2024
Merged via the queue into google:main with commit 4ae2dde May 21, 2024
56 checks passed
joshlf added a commit that referenced this pull request May 21, 2024
Follows up on #1332
Makes progress on #553
github-merge-queue bot pushed a commit that referenced this pull request May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants