Skip to content

Make the type_of return a generic type for generators #68884

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Mar 24, 2020

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 6, 2020

Fixes #67651.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 6, 2020
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Awesome :)

@nikomatsakis
Copy link
Contributor

@bors r+

Thanks @Zoxc

@bors
Copy link
Collaborator

bors commented Feb 6, 2020

📌 Commit 98c51fd has been approved by nikomatsakis

@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 Feb 6, 2020
@nikomatsakis
Copy link
Contributor

Could you check, @Zoxc, if this fixes #66312 too?

@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 7, 2020

@nikomatsakis It fixes the async case, but not the other.

@nikomatsakis
Copy link
Contributor

OK, I missed the second case, I suspect that should be broken into its own issue.

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 7, 2020
Make the `type_of` return a generic type for generators

Fixes rust-lang#67651.

r? @nikomatsakis
@Dylan-DPC-zz
Copy link

Failed in rollup

@bors r-

@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 Feb 7, 2020
@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 8, 2020

@bors r=nikomatsakis

@bors
Copy link
Collaborator

bors commented Feb 8, 2020

📌 Commit 1ae614f has been approved by nikomatsakis

@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 Feb 8, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 8, 2020
Make the `type_of` return a generic type for generators

Fixes rust-lang#67651.

r? @nikomatsakis
@Dylan-DPC-zz
Copy link

Failed in rollup

@bors r-

@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 Feb 8, 2020
@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 Mar 21, 2020
@bors
Copy link
Collaborator

bors commented Mar 23, 2020

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

@nikomatsakis
Copy link
Contributor

Specifically I think that this PR requires a x.py --bless --compare-mode=nll run

@nikomatsakis
Copy link
Contributor

(relevant log output)

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 24, 2020

@bors r=nikomatsakis

@bors
Copy link
Collaborator

bors commented Mar 24, 2020

📌 Commit 47a84f2 has been approved by nikomatsakis

@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 Mar 24, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 24, 2020
Make the `type_of` return a generic type for generators

Fixes rust-lang#67651.

r? @nikomatsakis
@bors
Copy link
Collaborator

bors commented Mar 24, 2020

⌛ Testing commit 47a84f2 with merge a81c062c169ef64f4ff9cd719dc23d78e21c7dd9...

@Centril
Copy link
Contributor

Centril commented Mar 24, 2020

@bors retry

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#68884 (Make the `type_of` return a generic type for generators)
 - rust-lang#69788 (Fix sequence of Type and Trait in optin-builtin-traits in Unstable Book)
 - rust-lang#70074 (Expand: nix all fatal errors)
 - rust-lang#70077 (Store idents for `DefPathData` into crate metadata)
 - rust-lang#70213 (traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet).)
 - rust-lang#70259 (Use Reveal::All in MIR optimizations)
 - rust-lang#70284 (correctly handle const params in type_of)
 - rust-lang#70289 (Refactor `codegen`)

Failed merges:

r? @ghost
Comment on lines -191 to -193
if gen.is_some() {
return tcx.typeck_tables_of(def_id).node_type(hir_id);
}
Copy link
Member

Choose a reason for hiding this comment

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

That's funny, I almost did the opposite last week, trying to make #69968 work.
(It was a bad idea and the solution was to fix the actual code that couldn't handle unsubstitued closure types)

@bors
Copy link
Collaborator

bors commented Mar 24, 2020

⌛ Testing commit 47a84f2 with merge 9d0ae58...

@bors bors merged commit a130954 into rust-lang:master Mar 24, 2020
@Zoxc Zoxc deleted the gen-type branch March 24, 2020 18:59
@tmandry tmandry mentioned this pull request Mar 24, 2020
Centril pushed a commit to Centril/rust that referenced this pull request Mar 25, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 25, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 25, 2020
Centril added a commit to Centril/rust that referenced this pull request Mar 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing/incorrect error message with incoherent implementations and async blocks
9 participants