1573d10325
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.
21 lines
674 B
Plaintext
21 lines
674 B
Plaintext
error[E0658]: custom inner attributes are unstable
|
|
--> $DIR/ice-5835.rs:1:4
|
|
|
|
|
LL | #![rustfmt::skip]
|
|
| ^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
|
|
= help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
|
|
|
|
error: using tabs in doc comments is not recommended
|
|
--> $DIR/ice-5835.rs:4:10
|
|
|
|
|
LL | /// 位
|
|
| ^^^^ help: consider using four spaces per tab
|
|
|
|
|
= note: `-D clippy::tabs-in-doc-comments` implied by `-D warnings`
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0658`.
|