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

Ignore clippy lint in generated code #331

Merged
merged 2 commits into from Apr 5, 2023
Merged

Conversation

Jake-Shadle
Copy link
Contributor

@Jake-Shadle Jake-Shadle commented Apr 3, 2023

If a project enables clippy::indexing_slicing the code generated by the macro will emit the warning, which for many projects will also fail CI.

@Jake-Shadle
Copy link
Contributor Author

Also adds the lifetime specifier for several Formatter<'_>.

Copy link
Member

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jake-Shadle 👍

We should probably add Clippy to our own CI too to make sure we catch these things rather than end-users having to.

@KodrAus KodrAus merged commit db4ce36 into bitflags:main Apr 5, 2023
15 checks passed
@Jake-Shadle
Copy link
Contributor Author

It's a good thing to have for sure! Though I think you could still run into trouble with lints that are accept by default like this particular case, in addition to behavior changes (new lints/default changes/etc) between Rust stable versions.

@KodrAus KodrAus mentioned this pull request Apr 5, 2023
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.

None yet

2 participants