Commit 285cb31
authored
Rollup merge of #148405 - Kivooeo:static-span, r=JonathanBrouwer
Fix suggestion when there were a colon already in generics
Finally found time to fix #144215
I don't feel like this `colon_flag` is perfect solution and that it can be refactored, but I'd say that this is pretty good as it, I was tried to refactor this a little, but the thing is the scope where `param.colon_span` lives is very limited, so there is not much time to check was there colon or not, I tried to rewrite this into more functional style to address this, but it becomes way more unreadable than this one or even less performant, maybe some comments could push readability of this fix further, maybe a comment for enum or `colon_flag`?File tree
3 files changed
+59
-12
lines changed- compiler/rustc_trait_selection/src/error_reporting/infer
- tests/ui/generics
3 files changed
+59
-12
lines changedLines changed: 33 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
774 | 774 | | |
775 | 775 | | |
776 | 776 | | |
777 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
| 783 | + | |
781 | 784 | | |
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
785 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
786 | 794 | | |
787 | 795 | | |
788 | 796 | | |
789 | 797 | | |
790 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
791 | 802 | | |
792 | 803 | | |
793 | 804 | | |
| |||
811 | 822 | | |
812 | 823 | | |
813 | 824 | | |
814 | | - | |
| 825 | + | |
815 | 826 | | |
816 | 827 | | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
825 | 840 | | |
826 | 841 | | |
827 | 842 | | |
| |||
1056 | 1071 | | |
1057 | 1072 | | |
1058 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1059 | 1080 | | |
1060 | 1081 | | |
1061 | 1082 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 17 additions & 0 deletions
| 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 | + | |
0 commit comments