diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:15:15 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-21 09:15:15 -0800 |
| commit | 1646707c6e86166b28be77623f260333015e790c (patch) | |
| tree | 37c2181506f878dfd930c270279fa6563d82175c /src/libsyntax | |
| parent | 4b6a0563c6d7bf90d5a70120d1818d57f49cb62a (diff) | |
| parent | 49684850bedcef007a2949c97872606d1d6dc325 (diff) | |
rollup merge of #21396: japaric/no-parens-in-range
Conflicts: src/libsyntax/parse/lexer/comments.rs
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/diagnostic.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/lexer/comments.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map/mod.rs b/src/libsyntax/ast_map/mod.rs index d57a1356def..02e7796b8c6 100644 --- a/src/libsyntax/ast_map/mod.rs +++ b/src/libsyntax/ast_map/mod.rs @@ -525,7 +525,7 @@ impl<'ast> Map<'ast> { NodesMatchingSuffix { map: self, item_name: parts.last().unwrap(), - in_which: &parts[..(parts.len() - 1)], + in_which: &parts[..parts.len() - 1], idx: 0, } } diff --git a/src/libsyntax/diagnostic.rs b/src/libsyntax/diagnostic.rs index c17ad058ada..c84cbdcae85 100644 --- a/src/libsyntax/diagnostic.rs +++ b/src/libsyntax/diagnostic.rs @@ -284,7 +284,7 @@ fn print_maybe_styled(w: &mut EmitterWriter, // to be miscolored. We assume this is rare enough that we don't // have to worry about it. if msg.ends_with("\n") { - try!(t.write_str(&msg[..(msg.len()-1)])); + try!(t.write_str(&msg[..msg.len()-1])); try!(t.reset()); try!(t.write_str("\n")); } else { 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> >(); |
