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

Allow unused type in no_type_leakage test #145

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

sunsided
Copy link
Contributor

A contender for the world's smallest PR.

Right now, the code builds with a warning (for me):

warning: field `0` is never read
  --> tests/no_type_leakage.rs:15:16
   |
15 | pub struct Bar(Foo);
   |            --- ^^^
   |            |
   |            field in this struct
   |
   = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
   |
15 | pub struct Bar(());
   |             

This PR makes the type

#[allow(unused)]
pub struct Bar(Foo);

To suppress that warning.

Signed-off-by: Markus Mayer <widemeadows@gmail.com>
@idanarye idanarye merged commit b367f33 into idanarye:master Jun 15, 2024
9 checks passed
@idanarye
Copy link
Owner

Thanks!

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.

2 participants