
Change the way that underline positions are calculated by delaying using the "visual" column position until the last possible moment, instead using the "file"/byte position in the file, and then calculating visual positioning as late as possible. This should make the underlines more resilient to non-1-width unicode chars. Unfortunately, as part of this change (which fixes some visual bugs) comes with the loss of some eager tab codepoint handling, but the output remains legible despite some minor regression on the "margin trimming" logic.
15 lines
672 B
Text
15 lines
672 B
Text
error: couldn't read `$DIR/not-utf8.bin`: stream did not contain valid UTF-8
|
||
--> $DIR/not-utf8.rs:6:5
|
||
|
|
||
LL | include!("not-utf8.bin");
|
||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
note: byte `193` is not valid utf-8
|
||
--> $DIR/not-utf8.bin:1:1
|
||
|
|
||
LL | <20>|<7C>␂!5<>cc␕␂<E29095>Ӻi<D3BA><69>WWj<57>ȥ<EFBFBD>'<27>}<7D>␒<EFBFBD>J<EFBFBD>ȉ<EFBFBD><C889>W<EFBFBD>␞O<E2909E>@<40><><EFBFBD><EFBFBD>␜w<E2909C>V<EFBFBD><56><EFBFBD>LO<4C><4F><EFBFBD><EFBFBD>␔[ ␃_<E29083>'<27><><EFBFBD>SQ<53>~ذ<><D8B0>ų&<26><>- <20><>lN~<7E><>!@␌ _#<23><><EFBFBD>kQ<6B><51>h<68>␝<EF8F81>:<3A>␜␇<E2909C>
|
||
| ^
|
||
= note: this error originates in the macro `include` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||
|
||
error: aborting due to 1 previous error
|
||
|