Remove bound_{explicit,}_item_bounds
This commit is contained in:
parent
e1533a26f7
commit
90df86f474
6 changed files with 40 additions and 64 deletions
|
@ -2558,12 +2558,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
// obligation will normalize to `<$0 as Iterator>::Item = $1` and
|
||||
// `$1: Copy`, so we must ensure the obligations are emitted in
|
||||
// that order.
|
||||
let predicates = tcx.bound_predicates_of(def_id);
|
||||
debug!(?predicates);
|
||||
assert_eq!(predicates.0.parent, None);
|
||||
let mut obligations = Vec::with_capacity(predicates.0.predicates.len());
|
||||
for (predicate, span) in predicates.0.predicates {
|
||||
let span = *span;
|
||||
let predicates = tcx.predicates_of(def_id);
|
||||
assert_eq!(predicates.parent, None);
|
||||
let predicates = predicates.instantiate_own(tcx, substs);
|
||||
let mut obligations = Vec::with_capacity(predicates.len());
|
||||
for (predicate, span) in predicates {
|
||||
let cause = cause.clone().derived_cause(parent_trait_pred, |derived| {
|
||||
ImplDerivedObligation(Box::new(ImplDerivedObligationCause {
|
||||
derived,
|
||||
|
@ -2576,7 +2575,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
param_env,
|
||||
cause.clone(),
|
||||
recursion_depth,
|
||||
predicates.rebind(*predicate).subst(tcx, substs),
|
||||
predicate,
|
||||
&mut obligations,
|
||||
);
|
||||
obligations.push(Obligation { cause, recursion_depth, param_env, predicate });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue