2 Checks for calls to `std::mem::forget` with a value that
6 Calling `std::mem::forget` [does nothing for types that
7 implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html) since the
8 value will be copied and moved into the function on invocation.
10 An alternative, but also valid, explanation is that Copy types do not
12 the Drop trait, which means they have no destructors. Without a destructor,
14 is nothing for `std::mem::forget` to ignore.
18 let x: i32 = 42; // i32 implements Copy
19 std::mem::forget(x) // A copy of x is passed to the function, leaving the
20 // original unaffected