From 5368432538edbd9fdafc0a3c91b578f9cfd6b10e Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 23 May 2016 19:52:44 -0400 Subject: [PATCH] thread vtable-closure obligations to result the vtable.nested obligations were being dropped on the floor. --- src/librustc/traits/project.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/librustc/traits/project.rs b/src/librustc/traits/project.rs index 516f1204f6fd..836e32f68089 100644 --- a/src/librustc/traits/project.rs +++ b/src/librustc/traits/project.rs @@ -551,6 +551,12 @@ impl<'tcx> Progress<'tcx> { fn with_addl_obligations(mut self, mut obligations: Vec>) -> 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 } @@ -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>(