types: check for macros in type complexity check

This commit is contained in:
Georg Brandl 2015-08-22 14:30:53 +02:00
parent 371584a637
commit 1587256dc4

View File

@ -259,6 +259,7 @@ fn check_fndecl(cx: &Context, decl: &FnDecl) {
}
fn check_type(cx: &Context, ty: &ast::Ty) {
if in_external_macro(cx, ty.span) { return; }
let score = {
let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 };
visitor.visit_ty(ty);