Jared Davis
2025-07-07 16:17:19 -04:00
parent 9580d61dc5
commit 81dd4e61ed
+1 -1
View File
@@ -68,7 +68,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) {
// if you instead check for the parent of the `exit()` call being the entrypoint function, as this worked before,
// in compilation contexts like --all-targets (which include --tests), you get false positives
// because in a test context, main is not the entrypoint function
&& ident.name.as_str() != "main"
&& ident.name != sym::main
{
span_lint(cx, EXIT, e.span, "usage of `process::exit`");
}