-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor some of dereference.rs
to util functions
#11166
Conversation
r? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
r? @Centri3 |
Failed to set assignee to
|
Callee, | ||
/// Access of a field. | ||
FieldAccess(Ident), | ||
} |
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.
} | |
} | |
Deref, | ||
Reborrow, | ||
None, | ||
} |
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.
} | |
} | |
Is juxtaposing the the type and its impl intentional?
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.
blank_lines_lower_bound
(rustfmt) is definitely relevant here. Is it worth the conflicts though? 👀
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.
Formatting the type and it's impl without a blank line in between is used in other parts of clippy. It's not a consistent thing though.
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.
Are the multiple impls similarly intentional?
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.
That part isn't.
Can I ask how/where you see the extracted code being applied? (Just curious.) |
As a short list of recentish things:
|
132c828
to
c6cfc2c
Compare
Thanks! |
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 looks fine, thanks! Just two typos
Extract getting an expression's use context and the context's defined type as util functions.
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
I've seen a few lints that need to be able to tell if changing the type of an expression would be a vaild suggestion. This extracts part of how that's done from
explicit_auto_deref
.changelog: None