Skip to content

Commit 04ba07b

Browse files
committed
add line_count and max_lines to too_many_lines lint message
1 parent f253dd0 commit 04ba07b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clippy_lints/src/functions.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,12 @@ impl<'tcx> Functions {
374374
}
375375

376376
if line_count > self.max_lines {
377-
span_lint(cx, TOO_MANY_LINES, span, "this function has a large number of lines")
377+
span_lint(
378+
cx,
379+
TOO_MANY_LINES,
380+
span,
381+
&format!("this function has too many lines ({}/{})", line_count, self.max_lines),
382+
)
378383
}
379384
}
380385

0 commit comments

Comments
 (0)