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

missing_inline_in_public_items warns about #[derive]-generated code #4861

Closed
jonas-schievink opened this issue Nov 28, 2019 · 1 comment · Fixed by #4870
Closed

missing_inline_in_public_items warns about #[derive]-generated code #4861

jonas-schievink opened this issue Nov 28, 2019 · 1 comment · Fixed by #4870
Labels
C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy

Comments

@jonas-schievink
Copy link
Contributor

Example:

#![warn(clippy::missing_inline_in_public_items)]

#[derive(Debug)]
pub struct S {}
warning: missing `#[inline]` for a method
 --> src/lib.rs:3:10
  |
3 | #[derive(Debug)]
  |          ^^^^^

I don't think Clippy should warn about this, since the user cannot control the code in question.

@llogiq llogiq added good-first-issue These issues are a good way to get started with Clippy C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels Nov 29, 2019
@llogiq
Copy link
Contributor

llogiq commented Nov 29, 2019

This lint just needs a macro check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants