diff options
| author | Philipp Hansch <dev@phansch.net> | 2021-04-06 06:59:10 +0200 |
|---|---|---|
| committer | Philipp Hansch <dev@phansch.net> | 2021-04-06 07:20:55 +0200 |
| commit | 1573d10325f286ffcbba290d27984ded9538a5c3 (patch) | |
| tree | ccf42fb5e45c2a8d49084d655783ef40696ce08d /src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff | |
| parent | e315437bd69d97c7e11efe6e74dbad1ddb9ca172 (diff) | |
| download | rust-1573d10325f286ffcbba290d27984ded9538a5c3.tar.gz rust-1573d10325f286ffcbba290d27984ded9538a5c3.zip | |
tabs_in_doc_comments: Fix ICE due to char indexing
This is a quick-fix for an ICE in `tabs_in_doc_comments`. The problem was that we we're indexing into possibly multi-byte characters, such as '位'. More specifically `get_chunks_of_tabs` was returning indices into multi-byte characters. Those were passed on to a `Span` creation that then caused the ICE. This fix makes sure that we don't return indices that point inside a multi-byte character. *However*, we are still iterating over unicode codepoints, not grapheme clusters. So a seemingly single character like y̆ , which actually consists of two codepoints, will probably still cause incorrect spans in the output.
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff')
0 files changed, 0 insertions, 0 deletions
