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