-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-trait-systemArea: Trait systemArea: Trait systemE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-traits[RETIRED] Working group: Traits[RETIRED] Working group: Traits
Description
The chalk integrate includes a is_coinductive
callback that indicates whether a particular goal is co-inductive:
rust/src/librustc_traits/chalk_context.rs
Lines 132 to 135 in e1643a8
/// True if this is a coinductive goal -- e.g., proving an auto trait. | |
fn is_coinductive(&self, _goal: &Canonical<'gcx, ty::ParamEnvAnd<'gcx, Goal<'gcx>>>) -> bool { | |
unimplemented!() | |
} |
A co-inductive goal is one of the following (see the corresponding chalk code for a kind of reference):
- proving whether an auto-trait is implemented
- "trait" well-formedness goals (not the type variant)
The existing trait solver doesn't have this notion of "well-formed trait goals" -- but it does have code related to testing about auto-traits that gives a few clues as to how to do the first step.
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-traits[RETIRED] Working group: Traits[RETIRED] Working group: Traits