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