add line_count and max_lines to too_many_lines lint message

This commit is contained in:
Ryan1729 2020-09-04 19:26:35 -06:00
parent f253dd06f9
commit 04ba07bdc3

View File

@ -374,7 +374,12 @@ impl<'tcx> Functions {
}
if line_count > self.max_lines {
span_lint(cx, TOO_MANY_LINES, span, "this function has a large number of lines")
span_lint(
cx,
TOO_MANY_LINES,
span,
&format!("this function has too many lines ({}/{})", line_count, self.max_lines),
)
}
}