]> git.lizzy.rs Git - rust.git/blob - src/test/ui-fulldeps/session-derive-errors.stderr
Auto merge of #91356 - GuillaumeGomez:improve-rustdoc-layout, r=jsha
[rust.git] / src / test / ui-fulldeps / session-derive-errors.stderr
1 error: `#[derive(SessionDiagnostic)]` can only be used on structs
2   --> $DIR/session-derive-errors.rs:34:1
3    |
4 LL | / #[error = "E0123"]
5 LL | |
6 LL | | enum SessionDiagnosticOnEnum {
7 LL | |     Foo,
8 LL | |     Bar,
9 LL | | }
10    | |_^
11
12 error: `#[label = ...]` is not a valid SessionDiagnostic struct attribute
13   --> $DIR/session-derive-errors.rs:43:1
14    |
15 LL | #[label = "This is in the wrong place"]
16    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
18 error: `#[suggestion = ...]` is not a valid SessionDiagnostic field attribute
19   --> $DIR/session-derive-errors.rs:50:5
20    |
21 LL |     #[suggestion = "this is the wrong kind of attribute"]
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
24 error: `error` specified multiple times
25   --> $DIR/session-derive-errors.rs:58:11
26    |
27 LL | #[error = "E0456"]
28    |           ^^^^^^^
29
30 error: `lint` specified when `error` was already specified
31   --> $DIR/session-derive-errors.rs:64:10
32    |
33 LL | #[lint = "some_useful_lint"]
34    |          ^^^^^^^^^^^^^^^^^^
35
36 error: `code` not specified
37   --> $DIR/session-derive-errors.rs:73:1
38    |
39 LL | struct ErrorCodeNotProvided {}
40    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41    |
42    = help: use the [code = "..."] attribute to set this diagnostic's error code 
43
44 error: the `#[message = "..."]` attribute can only be applied to fields of type Span
45   --> $DIR/session-derive-errors.rs:101:5
46    |
47 LL |     #[message = "this message is applied to a String field"]
48    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
50 error: `name` doesn't refer to a field on this type
51   --> $DIR/session-derive-errors.rs:108:1
52    |
53 LL | #[message = "This error has a field, and references {name}"]
54    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56 error: invalid format string: expected `'}'` but string was terminated
57   --> $DIR/session-derive-errors.rs:116:1
58    |
59 LL | #[derive(SessionDiagnostic)]
60    |          ----------------- in this derive macro expansion
61 LL | #[error = "E0123"]
62    |               - because of this opening brace
63 LL | #[message = "This is missing a closing brace: {name"]
64    | ^ expected `'}'` in format string
65    |
66    = note: if you intended to print `{`, you can escape it using `{{`
67    = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
68
69 error: invalid format string: unmatched `}` found
70   --> $DIR/session-derive-errors.rs:125:1
71    |
72 LL | #[derive(SessionDiagnostic)]
73    |          ----------------- in this derive macro expansion
74 LL | #[error = "E0123"]
75 LL | #[message = "This is missing an opening brace: name}"]
76    | ^ unmatched `}` in format string
77    |
78    = note: if you intended to print `}`, you can escape it using `}}`
79    = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
80
81 error: The `#[label = ...]` attribute can only be applied to fields of type Span
82   --> $DIR/session-derive-errors.rs:144:5
83    |
84 LL |     #[label = "See here"]
85    |     ^^^^^^^^^^^^^^^^^^^^^
86
87 error: `nonsense` is not a valid key for `#[suggestion(...)]`
88   --> $DIR/session-derive-errors.rs:169:18
89    |
90 LL |     #[suggestion(nonsense = "This is nonsense")]
91    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
93 error: `msg` is not a valid key for `#[suggestion(...)]`
94   --> $DIR/session-derive-errors.rs:177:18
95    |
96 LL |     #[suggestion(msg = "This is a suggestion")]
97    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98
99 error: missing suggestion message
100   --> $DIR/session-derive-errors.rs:185:7
101    |
102 LL |     #[suggestion(code = "This is suggested code")]
103    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104    |
105    = help: provide a suggestion message using #[suggestion(message = "...")]
106
107 error: wrong field type for suggestion
108   --> $DIR/session-derive-errors.rs:200:5
109    |
110 LL | /     #[suggestion(message = "This is a message", code = "This is suggested code")]
111 LL | |
112 LL | |     suggestion: Applicability,
113    | |_____________________________^
114    |
115    = help: #[suggestion(...)] should be applied to fields of type Span or (Span, Applicability)
116
117 error: type of field annotated with `#[suggestion(...)]` contains more than one Span
118   --> $DIR/session-derive-errors.rs:215:5
119    |
120 LL | /     #[suggestion(message = "This is a message", code = "This is suggested code")]
121 LL | |
122 LL | |     suggestion: (Span, Span, Applicability),
123    | |___________________________________________^
124
125 error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
126   --> $DIR/session-derive-errors.rs:223:5
127    |
128 LL | /     #[suggestion(message = "This is a message", code = "This is suggested code")]
129 LL | |
130 LL | |     suggestion: (Applicability, Applicability, Span),
131    | |____________________________________________________^
132
133 error: invalid annotation list `#[label(...)]`
134   --> $DIR/session-derive-errors.rs:231:7
135    |
136 LL |     #[label("wrong kind of annotation for label")]
137    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138
139 error: aborting due to 18 previous errors
140