-
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
explicit_auto_deref
changes
#9126
Conversation
r? @giraffate (rust-highfive has picked a reviewer for you, use r? to override) |
c9c24be
to
0ec49b6
Compare
explicit_auto_deref
changes
☔ The latest upstream changes (presumably #9134) made this pull request unmergeable. Please resolve the merge conflicts. |
fa7e53f
to
4ba210e
Compare
Ping @rust-lang/clippy The lint is going to hit beta soonish and the false-positives fixed here are quite noisy. |
@bors r+ |
`explicit_auto_deref` changes fixes #9123 fixes #9109 fixes #9143 fixes #9101 This avoid suggesting code which hits a rustc bug. Basically `&{x}` won't use auto-deref if the target type is `Sized`. changelog: Don't suggest using auto deref for block expressions when the target type is `Sized` changelog: Include the borrow in the suggestion for `explicit_auto_deref` changelog: Don't lint `explicit_auto_deref` on `dyn Trait` return changelog: Don't lint `explicit_auto_deref` when other adjustments are required
We should make sure there's a sync that happens before beta branching, too |
💔 Test failed - checks-action_test |
We're already too late for that ... |
Would you be able to nursery it then before it hits stable? I assume back-porting this would be not ideal. |
That should fix the ICE in cargo. Turns out the typeck tables have lifetimes for closure args. I thought those were supposed to be erased. |
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
I'll ask about it. |
fixes #9123
fixes #9109
fixes #9143
fixes #9101
This avoid suggesting code which hits a rustc bug. Basically
&{x}
won't use auto-deref if the target type isSized
.changelog: Don't suggest using auto deref for block expressions when the target type is
Sized
changelog: Include the borrow in the suggestion for
explicit_auto_deref
changelog: Don't lint
explicit_auto_deref
ondyn Trait
returnchangelog: Don't lint
explicit_auto_deref
when other adjustments are requiredchangelog: Lint
explicit_auto_deref
in implicit return positions for closures