no leak_check -> commit_unconditionally is noop
This commit is contained in:
parent
748cb1f01d
commit
c12f5fc006
2 changed files with 163 additions and 182 deletions
|
@ -2081,30 +2081,28 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
.flat_map(|ty| {
|
||||
let ty: ty::Binder<'tcx, Ty<'tcx>> = types.rebind(*ty); // <----/
|
||||
|
||||
self.infcx.commit_unconditionally(|_| {
|
||||
let placeholder_ty = self.infcx.replace_bound_vars_with_placeholders(ty);
|
||||
let Normalized { value: normalized_ty, mut obligations } =
|
||||
ensure_sufficient_stack(|| {
|
||||
project::normalize_with_depth(
|
||||
self,
|
||||
param_env,
|
||||
cause.clone(),
|
||||
recursion_depth,
|
||||
placeholder_ty,
|
||||
)
|
||||
});
|
||||
let placeholder_obligation = predicate_for_trait_def(
|
||||
self.tcx(),
|
||||
param_env,
|
||||
cause.clone(),
|
||||
trait_def_id,
|
||||
recursion_depth,
|
||||
normalized_ty,
|
||||
&[],
|
||||
);
|
||||
obligations.push(placeholder_obligation);
|
||||
obligations
|
||||
})
|
||||
let placeholder_ty = self.infcx.replace_bound_vars_with_placeholders(ty);
|
||||
let Normalized { value: normalized_ty, mut obligations } =
|
||||
ensure_sufficient_stack(|| {
|
||||
project::normalize_with_depth(
|
||||
self,
|
||||
param_env,
|
||||
cause.clone(),
|
||||
recursion_depth,
|
||||
placeholder_ty,
|
||||
)
|
||||
});
|
||||
let placeholder_obligation = predicate_for_trait_def(
|
||||
self.tcx(),
|
||||
param_env,
|
||||
cause.clone(),
|
||||
trait_def_id,
|
||||
recursion_depth,
|
||||
normalized_ty,
|
||||
&[],
|
||||
);
|
||||
obligations.push(placeholder_obligation);
|
||||
obligations
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue