We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d22dd65 commit e8f1d57Copy full SHA for e8f1d57
compiler/rustc_ast/src/util/comments.rs
@@ -38,7 +38,7 @@ pub fn beautify_doc_string(data: Symbol) -> Symbol {
38
i += 1;
39
}
40
// like the first, a last line of all stars should be omitted
41
- if j > i && lines[j - 1].chars().skip(1).all(|c| c == '*') {
+ if j > i && !lines[j - 1].is_empty() && lines[j - 1].chars().all(|c| c == '*') {
42
j -= 1;
43
44
0 commit comments