Skip to content

Commit 81dd4e6

Browse files
committed
1 parent 9580d61 commit 81dd4e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/exit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for Exit {
6868
// if you instead check for the parent of the `exit()` call being the entrypoint function, as this worked before,
6969
// in compilation contexts like --all-targets (which include --tests), you get false positives
7070
// because in a test context, main is not the entrypoint function
71-
&& ident.name.as_str() != "main"
71+
&& ident.name != sym::main
7272
{
7373
span_lint(cx, EXIT, e.span, "usage of `process::exit`");
7474
}

0 commit comments

Comments
 (0)