We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91676f3 commit 15871a7Copy full SHA for 15871a7
src/librustc/middle/lint.rs
@@ -786,6 +786,18 @@ fn check_item_heap(cx: ty::ctxt, it: @ast::item) {
786
_ => ()
787
}
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
+
801
let visit = item_stopping_visitor(
802
visit::mk_simple_visitor(@visit::SimpleVisitor {
803
visit_expr: |e: @ast::expr| {
0 commit comments