Skip to content

Commit f52b655

Browse files
Plumb inference obligations through selection
1 parent ec7c483 commit f52b655

File tree

3 files changed

+126
-66
lines changed

3 files changed

+126
-66
lines changed

src/librustc/traits/mod.rs

+12
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,18 @@ impl<'tcx, N> Vtable<'tcx, N> {
582582
}
583583
}
584584

585+
fn nested_obligations_mut(&mut self) -> &mut Vec<N> {
586+
match self {
587+
&mut VtableImpl(ref mut i) => &mut i.nested,
588+
&mut VtableParam(ref mut n) => n,
589+
&mut VtableBuiltin(ref mut i) => &mut i.nested,
590+
&mut VtableDefaultImpl(ref mut d) => &mut d.nested,
591+
&mut VtableClosure(ref mut c) => &mut c.nested,
592+
&mut VtableObject(ref mut d) => &mut d.nested,
593+
&mut VtableFnPointer(ref mut d) => &mut d.nested,
594+
}
595+
}
596+
585597
pub fn map<M, F>(self, f: F) -> Vtable<'tcx, M> where F: FnMut(N) -> M {
586598
match self {
587599
VtableImpl(i) => VtableImpl(VtableImplData {

0 commit comments

Comments
 (0)