Skip to content

Commit cba63d3

Browse files
committed
---
yaml --- r: 42740 b: refs/heads/try c: 15871a7 h: refs/heads/master v: v3
1 parent 7601ea1 commit cba63d3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 91676f3fa699c3d715c5420b5c8c0828627aa09e
5+
refs/heads/try: 15871a7458feee550c9ba65db802ed0fb5db2ae7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

branches/try/src/librustc/middle/lint.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,18 @@ fn check_item_heap(cx: ty::ctxt, it: @ast::item) {
786786
_ => ()
787787
}
788788
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+
789801
let visit = item_stopping_visitor(
790802
visit::mk_simple_visitor(@visit::SimpleVisitor {
791803
visit_expr: |e: @ast::expr| {

0 commit comments

Comments
 (0)