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

Do suggest_await_before_try with infer variables in self, and clean up binders #97721

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jun 4, 2022

Fixes #97704

Also cleans up binders in this fn, since everything is a Poly* and we really shouldn't have stray escaping late-bound regions everywhere. That's why the function changed so much. This isn't necessary, so I can revert if necessary.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 4, 2022
@rust-highfive
Copy link
Collaborator

r? @nagisa

(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 Jun 4, 2022
@compiler-errors compiler-errors changed the title Do suggest_await_before_try with infer in self, clean up binders Do suggest_await_before_try with infer variables in self, and clean up binders Jun 4, 2022
Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with or without comment

let projection_ty = trait_pred.map_bound(|trait_pred| {
self.tcx.mk_projection(
item_def_id,
self.tcx.mk_substs_trait(trait_pred.self_ty(), &[]),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me a second to realize that the empty list here is fine because it's the future trait; maybe a comment would be helpful?

@nagisa
Copy link
Member

nagisa commented Jun 5, 2022

r? @jackh726

@rust-highfive rust-highfive assigned jackh726 and unassigned nagisa Jun 5, 2022
@compiler-errors
Copy link
Member Author

@bors r=jackh726 rollup

@bors
Copy link
Contributor

bors commented Jun 6, 2022

📌 Commit d268b34 has been approved by jackh726

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 6, 2022
…h726

Do `suggest_await_before_try` with infer variables in self, and clean up binders

Fixes rust-lang#97704

Also cleans up binders in this fn, since everything is a `Poly*` and we really shouldn't have stray escaping late-bound regions everywhere. That's why the function changed so much. This isn't necessary, so I can revert if necessary.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 6, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#90905 (Add empty impl blocks if they have documentation)
 - rust-lang#97683 (Fail gracefully when encountering an HRTB in APIT. )
 - rust-lang#97721 (Do `suggest_await_before_try` with infer variables in self, and clean up binders)
 - rust-lang#97752 (typo: `-Zcodegen-backend=llvm -Cpasses=list` should work now)
 - rust-lang#97759 (Suggest adding `{}` for `'label: non_block_expr`)
 - rust-lang#97764 (use strict provenance APIs)
 - rust-lang#97765 (Restore a test that was intended to test `as` cast to ptr)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit df86d04 into rust-lang:master Jun 6, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 6, 2022
@compiler-errors compiler-errors deleted the issue-97704 branch August 11, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using try operator on a future doesn't suggest to .await it
6 participants