Add an Option<Span> argument to span_lint_and_help.

This commit is contained in:
xiongmao86
2020-04-18 18:28:29 +08:00
parent d03d3bd95b
commit cf4e35339b
39 changed files with 138 additions and 37 deletions

View File

@@ -53,6 +53,7 @@ impl LateLintPass<'_, '_> for MainRecursion {
MAIN_RECURSION,
func.span,
&format!("recursing into entrypoint `{}`", snippet(cx, func.span, "main")),
None,
"consider using another function for this recursion"
)
}