forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Enable various new clippy lints #1025
Open
tgross35
wants to merge
7
commits into
Rust-for-Linux:rust-next
Choose a base branch
from
tgross35:clippy-enable-lints
base: rust-next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3754849
rust: move 'rust_common_flags' to a separate configuration file
tgross35 82157b8
rust: clippy: enable lints from 'pedantic' that have no errors
tgross35 bbc6d1c
rust: clippy: enable 'undocumented_unsafe_blocks' lint
tgross35 8f4700d
rust: clippy: enable three trivial lints with corrections
tgross35 a764f0a
rust: clippy: enable two pointer-related lints
tgross35 2118d15
rust: clippy: enable lints related to improving style
tgross35 b2d5dbc
rust: clippy: enable 'items_after_statements' and 'redundant_closure_…
tgross35 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hmm.. I don't think this is an improve,
&self
is of type&&UniqueArc<T>
, it's not very straight-forwards why does the compiler coerce it to a&T
. We could do the same as std:But honestly, I don't think it's better.. could you explain what problem the old code has?
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.
There is no particular problem other than keeping consistency, this comes from the
explicit_deref_methods
lint. I suspect that this is whystd
does what it does (I neglected to check what they do before applying this).I am indifferent about this lint and agree that there are many times where it makes more sense to be explicit, so I don't mind dropping it. However, even unrelated to the lint, maybe it would be good to match what
std
does, just to avoid any possible confusion when syncingstd
->kernel