mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
77 lines
2.0 KiB
Plaintext
77 lines
2.0 KiB
Plaintext
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> $DIR/drop_forget_copy.rs:33:5
|
|
|
|
|
LL | drop(s1);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `-D clippy::drop-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:33: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:34:5
|
|
|
|
|
LL | drop(s2);
|
|
| ^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:34: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:36:5
|
|
|
|
|
LL | drop(s4);
|
|
| ^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:36: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:39:5
|
|
|
|
|
LL | forget(s1);
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::forget-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:39: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:40:5
|
|
|
|
|
LL | forget(s2);
|
|
| ^^^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:40: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:42:5
|
|
|
|
|
LL | forget(s4);
|
|
| ^^^^^^^^^^
|
|
|
|
|
note: argument has type SomeStruct
|
|
--> $DIR/drop_forget_copy.rs:42:12
|
|
|
|
|
LL | forget(s4);
|
|
| ^^
|
|
|
|
error: aborting due to 6 previous errors
|
|
|