Skip to content

Commit 4a10628

Browse files
committed
fix "make tidy" failure
1 parent f20a139 commit 4a10628

File tree

1 file changed

+2
-1
lines changed
  • src/libsyntax/parse/lexer

1 file changed

+2
-1
lines changed

src/libsyntax/parse/lexer/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,8 +1616,9 @@ pub fn is_doc_comment(s: &str) -> bool {
16161616
}
16171617

16181618
pub fn is_block_doc_comment(s: &str) -> bool {
1619+
// Prevent `/**/` from being parsed as a doc comment
16191620
let res = ((s.starts_with("/**") && *s.as_bytes().get(3).unwrap_or(&b' ') != b'*') ||
1620-
s.starts_with("/*!")) && s.len() >= 5; // Prevent `/**/` from being parsed as a doc comment
1621+
s.starts_with("/*!")) && s.len() >= 5;
16211622
debug!("is {:?} a doc comment? {}", s, res);
16221623
res
16231624
}

0 commit comments

Comments
 (0)