]> git.lizzy.rs Git - rust.git/blobdiff - src/types.rs
Fix type complexity lint
[rust.git] / src / types.rs
index af2deb9aa9720b5baf72e7186bcd75389d432d2b..93962586bc6b21d354f2baec4d565dc641eabe2e 100644 (file)
@@ -280,18 +280,10 @@ fn check_fn(&mut self, cx: &LateContext, _: FnKind, decl: &FnDecl, _: &Block, _:
     }
 
     fn check_struct_field(&mut self, cx: &LateContext, field: &StructField) {
+        // enum variants are also struct fields now
         check_type(cx, &field.node.ty);
     }
 
-    fn check_variant(&mut self, cx: &LateContext, var: &Variant, _: &Generics) {
-        // StructVariant is covered by check_struct_field
-        if let VariantData::Tuple(ref args, _) = *var.node.data {
-            for arg in args {
-                check_type(cx, &arg.node.ty);
-            }
-        }
-    }
-
     fn check_item(&mut self, cx: &LateContext, item: &Item) {
         match item.node {
             ItemStatic(ref ty, _, _) |