|
| 1 | +error: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
| 2 | + --> $DIR/dropping_copy_types-issue-125189.rs:9:14 |
| 3 | + | |
| 4 | +LL | 1 => drop(3), |
| 5 | + | ^^^^^-^ |
| 6 | + | | |
| 7 | + | argument has type `i32` |
| 8 | + | |
| 9 | + = note: use `let _ = ...` to ignore the expression or result |
| 10 | +note: the lint level is defined here |
| 11 | + --> $DIR/dropping_copy_types-issue-125189.rs:3:9 |
| 12 | + | |
| 13 | +LL | #![deny(dropping_copy_types)] |
| 14 | + | ^^^^^^^^^^^^^^^^^^^ |
| 15 | + |
| 16 | +error: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
| 17 | + --> $DIR/dropping_copy_types-issue-125189.rs:10:14 |
| 18 | + | |
| 19 | +LL | 2 => drop(y), |
| 20 | + | ^^^^^-^ |
| 21 | + | | |
| 22 | + | argument has type `i32` |
| 23 | + | |
| 24 | + = note: use `let _ = ...` to ignore the expression or result |
| 25 | + |
| 26 | +error: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
| 27 | + --> $DIR/dropping_copy_types-issue-125189.rs:11:17 |
| 28 | + | |
| 29 | +LL | 3 => if drop(z) == () {}, |
| 30 | + | ^^^^^-^ |
| 31 | + | | |
| 32 | + | argument has type `i32` |
| 33 | + | |
| 34 | + = note: use `let _ = ...` to ignore the expression or result |
| 35 | + |
| 36 | +error: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
| 37 | + --> $DIR/dropping_copy_types-issue-125189.rs:15:5 |
| 38 | + | |
| 39 | +LL | drop(3.2); |
| 40 | + | ^^^^^---^ |
| 41 | + | | |
| 42 | + | argument has type `f64` |
| 43 | + | |
| 44 | + = note: use `let _ = ...` to ignore the expression or result |
| 45 | +help: ignore the value |
| 46 | + | |
| 47 | +LL | let _ = 3.2; |
| 48 | + | ~~~~~~~~~~~ |
| 49 | + |
| 50 | +error: calls to `std::mem::drop` with a value that implements `Copy` does nothing |
| 51 | + --> $DIR/dropping_copy_types-issue-125189.rs:16:5 |
| 52 | + | |
| 53 | +LL | drop(y); |
| 54 | + | ^^^^^-^ |
| 55 | + | | |
| 56 | + | argument has type `i32` |
| 57 | + | |
| 58 | + = note: use `let _ = ...` to ignore the expression or result |
| 59 | +help: ignore the value |
| 60 | + | |
| 61 | +LL | let _ = y; |
| 62 | + | ~~~~~~~~~ |
| 63 | + |
| 64 | +error: aborting due to 5 previous errors |
| 65 | + |
0 commit comments