Avoid cycle with projections from object types

Normalizing `<dyn Iterator<Item = ()> as Iterator>::Item` no longer
requires selecting `dyn Iterator<Item = ()>: Iterator`. This was
previously worked around by using a special type-folder to normalize
things.
This commit is contained in:
Matthew Jasper
2020-07-24 21:59:43 +01:00
parent 34e5a4992c
commit 596d6c4b3b
11 changed files with 193 additions and 350 deletions

View File

@@ -441,8 +441,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
) -> Result<EvaluationResult, OverflowError> {
debug!(
"evaluate_predicate_recursively(obligation={:?}, previous_stack={:?})",
previous_stack.head(),
obligation
obligation,
previous_stack.head()
);
// `previous_stack` stores a `TraitObligation`, while `obligation` is