about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-14 04:53:24 +0000
committerbors <bors@rust-lang.org>2021-04-14 04:53:24 +0000
commit24921df7bd2cea06aba991909db7c9515799a40b (patch)
tree0815acaa741d1f2103f89f27a02c3a50fd5174b1 /library/std/src/sys/unix/stack_overflow.rs
parent19740d9334d1f4260a2851c3db7a7e70eb3d2ec3 (diff)
parentcbdebd97ec4846391dc0f9a1288a3ab1fc053f99 (diff)
downloadrust-24921df7bd2cea06aba991909db7c9515799a40b.tar.gz
rust-24921df7bd2cea06aba991909db7c9515799a40b.zip
Auto merge of #7039 - phansch:melt-ice, r=flip1995
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. But I don't think we handle those cases
anywhere in Clippy currently?

Fixes #5835

changelog: Fix ICE in `tabs_in_doc_comments`
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions