Skip to content

ClosureSubsts/GeneratorSubsts refactoring #72633

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

Closed

Conversation

VFLashM
Copy link
Contributor

@VFLashM VFLashM commented May 26, 2020

Now stored directly instead of requiring a cast.

As a result as_closure/as_generator casts are removed.

This change allows to encapsulate synthetic generic args handling inside of ClosureSbusts/GeneratorSubsts instead of leaking implementation details in SubstsRef.

Didn't expect this change to blow up this big. Please let me know if there is interest in this change before I start rebasing it.

Now stored directly instead of requiring a cast.
As a result as_closure/as_generator casts are removed.
This change allows to encapsulate synthetic generic args
handling inside of ClosureSbusts/GeneratorSubsts instead
of leaking implementation details in SubstsRef.
@rust-highfive
Copy link
Contributor

r? @eddyb

(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 May 26, 2020
@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 3, 2020
@Elinvynia
Copy link
Contributor

Ping from triage:
@VFLashM Hello, could you please have a look at rebasing this PR when you have the time? Thanks!

@VFLashM
Copy link
Contributor Author

VFLashM commented Jun 14, 2020

@eddyb I really don't want to waste time rebasing this change unless there is interest in it.
Could you please take a glance at it and tell me if it is worth merging?

@JohnCSimon JohnCSimon 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 30, 2020
@eddyb
Copy link
Member

eddyb commented Jul 15, 2020

@VFLashM Sorry, I didn't see this PR, you should've coordinated with @nikomatsakis. I believe as-is it's reverting a past change, which was probably done with Chalk integration in mind, but I don't know the details.

r? @nikomatsakis

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Jul 15, 2020
@nikomatsakis
Copy link
Contributor

Yeah, it is reverting a change that was made with the intent of moving towards a chalk-like setup. Specifically, the goal was that we could group all "nominal-like types" into a setup that combines a (id, substs) pair (i.e., closures, generators, ADTs, even things like booleans and tuples, can all be described in this uniform way). The chalk book explains.

I'm inclined to close this PR, but one of the things that I'm hoping to do now that I'm back from vacation is laying out a series of steps to complete and explore the transition to chalk-like types, and in particular complete the work towards a shared type library (see rust-lang/types-team#16 for current info, it needs some updating though). @VFLashM I wonder if you'd be interested in participating in that effort?

@VFLashM
Copy link
Contributor Author

VFLashM commented Jul 19, 2020

I see. Thanks for the details. No problem, let's close it then.
I was working on unrelated issue and this looked like a reasonable refactoring at the time.

I don't think I'll have enough time to work on such a major effort anytime soon, sorry.
I'm just trying to fix some performance issues that prevent my own code from compiling.

@VFLashM VFLashM closed this Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants