make it recursive

This commit is contained in:
Michael Goulet
2024-02-07 00:19:12 +00:00
parent 7a63d3f16a
commit 7057188c54
3 changed files with 95 additions and 93 deletions

View File

@@ -1645,11 +1645,9 @@ fn assemble_candidates_from_trait_def<'cx, 'tcx>(
ControlFlow::Continue(())
},
|| {
// `ProjectionCandidateSet` is borrowed in the above closure,
// so just mark ambiguous outside of the closure.
ambiguous = true;
},
// `ProjectionCandidateSet` is borrowed in the above closure,
// so just mark ambiguous outside of the closure.
|| ambiguous = true,
);
if ambiguous {

View File

@@ -201,10 +201,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
ControlFlow::Continue(())
},
|| {
// On ambiguity.
candidates.ambiguous = true;
},
// On ambiguity.
|| candidates.ambiguous = true,
);
});
}