Skip to content

Commit fbbbc98

Browse files
committed
Refactor a bunch of lookup_vtable to reduce rightward drift and clean things up.
1 parent 4b9759e commit fbbbc98

File tree

3 files changed

+241
-221
lines changed

3 files changed

+241
-221
lines changed

src/librustc/middle/trans/common.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,9 @@ pub fn find_vtable(tcx: ty::ctxt,
11091109
debug!("find_vtable(n_param=%u, n_bound=%u, ps=%s)",
11101110
n_param, n_bound, ps.repr(tcx));
11111111

1112-
ps.vtables.get()[n_param][n_bound].clone()
1112+
let tables = ps.vtables.expect("vtables missing where they are needed");
1113+
let param_bounds = tables[n_param];
1114+
param_bounds[n_bound].clone()
11131115
}
11141116

11151117
pub fn dummy_substs(tps: ~[ty::t]) -> ty::substs {

0 commit comments

Comments
 (0)