use preinterned symbol
fixes https://github.com/rust-lang/rust-clippy/actions/runs/16126736130/job/45505355614?pr=15222#logs
This commit is contained in:
parent
9580d61dc5
commit
81dd4e61ed
1 changed files with 1 additions and 1 deletions
|
|
@ -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`");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue