Skip to content

Commit 29e876a

Browse files
committed
---
yaml --- r: 142805 b: refs/heads/try2 c: 2b89b43 h: refs/heads/master i: 142803: b92345e v: v3
1 parent 8bd25f8 commit 29e876a

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 82ae2fa93abbdf2b7437e9a8df4b4a18df0bf310
8+
refs/heads/try2: 2b89b437fb38a4388d8f868f13d1200a22157e8a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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)