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 #[allow(unreachable_code)] to generated impls for ! type #404

Merged
merged 9 commits into from
Aug 29, 2024

Conversation

tyranron
Copy link
Collaborator

@tyranron tyranron commented Aug 28, 2024

Resolves #400

Synopsis

For ! never type used in trait signatures, rustc emits unreachable_code warning ignoring the #[automatically_derived] attribute.

Solution

Add #[allow(unreachable_code)] to generated impls to suppress such warnings for ! and similar types.

Checklist

  • Documentation is updated (not required)
  • Tests are added/updated
  • CHANGELOG entry is added

@tyranron tyranron added this to the 1.0.1 milestone Aug 28, 2024
@tyranron tyranron self-assigned this Aug 28, 2024
@tyranron tyranron marked this pull request as ready for review August 28, 2024 14:36
@tyranron tyranron requested a review from JelteF August 28, 2024 14:36
@tyranron tyranron merged commit 06acaad into master Aug 29, 2024
17 checks passed
@tyranron tyranron deleted the 400-strip-unreachable-code-warnings branch August 29, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deriving Display on never gives a warning
2 participants