]>
Commit | Line | Data |
---|---|---|
2b03887a | 1 | error: unsupported type attribute for diagnostic derive enum |
4b012472 | 2 | --> $DIR/diagnostic-derive.rs:43:1 |
04454e1e | 3 | | |
9ffffee4 FG |
4 | LL | #[diag(no_crate_example, code = "E0123")] |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
6 | |
7 | error: diagnostic slug not specified | |
4b012472 | 8 | --> $DIR/diagnostic-derive.rs:46:5 |
2b03887a FG |
9 | | |
10 | LL | Foo, | |
11 | | ^^^ | |
12 | | | |
13 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` | |
14 | ||
15 | error: diagnostic slug not specified | |
4b012472 | 16 | --> $DIR/diagnostic-derive.rs:48:5 |
2b03887a FG |
17 | | |
18 | LL | Bar, | |
19 | | ^^^ | |
20 | | | |
21 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` | |
04454e1e | 22 | |
04454e1e | 23 | error: `#[nonsense(...)]` is not a valid attribute |
4b012472 | 24 | --> $DIR/diagnostic-derive.rs:59:1 |
04454e1e | 25 | | |
9ffffee4 FG |
26 | LL | #[nonsense(no_crate_example, code = "E0123")] |
27 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e | 28 | |
f2b60f7d | 29 | error: diagnostic slug not specified |
4b012472 | 30 | --> $DIR/diagnostic-derive.rs:59:1 |
04454e1e | 31 | | |
9ffffee4 | 32 | LL | / #[nonsense(no_crate_example, code = "E0123")] |
04454e1e FG |
33 | LL | | |
34 | LL | | | |
35 | LL | | | |
36 | LL | | struct InvalidStructAttr {} | |
37 | | |___________________________^ | |
38 | | | |
2b03887a | 39 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 40 | |
064997fb | 41 | error: diagnostic slug not specified |
4b012472 | 42 | --> $DIR/diagnostic-derive.rs:66:1 |
04454e1e | 43 | | |
f2b60f7d | 44 | LL | / #[diag("E0123")] |
04454e1e | 45 | LL | | |
04454e1e FG |
46 | LL | | struct InvalidLitNestedAttr {} |
47 | | |______________________________^ | |
48 | | | |
2b03887a | 49 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 50 | |
353b0b11 | 51 | error: diagnostic slug must be the first argument |
4b012472 | 52 | --> $DIR/diagnostic-derive.rs:76:16 |
04454e1e | 53 | | |
f2b60f7d | 54 | LL | #[diag(nonsense("foo"), code = "E0123", slug = "foo")] |
353b0b11 | 55 | | ^ |
064997fb FG |
56 | |
57 | error: diagnostic slug not specified | |
4b012472 | 58 | --> $DIR/diagnostic-derive.rs:76:1 |
064997fb | 59 | | |
f2b60f7d | 60 | LL | / #[diag(nonsense("foo"), code = "E0123", slug = "foo")] |
064997fb FG |
61 | LL | | |
62 | LL | | | |
63 | LL | | struct InvalidNestedStructAttr1 {} | |
64 | | |__________________________________^ | |
65 | | | |
2b03887a | 66 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 67 | |
353b0b11 | 68 | error: unknown argument |
4b012472 | 69 | --> $DIR/diagnostic-derive.rs:82:8 |
2b03887a FG |
70 | | |
71 | LL | #[diag(nonsense = "...", code = "E0123", slug = "foo")] | |
353b0b11 | 72 | | ^^^^^^^^ |
2b03887a | 73 | | |
353b0b11 | 74 | = note: only the `code` parameter is valid after the slug |
064997fb FG |
75 | |
76 | error: diagnostic slug not specified | |
4b012472 | 77 | --> $DIR/diagnostic-derive.rs:82:1 |
064997fb | 78 | | |
f2b60f7d | 79 | LL | / #[diag(nonsense = "...", code = "E0123", slug = "foo")] |
064997fb FG |
80 | LL | | |
81 | LL | | | |
82 | LL | | struct InvalidNestedStructAttr2 {} | |
83 | | |__________________________________^ | |
84 | | | |
2b03887a | 85 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 86 | |
353b0b11 | 87 | error: unknown argument |
4b012472 | 88 | --> $DIR/diagnostic-derive.rs:88:8 |
064997fb | 89 | | |
2b03887a | 90 | LL | #[diag(nonsense = 4, code = "E0123", slug = "foo")] |
353b0b11 | 91 | | ^^^^^^^^ |
2b03887a | 92 | | |
353b0b11 | 93 | = note: only the `code` parameter is valid after the slug |
04454e1e | 94 | |
064997fb | 95 | error: diagnostic slug not specified |
4b012472 | 96 | --> $DIR/diagnostic-derive.rs:88:1 |
04454e1e | 97 | | |
f2b60f7d | 98 | LL | / #[diag(nonsense = 4, code = "E0123", slug = "foo")] |
064997fb FG |
99 | LL | | |
100 | LL | | | |
101 | LL | | struct InvalidNestedStructAttr3 {} | |
102 | | |__________________________________^ | |
04454e1e | 103 | | |
2b03887a | 104 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 105 | |
353b0b11 | 106 | error: unknown argument |
4b012472 | 107 | --> $DIR/diagnostic-derive.rs:94:42 |
04454e1e | 108 | | |
9ffffee4 | 109 | LL | #[diag(no_crate_example, code = "E0123", slug = "foo")] |
353b0b11 | 110 | | ^^^^ |
04454e1e | 111 | | |
353b0b11 | 112 | = note: only the `code` parameter is valid after the slug |
064997fb FG |
113 | |
114 | error: `#[suggestion = ...]` is not a valid attribute | |
4b012472 | 115 | --> $DIR/diagnostic-derive.rs:101:5 |
04454e1e | 116 | | |
064997fb FG |
117 | LL | #[suggestion = "bar"] |
118 | | ^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e FG |
119 | |
120 | error: specified multiple times | |
4b012472 | 121 | --> $DIR/diagnostic-derive.rs:108:8 |
04454e1e | 122 | | |
9ffffee4 FG |
123 | LL | #[diag(no_crate_example, code = "E0456")] |
124 | | ^^^^^^^^^^^^^^^^ | |
04454e1e FG |
125 | | |
126 | note: previously specified here | |
4b012472 | 127 | --> $DIR/diagnostic-derive.rs:107:8 |
04454e1e | 128 | | |
9ffffee4 FG |
129 | LL | #[diag(no_crate_example, code = "E0123")] |
130 | | ^^^^^^^^^^^^^^^^ | |
04454e1e FG |
131 | |
132 | error: specified multiple times | |
4b012472 | 133 | --> $DIR/diagnostic-derive.rs:108:26 |
04454e1e | 134 | | |
9ffffee4 | 135 | LL | #[diag(no_crate_example, code = "E0456")] |
353b0b11 | 136 | | ^^^^ |
04454e1e FG |
137 | | |
138 | note: previously specified here | |
4b012472 | 139 | --> $DIR/diagnostic-derive.rs:107:26 |
04454e1e | 140 | | |
9ffffee4 | 141 | LL | #[diag(no_crate_example, code = "E0123")] |
353b0b11 | 142 | | ^^^^ |
04454e1e FG |
143 | |
144 | error: specified multiple times | |
4b012472 | 145 | --> $DIR/diagnostic-derive.rs:114:42 |
04454e1e | 146 | | |
9ffffee4 | 147 | LL | #[diag(no_crate_example, code = "E0456", code = "E0457")] |
353b0b11 | 148 | | ^^^^ |
04454e1e FG |
149 | | |
150 | note: previously specified here | |
4b012472 | 151 | --> $DIR/diagnostic-derive.rs:114:26 |
064997fb | 152 | | |
9ffffee4 | 153 | LL | #[diag(no_crate_example, code = "E0456", code = "E0457")] |
353b0b11 | 154 | | ^^^^ |
064997fb | 155 | |
353b0b11 | 156 | error: diagnostic slug must be the first argument |
4b012472 | 157 | --> $DIR/diagnostic-derive.rs:119:43 |
2b03887a | 158 | | |
9ffffee4 | 159 | LL | #[diag(no_crate_example, no_crate::example, code = "E0456")] |
353b0b11 | 160 | | ^ |
04454e1e | 161 | |
f2b60f7d | 162 | error: diagnostic slug not specified |
4b012472 | 163 | --> $DIR/diagnostic-derive.rs:124:1 |
04454e1e FG |
164 | | |
165 | LL | struct KindNotProvided {} | |
166 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
167 | | | |
2b03887a | 168 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 169 | |
064997fb | 170 | error: diagnostic slug not specified |
4b012472 | 171 | --> $DIR/diagnostic-derive.rs:127:1 |
04454e1e | 172 | | |
f2b60f7d | 173 | LL | / #[diag(code = "E0456")] |
064997fb | 174 | LL | | |
04454e1e FG |
175 | LL | | struct SlugNotProvided {} |
176 | | |_________________________^ | |
177 | | | |
2b03887a | 178 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
04454e1e | 179 | |
064997fb | 180 | error: the `#[primary_span]` attribute can only be applied to fields of type `Span` or `MultiSpan` |
4b012472 | 181 | --> $DIR/diagnostic-derive.rs:138:5 |
04454e1e FG |
182 | | |
183 | LL | #[primary_span] | |
184 | | ^^^^^^^^^^^^^^^ | |
185 | ||
186 | error: `#[nonsense]` is not a valid attribute | |
4b012472 | 187 | --> $DIR/diagnostic-derive.rs:146:5 |
04454e1e FG |
188 | | |
189 | LL | #[nonsense] | |
190 | | ^^^^^^^^^^^ | |
04454e1e | 191 | |
064997fb | 192 | error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan` |
4b012472 | 193 | --> $DIR/diagnostic-derive.rs:163:5 |
04454e1e | 194 | | |
9ffffee4 FG |
195 | LL | #[label(no_crate_label)] |
196 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e FG |
197 | |
198 | error: `name` doesn't refer to a field on this type | |
4b012472 | 199 | --> $DIR/diagnostic-derive.rs:171:46 |
04454e1e | 200 | | |
9ffffee4 FG |
201 | LL | #[suggestion(no_crate_suggestion, code = "{name}")] |
202 | | ^^^^^^^^ | |
04454e1e FG |
203 | |
204 | error: invalid format string: expected `'}'` but string was terminated | |
4b012472 | 205 | --> $DIR/diagnostic-derive.rs:176:10 |
04454e1e | 206 | | |
2b03887a FG |
207 | LL | #[derive(Diagnostic)] |
208 | | ^^^^^^^^^^ expected `'}'` in format string | |
04454e1e FG |
209 | | |
210 | = note: if you intended to print `{`, you can escape it using `{{` | |
2b03887a | 211 | = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info) |
04454e1e FG |
212 | |
213 | error: invalid format string: unmatched `}` found | |
4b012472 | 214 | --> $DIR/diagnostic-derive.rs:186:10 |
04454e1e | 215 | | |
2b03887a FG |
216 | LL | #[derive(Diagnostic)] |
217 | | ^^^^^^^^^^ unmatched `}` in format string | |
04454e1e FG |
218 | | |
219 | = note: if you intended to print `}`, you can escape it using `}}` | |
2b03887a | 220 | = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info) |
04454e1e | 221 | |
064997fb | 222 | error: the `#[label(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan` |
4b012472 | 223 | --> $DIR/diagnostic-derive.rs:206:5 |
04454e1e | 224 | | |
9ffffee4 FG |
225 | LL | #[label(no_crate_label)] |
226 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
227 | |
228 | error: suggestion without `code = "..."` | |
4b012472 | 229 | --> $DIR/diagnostic-derive.rs:225:5 |
2b03887a | 230 | | |
9ffffee4 FG |
231 | LL | #[suggestion(no_crate_suggestion)] |
232 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e | 233 | |
353b0b11 | 234 | error: invalid nested attribute |
4b012472 | 235 | --> $DIR/diagnostic-derive.rs:233:18 |
04454e1e FG |
236 | | |
237 | LL | #[suggestion(nonsense = "bar")] | |
353b0b11 | 238 | | ^^^^^^^^ |
04454e1e | 239 | | |
fe692bf9 | 240 | = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes |
2b03887a FG |
241 | |
242 | error: suggestion without `code = "..."` | |
4b012472 | 243 | --> $DIR/diagnostic-derive.rs:233:5 |
2b03887a FG |
244 | | |
245 | LL | #[suggestion(nonsense = "bar")] | |
246 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e | 247 | |
353b0b11 | 248 | error: invalid nested attribute |
4b012472 | 249 | --> $DIR/diagnostic-derive.rs:242:18 |
04454e1e FG |
250 | | |
251 | LL | #[suggestion(msg = "bar")] | |
353b0b11 | 252 | | ^^^ |
04454e1e | 253 | | |
fe692bf9 | 254 | = help: only `no_span`, `style`, `code` and `applicability` are valid nested attributes |
2b03887a FG |
255 | |
256 | error: suggestion without `code = "..."` | |
4b012472 | 257 | --> $DIR/diagnostic-derive.rs:242:5 |
2b03887a FG |
258 | | |
259 | LL | #[suggestion(msg = "bar")] | |
260 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
04454e1e FG |
261 | |
262 | error: wrong field type for suggestion | |
4b012472 | 263 | --> $DIR/diagnostic-derive.rs:265:5 |
04454e1e | 264 | | |
9ffffee4 | 265 | LL | / #[suggestion(no_crate_suggestion, code = "This is suggested code")] |
04454e1e FG |
266 | LL | | |
267 | LL | | suggestion: Applicability, | |
268 | | |_____________________________^ | |
269 | | | |
270 | = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)` | |
271 | ||
2b03887a | 272 | error: specified multiple times |
4b012472 | 273 | --> $DIR/diagnostic-derive.rs:281:24 |
04454e1e | 274 | | |
2b03887a FG |
275 | LL | suggestion: (Span, Span, Applicability), |
276 | | ^^^^ | |
277 | | | |
278 | note: previously specified here | |
4b012472 | 279 | --> $DIR/diagnostic-derive.rs:281:18 |
2b03887a FG |
280 | | |
281 | LL | suggestion: (Span, Span, Applicability), | |
282 | | ^^^^ | |
04454e1e | 283 | |
2b03887a | 284 | error: specified multiple times |
4b012472 | 285 | --> $DIR/diagnostic-derive.rs:289:33 |
04454e1e | 286 | | |
2b03887a FG |
287 | LL | suggestion: (Applicability, Applicability, Span), |
288 | | ^^^^^^^^^^^^^ | |
289 | | | |
290 | note: previously specified here | |
4b012472 | 291 | --> $DIR/diagnostic-derive.rs:289:18 |
2b03887a FG |
292 | | |
293 | LL | suggestion: (Applicability, Applicability, Span), | |
294 | | ^^^^^^^^^^^^^ | |
04454e1e | 295 | |
064997fb | 296 | error: `#[label = ...]` is not a valid attribute |
4b012472 | 297 | --> $DIR/diagnostic-derive.rs:296:5 |
04454e1e | 298 | | |
064997fb FG |
299 | LL | #[label = "bar"] |
300 | | ^^^^^^^^^^^^^^^^ | |
04454e1e | 301 | |
2b03887a | 302 | error: specified multiple times |
4b012472 | 303 | --> $DIR/diagnostic-derive.rs:447:5 |
2b03887a | 304 | | |
9ffffee4 | 305 | LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "maybe-incorrect")] |
353b0b11 | 306 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2b03887a FG |
307 | | |
308 | note: previously specified here | |
4b012472 | 309 | --> $DIR/diagnostic-derive.rs:449:24 |
04454e1e | 310 | | |
2b03887a FG |
311 | LL | suggestion: (Span, Applicability), |
312 | | ^^^^^^^^^^^^^ | |
04454e1e FG |
313 | |
314 | error: invalid applicability | |
4b012472 | 315 | --> $DIR/diagnostic-derive.rs:455:69 |
064997fb | 316 | | |
9ffffee4 | 317 | LL | #[suggestion(no_crate_suggestion, code = "...", applicability = "batman")] |
353b0b11 | 318 | | ^^^^^^^^ |
064997fb | 319 | |
353b0b11 | 320 | error: the `#[help(...)]` attribute can only be applied to fields of type `Span`, `MultiSpan`, `bool` or `()` |
4b012472 | 321 | --> $DIR/diagnostic-derive.rs:522:5 |
064997fb | 322 | | |
353b0b11 FG |
323 | LL | #[help(no_crate_help)] |
324 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
325 | ||
326 | error: a diagnostic slug must be the first argument to the attribute | |
4b012472 | 327 | --> $DIR/diagnostic-derive.rs:531:32 |
2b03887a | 328 | | |
353b0b11 FG |
329 | LL | #[label(no_crate_label, foo)] |
330 | | ^ | |
064997fb | 331 | |
fe692bf9 | 332 | error: only `no_span` is a valid nested attribute |
4b012472 | 333 | --> $DIR/diagnostic-derive.rs:539:29 |
064997fb | 334 | | |
9ffffee4 | 335 | LL | #[label(no_crate_label, foo = "...")] |
353b0b11 | 336 | | ^^^ |
064997fb | 337 | |
fe692bf9 | 338 | error: only `no_span` is a valid nested attribute |
4b012472 | 339 | --> $DIR/diagnostic-derive.rs:547:29 |
064997fb | 340 | | |
9ffffee4 | 341 | LL | #[label(no_crate_label, foo("..."))] |
353b0b11 | 342 | | ^^^ |
064997fb | 343 | |
f2b60f7d | 344 | error: `#[primary_span]` is not a valid attribute |
4b012472 | 345 | --> $DIR/diagnostic-derive.rs:559:5 |
f2b60f7d FG |
346 | | |
347 | LL | #[primary_span] | |
348 | | ^^^^^^^^^^^^^^^ | |
349 | | | |
350 | = help: the `primary_span` field attribute is not valid for lint diagnostics | |
351 | ||
352 | error: `#[error(...)]` is not a valid attribute | |
4b012472 | 353 | --> $DIR/diagnostic-derive.rs:579:1 |
f2b60f7d | 354 | | |
9ffffee4 FG |
355 | LL | #[error(no_crate_example, code = "E0123")] |
356 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
f2b60f7d FG |
357 | |
358 | error: diagnostic slug not specified | |
4b012472 | 359 | --> $DIR/diagnostic-derive.rs:579:1 |
f2b60f7d | 360 | | |
9ffffee4 | 361 | LL | / #[error(no_crate_example, code = "E0123")] |
064997fb | 362 | LL | | |
f2b60f7d FG |
363 | LL | | |
364 | LL | | | |
365 | LL | | struct ErrorAttribute {} | |
366 | | |________________________^ | |
367 | | | |
2b03887a | 368 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
f2b60f7d FG |
369 | |
370 | error: `#[warn_(...)]` is not a valid attribute | |
4b012472 | 371 | --> $DIR/diagnostic-derive.rs:586:1 |
04454e1e | 372 | | |
9ffffee4 FG |
373 | LL | #[warn_(no_crate_example, code = "E0123")] |
374 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
064997fb | 375 | |
f2b60f7d | 376 | error: diagnostic slug not specified |
4b012472 | 377 | --> $DIR/diagnostic-derive.rs:586:1 |
064997fb | 378 | | |
9ffffee4 | 379 | LL | / #[warn_(no_crate_example, code = "E0123")] |
064997fb | 380 | LL | | |
f2b60f7d FG |
381 | LL | | |
382 | LL | | | |
383 | LL | | struct WarnAttribute {} | |
384 | | |_______________________^ | |
064997fb | 385 | | |
2b03887a | 386 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
f2b60f7d FG |
387 | |
388 | error: `#[lint(...)]` is not a valid attribute | |
4b012472 | 389 | --> $DIR/diagnostic-derive.rs:593:1 |
f2b60f7d | 390 | | |
9ffffee4 FG |
391 | LL | #[lint(no_crate_example, code = "E0123")] |
392 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
f2b60f7d FG |
393 | |
394 | error: diagnostic slug not specified | |
4b012472 | 395 | --> $DIR/diagnostic-derive.rs:593:1 |
f2b60f7d | 396 | | |
9ffffee4 | 397 | LL | / #[lint(no_crate_example, code = "E0123")] |
f2b60f7d FG |
398 | LL | | |
399 | LL | | | |
400 | LL | | | |
401 | LL | | struct LintAttributeOnSessionDiag {} | |
402 | | |____________________________________^ | |
403 | | | |
2b03887a | 404 | = help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]` |
f2b60f7d FG |
405 | |
406 | error: `#[lint(...)]` is not a valid attribute | |
4b012472 | 407 | --> $DIR/diagnostic-derive.rs:600:1 |
f2b60f7d | 408 | | |
9ffffee4 FG |
409 | LL | #[lint(no_crate_example, code = "E0123")] |
410 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
411 | |
412 | error: `#[lint(...)]` is not a valid attribute | |
4b012472 | 413 | --> $DIR/diagnostic-derive.rs:600:1 |
f2b60f7d | 414 | | |
9ffffee4 FG |
415 | LL | #[lint(no_crate_example, code = "E0123")] |
416 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
ed00b5ec FG |
417 | | |
418 | = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` | |
f2b60f7d FG |
419 | |
420 | error: diagnostic slug not specified | |
4b012472 | 421 | --> $DIR/diagnostic-derive.rs:600:1 |
f2b60f7d | 422 | | |
9ffffee4 | 423 | LL | / #[lint(no_crate_example, code = "E0123")] |
2b03887a | 424 | LL | | |
f2b60f7d FG |
425 | LL | | |
426 | LL | | | |
427 | LL | | | |
428 | LL | | struct LintAttributeOnLintDiag {} | |
429 | | |_________________________________^ | |
430 | | | |
2b03887a FG |
431 | = help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]` |
432 | ||
433 | error: specified multiple times | |
4b012472 | 434 | --> $DIR/diagnostic-derive.rs:610:53 |
2b03887a | 435 | | |
9ffffee4 | 436 | LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")] |
353b0b11 | 437 | | ^^^^ |
2b03887a FG |
438 | | |
439 | note: previously specified here | |
4b012472 | 440 | --> $DIR/diagnostic-derive.rs:610:39 |
2b03887a | 441 | | |
9ffffee4 | 442 | LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")] |
353b0b11 | 443 | | ^^^^ |
2b03887a FG |
444 | |
445 | error: wrong types for suggestion | |
4b012472 | 446 | --> $DIR/diagnostic-derive.rs:619:24 |
2b03887a FG |
447 | | |
448 | LL | suggestion: (Span, usize), | |
449 | | ^^^^^ | |
450 | | | |
451 | = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)` | |
452 | ||
453 | error: wrong types for suggestion | |
4b012472 | 454 | --> $DIR/diagnostic-derive.rs:627:17 |
2b03887a FG |
455 | | |
456 | LL | suggestion: (Span,), | |
457 | | ^^^^^^^ | |
458 | | | |
459 | = help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)` | |
460 | ||
461 | error: suggestion without `code = "..."` | |
4b012472 | 462 | --> $DIR/diagnostic-derive.rs:634:5 |
2b03887a | 463 | | |
9ffffee4 FG |
464 | LL | #[suggestion(no_crate_suggestion)] |
465 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
466 | |
467 | error: `#[multipart_suggestion(...)]` is not a valid attribute | |
4b012472 | 468 | --> $DIR/diagnostic-derive.rs:641:1 |
2b03887a | 469 | | |
9ffffee4 FG |
470 | LL | #[multipart_suggestion(no_crate_suggestion)] |
471 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
472 | | |
473 | = help: consider creating a `Subdiagnostic` instead | |
474 | ||
add651ee | 475 | error: `#[multipart_suggestion(...)]` is not a valid attribute |
4b012472 | 476 | --> $DIR/diagnostic-derive.rs:644:1 |
add651ee FG |
477 | | |
478 | LL | #[multipart_suggestion()] | |
479 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ | |
480 | | | |
481 | = help: consider creating a `Subdiagnostic` instead | |
482 | ||
2b03887a | 483 | error: `#[multipart_suggestion(...)]` is not a valid attribute |
4b012472 | 484 | --> $DIR/diagnostic-derive.rs:648:5 |
2b03887a | 485 | | |
9ffffee4 FG |
486 | LL | #[multipart_suggestion(no_crate_suggestion)] |
487 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
488 | | |
489 | = help: consider creating a `Subdiagnostic` instead | |
490 | ||
491 | error: `#[suggestion(...)]` is not a valid attribute | |
4b012472 | 492 | --> $DIR/diagnostic-derive.rs:656:1 |
2b03887a | 493 | | |
9ffffee4 FG |
494 | LL | #[suggestion(no_crate_suggestion, code = "...")] |
495 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a FG |
496 | | |
497 | = help: `#[label]` and `#[suggestion]` can only be applied to fields | |
498 | ||
499 | error: `#[label]` is not a valid attribute | |
4b012472 | 500 | --> $DIR/diagnostic-derive.rs:665:1 |
2b03887a FG |
501 | | |
502 | LL | #[label] | |
503 | | ^^^^^^^^ | |
504 | | | |
505 | = help: `#[label]` and `#[suggestion]` can only be applied to fields | |
506 | ||
353b0b11 | 507 | error: `eager` is the only supported nested attribute for `subdiagnostic` |
4b012472 | 508 | --> $DIR/diagnostic-derive.rs:699:7 |
2b03887a FG |
509 | | |
510 | LL | #[subdiagnostic(bad)] | |
353b0b11 | 511 | | ^^^^^^^^^^^^^^^^^^ |
2b03887a FG |
512 | |
513 | error: `#[subdiagnostic = ...]` is not a valid attribute | |
4b012472 | 514 | --> $DIR/diagnostic-derive.rs:707:5 |
2b03887a FG |
515 | | |
516 | LL | #[subdiagnostic = "bad"] | |
517 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
2b03887a | 518 | |
353b0b11 | 519 | error: `eager` is the only supported nested attribute for `subdiagnostic` |
4b012472 | 520 | --> $DIR/diagnostic-derive.rs:715:7 |
2b03887a FG |
521 | | |
522 | LL | #[subdiagnostic(bad, bad)] | |
353b0b11 | 523 | | ^^^^^^^^^^^^^^^^^^^^^^^ |
2b03887a | 524 | |
353b0b11 | 525 | error: `eager` is the only supported nested attribute for `subdiagnostic` |
4b012472 | 526 | --> $DIR/diagnostic-derive.rs:723:7 |
2b03887a FG |
527 | | |
528 | LL | #[subdiagnostic("bad")] | |
353b0b11 | 529 | | ^^^^^^^^^^^^^^^^^^^^ |
2b03887a FG |
530 | |
531 | error: `#[subdiagnostic(...)]` is not a valid attribute | |
4b012472 | 532 | --> $DIR/diagnostic-derive.rs:731:5 |
2b03887a FG |
533 | | |
534 | LL | #[subdiagnostic(eager)] | |
535 | | ^^^^^^^^^^^^^^^^^^^^^^^ | |
536 | | | |
537 | = help: eager subdiagnostics are not supported on lints | |
538 | ||
539 | error: expected at least one string literal for `code(...)` | |
4b012472 | 540 | --> $DIR/diagnostic-derive.rs:789:23 |
2b03887a FG |
541 | | |
542 | LL | #[suggestion(code())] | |
353b0b11 | 543 | | ^ |
2b03887a FG |
544 | |
545 | error: `code(...)` must contain only string literals | |
4b012472 | 546 | --> $DIR/diagnostic-derive.rs:797:23 |
353b0b11 FG |
547 | | |
548 | LL | #[suggestion(code(foo))] | |
549 | | ^^^ | |
550 | ||
9ffffee4 | 551 | error: `#[suggestion(...)]` is not a valid attribute |
4b012472 | 552 | --> $DIR/diagnostic-derive.rs:821:5 |
9ffffee4 FG |
553 | | |
554 | LL | #[suggestion(no_crate_suggestion, code = "")] | |
555 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
556 | | | |
557 | = note: `#[suggestion(...)]` applied to `Vec` field is ambiguous | |
558 | = help: to show a suggestion consisting of multiple parts, use a `Subdiagnostic` annotated with `#[multipart_suggestion(...)]` | |
559 | = help: to show a variable set of suggestions, use a `Vec` of `Subdiagnostic`s annotated with `#[suggestion(...)]` | |
560 | ||
add651ee | 561 | error[E0433]: failed to resolve: maybe a missing crate `core`? |
4b012472 | 562 | --> $DIR/diagnostic-derive.rs:54:8 |
add651ee FG |
563 | | |
564 | LL | #[diag = "E0123"] | |
565 | | ^ maybe a missing crate `core`? | |
566 | ||
567 | error[E0433]: failed to resolve: maybe a missing crate `core`? | |
4b012472 | 568 | --> $DIR/diagnostic-derive.rs:797:23 |
add651ee FG |
569 | | |
570 | LL | #[suggestion(code(foo))] | |
571 | | ^^^ maybe a missing crate `core`? | |
572 | ||
573 | error[E0433]: failed to resolve: maybe a missing crate `core`? | |
4b012472 | 574 | --> $DIR/diagnostic-derive.rs:806:25 |
add651ee FG |
575 | | |
576 | LL | #[suggestion(code = 3)] | |
577 | | ^ maybe a missing crate `core`? | |
578 | ||
04454e1e | 579 | error: cannot find attribute `nonsense` in this scope |
4b012472 | 580 | --> $DIR/diagnostic-derive.rs:59:3 |
04454e1e | 581 | | |
9ffffee4 | 582 | LL | #[nonsense(no_crate_example, code = "E0123")] |
04454e1e FG |
583 | | ^^^^^^^^ |
584 | ||
585 | error: cannot find attribute `nonsense` in this scope | |
4b012472 | 586 | --> $DIR/diagnostic-derive.rs:146:7 |
04454e1e FG |
587 | | |
588 | LL | #[nonsense] | |
589 | | ^^^^^^^^ | |
590 | ||
f2b60f7d | 591 | error: cannot find attribute `error` in this scope |
4b012472 | 592 | --> $DIR/diagnostic-derive.rs:579:3 |
f2b60f7d | 593 | | |
9ffffee4 | 594 | LL | #[error(no_crate_example, code = "E0123")] |
f2b60f7d FG |
595 | | ^^^^^ |
596 | ||
597 | error: cannot find attribute `warn_` in this scope | |
4b012472 | 598 | --> $DIR/diagnostic-derive.rs:586:3 |
f2b60f7d | 599 | | |
9ffffee4 | 600 | LL | #[warn_(no_crate_example, code = "E0123")] |
f2b60f7d FG |
601 | | ^^^^^ help: a built-in attribute with a similar name exists: `warn` |
602 | ||
603 | error: cannot find attribute `lint` in this scope | |
4b012472 | 604 | --> $DIR/diagnostic-derive.rs:593:3 |
f2b60f7d | 605 | | |
9ffffee4 | 606 | LL | #[lint(no_crate_example, code = "E0123")] |
f2b60f7d FG |
607 | | ^^^^ help: a built-in attribute with a similar name exists: `link` |
608 | ||
609 | error: cannot find attribute `lint` in this scope | |
4b012472 | 610 | --> $DIR/diagnostic-derive.rs:600:3 |
f2b60f7d | 611 | | |
9ffffee4 | 612 | LL | #[lint(no_crate_example, code = "E0123")] |
f2b60f7d FG |
613 | | ^^^^ help: a built-in attribute with a similar name exists: `link` |
614 | ||
2b03887a | 615 | error: cannot find attribute `multipart_suggestion` in this scope |
4b012472 | 616 | --> $DIR/diagnostic-derive.rs:641:3 |
2b03887a | 617 | | |
9ffffee4 | 618 | LL | #[multipart_suggestion(no_crate_suggestion)] |
2b03887a FG |
619 | | ^^^^^^^^^^^^^^^^^^^^ |
620 | ||
621 | error: cannot find attribute `multipart_suggestion` in this scope | |
4b012472 | 622 | --> $DIR/diagnostic-derive.rs:644:3 |
2b03887a FG |
623 | | |
624 | LL | #[multipart_suggestion()] | |
625 | | ^^^^^^^^^^^^^^^^^^^^ | |
626 | ||
627 | error: cannot find attribute `multipart_suggestion` in this scope | |
4b012472 | 628 | --> $DIR/diagnostic-derive.rs:648:7 |
2b03887a | 629 | | |
9ffffee4 | 630 | LL | #[multipart_suggestion(no_crate_suggestion)] |
2b03887a FG |
631 | | ^^^^^^^^^^^^^^^^^^^^ |
632 | ||
9ffffee4 | 633 | error[E0425]: cannot find value `nonsense` in module `crate::fluent_generated` |
4b012472 | 634 | --> $DIR/diagnostic-derive.rs:71:8 |
064997fb | 635 | | |
f2b60f7d | 636 | LL | #[diag(nonsense, code = "E0123")] |
9ffffee4 | 637 | | ^^^^^^^^ not found in `crate::fluent_generated` |
064997fb | 638 | |
353b0b11 | 639 | error[E0425]: cannot find value `__code_34` in this scope |
4b012472 | 640 | --> $DIR/diagnostic-derive.rs:803:10 |
353b0b11 FG |
641 | | |
642 | LL | #[derive(Diagnostic)] | |
643 | | ^^^^^^^^^^ not found in this scope | |
644 | | | |
645 | = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info) | |
646 | ||
04454e1e | 647 | error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied |
4b012472 | 648 | --> $DIR/diagnostic-derive.rs:345:12 |
04454e1e | 649 | | |
2b03887a | 650 | LL | #[derive(Diagnostic)] |
49aad941 FG |
651 | | ---------- required by a bound introduced by this call |
652 | ... | |
653 | LL | other: Hello, | |
654 | | ^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello` | |
04454e1e | 655 | | |
064997fb | 656 | = help: normalized in stderr |
04454e1e | 657 | note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg` |
f2b60f7d | 658 | --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC |
49aad941 | 659 | = note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info) |
04454e1e | 660 | |
9ffffee4 | 661 | error: aborting due to 84 previous errors |
04454e1e | 662 | |
add651ee | 663 | Some errors have detailed explanations: E0277, E0425, E0433. |
064997fb | 664 | For more information about an error, try `rustc --explain E0277`. |