We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2661ba commit 5dd1684Copy full SHA for 5dd1684
compiler/rustc_ast/src/util/comments.rs
@@ -44,6 +44,10 @@ pub fn beautify_doc_string(data: Symbol, kind: CommentKind) -> Symbol {
44
}
45
46
fn get_horizontal_trim<'a>(lines: &'a [&str], kind: CommentKind) -> Option<String> {
47
+ if lines.is_empty() {
48
+ return None;
49
+ }
50
+
51
let mut i = usize::MAX;
52
let mut first = true;
53
0 commit comments