@@ -16,6 +16,7 @@ use std::borrow::Cow;
16
16
use crate :: syntax:: ast:: { FloatTy , IntTy , UintTy } ;
17
17
use crate :: syntax:: source_map:: Span ;
18
18
use crate :: syntax:: errors:: DiagnosticBuilder ;
19
+ use crate :: rustc_target:: spec:: abi:: Abi ;
19
20
use crate :: utils:: { comparisons, differing_macro_contexts, higher, in_constant, in_macro, last_path_segment, match_def_path, match_path,
20
21
match_type, multispan_sugg, opt_def_id, same_tys, snippet, snippet_opt, span_help_and_lint, span_lint,
21
22
span_lint_and_sugg, span_lint_and_then, clip, unsext, sext, int_bits} ;
@@ -1224,7 +1225,7 @@ impl<'tcx> Visitor<'tcx> for TypeComplexityVisitor {
1224
1225
TyKind :: Path ( ..) | TyKind :: Slice ( ..) | TyKind :: Tup ( ..) | TyKind :: Array ( ..) => ( 10 * self . nest , 1 ) ,
1225
1226
1226
1227
// function types bring a lot of overhead
1227
- TyKind :: BareFn ( .. ) => ( 50 * self . nest , 1 ) ,
1228
+ TyKind :: BareFn ( ref bare ) if bare . abi == Abi :: Rust => ( 50 * self . nest , 1 ) ,
1228
1229
1229
1230
TyKind :: TraitObject ( ref param_bounds, _) => {
1230
1231
let has_lifetime_parameters = param_bounds
0 commit comments