Auto merge of #118120 - compiler-errors:closure-kind, r=lcnr
Remove `PredicateKind::ClosureKind` We don't need the `ClosureKind` predicate kind -- instead, `Fn`-family trait goals are left as ambiguous, and we only need to make progress on `FnOnce` projection goals for inference purposes. This is similar to how we do confirmation of `Fn`-family trait and projection goals in the new trait solver, which also doesn't use the `ClosureKind` predicate. Some hacky logic is added in the second commit so that we can keep the error messages the same.
This commit is contained in:
commit
1e9dda77b5
19 changed files with 53 additions and 102 deletions
|
@ -1809,13 +1809,6 @@ impl<'tcx> Stable<'tcx> for ty::PredicateKind<'tcx> {
|
|||
PredicateKind::ObjectSafe(did) => {
|
||||
stable_mir::ty::PredicateKind::ObjectSafe(tables.trait_def(*did))
|
||||
}
|
||||
PredicateKind::ClosureKind(did, generic_args, closure_kind) => {
|
||||
stable_mir::ty::PredicateKind::ClosureKind(
|
||||
tables.closure_def(*did),
|
||||
generic_args.stable(tables),
|
||||
closure_kind.stable(tables),
|
||||
)
|
||||
}
|
||||
PredicateKind::Subtype(subtype_predicate) => {
|
||||
stable_mir::ty::PredicateKind::SubType(subtype_predicate.stable(tables))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue