File tree 1 file changed +9
-11
lines changed
compiler/rustc_parse/src/lexer
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -335,17 +335,15 @@ impl<'a> StringReader<'a> {
335
335
comment_kind : CommentKind ,
336
336
doc_style : DocStyle ,
337
337
) -> TokenKind {
338
- if content. contains ( '\r' ) {
339
- for ( idx, _) in content. char_indices ( ) . filter ( |& ( _, c) | c == '\r' ) {
340
- self . err_span_ (
341
- content_start + BytePos ( idx as u32 ) ,
342
- content_start + BytePos ( idx as u32 + 1 ) ,
343
- match comment_kind {
344
- CommentKind :: Line => "bare CR not allowed in doc-comment" ,
345
- CommentKind :: Block => "bare CR not allowed in block doc-comment" ,
346
- } ,
347
- ) ;
348
- }
338
+ for ( idx, _) in content. match_indices ( '\r' ) {
339
+ self . err_span_ (
340
+ content_start + BytePos ( idx as u32 ) ,
341
+ content_start + BytePos ( idx as u32 + 1 ) ,
342
+ match comment_kind {
343
+ CommentKind :: Line => "bare CR not allowed in doc-comment" ,
344
+ CommentKind :: Block => "bare CR not allowed in block doc-comment" ,
345
+ } ,
346
+ ) ;
349
347
}
350
348
351
349
let attr_style = match doc_style {
You can’t perform that action at this time.
0 commit comments