|
| 1 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 2 | + --> $DIR/drop_ref.rs:8:5 |
| 3 | + | |
| 4 | +LL | drop(&SomeStruct); |
| 5 | + | ^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: argument has type `&SomeStruct` |
| 8 | + --> $DIR/drop_ref.rs:8:10 |
| 9 | + | |
| 10 | +LL | drop(&SomeStruct); |
| 11 | + | ^^^^^^^^^^^ |
| 12 | +note: the lint level is defined here |
| 13 | + --> $DIR/drop_ref.rs:3:9 |
| 14 | + | |
| 15 | +LL | #![warn(drop_ref)] |
| 16 | + | ^^^^^^^^ |
| 17 | + |
| 18 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 19 | + --> $DIR/drop_ref.rs:11:5 |
| 20 | + | |
| 21 | +LL | drop(&owned1); |
| 22 | + | ^^^^^^^^^^^^^ |
| 23 | + | |
| 24 | +note: argument has type `&SomeStruct` |
| 25 | + --> $DIR/drop_ref.rs:11:10 |
| 26 | + | |
| 27 | +LL | drop(&owned1); |
| 28 | + | ^^^^^^^ |
| 29 | + |
| 30 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 31 | + --> $DIR/drop_ref.rs:12:5 |
| 32 | + | |
| 33 | +LL | drop(&&owned1); |
| 34 | + | ^^^^^^^^^^^^^^ |
| 35 | + | |
| 36 | +note: argument has type `&&SomeStruct` |
| 37 | + --> $DIR/drop_ref.rs:12:10 |
| 38 | + | |
| 39 | +LL | drop(&&owned1); |
| 40 | + | ^^^^^^^^ |
| 41 | + |
| 42 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 43 | + --> $DIR/drop_ref.rs:13:5 |
| 44 | + | |
| 45 | +LL | drop(&mut owned1); |
| 46 | + | ^^^^^^^^^^^^^^^^^ |
| 47 | + | |
| 48 | +note: argument has type `&mut SomeStruct` |
| 49 | + --> $DIR/drop_ref.rs:13:10 |
| 50 | + | |
| 51 | +LL | drop(&mut owned1); |
| 52 | + | ^^^^^^^^^^^ |
| 53 | + |
| 54 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 55 | + --> $DIR/drop_ref.rs:17:5 |
| 56 | + | |
| 57 | +LL | drop(reference1); |
| 58 | + | ^^^^^^^^^^^^^^^^ |
| 59 | + | |
| 60 | +note: argument has type `&SomeStruct` |
| 61 | + --> $DIR/drop_ref.rs:17:10 |
| 62 | + | |
| 63 | +LL | drop(reference1); |
| 64 | + | ^^^^^^^^^^ |
| 65 | + |
| 66 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 67 | + --> $DIR/drop_ref.rs:20:5 |
| 68 | + | |
| 69 | +LL | drop(reference2); |
| 70 | + | ^^^^^^^^^^^^^^^^ |
| 71 | + | |
| 72 | +note: argument has type `&mut SomeStruct` |
| 73 | + --> $DIR/drop_ref.rs:20:10 |
| 74 | + | |
| 75 | +LL | drop(reference2); |
| 76 | + | ^^^^^^^^^^ |
| 77 | + |
| 78 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 79 | + --> $DIR/drop_ref.rs:23:5 |
| 80 | + | |
| 81 | +LL | drop(reference3); |
| 82 | + | ^^^^^^^^^^^^^^^^ |
| 83 | + | |
| 84 | +note: argument has type `&SomeStruct` |
| 85 | + --> $DIR/drop_ref.rs:23:10 |
| 86 | + | |
| 87 | +LL | drop(reference3); |
| 88 | + | ^^^^^^^^^^ |
| 89 | + |
| 90 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 91 | + --> $DIR/drop_ref.rs:28:5 |
| 92 | + | |
| 93 | +LL | drop(&val); |
| 94 | + | ^^^^^^^^^^ |
| 95 | + | |
| 96 | +note: argument has type `&T` |
| 97 | + --> $DIR/drop_ref.rs:28:10 |
| 98 | + | |
| 99 | +LL | drop(&val); |
| 100 | + | ^^^^ |
| 101 | + |
| 102 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 103 | + --> $DIR/drop_ref.rs:36:5 |
| 104 | + | |
| 105 | +LL | std::mem::drop(&SomeStruct); |
| 106 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 107 | + | |
| 108 | +note: argument has type `&SomeStruct` |
| 109 | + --> $DIR/drop_ref.rs:36:20 |
| 110 | + | |
| 111 | +LL | std::mem::drop(&SomeStruct); |
| 112 | + | ^^^^^^^^^^^ |
| 113 | + |
| 114 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 115 | + --> $DIR/drop_ref.rs:91:13 |
| 116 | + | |
| 117 | +LL | drop(println_and(&13)); |
| 118 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 119 | + | |
| 120 | +note: argument has type `&i32` |
| 121 | + --> $DIR/drop_ref.rs:91:18 |
| 122 | + | |
| 123 | +LL | drop(println_and(&13)); |
| 124 | + | ^^^^^^^^^^^^^^^^ |
| 125 | + |
| 126 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 127 | + --> $DIR/drop_ref.rs:94:14 |
| 128 | + | |
| 129 | +LL | 3 if drop(println_and(&14)) == () => (), |
| 130 | + | ^^^^^^^^^^^^^^^^^^^^^^ |
| 131 | + | |
| 132 | +note: argument has type `&i32` |
| 133 | + --> $DIR/drop_ref.rs:94:19 |
| 134 | + | |
| 135 | +LL | 3 if drop(println_and(&14)) == () => (), |
| 136 | + | ^^^^^^^^^^^^^^^^ |
| 137 | + |
| 138 | +warning: calls to `std::mem::drop` with a reference instead of an owned value |
| 139 | + --> $DIR/drop_ref.rs:96:14 |
| 140 | + | |
| 141 | +LL | 4 => drop(&2), |
| 142 | + | ^^^^^^^^ |
| 143 | + | |
| 144 | +note: argument has type `&i32` |
| 145 | + --> $DIR/drop_ref.rs:96:19 |
| 146 | + | |
| 147 | +LL | 4 => drop(&2), |
| 148 | + | ^^ |
| 149 | + |
| 150 | +warning: 12 warnings emitted |
| 151 | + |
0 commit comments