Navigation Menu

Skip to content

Commit

Permalink
thread vtable-closure obligations to result
Browse files Browse the repository at this point in the history
the vtable.nested obligations were being dropped on the floor.
  • Loading branch information
nikomatsakis committed May 31, 2016
1 parent 24d4f10 commit 5368432
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/librustc/traits/project.rs
Expand Up @@ -551,6 +551,12 @@ impl<'tcx> Progress<'tcx> {
fn with_addl_obligations(mut self,
mut obligations: Vec<PredicateObligation<'tcx>>)
-> Self {
debug!("with_addl_obligations: self.obligations.len={} obligations.len={}",
self.obligations.len(), obligations.len());

debug!("with_addl_obligations: self.obligations={:?} obligations={:?}",
self.obligations, obligations);

self.obligations.append(&mut obligations);
self
}
Expand Down Expand Up @@ -1123,11 +1129,18 @@ fn confirm_closure_candidate<'cx, 'gcx, 'tcx>(
obligation.cause.clone(),
obligation.recursion_depth+1,
&closure_type);

debug!("confirm_closure_candidate: obligation={:?},closure_type={:?},obligations={:?}",
obligation,
closure_type,
obligations);

confirm_callable_candidate(selcx,
obligation,
&closure_type.sig,
util::TupleArgumentsFlag::No)
.with_addl_obligations(obligations)
.with_addl_obligations(vtable.nested)
}

fn confirm_callable_candidate<'cx, 'gcx, 'tcx>(
Expand Down

0 comments on commit 5368432

Please sign in to comment.