Description
Now that @scalexm has created the basic framework for lowering, we need to flesh it out. This issue is intentionally structured as a "quest isuse" -- that is, a way for a lot of people to contribute, each doing one small thing. The goal is for everyone to get familiar with the overall "chalk" setup.
The tasks
Each task corresponds to one of the rules documented in the rustc-guide. You can search the guide for the rule name in order to find some text explaining the rule. If you want to do a rule, just check the box and edit this post to add your name (if you are a member of the GitHub team, you should have privileges for that). If you are not yet a member of the WG-traits group, leave a comment below or ping me on gitter and I will add you.
- Rule Implemented-From-Impl: this is the template rule that @scalexm started with.Rule Implemented-From-Env -- @varkor (PR Implement Chalk lowering rule "Implemented-From-Env" #49211)Rule Implied-Bound-From-Trait -- @tmandry (PR chalkify: Implement lowering rule Implied-Bound-From-Trait #49435)Rule WellFormed-TraitRef -- @csmoe (PR Chalk lowering rule: WellFormed-TraitRef #50250)Rule ProjectionEq-Normalize -- @csmoe (PR chalk lowering rule: ProjectionEq-Normalize #52153)Rule ProjectionEq-Skolemize -- @scalexm (PR Add chalk rules related to associated type defs #54909)Rule Normalize-From-Impl -- @fanzier (PR Implement Chalk lowering rule Normalize-From-Impl #49626)Rule Implied-Bound-From-AssocTy -- not needed until GATsRule WellFormed-AssocTy -- @scalexm (PR Add chalk rules related to associated type defs #54909)Rule Implied-WC-From-AssocTy -- not needed until GATs / where clauses on assoc typesRule Implied-Trait-From-AssocTy -- @scalexm (PR # Add chalk rules related to associated type defs #54909)
Mentoring instructions
As described above, the goal is to add the code to generate appropriate program clauses from various Rust constructs. You should use the Implemented-From-Impl
rule as a kind of template:
rust/src/librustc_traits/lowering.rs
Lines 121 to 130 in a04b88d
Each rule should also have a unit-test. This rustc-guide chapter describes how to create such unit tests.
cc @rust-lang/wg-traits
Activity
varkor commentedon Mar 20, 2018
I'll take
Rule Implemented-From-Env
to get my feet wet!Implement Rule Implemented-From-Env
tmandry commentedon Mar 26, 2018
Working on
Rule Implied-Bound-From-Trait
!fanzier commentedon Mar 31, 2018
I'd like to try
Normalize-From-Impl
:) (Also, I think the ruleImplemented-From-Impl
occurs twice in the list.)nikomatsakis commentedon Apr 2, 2018
@fanzier great! Let me know how it goes. Feel free to pop in on the gitter channel with questions.
17 remaining items