Skip to content

Auto traits are not handled for generic closures  #734

@matthewjasper

Description

@matthewjasper

The following test fails with both solvers (returning ambiguous).

program {
      #[auto]
      trait Send { }

      closure with_ty<T>(self,) { T }
}

goal {
    forall<T> { if (T: Send) { with_ty<T>: Send } }
} yields {
    "Unique"
}

The empty substs here seem suspicious.

.closure_upvars(*closure_id, &Substitution::empty(interner));

Metadata

Metadata

Assignees

Labels

C-chalk-solveIssues related to the chalk-solve crategood first issueA good issue to start working on Chalk with

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions