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 printing impl trait under binders #98371

Merged
merged 2 commits into from
Jun 26, 2022

Conversation

compiler-errors
Copy link
Member

Before, we would render impl for<'a> Trait<'a> like impl Trait<for<'a> 'a>, lol.

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

r? @oli-obk

(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 22, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Jun 23, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jun 23, 2022

📌 Commit a1e0ef43bb404a27d5651f3b8a03b19acede7a8d has been approved by oli-obk

@bors
Copy link
Contributor

bors commented Jun 23, 2022

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 23, 2022
@compiler-errors
Copy link
Member Author

@bors r- failed to merge apparently

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 23, 2022
@bors
Copy link
Contributor

bors commented Jun 24, 2022

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

@compiler-errors
Copy link
Member Author

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Jun 24, 2022

📌 Commit e80cced has been approved by oli-obk

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 24, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 25, 2022
…ing, r=oli-obk

Fix printing `impl trait` under binders

Before, we would render `impl for<'a> Trait<'a>` like `impl Trait<for<'a> 'a>`, lol.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 25, 2022
…ing, r=oli-obk

Fix printing `impl trait` under binders

Before, we would render `impl for<'a> Trait<'a>` like `impl Trait<for<'a> 'a>`, lol.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 25, 2022
…ing, r=oli-obk

Fix printing `impl trait` under binders

Before, we would render `impl for<'a> Trait<'a>` like `impl Trait<for<'a> 'a>`, lol.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 26, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#98371 (Fix printing `impl trait` under binders)
 - rust-lang#98385 (Work around llvm 12's memory ordering restrictions.)
 - rust-lang#98474 (x.py: Support systems with only `python3` not `python`)
 - rust-lang#98488 (Bump RLS to latest master on rust-lang/rls)
 - rust-lang#98491 (Fix backtrace UI test when panic=abort is used)
 - rust-lang#98502 (Fix source sidebar hover in ayu theme)
 - rust-lang#98509 (diagnostics: consider parameter count when suggesting smart pointers)
 - rust-lang#98513 (Fix LLVM rebuild with download-ci-llvm.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 645e5c4 into rust-lang:master Jun 26, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jun 26, 2022
@@ -22,7 +22,7 @@ LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
LL | |
LL | | }
| |_^
= note: required because it captures the following types: `ResumeTy`, `impl Future<Output = ()>`, `()`
= note: required because it captures the following types: `ResumeTy`, `impl for<'r, 's, 't0> Future<Output = ()>`, `()`
Copy link
Member

Choose a reason for hiding this comment

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

hmm, is this change expected? I guess it doesn't really matter since I'm going to remove it in #98754, but I wonder if it can come up in diagnostics for generators or something like that?

Copy link
Member Author

Choose a reason for hiding this comment

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

well so the only reason we weren't printing this in the first place was because of another bug... the bound lifetimes are there though

i mean i guess we could filter them out or something 🤷

Copy link
Member

Choose a reason for hiding this comment

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

hmm, sure - I think what's confusing is that the lifetimes don't appear in the impl Future pretty printing, only the for binder.

maybe that's ok though and this gives a hint of which lifetimes are captured? I don't feel super strongly either way

@compiler-errors compiler-errors deleted the better-opaque-printing branch August 11, 2023 19:56
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.

6 participants