2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:33:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s1);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:33:10
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s1);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::drop-copy` implied by `-D warnings`
|
2017-02-26 03:55:43 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:34:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s2);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:34:10
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s2);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:36:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s4);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:36:10
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | drop(s4);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:39:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s1);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:39:12
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s1);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::forget-copy` implied by `-D warnings`
|
2017-02-26 03:55:43 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:40:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s2);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:40:12
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s2);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:42:5
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s4);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2022-04-07 17:39:59 +00:00
|
|
|
note: argument has type `SomeStruct`
|
2019-01-07 21:33:18 +00:00
|
|
|
--> $DIR/drop_forget_copy.rs:42:12
|
2017-02-26 03:55:43 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | forget(s4);
|
2017-02-26 03:55:43 +00:00
|
|
|
| ^^
|
|
|
|
|
2022-10-06 07:44:38 +00:00
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
|
|
|
--> $DIR/drop_forget_copy.rs:80:13
|
|
|
|
|
|
|
|
|
LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `i32`
|
|
|
|
--> $DIR/drop_forget_copy.rs:80:18
|
|
|
|
|
|
|
|
|
LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
|
|
|
--> $DIR/drop_forget_copy.rs:82:14
|
|
|
|
|
|
|
|
|
LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `i32`
|
|
|
|
--> $DIR/drop_forget_copy.rs:82:19
|
|
|
|
|
|
|
|
|
LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
|
|
|
|
--> $DIR/drop_forget_copy.rs:83:14
|
|
|
|
|
|
|
|
|
LL | 4 => drop(2), // Lint, not a fn/method call
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: argument has type `i32`
|
|
|
|
--> $DIR/drop_forget_copy.rs:83:19
|
|
|
|
|
|
|
|
|
LL | 4 => drop(2), // Lint, not a fn/method call
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|