diff options
| author | bors <bors@rust-lang.org> | 2013-05-11 21:28:37 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-11 21:28:37 -0700 |
| commit | 1f62b23411abcfbe66eeea294f4258f1bb169e7d (patch) | |
| tree | df582703e2f47eb1ee746e7c92fe1ff596d7d7a7 /src/libsyntax/ext | |
| parent | 35e6ce548f2008331c0fa50f1cff30ab7b412ab7 (diff) | |
| parent | a279d6510251ebd3956c74ffe4b12bd49074da9c (diff) | |
auto merge of #6431 : catamorphism/rust/warnings, r=catamorphism
Just cleaning up warnings.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/pipes/mod.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index 5129fa6ebd2..0fe28dadbc7 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -27,7 +27,6 @@ pub fn expand_expr(extsbox: @mut SyntaxEnv, fld: @ast_fold, orig: @fn(&expr_, span, @ast_fold) -> (expr_, span)) -> (expr_, span) { - let mut cx = cx; match *e { // expr_mac should really be expr_ext or something; it's the // entry-point for all syntax extensions. @@ -113,7 +112,6 @@ pub fn expand_mod_items(extsbox: @mut SyntaxEnv, fld: @ast_fold, orig: @fn(&ast::_mod, @ast_fold) -> ast::_mod) -> ast::_mod { - let mut cx = cx; // Fold the contents first: let module_ = orig(module_, fld); diff --git a/src/libsyntax/ext/pipes/mod.rs b/src/libsyntax/ext/pipes/mod.rs index 85c578bc2ce..642f22e9736 100644 --- a/src/libsyntax/ext/pipes/mod.rs +++ b/src/libsyntax/ext/pipes/mod.rs @@ -74,7 +74,7 @@ pub fn expand_proto(cx: @ext_ctxt, _sp: span, id: ast::ident, let rdr = tt_rdr as @reader; let rust_parser = Parser(sess, cfg, rdr.dup()); - let mut proto = rust_parser.parse_proto(cx.str_of(id)); + let proto = rust_parser.parse_proto(cx.str_of(id)); // check for errors visit(proto, cx); diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 0c1e619985d..46b09aca8b2 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -247,8 +247,8 @@ pub fn parse( let TokenAndSpan {tok: tok, sp: sp} = rdr.peek(); /* we append new items to this while we go */ - while cur_eis.len() > 0u { /* for each Earley Item */ - let mut ei = cur_eis.pop(); + while !cur_eis.is_empty() { /* for each Earley Item */ + let ei = cur_eis.pop(); let idx = ei.idx; let len = ei.elts.len(); |
