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

Fix unnecessary_lazy_eval suggestion applicability #6272

Merged
merged 2 commits into from
Nov 7, 2020

Conversation

camsteffen
Copy link
Contributor

changelog: Fix unnecessary_lazy_eval suggestion applicability when breaking type inference

Fixes #6240

@rust-highfive
Copy link

r? @llogiq

(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 Oct 30, 2020
@llogiq
Copy link
Contributor

llogiq commented Oct 31, 2020

I don't fully understand yet how the test is supposed to capture the difference in applicability. Wouldn't we need to have a //run-rustfix test for that?

@camsteffen
Copy link
Contributor Author

Hmm I think you're right. The test doesn't verify that the lint is not machine applicable. But if I put the test case under //run-rustfix, the suggestion is applied in the .fixed file even though I have Applicability::MaybeIncorrect, and then the fixed file fails to compile. See the async_yields_async test which does the same except the suggestion does compile. Is this a shortcoming of the whole testing setup? What I did is consistent with tests assign_ops2 and bytecount.

@llogiq
Copy link
Contributor

llogiq commented Nov 7, 2020

I don't have a good solution right now, but that shouldn't stop us. So... @bors r+

@bors
Copy link
Contributor

bors commented Nov 7, 2020

📌 Commit a6611de has been approved by llogiq

@bors
Copy link
Contributor

bors commented Nov 7, 2020

⌛ Testing commit a6611de with merge 4bbef42...

@bors
Copy link
Contributor

bors commented Nov 7, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 4bbef42 to master...

@bors bors merged commit 4bbef42 into rust-lang:master Nov 7, 2020
@camsteffen camsteffen deleted the unnecesary-lazy-eval-type branch July 8, 2021 22:01
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
Development

Successfully merging this pull request may close these issues.

unnecessary_lazy_evaluations suggestions cause type inferrence errors
5 participants