Fix type complexity lint

This commit is contained in:
Manish Goregaokar 2015-10-15 19:55:14 +05:30
parent a7270adbd7
commit b2f4550654
2 changed files with 1 additions and 10 deletions

View file

@ -280,18 +280,10 @@ impl LateLintPass for TypeComplexityPass {
}
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, _, _) |