Commit 7e94641
committed
Fix SourceMap::start_point
`start_point` needs to return the *first* character's span, but it would
previously call `find_width_of_character_at_span` which returns the span
of the *last* character. The implementation is now fixed.
Other changes:
- Docs for start_point, end_point, find_width_of_character_at_span
updated
- Minor simplification in find_width_of_character_at_span code
Fixes #818001 parent 36ecbc9 commit 7e94641
File tree
3 files changed
+51
-12
lines changed- compiler/rustc_span/src
- src/test/ui/span
3 files changed
+51
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
| 780 | + | |
781 | 781 | | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
787 | 806 | | |
788 | 807 | | |
789 | | - | |
| 808 | + | |
790 | 809 | | |
791 | 810 | | |
792 | 811 | | |
| |||
815 | 834 | | |
816 | 835 | | |
817 | 836 | | |
818 | | - | |
| 837 | + | |
| 838 | + | |
819 | 839 | | |
820 | 840 | | |
821 | 841 | | |
| |||
862 | 882 | | |
863 | 883 | | |
864 | 884 | | |
865 | | - | |
866 | | - | |
| 885 | + | |
867 | 886 | | |
868 | | - | |
869 | | - | |
| 887 | + | |
870 | 888 | | |
871 | 889 | | |
872 | 890 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 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