about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/exit.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/exit.rs b/clippy_lints/src/exit.rs
index a43d788fc16..487db69027a 100644
--- a/clippy_lints/src/exit.rs
+++ b/clippy_lints/src/exit.rs
@@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for Exit {
             // 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`");
         }