Skip to content

Commit 8657bb2

Browse files
committed
Always produce sub-obligations when using cached projection result
1 parent d565c74 commit 8657bb2

File tree

1 file changed

+1
-9
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+1
-9
lines changed

compiler/rustc_trait_selection/src/traits/project.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -529,15 +529,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
529529
// evaluation this is not the case, and dropping the trait
530530
// evaluations can causes ICEs (e.g., #43132).
531531
debug!(?ty, "found normalized ty");
532-
533-
// Once we have inferred everything we need to know, we
534-
// can ignore the `obligations` from that point on.
535-
if infcx.unresolved_type_vars(&ty.value).is_none() {
536-
infcx.inner.borrow_mut().projection_cache().complete_normalized(cache_key, &ty);
537-
// No need to extend `obligations`.
538-
} else {
539-
obligations.extend(ty.obligations);
540-
}
532+
obligations.extend(ty.obligations);
541533
return Ok(Some(ty.value));
542534
}
543535
Err(ProjectionCacheEntry::Error) => {

0 commit comments

Comments
 (0)