summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/drop_forget_copy.stderr
blob: 90bef1c3c439f76d334e209619d160b5ac0e8ad5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:33:5
   |
LL |     drop(s1);
   |     ^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:33:10
   |
LL |     drop(s1);
   |          ^^
   = note: `-D clippy::drop-copy` implied by `-D warnings`

error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:34:5
   |
LL |     drop(s2);
   |     ^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:34:10
   |
LL |     drop(s2);
   |          ^^

error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:36:5
   |
LL |     drop(s4);
   |     ^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:36:10
   |
LL |     drop(s4);
   |          ^^

error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:39:5
   |
LL |     forget(s1);
   |     ^^^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:39:12
   |
LL |     forget(s1);
   |            ^^
   = note: `-D clippy::forget-copy` implied by `-D warnings`

error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:40:5
   |
LL |     forget(s2);
   |     ^^^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:40:12
   |
LL |     forget(s2);
   |            ^^

error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
  --> $DIR/drop_forget_copy.rs:42:5
   |
LL |     forget(s4);
   |     ^^^^^^^^^^
   |
note: argument has type `SomeStruct`
  --> $DIR/drop_forget_copy.rs:42:12
   |
LL |     forget(s4);
   |            ^^

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