Skip to content
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

Merged
merged 6 commits into from
Aug 8, 2022
Merged

explicit_auto_deref changes #9126

merged 6 commits into from
Aug 8, 2022

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Jul 5, 2022

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
changelog: Lint explicit_auto_deref in implicit return positions for closures

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 5, 2022
@Jarcho Jarcho force-pushed the auto_deref_sugg branch 2 times, most recently from c9c24be to 0ec49b6 Compare July 6, 2022 01:25
@Jarcho Jarcho changed the title Don't suggest using auto deref for block expressions explicit_auto_deref changes Jul 6, 2022
@bors
Copy link
Contributor

bors commented Jul 13, 2022

☔ The latest upstream changes (presumably #9134) made this pull request unmergeable. Please resolve the merge conflicts.

@Jarcho Jarcho force-pushed the auto_deref_sugg branch 3 times, most recently from fa7e53f to 4ba210e Compare July 15, 2022 15:40
@Jarcho
Copy link
Contributor Author

Jarcho commented Aug 8, 2022

Ping @rust-lang/clippy The lint is going to hit beta soonish and the false-positives fixed here are quite noisy.

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2022

📌 Commit d602ab1 has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 8, 2022

⌛ Testing commit d602ab1 with merge 7b62cce...

bors added a commit that referenced this pull request Aug 8, 2022
`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
@Manishearth
Copy link
Member

We should make sure there's a sync that happens before beta branching, too

@bors
Copy link
Contributor

bors commented Aug 8, 2022

💔 Test failed - checks-action_test

@flip1995
Copy link
Member

flip1995 commented Aug 8, 2022

We should make sure there's a sync that happens before beta branching, too

We're already too late for that ...

@Jarcho
Copy link
Contributor Author

Jarcho commented Aug 8, 2022

Would you be able to nursery it then before it hits stable? I assume back-porting this would be not ideal.

@Jarcho
Copy link
Contributor Author

Jarcho commented Aug 8, 2022

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.

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 8, 2022

📌 Commit ecb51fe has been approved by Manishearth

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 8, 2022

⌛ Testing commit ecb51fe with merge 4912c0e...

@bors
Copy link
Contributor

bors commented Aug 8, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Manishearth
Pushing 4912c0e to master...

@bors bors merged commit 4912c0e into rust-lang:master Aug 8, 2022
@flip1995
Copy link
Member

flip1995 commented Aug 8, 2022

Would you be able to nursery it then before it hits stable? I assume back-porting this would be not ideal.

I'll ask about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
7 participants