|
| 1 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 2 | + --> $DIR/drop_ref.rs:9:5 |
| 3 | + | |
| 4 | +LL | drop(&SomeStruct); |
| 5 | + | ^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = note: `-D clippy::drop-ref` implied by `-D warnings` |
| 8 | +note: argument has type `&SomeStruct` |
| 9 | + --> $DIR/drop_ref.rs:9:10 |
| 10 | + | |
| 11 | +LL | drop(&SomeStruct); |
| 12 | + | ^^^^^^^^^^^ |
| 13 | + |
| 14 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 15 | + --> $DIR/drop_ref.rs:12:5 |
| 16 | + | |
| 17 | +LL | drop(&owned1); |
| 18 | + | ^^^^^^^^^^^^^ |
| 19 | + | |
| 20 | +note: argument has type `&SomeStruct` |
| 21 | + --> $DIR/drop_ref.rs:12:10 |
| 22 | + | |
| 23 | +LL | drop(&owned1); |
| 24 | + | ^^^^^^^ |
| 25 | + |
| 26 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 27 | + --> $DIR/drop_ref.rs:13:5 |
| 28 | + | |
| 29 | +LL | drop(&&owned1); |
| 30 | + | ^^^^^^^^^^^^^^ |
| 31 | + | |
| 32 | +note: argument has type `&&SomeStruct` |
| 33 | + --> $DIR/drop_ref.rs:13:10 |
| 34 | + | |
| 35 | +LL | drop(&&owned1); |
| 36 | + | ^^^^^^^^ |
| 37 | + |
| 38 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 39 | + --> $DIR/drop_ref.rs:14:5 |
| 40 | + | |
| 41 | +LL | drop(&mut owned1); |
| 42 | + | ^^^^^^^^^^^^^^^^^ |
| 43 | + | |
| 44 | +note: argument has type `&mut SomeStruct` |
| 45 | + --> $DIR/drop_ref.rs:14:10 |
| 46 | + | |
| 47 | +LL | drop(&mut owned1); |
| 48 | + | ^^^^^^^^^^^ |
| 49 | + |
| 50 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 51 | + --> $DIR/drop_ref.rs:18:5 |
| 52 | + | |
| 53 | +LL | drop(reference1); |
| 54 | + | ^^^^^^^^^^^^^^^^ |
| 55 | + | |
| 56 | +note: argument has type `&SomeStruct` |
| 57 | + --> $DIR/drop_ref.rs:18:10 |
| 58 | + | |
| 59 | +LL | drop(reference1); |
| 60 | + | ^^^^^^^^^^ |
| 61 | + |
| 62 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 63 | + --> $DIR/drop_ref.rs:21:5 |
| 64 | + | |
| 65 | +LL | drop(reference2); |
| 66 | + | ^^^^^^^^^^^^^^^^ |
| 67 | + | |
| 68 | +note: argument has type `&mut SomeStruct` |
| 69 | + --> $DIR/drop_ref.rs:21:10 |
| 70 | + | |
| 71 | +LL | drop(reference2); |
| 72 | + | ^^^^^^^^^^ |
| 73 | + |
| 74 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 75 | + --> $DIR/drop_ref.rs:24:5 |
| 76 | + | |
| 77 | +LL | drop(reference3); |
| 78 | + | ^^^^^^^^^^^^^^^^ |
| 79 | + | |
| 80 | +note: argument has type `&SomeStruct` |
| 81 | + --> $DIR/drop_ref.rs:24:10 |
| 82 | + | |
| 83 | +LL | drop(reference3); |
| 84 | + | ^^^^^^^^^^ |
| 85 | + |
| 86 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 87 | + --> $DIR/drop_ref.rs:29:5 |
| 88 | + | |
| 89 | +LL | drop(&val); |
| 90 | + | ^^^^^^^^^^ |
| 91 | + | |
| 92 | +note: argument has type `&T` |
| 93 | + --> $DIR/drop_ref.rs:29:10 |
| 94 | + | |
| 95 | +LL | drop(&val); |
| 96 | + | ^^^^ |
| 97 | + |
| 98 | +error: calls to `std::mem::drop` with a reference instead of an owned value. Dropping a reference does nothing. |
| 99 | + --> $DIR/drop_ref.rs:37:5 |
| 100 | + | |
| 101 | +LL | std::mem::drop(&SomeStruct); |
| 102 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 103 | + | |
| 104 | +note: argument has type `&SomeStruct` |
| 105 | + --> $DIR/drop_ref.rs:37:20 |
| 106 | + | |
| 107 | +LL | std::mem::drop(&SomeStruct); |
| 108 | + | ^^^^^^^^^^^ |
| 109 | + |
| 110 | +error: aborting due to 9 previous errors |
| 111 | + |
0 commit comments