pub static DROPPING_COPY_TYPES: &Lint
Expand description
The dropping_copy_types
lint checks for calls to std::mem::drop
with a value
that derives the Copy trait.
§Example
let x: i32 = 42; // i32 implements Copy
std::mem::drop(x); // A copy of x is passed to the function, leaving the
// original unaffected
{{produces}}
§Explanation
Calling std::mem::drop
does nothing for types that
implement Copy, since the
value will be copied and moved into the function on invocation.