Skip to content

Commit 7206df6

Browse files
committed
---
yaml --- r: 64248 b: refs/heads/snap-stage3 c: 2b89b43 h: refs/heads/master v: v3
1 parent cedc21d commit 7206df6

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 82ae2fa93abbdf2b7437e9a8df4b4a18df0bf310
4+
refs/heads/snap-stage3: 2b89b437fb38a4388d8f868f13d1200a22157e8a
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub fn trans_fn_ref_with_vtables(
250250
def_id: ast::def_id, // def id of fn
251251
ref_id: ast::node_id, // node id of use of fn; may be zero if N/A
252252
type_params: &[ty::t], // values for fn's ty params
253-
vtables: Option<typeck::vtable_res>)
253+
vtables: Option<typeck::vtable_res>) // vtables for the call
254254
-> FnData {
255255
//!
256256
//

branches/snap-stage3/src/librustc/middle/trans/monomorphize.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,26 @@ pub fn monomorphic_fn(ccx: @mut CrateContext,
6363
assert!(real_substs.tps.iter().all(|t| !ty::type_needs_infer(*t)));
6464
let _icx = push_ctxt("monomorphic_fn");
6565
let mut must_cast = false;
66-
let substs = real_substs.tps.iter().transform(|t| {
66+
67+
let do_normalize = |t: &ty::t| {
6768
match normalize_for_monomorphization(ccx.tcx, *t) {
6869
Some(t) => { must_cast = true; t }
6970
None => *t
7071
}
71-
}).collect::<~[ty::t]>();
72-
73-
for real_substs.tps.iter().advance |s| { assert!(!ty::type_has_params(*s)); }
74-
for substs.iter().advance |s| { assert!(!ty::type_has_params(*s)); }
75-
let param_uses = type_use::type_uses_for(ccx, fn_id, substs.len());
72+
};
7673

7774
let psubsts = @param_substs {
78-
tys: substs,
75+
tys: real_substs.tps.map(|x| do_normalize(x)),
7976
vtables: vtables,
80-
self_ty: real_substs.self_ty,
77+
self_ty: real_substs.self_ty.map(|x| do_normalize(x)),
8178
self_vtable: self_vtable
8279
};
8380

81+
for real_substs.tps.iter().advance |s| { assert!(!ty::type_has_params(*s)); }
82+
for psubsts.tys.iter().advance |s| { assert!(!ty::type_has_params(*s)); }
83+
let param_uses = type_use::type_uses_for(ccx, fn_id, psubsts.tys.len());
84+
85+
8486
let hash_id = make_mono_id(ccx, fn_id, impl_did_opt,
8587
&*psubsts,
8688
Some(param_uses));

0 commit comments

Comments
 (0)