Skip to content

Commit 5368432

Browse files
committed
thread vtable-closure obligations to result
the vtable.nested obligations were being dropped on the floor.
1 parent 24d4f10 commit 5368432

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/librustc/traits/project.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ impl<'tcx> Progress<'tcx> {
551551
fn with_addl_obligations(mut self,
552552
mut obligations: Vec<PredicateObligation<'tcx>>)
553553
-> Self {
554+
debug!("with_addl_obligations: self.obligations.len={} obligations.len={}",
555+
self.obligations.len(), obligations.len());
556+
557+
debug!("with_addl_obligations: self.obligations={:?} obligations={:?}",
558+
self.obligations, obligations);
559+
554560
self.obligations.append(&mut obligations);
555561
self
556562
}
@@ -1123,11 +1129,18 @@ fn confirm_closure_candidate<'cx, 'gcx, 'tcx>(
11231129
obligation.cause.clone(),
11241130
obligation.recursion_depth+1,
11251131
&closure_type);
1132+
1133+
debug!("confirm_closure_candidate: obligation={:?},closure_type={:?},obligations={:?}",
1134+
obligation,
1135+
closure_type,
1136+
obligations);
1137+
11261138
confirm_callable_candidate(selcx,
11271139
obligation,
11281140
&closure_type.sig,
11291141
util::TupleArgumentsFlag::No)
11301142
.with_addl_obligations(obligations)
1143+
.with_addl_obligations(vtable.nested)
11311144
}
11321145

11331146
fn confirm_callable_candidate<'cx, 'gcx, 'tcx>(

0 commit comments

Comments
 (0)