mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
76 lines
2 KiB
Text
76 lines
2 KiB
Text
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:42:5
|
|
|
|
|
LL | drop(s1);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `-D clippy::drop-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:42:10
|
|
|
|
|
LL | drop(s1);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:43:5
|
|
|
|
|
LL | drop(s2);
|
|
| ^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:43:10
|
|
|
|
|
LL | drop(s2);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:45:5
|
|
|
|
|
LL | drop(s4);
|
|
| ^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:45:10
|
|
|
|
|
LL | drop(s4);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:48:5
|
|
|
|
|
LL | forget(s1);
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::forget-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:48:12
|
|
|
|
|
LL | forget(s1);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:49:5
|
|
|
|
|
LL | forget(s2);
|
|
| ^^^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:49:12
|
|
|
|
|
LL | forget(s2);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:51:5
|
|
|
|
|
LL | forget(s4);
|
|
| ^^^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:51:12
|
|
|
|
|
LL | forget(s4);
|
|
| ^^
|
|
|
|
error: aborting due to 6 previous errors
|
|
|