]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/bad_style.rs
Auto merge of #29014 - petrochenkov:stability, r=brson
[rust.git] / src / librustc_lint / bad_style.rs
index 91d1d398a0e548ea782b2c9c4be8fce78754a76e..693de1740bfee9fdee03e7f453ef361ba40dc583 100644 (file)
@@ -280,9 +280,9 @@ fn check_pat(&mut self, cx: &LateContext, p: &hir::Pat) {
         }
     }
 
-    fn check_struct_def(&mut self, cx: &LateContext, s: &hir::StructDef,
+    fn check_struct_def(&mut self, cx: &LateContext, s: &hir::VariantData,
                         _: ast::Name, _: &hir::Generics, _: ast::NodeId) {
-        for sf in &s.fields {
+        for sf in s.fields() {
             if let hir::StructField_ { kind: hir::NamedField(name, _), .. } = sf.node {
                 self.check_snake_case(cx, "structure field", &name.as_str(),
                                       Some(sf.span));