Deeply normalize when computing implied outlives bounds
This commit is contained in:
@@ -59,12 +59,13 @@ pub fn compute_implied_outlives_bounds_inner<'tcx>(
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
ty: Ty<'tcx>,
|
||||
) -> Result<Vec<OutlivesBound<'tcx>>, NoSolution> {
|
||||
let normalize_op = |ty| {
|
||||
let ty = ocx.normalize(&ObligationCause::dummy(), param_env, ty);
|
||||
let normalize_op = |ty| -> Result<_, NoSolution> {
|
||||
let ty = ocx
|
||||
.deeply_normalize(&ObligationCause::dummy(), param_env, ty)
|
||||
.map_err(|_| NoSolution)?;
|
||||
if !ocx.select_all_or_error().is_empty() {
|
||||
return Err(NoSolution);
|
||||
}
|
||||
let ty = ocx.infcx.resolve_vars_if_possible(ty);
|
||||
let ty = OpportunisticRegionResolver::new(&ocx.infcx).fold_ty(ty);
|
||||
Ok(ty)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user