Revert "rustc_parse: work around instruction-counting non-determinism."
This reverts commit 521218ce88e12ed2960f619545cf22404cee8d1e.
This commit is contained in:
parent
521218ce88
commit
44783f1db0
@ -335,15 +335,17 @@ impl<'a> StringReader<'a> {
|
||||
comment_kind: CommentKind,
|
||||
doc_style: DocStyle,
|
||||
) -> TokenKind {
|
||||
for (idx, _) in content.match_indices('\r') {
|
||||
self.err_span_(
|
||||
content_start + BytePos(idx as u32),
|
||||
content_start + BytePos(idx as u32 + 1),
|
||||
match comment_kind {
|
||||
CommentKind::Line => "bare CR not allowed in doc-comment",
|
||||
CommentKind::Block => "bare CR not allowed in block doc-comment",
|
||||
},
|
||||
);
|
||||
if content.contains('\r') {
|
||||
for (idx, _) in content.char_indices().filter(|&(_, c)| c == '\r') {
|
||||
self.err_span_(
|
||||
content_start + BytePos(idx as u32),
|
||||
content_start + BytePos(idx as u32 + 1),
|
||||
match comment_kind {
|
||||
CommentKind::Line => "bare CR not allowed in doc-comment",
|
||||
CommentKind::Block => "bare CR not allowed in block doc-comment",
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let attr_style = match doc_style {
|
||||
|
Loading…
x
Reference in New Issue
Block a user