Commit dd104ef
committed
Auto merge of #126623 - oli-obk:do_not_count_errors, r=davidtwco
Replace all `&DiagCtxt` with a `DiagCtxtHandle<'_>` wrapper type
r? `@davidtwco`
This paves the way for tracking more state (e.g. error tainting) in the diagnostic context handle
Basically I will add a field to the `DiagCtxtHandle` that refers back to the `InferCtxt`'s (and others) `Option<ErrorHandled>`, allowing us to immediately taint these contexts when emitting an error and not needing manual tainting anymore (which is easy to forget and we don't do in general anyway)File tree
118 files changed
+773
-915
lines changed- compiler
- rustc_ast_lowering/src
- rustc_ast_passes/src
- rustc_attr/src
- rustc_borrowck/src
- diagnostics
- rustc_builtin_macros/src
- rustc_codegen_cranelift/src
- rustc_codegen_gcc/src
- back
- rustc_codegen_llvm/src
- back
- rustc_codegen_ssa/src
- back
- traits
- rustc_const_eval/src
- check_consts
- interpret
- rustc_driver_impl/src
- rustc_errors/src
- json
- rustc_expand/src
- mbe
- rustc_hir_analysis/src
- check
- coherence
- rustc_hir_typeck/src
- fn_ctxt
- method
- rustc_infer/src/infer
- error_reporting
- rustc_interface/src
- rustc_lint/src
- rustc_macros/src/diagnostics
- rustc_metadata/src
- rustc_middle/src
- middle
- ty
- rustc_mir_build/src
- thir/pattern
- rustc_mir_transform/src
- rustc_monomorphize/src
- rustc_parse/src
- lexer
- parser
- rustc_passes/src
- rustc_query_system/src/query
- rustc_resolve/src
- late
- rustc_session/src
- rustc_symbol_mangling/src
- rustc_trait_selection/src
- traits/error_reporting
- src
- librustdoc
- doctest
- tools
- clippy/src
- miri/src
- rustfmt/src/parse
- macros
- tests/ui-fulldeps/internal-lints
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
118 files changed
+773
-915
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
809 | 810 | | |
810 | 811 | | |
811 | 812 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
| 813 | + | |
817 | 814 | | |
818 | 815 | | |
819 | 816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
202 | 203 | | |
203 | 204 | | |
204 | 205 | | |
205 | | - | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 58 additions & 88 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
315 | 312 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
324 | 318 | | |
325 | 319 | | |
326 | 320 | | |
| |||
597 | 591 | | |
598 | 592 | | |
599 | 593 | | |
600 | | - | |
| 594 | + | |
601 | 595 | | |
602 | 596 | | |
603 | 597 | | |
| |||
996 | 990 | | |
997 | 991 | | |
998 | 992 | | |
999 | | - | |
| 993 | + | |
1000 | 994 | | |
1001 | 995 | | |
1002 | 996 | | |
| |||
1084 | 1078 | | |
1085 | 1079 | | |
1086 | 1080 | | |
1087 | | - | |
1088 | | - | |
| 1081 | + | |
| 1082 | + | |
1089 | 1083 | | |
1090 | 1084 | | |
1091 | 1085 | | |
| |||
1410 | 1404 | | |
1411 | 1405 | | |
1412 | 1406 | | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
| 1407 | + | |
1418 | 1408 | | |
1419 | | - | |
| 1409 | + | |
1420 | 1410 | | |
1421 | 1411 | | |
1422 | 1412 | | |
| |||
1468 | 1458 | | |
1469 | 1459 | | |
1470 | 1460 | | |
1471 | | - | |
| 1461 | + | |
1472 | 1462 | | |
1473 | 1463 | | |
1474 | 1464 | | |
| |||
1633 | 1623 | | |
1634 | 1624 | | |
1635 | 1625 | | |
1636 | | - | |
1637 | 1626 | | |
1638 | 1627 | | |
1639 | 1628 | | |
| |||
1730 | 1719 | | |
1731 | 1720 | | |
1732 | 1721 | | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1752 | 1732 | | |
1753 | | - | |
1754 | | - | |
| 1733 | + | |
| 1734 | + | |
1755 | 1735 | | |
1756 | | - | |
1757 | | - | |
1758 | | - | |
1759 | | - | |
1760 | | - | |
1761 | | - | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
1769 | | - | |
1770 | | - | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1771 | 1743 | | |
1772 | | - | |
1773 | | - | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1774 | 1749 | | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
1779 | | - | |
1780 | | - | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
1788 | 1755 | | |
1789 | | - | |
1790 | | - | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
1791 | 1761 | | |
1792 | 1762 | | |
1793 | 1763 | | |
| |||
2016 | 1986 | | |
2017 | 1987 | | |
2018 | 1988 | | |
2019 | | - | |
| 1989 | + | |
2020 | 1990 | | |
2021 | 1991 | | |
2022 | 1992 | | |
| |||
2961 | 2931 | | |
2962 | 2932 | | |
2963 | 2933 | | |
2964 | | - | |
| 2934 | + | |
2965 | 2935 | | |
2966 | 2936 | | |
2967 | 2937 | | |
| |||
3219 | 3189 | | |
3220 | 3190 | | |
3221 | 3191 | | |
3222 | | - | |
| 3192 | + | |
3223 | 3193 | | |
3224 | 3194 | | |
3225 | 3195 | | |
| |||
3680 | 3650 | | |
3681 | 3651 | | |
3682 | 3652 | | |
3683 | | - | |
| 3653 | + | |
3684 | 3654 | | |
3685 | 3655 | | |
3686 | 3656 | | |
| |||
3698 | 3668 | | |
3699 | 3669 | | |
3700 | 3670 | | |
3701 | | - | |
| 3671 | + | |
3702 | 3672 | | |
3703 | 3673 | | |
3704 | 3674 | | |
| |||
0 commit comments