diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs index 92990ae2ef071..d3039326c8941 100644 --- a/src/libsyntax/parse/lexer/comments.rs +++ b/src/libsyntax/parse/lexer/comments.rs @@ -211,7 +211,7 @@ fn all_whitespace(s: &str, col: CharPos) -> Option { if !ch.is_whitespace() { return None; } - idx = i; + idx = i + ch.len_utf8(); } Some(idx) }