-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Description
right now, we add synthetic generic parameters to closures to represent a bunch of additional information about the closure, see
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/sty/struct.ClosureSubsts.html
These substs don't behave like ordinary generic parameters, negatively impact perf and are difficult to understand or deal with in some cases.
We should try to remove these synthetic parameters, for example by moving them into TypeckResults
and treating closures a lot more similar to ordinary adts. The same approach should also be used for generators and inline consts.
Going to look into this myself for now
Aaron1011
Metadata
Metadata
Assignees
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.