Skip to content

implement is_coinductive chalk callback #55096

Closed
@nikomatsakis

Description

@nikomatsakis

The chalk integrate includes a is_coinductive callback that indicates whether a particular goal is co-inductive:

/// 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):

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

No one assigned

    Labels

    A-trait-systemArea: Trait systemE-mentorCall 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.WG-traits[RETIRED] Working group: Traits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions