mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 10:33:27 +00:00
82 lines
2.2 KiB
Text
82 lines
2.2 KiB
Text
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:33:5
|
|
|
|
|
33 | drop(s1);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `-D drop-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:33:10
|
|
|
|
|
33 | drop(s1);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:34:5
|
|
|
|
|
34 | drop(s2);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `-D drop-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:34:10
|
|
|
|
|
34 | drop(s2);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::drop` with a value that implements Copy. Dropping a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:36:5
|
|
|
|
|
36 | drop(s4);
|
|
| ^^^^^^^^
|
|
|
|
|
= note: `-D drop-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:36:10
|
|
|
|
|
36 | drop(s4);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:39:5
|
|
|
|
|
39 | forget(s1);
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D forget-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:39:12
|
|
|
|
|
39 | forget(s1);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:40:5
|
|
|
|
|
40 | forget(s2);
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D forget-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:40:12
|
|
|
|
|
40 | forget(s2);
|
|
| ^^
|
|
|
|
error: calls to `std::mem::forget` with a value that implements Copy. Forgetting a copy leaves the original intact.
|
|
--> drop_forget_copy.rs:42:5
|
|
|
|
|
42 | forget(s4);
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D forget-copy` implied by `-D warnings`
|
|
note: argument has type SomeStruct
|
|
--> drop_forget_copy.rs:42:12
|
|
|
|
|
42 | forget(s4);
|
|
| ^^
|
|
|
|
error: aborting due to previous error(s)
|
|
|
|
|
|
To learn more, run the command again with --verbose.
|