File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
branches/try/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 2
2
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5
- refs/heads/try: 91676f3fa699c3d715c5420b5c8c0828627aa09e
5
+ refs/heads/try: 15871a7458feee550c9ba65db802ed0fb5db2ae7
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
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