about summary refs log tree commit diff
path: root/compiler/rustc_ast/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2021-11-09 23:45:17 +0100
committerest31 <MTest31@outlook.com>2021-11-09 23:47:36 +0100
commit9afb241af575d2550d6e58b73cb0769a73d6a1f2 (patch)
treeccae1dd3884fb6917edda2f6f7cd90f049af38bd /compiler/rustc_ast/src
parentd32993afe81a49701edd6f2b8f018020ca50da1a (diff)
downloadrust-9afb241af575d2550d6e58b73cb0769a73d6a1f2.tar.gz
rust-9afb241af575d2550d6e58b73cb0769a73d6a1f2.zip
Use AddAssign impl
Diffstat (limited to 'compiler/rustc_ast/src')
-rw-r--r--compiler/rustc_ast/src/util/comments.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ast/src/util/comments.rs b/compiler/rustc_ast/src/util/comments.rs
index 542a330a031..02792f09ace 100644
--- a/compiler/rustc_ast/src/util/comments.rs
+++ b/compiler/rustc_ast/src/util/comments.rs
@@ -169,7 +169,7 @@ pub fn gather_comments(sm: &SourceMap, path: FileName, src: String) -> Vec<Comme
                 if let Some(mut idx) = token_text.find('\n') {
                     code_to_the_left = false;
                     while let Some(next_newline) = &token_text[idx + 1..].find('\n') {
-                        idx = idx + 1 + next_newline;
+                        idx += 1 + next_newline;
                         comments.push(Comment {
                             style: CommentStyle::BlankLine,
                             lines: vec![],