File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
trunk/src/librustc/middle Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 91676f3fa699c3d715c5420b5c8c0828627aa09e
2
+ refs/heads/master: 15871a7458feee550c9ba65db802ed0fb5db2ae7
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
5
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
Original file line number Diff line number Diff line change @@ -786,6 +786,18 @@ fn check_item_heap(cx: ty::ctxt, it: @ast::item) {
786
786
_ => ()
787
787
}
788
788
789
+ // If it's a struct, we also have to check the fields' types
790
+ match it.node {
791
+ ast::item_struct(struct_def, _) => {
792
+ for struct_def.fields.each |struct_field| {
793
+ check_type(cx, struct_field.node.id, it.id,
794
+ struct_field.span,
795
+ ty::node_id_to_type(cx, struct_field.node.id));
796
+ }
797
+ }
798
+ _ => ()
799
+ }
800
+
789
801
let visit = item_stopping_visitor(
790
802
visit::mk_simple_visitor(@visit::SimpleVisitor {
791
803
visit_expr: |e: @ast::expr| {
You can’t perform that action at this time.
0 commit comments