Commit 872124e
authored
Unrolled build for #140622
Rollup merge of #140622 - petrochenkov:annusexp, r=jieyouxu
compiletest: Improve diagnostics for line annotation mismatches
When some line annotations are missing or misplaced, compiletest reports an error, but the error is not very convenient.
This PR attempts to improve the user experience.
- The "expected ... not found" messages are no longer duplicated.
- The `proc_res.status` and `proc_res.cmdline` message is no longer put in the middle of other messages describing the annotation mismatches, it's now put into the end.
- Compiletest now makes suggestions if there are fuzzy matches between expected and actually reported errors (e.g. the annotation is put on a wrong line).
- Missing diagnostic kinds are no longer produce an error eagerly, but instead treated as always mismatching kinds, so they can produce suggestions telling the right kind.
I'll post screenshots in the thread below, but the behavior shown on the screenshots can be reproduced locally using the new test `tests/ui/compiletest-self-test/line-annotation-mismatches.rs`.
This also fixes #140940.
r? ``@jieyouxu``File tree
25 files changed
+297
-111
lines changed- src/tools/compiletest/src
- tests
- incremental
- ui
- argument-suggestions
- async-await
- compiletest-self-test
- feature-gates
- impl-header-lifetime-elision
- imports
- inference
- issues
- lifetimes
- mismatched_types
- sanitizer/cfi
- suggestions
- typeck
- type
25 files changed
+297
-111
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | | - | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
| |||
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
171 | | - | |
172 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
| 149 | + | |
151 | 150 | | |
152 | 151 | | |
153 | 152 | | |
| |||
193 | 192 | | |
194 | 193 | | |
195 | 194 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
215 | 198 | | |
216 | 199 | | |
217 | 200 | | |
| |||
225 | 208 | | |
226 | 209 | | |
227 | 210 | | |
| 211 | + | |
228 | 212 | | |
229 | | - | |
| 213 | + | |
230 | 214 | | |
231 | 215 | | |
232 | 216 | | |
233 | 217 | | |
234 | 218 | | |
235 | 219 | | |
236 | 220 | | |
| 221 | + | |
237 | 222 | | |
238 | | - | |
| 223 | + | |
239 | 224 | | |
240 | 225 | | |
241 | 226 | | |
| |||
244 | 229 | | |
245 | 230 | | |
246 | 231 | | |
| 232 | + | |
247 | 233 | | |
248 | | - | |
| 234 | + | |
249 | 235 | | |
250 | 236 | | |
251 | 237 | | |
252 | 238 | | |
253 | 239 | | |
254 | 240 | | |
| 241 | + | |
255 | 242 | | |
256 | | - | |
| 243 | + | |
257 | 244 | | |
258 | 245 | | |
259 | 246 | | |
| |||
266 | 253 | | |
267 | 254 | | |
268 | 255 | | |
| 256 | + | |
269 | 257 | | |
270 | 258 | | |
271 | 259 | | |
| |||
288 | 276 | | |
289 | 277 | | |
290 | 278 | | |
| 279 | + | |
291 | 280 | | |
292 | 281 | | |
293 | 282 | | |
| |||
310 | 299 | | |
311 | 300 | | |
312 | 301 | | |
| 302 | + | |
313 | 303 | | |
314 | 304 | | |
315 | 305 | | |
| |||
0 commit comments