Skip to content

Commit d3bd9c3

Browse files
committed
---
yaml --- r: 12514 b: refs/heads/master c: fda7bb6 h: refs/heads/master v: v3
1 parent b31501d commit d3bd9c3

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 73ea690016452d7c7d732d0fd6940d6271411606
2+
refs/heads/master: fda7bb672134257c0466cd6b7bbf738963d2a130
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/trans/type_use.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,21 @@ fn mark_for_expr(cx: ctx, e: @expr) {
180180
// after the chosen field
181181
let base_ty = ty::node_id_to_type(cx.ccx.tcx, base.id);
182182
type_needs(cx, use_repr, ty::type_autoderef(cx.ccx.tcx, base_ty));
183+
184+
option::iter(cx.ccx.maps.method_map.find(e.id)) {|mth|
185+
alt mth {
186+
typeck::method_static(did) {
187+
option::iter(cx.ccx.tcx.node_type_substs.find(e.id)) {|ts|
188+
vec::iter2(type_uses_for(cx.ccx, did, ts.len()), ts)
189+
{|uses, subst| type_needs(cx, uses, subst)}
190+
}
191+
}
192+
typeck::method_param(_, _, param, _) {
193+
cx.uses[param] |= use_tydesc;
194+
}
195+
typeck::method_iface(_, _) {}
196+
}
197+
}
183198
}
184199
expr_log(_, _, val) {
185200
node_type_needs(cx, use_tydesc, val.id);

0 commit comments

Comments
 (0)