11error: `#[derive(SessionDiagnostic)]` can only be used on structs
2- --> $DIR/session -derive-errors .rs:37:1
2+ --> $DIR/diagnostic -derive.rs:37:1
33 |
44LL | / #[error(code = "E0123", slug = "foo")]
55LL | |
@@ -10,19 +10,19 @@ LL | | }
1010 | |_^
1111
1212error: `#[error = ...]` is not a valid `SessionDiagnostic` struct attribute
13- --> $DIR/session -derive-errors .rs:46:1
13+ --> $DIR/diagnostic -derive.rs:46:1
1414 |
1515LL | #[error = "E0123"]
1616 | ^^^^^^^^^^^^^^^^^^
1717
1818error: `#[nonsense(...)]` is not a valid `SessionDiagnostic` struct attribute
19- --> $DIR/session -derive-errors .rs:51:1
19+ --> $DIR/diagnostic -derive.rs:51:1
2020 |
2121LL | #[nonsense(code = "E0123", slug = "foo")]
2222 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
2424error: diagnostic kind not specified
25- --> $DIR/session -derive-errors .rs:51:1
25+ --> $DIR/diagnostic -derive.rs:51:1
2626 |
2727LL | / #[nonsense(code = "E0123", slug = "foo")]
2828LL | |
@@ -34,13 +34,13 @@ LL | | struct InvalidStructAttr {}
3434 = help: use the `#[error(...)]` attribute to create an error
3535
3636error: `#[error("...")]` is not a valid `SessionDiagnostic` struct attribute
37- --> $DIR/session -derive-errors .rs:58:9
37+ --> $DIR/diagnostic -derive.rs:58:9
3838 |
3939LL | #[error("E0123")]
4040 | ^^^^^^^
4141
4242error: `slug` not specified
43- --> $DIR/session -derive-errors .rs:58:1
43+ --> $DIR/diagnostic -derive.rs:58:1
4444 |
4545LL | / #[error("E0123")]
4646LL | |
@@ -51,95 +51,95 @@ LL | | struct InvalidLitNestedAttr {}
5151 = help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
5252
5353error: `#[error(nonsense)]` is not a valid `SessionDiagnostic` struct attribute
54- --> $DIR/session -derive-errors .rs:64:9
54+ --> $DIR/diagnostic -derive.rs:64:9
5555 |
5656LL | #[error(nonsense, code = "E0123", slug = "foo")]
5757 | ^^^^^^^^
5858
5959error: `#[error(nonsense(...))]` is not a valid `SessionDiagnostic` struct attribute
60- --> $DIR/session -derive-errors .rs:69:9
60+ --> $DIR/diagnostic -derive.rs:69:9
6161 |
6262LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
6363 | ^^^^^^^^^^^^^^^
6464
6565error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
66- --> $DIR/session -derive-errors .rs:74:9
66+ --> $DIR/diagnostic -derive.rs:74:9
6767 |
6868LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
6969 | ^^^^^^^^^^^^^^^^
7070
7171error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
72- --> $DIR/session -derive-errors .rs:79:9
72+ --> $DIR/diagnostic -derive.rs:79:9
7373 |
7474LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
7575 | ^^^^^^^^^^^^
7676 |
7777 = help: value must be a string
7878
7979error: `#[suggestion = ...]` is not a valid `SessionDiagnostic` field attribute
80- --> $DIR/session -derive-errors .rs:86:5
80+ --> $DIR/diagnostic -derive.rs:86:5
8181 |
8282LL | #[suggestion = "bar"]
8383 | ^^^^^^^^^^^^^^^^^^^^^
8484
8585error: `error` specified multiple times
86- --> $DIR/session -derive-errors .rs:93:1
86+ --> $DIR/diagnostic -derive.rs:93:1
8787 |
8888LL | #[error(code = "E0456", slug = "bar")]
8989 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9090 |
9191note: previously specified here
92- --> $DIR/session -derive-errors .rs:92:1
92+ --> $DIR/diagnostic -derive.rs:92:1
9393 |
9494LL | #[error(code = "E0123", slug = "foo")]
9595 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9696
9797error: `warning` specified when `error` was already specified
98- --> $DIR/session -derive-errors .rs:98:1
98+ --> $DIR/diagnostic -derive.rs:98:1
9999 |
100100LL | #[warning(code = "E0293", slug = "bar")]
101101 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102 |
103103note: previously specified here
104- --> $DIR/session -derive-errors .rs:97:1
104+ --> $DIR/diagnostic -derive.rs:97:1
105105 |
106106LL | #[error(code = "E0123", slug = "foo")]
107107 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108108
109109error: `code` specified multiple times
110- --> $DIR/session -derive-errors .rs:103:32
110+ --> $DIR/diagnostic -derive.rs:103:32
111111 |
112112LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
113113 | ^^^^^^^
114114 |
115115note: previously specified here
116- --> $DIR/session -derive-errors .rs:103:16
116+ --> $DIR/diagnostic -derive.rs:103:16
117117 |
118118LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
119119 | ^^^^^^^
120120
121121error: `slug` specified multiple times
122- --> $DIR/session -derive-errors .rs:107:46
122+ --> $DIR/diagnostic -derive.rs:107:46
123123 |
124124LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
125125 | ^^^^^
126126 |
127127note: previously specified here
128- --> $DIR/session -derive-errors .rs:107:32
128+ --> $DIR/diagnostic -derive.rs:107:32
129129 |
130130LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
131131 | ^^^^^
132132
133133error: diagnostic kind not specified
134- --> $DIR/session -derive-errors .rs:111:1
134+ --> $DIR/diagnostic -derive.rs:111:1
135135 |
136136LL | struct KindNotProvided {}
137137 | ^^^^^^^^^^^^^^^^^^^^^^^^^
138138 |
139139 = help: use the `#[error(...)]` attribute to create an error
140140
141141error: `slug` not specified
142- --> $DIR/session -derive-errors .rs:114:1
142+ --> $DIR/diagnostic -derive.rs:114:1
143143 |
144144LL | / #[error(code = "E0456")]
145145LL | | struct SlugNotProvided {}
@@ -148,31 +148,31 @@ LL | | struct SlugNotProvided {}
148148 = help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
149149
150150error: the `#[primary_span]` attribute can only be applied to fields of type `Span`
151- --> $DIR/session -derive-errors .rs:124:5
151+ --> $DIR/diagnostic -derive.rs:124:5
152152 |
153153LL | #[primary_span]
154154 | ^^^^^^^^^^^^^^^
155155
156156error: `#[nonsense]` is not a valid `SessionDiagnostic` field attribute
157- --> $DIR/session -derive-errors .rs:132:5
157+ --> $DIR/diagnostic -derive.rs:132:5
158158 |
159159LL | #[nonsense]
160160 | ^^^^^^^^^^^
161161
162162error: the `#[label = ...]` attribute can only be applied to fields of type `Span`
163- --> $DIR/session -derive-errors .rs:149:5
163+ --> $DIR/diagnostic -derive.rs:149:5
164164 |
165165LL | #[label = "bar"]
166166 | ^^^^^^^^^^^^^^^^
167167
168168error: `name` doesn't refer to a field on this type
169- --> $DIR/session -derive-errors .rs:157:42
169+ --> $DIR/diagnostic -derive.rs:157:42
170170 |
171171LL | #[suggestion(message = "bar", code = "{name}")]
172172 | ^^^^^^^^
173173
174174error: invalid format string: expected `'}'` but string was terminated
175- --> $DIR/session -derive-errors .rs:162:16
175+ --> $DIR/diagnostic -derive.rs:162:16
176176 |
177177LL | #[derive(SessionDiagnostic)]
178178 | - ^ expected `'}'` in format string
@@ -183,7 +183,7 @@ LL | #[derive(SessionDiagnostic)]
183183 = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
184184
185185error: invalid format string: unmatched `}` found
186- --> $DIR/session -derive-errors .rs:172:15
186+ --> $DIR/diagnostic -derive.rs:172:15
187187 |
188188LL | #[derive(SessionDiagnostic)]
189189 | ^ unmatched `}` in format string
@@ -192,25 +192,25 @@ LL | #[derive(SessionDiagnostic)]
192192 = note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
193193
194194error: the `#[label = ...]` attribute can only be applied to fields of type `Span`
195- --> $DIR/session -derive-errors .rs:192:5
195+ --> $DIR/diagnostic -derive.rs:192:5
196196 |
197197LL | #[label = "bar"]
198198 | ^^^^^^^^^^^^^^^^
199199
200200error: `#[suggestion(nonsense = ...)]` is not a valid `SessionDiagnostic` field attribute
201- --> $DIR/session -derive-errors .rs:217:18
201+ --> $DIR/diagnostic -derive.rs:217:18
202202 |
203203LL | #[suggestion(nonsense = "bar")]
204204 | ^^^^^^^^^^^^^^^^
205205
206206error: `#[suggestion(msg = ...)]` is not a valid `SessionDiagnostic` field attribute
207- --> $DIR/session -derive-errors .rs:225:18
207+ --> $DIR/diagnostic -derive.rs:225:18
208208 |
209209LL | #[suggestion(msg = "bar")]
210210 | ^^^^^^^^^^^
211211
212212error: wrong field type for suggestion
213- --> $DIR/session -derive-errors .rs:247:5
213+ --> $DIR/diagnostic -derive.rs:247:5
214214 |
215215LL | / #[suggestion(message = "bar", code = "This is suggested code")]
216216LL | |
@@ -220,65 +220,65 @@ LL | | suggestion: Applicability,
220220 = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
221221
222222error: type of field annotated with `#[suggestion(...)]` contains more than one `Span`
223- --> $DIR/session -derive-errors .rs:262:5
223+ --> $DIR/diagnostic -derive.rs:262:5
224224 |
225225LL | / #[suggestion(message = "bar", code = "This is suggested code")]
226226LL | |
227227LL | | suggestion: (Span, Span, Applicability),
228228 | |___________________________________________^
229229
230230error: type of field annotated with `#[suggestion(...)]` contains more than one Applicability
231- --> $DIR/session -derive-errors .rs:270:5
231+ --> $DIR/diagnostic -derive.rs:270:5
232232 |
233233LL | / #[suggestion(message = "bar", code = "This is suggested code")]
234234LL | |
235235LL | | suggestion: (Applicability, Applicability, Span),
236236 | |____________________________________________________^
237237
238238error: `#[label(...)]` is not a valid `SessionDiagnostic` field attribute
239- --> $DIR/session -derive-errors .rs:278:5
239+ --> $DIR/diagnostic -derive.rs:278:5
240240 |
241241LL | #[label("bar")]
242242 | ^^^^^^^^^^^^^^^
243243
244244error: `#[help]` must come after `#[error(..)]` or `#[warn(..)]`
245- --> $DIR/session -derive-errors .rs:399:1
245+ --> $DIR/diagnostic -derive.rs:399:1
246246 |
247247LL | #[help]
248248 | ^^^^^^^
249249
250250error: `#[help = ...]` must come after `#[error(..)]` or `#[warn(..)]`
251- --> $DIR/session -derive-errors .rs:407:1
251+ --> $DIR/diagnostic -derive.rs:407:1
252252 |
253253LL | #[help = "bar"]
254254 | ^^^^^^^^^^^^^^^
255255
256256error: `#[note]` must come after `#[error(..)]` or `#[warn(..)]`
257- --> $DIR/session -derive-errors .rs:415:1
257+ --> $DIR/diagnostic -derive.rs:415:1
258258 |
259259LL | #[note]
260260 | ^^^^^^^
261261
262262error: `#[note = ...]` must come after `#[error(..)]` or `#[warn(..)]`
263- --> $DIR/session -derive-errors .rs:423:1
263+ --> $DIR/diagnostic -derive.rs:423:1
264264 |
265265LL | #[note = "bar"]
266266 | ^^^^^^^^^^^^^^^
267267
268268error: cannot find attribute `nonsense` in this scope
269- --> $DIR/session -derive-errors .rs:51:3
269+ --> $DIR/diagnostic -derive.rs:51:3
270270 |
271271LL | #[nonsense(code = "E0123", slug = "foo")]
272272 | ^^^^^^^^
273273
274274error: cannot find attribute `nonsense` in this scope
275- --> $DIR/session -derive-errors .rs:132:7
275+ --> $DIR/diagnostic -derive.rs:132:7
276276 |
277277LL | #[nonsense]
278278 | ^^^^^^^^
279279
280280error[E0599]: no method named `into_diagnostic_arg` found for struct `Hello` in the current scope
281- --> $DIR/session -derive-errors .rs:322:10
281+ --> $DIR/diagnostic -derive.rs:322:10
282282 |
283283LL | struct Hello {}
284284 | ------------ method `into_diagnostic_arg` not found for this
0 commit comments