-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
$ echo 'fn main(){}' | rustc --test -
<anon>:1:1: 1:12 warning: code is never used: `main`, #[warn(dead_code)] on by default
<anon>:1 fn main(){}
^~~~~~~~~~~
I have put #[cfg(not(test))]
on main
a couple of times (though perhaps #[allow(dead_code)]
would be better) and I have just observed another person doing it. Would it be reasonable to make the dead code lint permit main
to be unused?
nbro and ethanrjs
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.