We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73ea690 commit fda7bb6Copy full SHA for fda7bb6
src/rustc/middle/trans/type_use.rs
@@ -180,6 +180,21 @@ fn mark_for_expr(cx: ctx, e: @expr) {
180
// after the chosen field
181
let base_ty = ty::node_id_to_type(cx.ccx.tcx, base.id);
182
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
198
}
199
expr_log(_, _, val) {
200
node_type_needs(cx, use_tydesc, val.id);
0 commit comments