Static rustc_lint::builtin::DEAD_CODE
source · pub static DEAD_CODE: &'static Lint
Expand description
The dead_code
lint detects unused, unexported items.
§Example
fn foo() {}
{{produces}}
§Explanation
Dead code may signal a mistake or unfinished code. To silence the
warning for individual items, prefix the name with an underscore such
as _foo
. If it was intended to expose the item outside of the crate,
consider adding a visibility modifier like pub
.
To preserve the numbering of tuple structs with unused fields,
change the unused fields to have unit type or use
PhantomData
.
Otherwise consider removing the unused code.