bors
24921df7bd
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`
2021-04-14 04:53:24 +00:00
..
2021-04-06 10:43:47 -04:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:35:51 +02:00
2021-04-10 14:43:52 +02:00
2021-04-03 21:25:53 +03:00
2021-04-01 10:40:44 +09:00
2021-04-14 09:23:44 +12:00
2021-04-05 13:35:51 +02:00
2021-03-29 16:10:37 -04:00
2021-03-29 16:10:37 -04:00
2021-03-29 16:10:37 -04:00
2021-04-06 10:43:47 -04:00
2021-04-06 10:43:47 -04:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:35:51 +02:00
2021-04-10 16:59:59 -05:00
2021-04-11 18:24:23 +00:00
2021-03-28 07:54:00 -04:00
2021-03-28 07:54:00 -04:00
2021-04-05 00:09:13 -04:00
2021-04-03 21:25:53 +03:00
2021-04-06 10:43:47 -04:00
2021-04-01 10:40:44 +09:00
2021-04-01 10:40:44 +09:00
2021-04-06 12:12:32 -04:00
2021-04-06 12:12:32 -04:00
2021-04-01 10:40:44 +09:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:35:51 +02:00
2021-04-06 10:43:47 -04:00
2021-04-06 10:43:47 -04:00
2021-04-06 10:43:47 -04:00
2021-04-08 22:49:48 +02:00
2021-04-08 22:49:48 +02:00
2021-04-08 22:49:48 +02:00
2021-03-27 09:04:44 -04:00
2021-03-31 11:18:48 +09:00
2021-04-05 13:35:51 +02:00
2021-04-05 13:33:45 +02:00
2021-03-26 20:19:34 +09:00
2021-03-26 20:19:34 +09:00
2021-04-02 22:27:13 -04:00
2021-04-02 22:27:13 -04:00
2021-03-30 10:56:08 -04:00
2021-03-30 10:56:08 -04:00
2021-03-30 09:58:23 -04:00
2021-03-28 00:04:44 +01:00
2021-03-31 07:36:09 +02:00
2021-03-31 07:36:09 +02:00
2021-03-26 14:36:09 +01:00
2021-03-26 14:36:09 +01:00
2021-04-05 09:16:48 +02:00
2021-04-05 09:16:48 +02:00
2021-04-02 10:10:54 -05:00
2021-04-01 00:05:42 +09:00
2021-04-01 00:05:42 +09:00
2021-04-01 00:05:42 +09:00
2021-04-01 00:05:42 +09:00
2021-04-01 00:08:59 +09:00
2021-04-12 21:58:34 +09:00
2021-04-12 21:58:34 +09:00
2021-04-12 21:58:34 +09:00
2021-03-30 16:04:16 -07:00
2021-03-30 16:04:16 -07:00
2021-03-30 16:04:16 -07:00
2021-03-31 11:35:24 -04:00
2021-03-31 11:35:24 -04:00
2021-03-31 11:35:24 -04:00
2021-03-26 20:19:34 +09:00
2021-03-26 20:19:34 +09:00
2021-04-10 17:45:55 +02:00
2021-04-10 23:37:18 +02:00
2021-03-31 15:35:34 -04:00
2021-03-31 15:35:34 -04:00
2021-03-31 15:35:34 -04:00
2021-03-25 22:30:14 -04:00
2021-03-25 22:30:14 -04:00
2021-04-06 10:43:47 -04:00
2021-04-06 10:43:47 -04:00
2021-03-31 11:18:48 +09:00
2021-04-02 16:28:16 +09:00
2021-04-10 10:26:53 +02:00
2021-04-10 10:26:53 +02:00
2021-03-28 09:37:05 +02:00
2021-03-28 09:37:05 +02:00
2021-04-04 14:25:05 +02:00
2021-04-04 14:25:05 +02:00
2021-04-04 14:25:05 +02:00
2021-04-06 10:43:47 -04:00
2021-04-06 10:43:47 -04:00
2021-03-26 20:19:34 +09:00
2021-03-26 20:19:34 +09:00
2021-03-27 01:08:14 +01:00
2021-03-27 01:08:14 +01:00
2021-03-26 20:19:34 +09:00
2021-03-26 20:19:34 +09:00
2021-03-26 20:19:34 +09:00
2021-04-06 11:09:52 +02:00
2021-04-06 11:09:52 +02:00
2021-04-06 11:09:52 +02:00
2021-03-27 13:06:36 +03:00
2021-04-11 13:29:08 +02:00
2021-03-29 23:46:03 -07:00
2021-03-29 23:46:03 -07:00
2021-03-29 23:46:03 -07:00