Commit 7ed6068
authored
Auto merge of #34789 - jonathandturner:simplify_liberror, r=alexcrichton
Simplify librustc_errors
This is part 2 of the error crate refactor, starting with #34403.
In this refactor, I focused on slimming down the error crate to fewer moving parts. As such, I've removed quite a few parts and replaced the with simpler, straight-line code. Specifically, this PR:
* Removes BasicEmitter
* Remove emit from emitter, leaving emit_struct
* Renames emit_struct to emit
* Removes CoreEmitter and focuses on a single Emitter
* Implements the latest changes to error format RFC (#1644)
* Removes (now-unused) code in emitter.rs and snippet.rs
* Moves more tests to the UI tester, removing some duplicate tests in the process
There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state.
r? @alexcrichton cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)File tree
36 files changed
+1550
-2118
lines changed- src
- librustc_driver
- librustc_errors
- librustc_trans/back
- librustc
- infer
- session
- librustdoc
- libsyntax_pos
- libsyntax
- parse
- lexer
- test/ui
- codemap_tests
- mismatched_types
36 files changed
+1550
-2118
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
485 | 485 | | |
486 | 486 | | |
487 | 487 | | |
488 | | - | |
| 488 | + | |
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
442 | | - | |
| 443 | + | |
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| |||
575 | 576 | | |
576 | 577 | | |
577 | 578 | | |
578 | | - | |
| 579 | + | |
579 | 580 | | |
580 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
581 | 585 | | |
582 | 586 | | |
583 | 587 | | |
584 | | - | |
| 588 | + | |
| 589 | + | |
585 | 590 | | |
586 | 591 | | |
587 | 592 | | |
588 | 593 | | |
589 | | - | |
| 594 | + | |
590 | 595 | | |
591 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
592 | 600 | | |
593 | 601 | | |
594 | 602 | | |
595 | | - | |
| 603 | + | |
| 604 | + | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
373 | 379 | | |
374 | 380 | | |
375 | 381 | | |
376 | | - | |
| 382 | + | |
377 | 383 | | |
378 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
379 | 388 | | |
380 | 389 | | |
381 | 390 | | |
| 391 | + | |
382 | 392 | | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
387 | 397 | | |
388 | | - | |
| 398 | + | |
389 | 399 | | |
390 | 400 | | |
391 | | - | |
392 | | - | |
| 401 | + | |
393 | 402 | | |
394 | 403 | | |
395 | 404 | | |
| |||
1046 | 1055 | | |
1047 | 1056 | | |
1048 | 1057 | | |
1049 | | - | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1050 | 1064 | | |
1051 | 1065 | | |
1052 | 1066 | | |
1053 | 1067 | | |
1054 | | - | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1055 | 1071 | | |
1056 | 1072 | | |
1057 | 1073 | | |
1058 | 1074 | | |
1059 | 1075 | | |
1060 | | - | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1061 | 1079 | | |
1062 | 1080 | | |
1063 | 1081 | | |
1064 | 1082 | | |
1065 | 1083 | | |
1066 | | - | |
| 1084 | + | |
1067 | 1085 | | |
1068 | | - | |
1069 | 1086 | | |
1070 | 1087 | | |
1071 | 1088 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
| |||
0 commit comments