-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix missing_inline_in_public_items fail to fulfill expect in --test build
#15320
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
base: master
Are you sure you want to change the base?
Conversation
c1a51b3 to
e528256
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does mean that something like #[expect(clippy::missing_inline_in_public_items)] fn private_function() {} passes the expectation with --test even though the lint would never emit a warning there, but I'm not really sure how we could avoid that so this seems fine
|
This looks like a symptom rather than the root of the issue, that the following is a false negative when ran with #![warn(clippy::missing_inline_in_public_items)]
pub fn foo() -> u32 {
0
}It should still lint |
|
Hmm.. Im confused. What is the expected behavior in |
|
I doubt if it is possible to know the original crate type in |
|
r? clippy |
Yeah I think that might well be the case Something we could do is remove the |
|
Updated. Check for executables are now removed |
|
Lintcheck changes for 33a5d5e
This comment will be updated if you push new changes |
|
r? clippy |
|
r? clippy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll think about this more tomorrow. One concern for now
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I think I'm +1 on linting in binary crates. It makes sense to me to still lint as maybe they'd extract it into a library crate in the future. The only file this doesn't make sense in is
Just to confirm, is this no longer an issue with the new implementation? Is this just something that happens with some lints? |
|
Yes, this is no longer a issue. A private function with such expect will also fail when its in |
Closes #13394
changelog: [
missing_inline_in_public_items] fix failure to fulfillexpectin--testbuild