about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-21 09:15:15 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-21 09:15:15 -0800
commit1646707c6e86166b28be77623f260333015e790c (patch)
tree37c2181506f878dfd930c270279fa6563d82175c /src/libsyntax/parse
parent4b6a0563c6d7bf90d5a70120d1818d57f49cb62a (diff)
parent49684850bedcef007a2949c97872606d1d6dc325 (diff)
downloadrust-1646707c6e86166b28be77623f260333015e790c.tar.gz
rust-1646707c6e86166b28be77623f260333015e790c.zip
rollup merge of #21396: japaric/no-parens-in-range
Conflicts:
	src/libsyntax/parse/lexer/comments.rs
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/lexer/comments.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/comments.rs b/src/libsyntax/parse/lexer/comments.rs
index 2799696e8eb..c58136b30aa 100644
--- a/src/libsyntax/parse/lexer/comments.rs
+++ b/src/libsyntax/parse/lexer/comments.rs
@@ -116,7 +116,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> String {
 
         if can_trim {
             lines.iter().map(|line| {
-                (&line[(i + 1)..line.len()]).to_string()
+                (&line[i + 1..line.len()]).to_string()
             }).collect()
         } else {
             lines
@@ -132,7 +132,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> String {
     }
 
     if comment.starts_with("/*") {
-        let lines = comment[3us..(comment.len() - 2us)]
+        let lines = comment[3..comment.len() - 2]
             .lines_any()
             .map(|s| s.to_string())
             .collect::<Vec<String> >();