1
1
error: `#[derive(SessionDiagnostic)]` can only be used on structs
2
- --> $DIR/session -derive-errors .rs:37:1
2
+ --> $DIR/diagnostic -derive.rs:37:1
3
3
|
4
4
LL | / #[error(code = "E0123", slug = "foo")]
5
5
LL | |
@@ -10,19 +10,19 @@ LL | | }
10
10
| |_^
11
11
12
12
error: `#[error = ...]` is not a valid `SessionDiagnostic` struct attribute
13
- --> $DIR/session -derive-errors .rs:46:1
13
+ --> $DIR/diagnostic -derive.rs:46:1
14
14
|
15
15
LL | #[error = "E0123"]
16
16
| ^^^^^^^^^^^^^^^^^^
17
17
18
18
error: `#[nonsense(...)]` is not a valid `SessionDiagnostic` struct attribute
19
- --> $DIR/session -derive-errors .rs:51:1
19
+ --> $DIR/diagnostic -derive.rs:51:1
20
20
|
21
21
LL | #[nonsense(code = "E0123", slug = "foo")]
22
22
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
23
24
24
error: diagnostic kind not specified
25
- --> $DIR/session -derive-errors .rs:51:1
25
+ --> $DIR/diagnostic -derive.rs:51:1
26
26
|
27
27
LL | / #[nonsense(code = "E0123", slug = "foo")]
28
28
LL | |
@@ -34,13 +34,13 @@ LL | | struct InvalidStructAttr {}
34
34
= help: use the `#[error(...)]` attribute to create an error
35
35
36
36
error: `#[error("...")]` is not a valid `SessionDiagnostic` struct attribute
37
- --> $DIR/session -derive-errors .rs:58:9
37
+ --> $DIR/diagnostic -derive.rs:58:9
38
38
|
39
39
LL | #[error("E0123")]
40
40
| ^^^^^^^
41
41
42
42
error: `slug` not specified
43
- --> $DIR/session -derive-errors .rs:58:1
43
+ --> $DIR/diagnostic -derive.rs:58:1
44
44
|
45
45
LL | / #[error("E0123")]
46
46
LL | |
@@ -51,95 +51,95 @@ LL | | struct InvalidLitNestedAttr {}
51
51
= help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
52
52
53
53
error: `#[error(nonsense)]` is not a valid `SessionDiagnostic` struct attribute
54
- --> $DIR/session -derive-errors .rs:64:9
54
+ --> $DIR/diagnostic -derive.rs:64:9
55
55
|
56
56
LL | #[error(nonsense, code = "E0123", slug = "foo")]
57
57
| ^^^^^^^^
58
58
59
59
error: `#[error(nonsense(...))]` is not a valid `SessionDiagnostic` struct attribute
60
- --> $DIR/session -derive-errors .rs:69:9
60
+ --> $DIR/diagnostic -derive.rs:69:9
61
61
|
62
62
LL | #[error(nonsense("foo"), code = "E0123", slug = "foo")]
63
63
| ^^^^^^^^^^^^^^^
64
64
65
65
error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
66
- --> $DIR/session -derive-errors .rs:74:9
66
+ --> $DIR/diagnostic -derive.rs:74:9
67
67
|
68
68
LL | #[error(nonsense = "...", code = "E0123", slug = "foo")]
69
69
| ^^^^^^^^^^^^^^^^
70
70
71
71
error: `#[error(nonsense = ...)]` is not a valid `SessionDiagnostic` struct attribute
72
- --> $DIR/session -derive-errors .rs:79:9
72
+ --> $DIR/diagnostic -derive.rs:79:9
73
73
|
74
74
LL | #[error(nonsense = 4, code = "E0123", slug = "foo")]
75
75
| ^^^^^^^^^^^^
76
76
|
77
77
= help: value must be a string
78
78
79
79
error: `#[suggestion = ...]` is not a valid `SessionDiagnostic` field attribute
80
- --> $DIR/session -derive-errors .rs:86:5
80
+ --> $DIR/diagnostic -derive.rs:86:5
81
81
|
82
82
LL | #[suggestion = "bar"]
83
83
| ^^^^^^^^^^^^^^^^^^^^^
84
84
85
85
error: `error` specified multiple times
86
- --> $DIR/session -derive-errors .rs:93:1
86
+ --> $DIR/diagnostic -derive.rs:93:1
87
87
|
88
88
LL | #[error(code = "E0456", slug = "bar")]
89
89
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90
90
|
91
91
note: previously specified here
92
- --> $DIR/session -derive-errors .rs:92:1
92
+ --> $DIR/diagnostic -derive.rs:92:1
93
93
|
94
94
LL | #[error(code = "E0123", slug = "foo")]
95
95
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96
96
97
97
error: `warning` specified when `error` was already specified
98
- --> $DIR/session -derive-errors .rs:98:1
98
+ --> $DIR/diagnostic -derive.rs:98:1
99
99
|
100
100
LL | #[warning(code = "E0293", slug = "bar")]
101
101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102
102
|
103
103
note: previously specified here
104
- --> $DIR/session -derive-errors .rs:97:1
104
+ --> $DIR/diagnostic -derive.rs:97:1
105
105
|
106
106
LL | #[error(code = "E0123", slug = "foo")]
107
107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108
108
109
109
error: `code` specified multiple times
110
- --> $DIR/session -derive-errors .rs:103:32
110
+ --> $DIR/diagnostic -derive.rs:103:32
111
111
|
112
112
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
113
113
| ^^^^^^^
114
114
|
115
115
note: previously specified here
116
- --> $DIR/session -derive-errors .rs:103:16
116
+ --> $DIR/diagnostic -derive.rs:103:16
117
117
|
118
118
LL | #[error(code = "E0456", code = "E0457", slug = "bar")]
119
119
| ^^^^^^^
120
120
121
121
error: `slug` specified multiple times
122
- --> $DIR/session -derive-errors .rs:107:46
122
+ --> $DIR/diagnostic -derive.rs:107:46
123
123
|
124
124
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
125
125
| ^^^^^
126
126
|
127
127
note: previously specified here
128
- --> $DIR/session -derive-errors .rs:107:32
128
+ --> $DIR/diagnostic -derive.rs:107:32
129
129
|
130
130
LL | #[error(code = "E0456", slug = "foo", slug = "bar")]
131
131
| ^^^^^
132
132
133
133
error: diagnostic kind not specified
134
- --> $DIR/session -derive-errors .rs:111:1
134
+ --> $DIR/diagnostic -derive.rs:111:1
135
135
|
136
136
LL | struct KindNotProvided {}
137
137
| ^^^^^^^^^^^^^^^^^^^^^^^^^
138
138
|
139
139
= help: use the `#[error(...)]` attribute to create an error
140
140
141
141
error: `slug` not specified
142
- --> $DIR/session -derive-errors .rs:114:1
142
+ --> $DIR/diagnostic -derive.rs:114:1
143
143
|
144
144
LL | / #[error(code = "E0456")]
145
145
LL | | struct SlugNotProvided {}
@@ -148,31 +148,31 @@ LL | | struct SlugNotProvided {}
148
148
= help: use the `#[error(slug = "...")]` attribute to set this diagnostic's slug
149
149
150
150
error: 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
152
152
|
153
153
LL | #[primary_span]
154
154
| ^^^^^^^^^^^^^^^
155
155
156
156
error: `#[nonsense]` is not a valid `SessionDiagnostic` field attribute
157
- --> $DIR/session -derive-errors .rs:132:5
157
+ --> $DIR/diagnostic -derive.rs:132:5
158
158
|
159
159
LL | #[nonsense]
160
160
| ^^^^^^^^^^^
161
161
162
162
error: 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
164
164
|
165
165
LL | #[label = "bar"]
166
166
| ^^^^^^^^^^^^^^^^
167
167
168
168
error: `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
170
170
|
171
171
LL | #[suggestion(message = "bar", code = "{name}")]
172
172
| ^^^^^^^^
173
173
174
174
error: invalid format string: expected `'}'` but string was terminated
175
- --> $DIR/session -derive-errors .rs:162:16
175
+ --> $DIR/diagnostic -derive.rs:162:16
176
176
|
177
177
LL | #[derive(SessionDiagnostic)]
178
178
| - ^ expected `'}'` in format string
@@ -183,7 +183,7 @@ LL | #[derive(SessionDiagnostic)]
183
183
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
184
184
185
185
error: invalid format string: unmatched `}` found
186
- --> $DIR/session -derive-errors .rs:172:15
186
+ --> $DIR/diagnostic -derive.rs:172:15
187
187
|
188
188
LL | #[derive(SessionDiagnostic)]
189
189
| ^ unmatched `}` in format string
@@ -192,25 +192,25 @@ LL | #[derive(SessionDiagnostic)]
192
192
= note: this error originates in the derive macro `SessionDiagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
193
193
194
194
error: 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
196
196
|
197
197
LL | #[label = "bar"]
198
198
| ^^^^^^^^^^^^^^^^
199
199
200
200
error: `#[suggestion(nonsense = ...)]` is not a valid `SessionDiagnostic` field attribute
201
- --> $DIR/session -derive-errors .rs:217:18
201
+ --> $DIR/diagnostic -derive.rs:217:18
202
202
|
203
203
LL | #[suggestion(nonsense = "bar")]
204
204
| ^^^^^^^^^^^^^^^^
205
205
206
206
error: `#[suggestion(msg = ...)]` is not a valid `SessionDiagnostic` field attribute
207
- --> $DIR/session -derive-errors .rs:225:18
207
+ --> $DIR/diagnostic -derive.rs:225:18
208
208
|
209
209
LL | #[suggestion(msg = "bar")]
210
210
| ^^^^^^^^^^^
211
211
212
212
error: wrong field type for suggestion
213
- --> $DIR/session -derive-errors .rs:247:5
213
+ --> $DIR/diagnostic -derive.rs:247:5
214
214
|
215
215
LL | / #[suggestion(message = "bar", code = "This is suggested code")]
216
216
LL | |
@@ -220,65 +220,65 @@ LL | | suggestion: Applicability,
220
220
= help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
221
221
222
222
error: 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
224
224
|
225
225
LL | / #[suggestion(message = "bar", code = "This is suggested code")]
226
226
LL | |
227
227
LL | | suggestion: (Span, Span, Applicability),
228
228
| |___________________________________________^
229
229
230
230
error: 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
232
232
|
233
233
LL | / #[suggestion(message = "bar", code = "This is suggested code")]
234
234
LL | |
235
235
LL | | suggestion: (Applicability, Applicability, Span),
236
236
| |____________________________________________________^
237
237
238
238
error: `#[label(...)]` is not a valid `SessionDiagnostic` field attribute
239
- --> $DIR/session -derive-errors .rs:278:5
239
+ --> $DIR/diagnostic -derive.rs:278:5
240
240
|
241
241
LL | #[label("bar")]
242
242
| ^^^^^^^^^^^^^^^
243
243
244
244
error: `#[help]` must come after `#[error(..)]` or `#[warn(..)]`
245
- --> $DIR/session -derive-errors .rs:399:1
245
+ --> $DIR/diagnostic -derive.rs:399:1
246
246
|
247
247
LL | #[help]
248
248
| ^^^^^^^
249
249
250
250
error: `#[help = ...]` must come after `#[error(..)]` or `#[warn(..)]`
251
- --> $DIR/session -derive-errors .rs:407:1
251
+ --> $DIR/diagnostic -derive.rs:407:1
252
252
|
253
253
LL | #[help = "bar"]
254
254
| ^^^^^^^^^^^^^^^
255
255
256
256
error: `#[note]` must come after `#[error(..)]` or `#[warn(..)]`
257
- --> $DIR/session -derive-errors .rs:415:1
257
+ --> $DIR/diagnostic -derive.rs:415:1
258
258
|
259
259
LL | #[note]
260
260
| ^^^^^^^
261
261
262
262
error: `#[note = ...]` must come after `#[error(..)]` or `#[warn(..)]`
263
- --> $DIR/session -derive-errors .rs:423:1
263
+ --> $DIR/diagnostic -derive.rs:423:1
264
264
|
265
265
LL | #[note = "bar"]
266
266
| ^^^^^^^^^^^^^^^
267
267
268
268
error: cannot find attribute `nonsense` in this scope
269
- --> $DIR/session -derive-errors .rs:51:3
269
+ --> $DIR/diagnostic -derive.rs:51:3
270
270
|
271
271
LL | #[nonsense(code = "E0123", slug = "foo")]
272
272
| ^^^^^^^^
273
273
274
274
error: cannot find attribute `nonsense` in this scope
275
- --> $DIR/session -derive-errors .rs:132:7
275
+ --> $DIR/diagnostic -derive.rs:132:7
276
276
|
277
277
LL | #[nonsense]
278
278
| ^^^^^^^^
279
279
280
280
error[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
282
282
|
283
283
LL | struct Hello {}
284
284
| ------------ method `into_diagnostic_arg` not found for this
0 commit comments