owned this note
                
                
                     
                     owned this note
                
                
                     
                    
                
                
                     
                    
                
                
                     
                    
                        
                            
                            Published
                        
                        
                            
                                
                                Linked with GitHub
                            
                            
                                
                                
                            
                        
                     
                
            
            
                
                    
                    
                
                
                    
                
                
                
                    
                        
                    
                    
                    
                
                
                
                    
                
            
            
         
        
        # wg-traits meeting agenda and dev log
## Instructions
During the week, find the section for the upcoming meeting. Add into the "Log of notable events" any interesting things that you did -- PRs opened, notes made, problems encountered. Then add to the Agenda possible topics for focused discussion. During the meeting we'll focus on some of the agenda items, and we'll add a link to the Zulip topic so you can read the details.
## Current sprint
The current sprint runs from 2020.05.26 to 2020.07.07. You can find our [sprint goals here](https://hackmd.io/D_wskAmRT52zL9xmhmg0Kg).
# Upcoming meeting topics
# Previous meeting topics
## [2021.03.30]
* Type library and planning
## [2020.10.20]
**To discuss**
* In progress work
    * Binder refactor ([rust#76814])
    * ~~Binder `map_bound_ref` ([rust#77685])~~
    * `TyKind` -> `TyData` ([rust#77768])
    * Subtyping/variance ([chalk#609])
    * Sem/syn equality ([chalk#589])
    * Const evaluation ([chalk#596])
[rust#76814]: https://github.com/rust-lang/rust/pull/76814
[rust#77685]: https://github.com/rust-lang/rust/pull/77685
[rust#77768]: https://github.com/rust-lang/rust/pull/77768
[chalk#609]: https://github.com/rust-lang/chalk/pull/609
[chalk#589]: https://github.com/rust-lang/chalk/pull/589
[chalk#596]: https://github.com/rust-lang/chalk/pull/596
## [2020.09.29]
**To discuss**
* Issue [#77187](https://github.com/rust-lang/rust/pull/77187): What do we need to do for >1 type parameters on fundamental types?
* Issue [#76814](https://github.com/rust-lang/rust/pull/76814): Is it potentially worth it to have a prelim PR that adds a `rebind` function to `Binder`?
    * `dummy`: adds a level of binding *without* allowing capturing escaping vars (enforced)
    * `bind`: potentially captures escaping vars
    * `rebind`: (potentially) recaptures escaping vars
        * would rather use `map`/`map_ref`, but this isn't possible in a lot of cases currently
    * `wrap_nonbinding`: adds a level of binding, shifting vars to avoid captures
* Design meeting: Wellformed
**Action items**
* Open issue for coherence rules with >1 param (Jack)
* Open PR to import coherence doc into book (Jack)
* Open PR for new coherence rules with >1 param (anyone, Jack)
* Prepare discussion points for WF design meeting (Jack)
* Post a summary of `Kind` changes to MCP topic (Jack)
## [2020.09.22]
* Topic: placeholder canonicalization
## [2020.09.15]
**Action Items**
* File issue for adding `ReStatic` (Jack)
* Review conversation on placeholder canonicalization (Niko, all)
## [2020.09.08](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/meeting.202020-09-08)
**Meeting notes**
* Sprint planning
    * https://hackmd.io/s1MfBn4bRjyir-aqHZzbKQ
## [2020.09.01](https://zulip-archive.rust-lang.org/144729wgtraits/51412meeting09012020.html)
**Action Items**
* Review Chalk upgrade PR (#75173) (Niko)
* Add rustc-chalk integration tracking issue (Jack)
* Elaborate on opaque types WF w/ implied bounds (detrumi)
* File issue for auto and builtin traits with builtin types (Jack)
* Update well known traits table for closures extern types (Jack)
* Update skill tree (Niko)
**Meeting notes**
* Catching up from the summer
    * chalk/rustc integration (no issue)
        * rust#75173 -- needs review 
        * next steps:
            * variance
            * placeholder canonicalization
            * params
    * chalk-ty lib extraction ([rust-lang/wg-traits#16](https://github.com/rust-lang/wg-traits/issues/16))
        * rust#75077 -- basically ready to land, but blocked on the question of whether to return `&TyKind`; [we hit some complications trying to do so](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/fn.20kind%28%29.20-.3E.20TypeKind.20or.20-.3E.20.26TypeKind/near/208444172)
    * builtin traits ([rust-lang/chalk#363](https://github.com/rust-lang/chalk/issues/363))
        * need `Unpin`, `CoerceUnsied`, `DispatchFromDyn`
    * builtin types([rust-lang/chalk#368])
            * generators ([chalk#593]) and extern types
    * recursive solver
    * opaque types ([tracking issue](https://github.com/rust-lang/chalk/issues/335#issuecomment-615254659))
        * chalk#559 -- needs tests fixed so it can be merged 
        * chalk#579 -- waiting for r+
    * auto traits with builtin types
        * good starter issue
    * builtin traits with builtin types
    * sem-syn inequality
        * pending PR chalk#589 but causes some perf regressions in rust-analyzer that will require investigation
    * variance and subtyping
        * [chalk#520] -- needs some testing
        
[chalk#593]: https://github.com/rust-lang/chalk/pull/593
[chalk#520]: https://github.com/rust-lang/chalk/pull/520
## [2020.06.02](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/meeting.2006.2E02.2E2020/near/199544881)
### Notes from meeting
* chalk 0.11.0 was published last week :tada:
* also some crate structure refactors
* some talk about making the solver more parallel
* opaque types are [getting close](https://github.com/rust-lang/chalk/issues/335#issuecomment-615254659)
* discussion on [subtyping](https://github.com/rust-lang/chalk/issues/418), variance
## [2020.05.26](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E05.2E26)
### Agenda and possible topics
* Possible future meeting topics
    * implied bounds -- continuing from last meeting
    * how to manage consts in chalk writer
    * shared type library next steps
    * wf checks on types
    * chalk's support for coherence
## [2020.05.12](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E05.2E12)
### Agenda and possible topics
 * Minutes updating on rust-lang/wg-traits (last is 2020.03.03)
     * Will also close meeting issues
 * Sprint overview
     * Blog post?
 * Next sprint planning
### Log of notable events, please feel free to add
 * rustc Chalk integration MVP PR landed
## [2020.05.05](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E05.2E05/near/196359047)
### Agenda and possible topics
* Decide on the approach for dealing with const types
* ObjectSafe(Trait)
### Log of notable events, please feel free to add
* 
## [2020.04.28](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E28/near/195618205)
### Agenda and possible topics
* Sprint progress - 2 weeks left
* Release?
* Mdbook linkcheck - should we block 
* `from_fallible` on `Interner` list-like types
* Implied bounds
## [2020.04.21](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E21/near/194853430)
### Agenda and possible topics
* Design meeting: discuss implied bounds ([tracking issue](https://github.com/rust-lang/wg-traits/issues/17)) 
### Log of notable events, please feel free to add
* The [recursive solver](https://github.com/rust-lang/chalk/pull/372) was added as an alternative to the existing solver
* Basic support for [`impl Trait`](https://github.com/rust-lang/chalk/issues/335) landed
* Added support for the [`Copy`, `Clone` and `Drop`](https://github.com/rust-lang/chalk/pull/385/files) traits
* The new-style trait solving chapter was moved from [rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/traits/index.html) to the [chalk book](https://rust-lang.github.io/chalk/book/clauses.html)
* 
## [2020.04.14](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E14/near/193949693)
### Agenda and possible topics
* crate.io release
* Where should "builtin" types go? `chalk-ir` or `chalk-rust-ir`? ([#368](https://github.com/rust-lang/chalk/issues/368) and [#371](https://github.com/rust-lang/chalk/pull/371))
    * If in `chalk-rust-ir`, `chalk_ir::ApplicationType.name` would have to an associated type on `Interner`. And then `chalk_solve` would have to have some way to constrain this for a fixed set of types.
* rustc integration
    * `RegionOutlives`, `TypeOutlives`
        * We need some way to register `Constraint`s.
        * `LifetimeEq` -> `Outlives`?
    * `Subtype`
        * What to do here? How do we handle super traits currently?
* State of "old" PRs
    * https://github.com/rust-lang/chalk/pull/230
    * https://github.com/rust-lang/chalk/pull/277
    * https://github.com/rust-lang/chalk/pull/331
* Not enough sprint issues for the many new contributors
### Log of notable events, please feel free to add
* 8 PRs merged (11 if you include those merged last Tuesday)
    * 11(!) open now too
## [2020.04.07](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/design.20meeting.202020.2E04.2E07/near/193239347)
### Agenda and possible topics
* Discuss what to do about const generics ([tracking issue](https://github.com/rust-lang/wg-traits/issues/15))
### Notes from meeting
* created [hackmd](https://hackmd.io/n0Um5UtyS8md4l9r7B8rCw) with notes
### Log of notable events, please feel free to add
* rustc integration is getting close
* many Chalk PRs in a lot of areas
    * extending `TypeName`
    * built-in traits like `Sized`, `Drop`, `Copy`, and `Clone`
    * adding a `Visitor`
    * an open PR for the recursive solver
    * impl Trait
* Progress towards leak check removal in rustc
## [2020.03.31](https://zulip-archive.rust-lang.org/144729wgtraits/61131designmeeting20200331.html)
### Agenda and possible topics
* We discussed the sprint goals, got into more details, and enumerated planned meetings
### Notes from meeting
### Log of notable events, please feel free to add
* Sprint start
* Landed PR to [count binders, not variables](https://github.com/rust-lang/chalk/pull/360)
* Landed initial work on [builtin traits](https://github.com/rust-lang/chalk/pull/359)
* Landed [stopgap measure for builtin traits](https://github.com/rust-lang/chalk/pull/367)
## [2020.03.24](https://zulip-archive.rust-lang.org/144729wgtraits/26669designmeeting20200324.html)
### Agenda and possible topics
* Sprint is over - retrospective
* Next sprint - March 31st to May 12th?
    * Goals/Topic
        * Goal: Rustc integration MVP
            * In this version:
                * rustc types are converted to chalk types deeply and eagerly
                * region integration is basically ignored, so not sound
                * chalk is responsible for generating builtin trait rules, and those may be approximated in some cases
                * constants are not handled, they are translated to `()` type for now
                * closures and the fn traits are "reach items"
                * unsizing is out of scope
            * Work items (required):
                * Write code to eagerly, deeply convert rustc types to chalk types
                * Define builtin traits mechanism
                    * Implement rules for Sized
                    * Implement rules for Clone
                    * Implement rules for Copy
                * Some kind of interim solution `*Outlives` and `Subtype`
                * Land Jack's branch :)
            * Work items (reach):
                * Implement rules for `Fn` traits as applied to fn-def and closures
        * Goal: Plan for what const integration looks like
            * Hold a design meeting, or multiple
        * Goal: Move towards alignment of rustc and chalk types, and towards extracting a shared library
            * Adopt "count binder"-style debruijn indices (in progress, carried over)
            * Adapt *rustc* to support binder lists and (perhaps) indices in late-bound regions ([discussion](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/debruijn.20indices.20and.20bound.20variables.20chalk.23334/near/191636362))
            * Extend chalk with types like Rustc's `FnDef` and `Closure`
            * In some order:
                * Adapt *rustc* to use `ty.kind(tcx)` instead of `ty.kind`
                * Align names of rustc and chalk types (eg., `GenericArg`)
                * Extract or identify items from rustc that would ultimately live in the new library
        * Goal: basic support for impl Trait
            * Land existing PR
            * Accomodatic generic opaque types fully
            * Lazy access of hidden type
            * Well-formedness rules for opaque types
        * Goal: progress towards removing leak check in rustc
            * Next step: extend NLL solver with the notion of 
        * Goal: exploration and research
            * exploring recursive solver (flodiebold)
            * explore converting semantic-to-syntactic equality
            * create a chalk file from any given program
        * Goal: increase Chalk performance (very open-ended)
            * Create a set of benchmarks
            * Add tracing support (in progress)
            * Track memory usage and try to decrease as necessary
            * Creating a .chalk from a given program for reproducing
* See https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/.22skill.20tree.22/near/190652842 to add to skill-tree?
* rustc integration: `TypeOutlives`, `RegionOutlives`, `Subtype`
    * `*Outlives` are `WhereClause` variants, `Subtype` is `GoalKind`
* Possible issue with `any_future_answer`/`MayInvalidate`: https://github.com/rust-lang/chalk/pull/331
### Log of notable events, please feel free to add
* Niko pushed more on debruijn branch, making some progress
## [2020.03.17](https://zulip-archive.rust-lang.org/144729wgtraits/92207designmeeting20200317.html)
### Agenda and possible topics
* Design meeting of compiler to discuss extracting a rust-ty library -- nikomatsakis
    * How does this work interact with this group? Maybe a good thing for next sprint
* Rustc integration blocking items (for next sprint?)
    * `Sized` and other built-in Traits
    * Fn and closures
* Next sprint planning?
### Notes from meeting
Ongoing things from this sprint
* modeling impl Trait
* making the Interner a value that gets passed around (probably.. 75% done)
* exploring the recursive solver (yay @Florian Diebold)
* exploring rustc integration (the most nebuluous, but we've definitely made progress)
* tracing (added:)
Discussing next sprint topics
* Goal: extending the `interner` data methods to have `&self`
    * yaahc has made great progress here, we need to land and maybe tweak it
* Goal: implement the "builtin traits"
* Possible goal: rustc refactors to move closer to chalk-ir model
    * e.g., `ty.kind` to `ty.kind(tcx)`
* Goal: continue exploration of recursive solver
    * flodiebold has made great progress here
* Goal: explore equivalence edges
* Goal: move to tracing
* Possible goal: refactor NLL solver in rustc to further the work in removing the leak check (is this really wg-traits?? maybe not. --niko)
* Goal: complete the *chalk part* of impl Trait modeling
    * i.e., given that some other layer is managing the inference of the hidden type
### Log of notable events, please feel free to add
* Niko [updated a gist exploring how to the "debruijn index" question](https://gist.github.com/nikomatsakis/fe440aec437f7e8ad4cce8319954a973)
* Niko was [updating roadmap slightly](https://github.com/rust-lang/wg-traits/pull/14) to account for function/closure types, which are baked into rustc's trait matching just a it
## [2020.03.10](https://zulip-archive.rust-lang.org/144729wgtraits/33448designmeeting20200310.html)
### Agenda and possible topics
* Design meeting of compiler to discuss extracting a rust-ty library -- nikomatsakis
    * How does this work interact with this group? Maybe a good thing for next sprint
* How to handle debruijn and type parameter indexing? -- nikomatsakis
    * building on [the gist](https://gist.github.com/fe440aec437f7e8ad4cce8319954a973) that I wrote, I'm not sure what to do
* Expected pattern for integrating impl Trait into rust-analyzer etc -- nikomatsakis
    * I'd like to understand better what detrumi + flodiebold were discussing -- nikomatsakis
* rustc integration: `TypeOutlives`, `RegionOutlives`, `Subtype`
### Log of notable events, please feel free to add
* yaahc made a number of PRs related to [chalk#340](https://github.com/rust-lang/chalk/issues/340), adding `&self` to all the other interning methods besides typing
* yaahc opened a "WIP" PR 
* flodiebold [resurrected the recursive trait solver](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/recursive.20solver) from older versions of chalk
* flodiebold + detrumi explored integration of impl Trait into rust-analyzer
* nikomatsakis pursued debruijn interation and encountered some questions, started writing [a gist](https://gist.github.com/fe440aec437f7e8ad4cce8319954a973) that explains how things work today
    * goal is to eventually produce a proposal :)