Commit 0cb2ee2
committed
Auto merge of #32877 - oli-obk:const_err_multi, r=arielb1
don't report errors in constants at every use site
partially fixes #32842
r? @arielb1
cc @retep998
I chose this way of implementing it, because the alternative (checking if the error span is inside the constant's expressions's span) would get confusing when combined with expression generating macros.
A next step would be to re-enable the re-reporting of errors if the original erroneous constant is in another crate.File tree
6 files changed
+54
-7
lines changed- src
- librustc_const_eval
- librustc_passes
- librustc_typeck
- test/compile-fail
6 files changed
+54
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
| |||
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
| 484 | + | |
483 | 485 | | |
484 | 486 | | |
485 | 487 | | |
| |||
696 | 698 | | |
697 | 699 | | |
698 | 700 | | |
| 701 | + | |
| 702 | + | |
699 | 703 | | |
700 | 704 | | |
701 | 705 | | |
| |||
737 | 741 | | |
738 | 742 | | |
739 | 743 | | |
740 | | - | |
| 744 | + | |
741 | 745 | | |
742 | 746 | | |
743 | 747 | | |
744 | 748 | | |
745 | | - | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
746 | 756 | | |
747 | 757 | | |
748 | 758 | | |
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
752 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
753 | 769 | | |
754 | 770 | | |
755 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
1693 | 1694 | | |
1694 | 1695 | | |
1695 | 1696 | | |
1696 | | - | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
1697 | 1701 | | |
1698 | 1702 | | |
1699 | 1703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
1062 | 1063 | | |
1063 | 1064 | | |
1064 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1065 | 1069 | | |
1066 | 1070 | | |
1067 | 1071 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments