fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
5.6 KiB221 linesraw
1error: unused attribute `must_use`
2  --> $DIR/unused_attributes-must_use.rs:58:1
3   |
4LL | #[must_use]
5   | ^^^^^^^^^^^
6   |
7note: the built-in attribute `must_use` will be ignored, since it's applied to the macro invocation `global_asm`
8  --> $DIR/unused_attributes-must_use.rs:59:1
9   |
10LL | global_asm!("");
11   | ^^^^^^^^^^
12note: the lint level is defined here
13  --> $DIR/unused_attributes-must_use.rs:2:9
14   |
15LL | #![deny(unused_attributes, unused_must_use)]
16   |         ^^^^^^^^^^^^^^^^^
17
18error: `#[must_use]` has no effect when applied to an extern crate
19  --> $DIR/unused_attributes-must_use.rs:5:1
20   |
21LL | #[must_use]
22   | ^^^^^^^^^^^
23
24error: `#[must_use]` has no effect when applied to a module
25  --> $DIR/unused_attributes-must_use.rs:8:1
26   |
27LL | #[must_use]
28   | ^^^^^^^^^^^
29
30error: `#[must_use]` has no effect when applied to a use
31  --> $DIR/unused_attributes-must_use.rs:11:1
32   |
33LL | #[must_use]
34   | ^^^^^^^^^^^
35
36error: `#[must_use]` has no effect when applied to a constant item
37  --> $DIR/unused_attributes-must_use.rs:14:1
38   |
39LL | #[must_use]
40   | ^^^^^^^^^^^
41
42error: `#[must_use]` has no effect when applied to a static item
43  --> $DIR/unused_attributes-must_use.rs:16:1
44   |
45LL | #[must_use]
46   | ^^^^^^^^^^^
47
48error: `#[must_use]` has no effect when applied to an implementation block
49  --> $DIR/unused_attributes-must_use.rs:33:1
50   |
51LL | #[must_use]
52   | ^^^^^^^^^^^
53
54error: `#[must_use]` has no effect when applied to a foreign module
55  --> $DIR/unused_attributes-must_use.rs:47:1
56   |
57LL | #[must_use]
58   | ^^^^^^^^^^^
59
60error: `#[must_use]` has no effect when applied to a type alias
61  --> $DIR/unused_attributes-must_use.rs:61:1
62   |
63LL | #[must_use]
64   | ^^^^^^^^^^^
65
66error: `#[must_use]` has no effect when applied to a type parameter
67  --> $DIR/unused_attributes-must_use.rs:64:8
68   |
69LL | fn qux<#[must_use] T>(_: T) {}
70   |        ^^^^^^^^^^^
71
72error: `#[must_use]` has no effect when applied to an implementation block
73  --> $DIR/unused_attributes-must_use.rs:79:1
74   |
75LL | #[must_use]
76   | ^^^^^^^^^^^
77
78error: `#[must_use]` has no effect when applied to a trait alias
79  --> $DIR/unused_attributes-must_use.rs:84:1
80   |
81LL | #[must_use]
82   | ^^^^^^^^^^^
83
84error: `#[must_use]` has no effect when applied to a macro def
85  --> $DIR/unused_attributes-must_use.rs:87:1
86   |
87LL | #[must_use]
88   | ^^^^^^^^^^^
89
90error: `#[must_use]` has no effect when applied to a statement
91  --> $DIR/unused_attributes-must_use.rs:95:5
92   |
93LL |     #[must_use]
94   |     ^^^^^^^^^^^
95
96error: `#[must_use]` has no effect when applied to a closure
97  --> $DIR/unused_attributes-must_use.rs:99:13
98   |
99LL |     let x = #[must_use]
100   |             ^^^^^^^^^^^
101
102error: `#[must_use]` has no effect when applied to an match arm
103  --> $DIR/unused_attributes-must_use.rs:121:9
104   |
105LL |         #[must_use]
106   |         ^^^^^^^^^^^
107
108error: `#[must_use]` has no effect when applied to a struct field
109  --> $DIR/unused_attributes-must_use.rs:129:28
110   |
111LL |     let s = PatternField { #[must_use]  foo: 123 };
112   |                            ^^^^^^^^^^^
113
114error: `#[must_use]` has no effect when applied to a pattern field
115  --> $DIR/unused_attributes-must_use.rs:130:24
116   |
117LL |     let PatternField { #[must_use] foo } = s;
118   |                        ^^^^^^^^^^^
119
120error: `#[must_use]` has no effect when applied to an associated const
121  --> $DIR/unused_attributes-must_use.rs:68:5
122   |
123LL |     #[must_use]
124   |     ^^^^^^^^^^^
125
126error: `#[must_use]` has no effect when applied to an associated type
127  --> $DIR/unused_attributes-must_use.rs:70:5
128   |
129LL |     #[must_use]
130   |     ^^^^^^^^^^^
131
132error: `#[must_use]` has no effect when applied to a foreign static item
133  --> $DIR/unused_attributes-must_use.rs:50:5
134   |
135LL |     #[must_use]
136   |     ^^^^^^^^^^^
137
138error: unused `X` that must be used
139  --> $DIR/unused_attributes-must_use.rs:103:5
140   |
141LL |     X;
142   |     ^
143   |
144note: the lint level is defined here
145  --> $DIR/unused_attributes-must_use.rs:2:28
146   |
147LL | #![deny(unused_attributes, unused_must_use)]
148   |                            ^^^^^^^^^^^^^^^
149help: use `let _ = ...` to ignore the resulting value
150   |
151LL |     let _ = X;
152   |     +++++++
153
154error: unused `Y` that must be used
155  --> $DIR/unused_attributes-must_use.rs:104:5
156   |
157LL |     Y::Z;
158   |     ^^^^
159   |
160help: use `let _ = ...` to ignore the resulting value
161   |
162LL |     let _ = Y::Z;
163   |     +++++++
164
165error: unused `U` that must be used
166  --> $DIR/unused_attributes-must_use.rs:105:5
167   |
168LL |     U { unit: () };
169   |     ^^^^^^^^^^^^^^
170   |
171help: use `let _ = ...` to ignore the resulting value
172   |
173LL |     let _ = U { unit: () };
174   |     +++++++
175
176error: unused return value of `U::method` that must be used
177  --> $DIR/unused_attributes-must_use.rs:106:5
178   |
179LL |     U::method();
180   |     ^^^^^^^^^^^
181   |
182help: use `let _ = ...` to ignore the resulting value
183   |
184LL |     let _ = U::method();
185   |     +++++++
186
187error: unused return value of `foo` that must be used
188  --> $DIR/unused_attributes-must_use.rs:107:5
189   |
190LL |     foo();
191   |     ^^^^^
192   |
193help: use `let _ = ...` to ignore the resulting value
194   |
195LL |     let _ = foo();
196   |     +++++++
197
198error: unused return value of `foreign_foo` that must be used
199  --> $DIR/unused_attributes-must_use.rs:110:9
200   |
201LL |         foreign_foo();
202   |         ^^^^^^^^^^^^^
203   |
204help: use `let _ = ...` to ignore the resulting value
205   |
206LL |         let _ = foreign_foo();
207   |         +++++++
208
209error: unused return value of `Use::get_four` that must be used
210  --> $DIR/unused_attributes-must_use.rs:118:5
211   |
212LL |     ().get_four();
213   |     ^^^^^^^^^^^^^
214   |
215help: use `let _ = ...` to ignore the resulting value
216   |
217LL |     let _ = ().get_four();
218   |     +++++++
219
220error: aborting due to 28 previous errors
221