-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 new lint: used_underscore_items
#13294
Add new lint: used_underscore_items
#13294
Conversation
3993dbd
to
b615c82
Compare
FWIW, pretty much almost all of the x86 platform intrinsics are prefixed with an underscore: https://doc.rust-lang.org/stable/core/arch/x86_64/index.html Seems unfortunate if we start linting on any use of them... 🤔 |
I think a good balance here would be to check only the use of intra-crate items (that is items from the current crate), as the user cannot control how others name their items. |
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'm not sure why we compare names instead of crate indices. Otherwise this looks good.
4a2b0a5
to
66d02e8
Compare
66d02e8
to
d40e04a
Compare
Thank you! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Closes #13260
changelog: new [
used_underscore_items
] lint against using items with a single leading underscore