]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/drop_forget_copy.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / drop_forget_copy.stderr
1 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
2 --> $DIR/drop_forget_copy.rs:33:5
3 |
4 LL | drop(s1);
5 | ^^^^^^^^
6 |
7 note: argument has type `SomeStruct`
8 --> $DIR/drop_forget_copy.rs:33:10
9 |
10 LL | drop(s1);
11 | ^^
12 = note: `-D clippy::drop-copy` implied by `-D warnings`
13
14 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
15 --> $DIR/drop_forget_copy.rs:34:5
16 |
17 LL | drop(s2);
18 | ^^^^^^^^
19 |
20 note: argument has type `SomeStruct`
21 --> $DIR/drop_forget_copy.rs:34:10
22 |
23 LL | drop(s2);
24 | ^^
25
26 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
27 --> $DIR/drop_forget_copy.rs:36:5
28 |
29 LL | drop(s4);
30 | ^^^^^^^^
31 |
32 note: argument has type `SomeStruct`
33 --> $DIR/drop_forget_copy.rs:36:10
34 |
35 LL | drop(s4);
36 | ^^
37
38 error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
39 --> $DIR/drop_forget_copy.rs:39:5
40 |
41 LL | forget(s1);
42 | ^^^^^^^^^^
43 |
44 note: argument has type `SomeStruct`
45 --> $DIR/drop_forget_copy.rs:39:12
46 |
47 LL | forget(s1);
48 | ^^
49 = note: `-D clippy::forget-copy` implied by `-D warnings`
50
51 error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
52 --> $DIR/drop_forget_copy.rs:40:5
53 |
54 LL | forget(s2);
55 | ^^^^^^^^^^
56 |
57 note: argument has type `SomeStruct`
58 --> $DIR/drop_forget_copy.rs:40:12
59 |
60 LL | forget(s2);
61 | ^^
62
63 error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
64 --> $DIR/drop_forget_copy.rs:42:5
65 |
66 LL | forget(s4);
67 | ^^^^^^^^^^
68 |
69 note: argument has type `SomeStruct`
70 --> $DIR/drop_forget_copy.rs:42:12
71 |
72 LL | forget(s4);
73 | ^^
74
75 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
76 --> $DIR/drop_forget_copy.rs:80:13
77 |
78 LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
79 | ^^^^^^^^^^^^^^^^^^^^^
80 |
81 note: argument has type `i32`
82 --> $DIR/drop_forget_copy.rs:80:18
83 |
84 LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
85 | ^^^^^^^^^^^^^^^
86
87 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
88 --> $DIR/drop_forget_copy.rs:82:14
89 |
90 LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
91 | ^^^^^^^^^^^^^^^^^^^^^
92 |
93 note: argument has type `i32`
94 --> $DIR/drop_forget_copy.rs:82:19
95 |
96 LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
97 | ^^^^^^^^^^^^^^^
98
99 error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
100 --> $DIR/drop_forget_copy.rs:83:14
101 |
102 LL | 4 => drop(2), // Lint, not a fn/method call
103 | ^^^^^^^
104 |
105 note: argument has type `i32`
106 --> $DIR/drop_forget_copy.rs:83:19
107 |
108 LL | 4 => drop(2), // Lint, not a fn/method call
109 | ^
110
111 error: aborting due to 9 previous errors
112