Skip to content

Commit fda7bb6

Browse files
committed
Fix oversight in type_use.rs
Closes #2053
1 parent 73ea690 commit fda7bb6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/rustc/middle/trans/type_use.rs

+15
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)