about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-12-04 21:13:02 -0800
committerPatrick Walton <pcwalton@mimiga.net>2012-12-04 21:13:02 -0800
commitb8cfd5c4142c28dde844678f2d506ccaf058dc78 (patch)
tree9f947bc89c7faa03d1f5455f52c9dee5a69e6580 /src/libsyntax
parent01cd53baf0ea241b17132e857ba356b9b9a14908 (diff)
downloadrust-b8cfd5c4142c28dde844678f2d506ccaf058dc78.tar.gz
rust-b8cfd5c4142c28dde844678f2d506ccaf058dc78.zip
librustc: Long lines. rs=rustbot
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/attr.rs4
-rw-r--r--src/libsyntax/codemap.rs2
-rw-r--r--src/libsyntax/ext/expand.rs2
-rw-r--r--src/libsyntax/ext/simplext.rs4
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs4
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs4
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs13
-rw-r--r--src/libsyntax/fold.rs3
-rw-r--r--src/libsyntax/parse/parser.rs4
-rw-r--r--src/libsyntax/print/pprust.rs3
10 files changed, 30 insertions, 13 deletions
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 79f78079784..81b6357c6ae 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -211,7 +211,9 @@ fn eq(a: @ast::meta_item, b: @ast::meta_item) -> bool {
             _ => false
           },
           ast::meta_name_value(ref na, va) => match b.node {
-            ast::meta_name_value(ref nb, vb) => (*na) == (*nb) && va.node == vb.node,
+            ast::meta_name_value(ref nb, vb) => {
+                (*na) == (*nb) && va.node == vb.node
+            }
             _ => false
           },
           ast::meta_list(*) => {
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index 5218a753ae0..220a0a7e6bb 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -311,7 +311,7 @@ pub impl CodeMap {
             FssExternal(ref eloc) => {
                 {filename: /* FIXME (#2543) */ copy (*eloc).filename,
                  line: (*eloc).line + loc.line - 1u,
-                 col: if loc.line == 1u {(*eloc).col + loc.col} else {loc.col},
+                 col: if loc.line == 1 {eloc.col + loc.col} else {loc.col},
                  file: None}
             }
         }
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 6efca050fa5..9bbe9568f26 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -283,7 +283,7 @@ fn expand_stmt(exts: HashMap<~str, syntax_extension>, cx: ext_ctxt,
     -> (stmt_, span)
 {
     let (mac, pth, tts, semi) = biased_match! (
-        (s)        ~ (stmt_mac(ref mac, semi))    else return orig(s, sp, fld);
+        (s)        ~ (stmt_mac(ref mac, semi))   else return orig(s, sp, fld);
         ((*mac).node) ~ (mac_invoc_tt(pth, ref tts)) else {
             cx.span_bug((*mac).span, ~"naked syntactic bit")
         };
diff --git a/src/libsyntax/ext/simplext.rs b/src/libsyntax/ext/simplext.rs
index 1bf24670aab..f13c5c9aff9 100644
--- a/src/libsyntax/ext/simplext.rs
+++ b/src/libsyntax/ext/simplext.rs
@@ -422,7 +422,9 @@ fn transcribe_block(cx: ext_ctxt, b: bindings, idx_path: @mut ~[uint],
     return match block_to_ident(blk) {
           Some(id) => {
             match follow_for_trans(cx, b.find(id), idx_path) {
-              Some(match_block(ref new_blk)) => ((*new_blk).node, (*new_blk).span),
+              Some(match_block(ref new_blk)) => {
+                ((*new_blk).node, (*new_blk).span)
+              }
 
               // possibly allow promotion of ident/path/expr to blocks?
               Some(ref m) => match_error(cx, (*m), ~"a block"),
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index e782a183430..ad4677942ac 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -185,7 +185,9 @@ fn nameize(p_s: parse_sess, ms: ~[matcher], res: ~[@named_match])
         match m {
           {node: match_tok(_), span: _} => (),
           {node: match_seq(ref more_ms, _, _, _, _), span: _} => {
-            for (*more_ms).each() |next_m| { n_rec(p_s, *next_m, res, ret_val) };
+            for (*more_ms).each() |next_m| {
+                n_rec(p_s, *next_m, res, ret_val)
+            };
           }
           {node: match_nonterminal(bind_name, _, idx), span: sp} => {
             if ret_val.contains_key(bind_name) {
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 09415703260..f33c8b80204 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -94,7 +94,9 @@ fn add_new_extension(cx: ext_ctxt, sp: span, name: ident,
                         @matched_nonterminal(nt_tt(@ref tt)) => {
                             match (*tt) {
                                 // cut off delimiters; don't parse 'em
-                                tt_delim(ref tts) => (*tts).slice(1u,(*tts).len()-1u),
+                                tt_delim(ref tts) => {
+                                    (*tts).slice(1u,(*tts).len()-1u)
+                                }
                                 _ => cx.span_fatal(
                                     sp, ~"macro rhs must be delimited")
                             }
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 3d901039188..19b5975c147 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -199,8 +199,8 @@ fn tt_next_token(&&r: tt_reader) -> {tok: Token, sp: span} {
                     ~"attempted to repeat an expression containing no syntax \
                      variables matched as repeating at this depth");
               }
-              lis_contradiction(ref msg) => { /* FIXME #2887 blame macro invoker
-                                          instead*/
+              lis_contradiction(ref msg) => {
+                /* FIXME #2887 blame macro invoker instead*/
                 r.sp_diag.span_fatal(sp, (*msg));
               }
               lis_constraint(len, _) => {
@@ -217,8 +217,13 @@ fn tt_next_token(&&r: tt_reader) -> {tok: Token, sp: span} {
                 } else {
                     r.repeat_len.push(len);
                     r.repeat_idx.push(0u);
-                    r.cur = @{readme: (*tts), mut idx: 0u, dotdotdoted: true,
-                              sep: (*sep), up: tt_frame_up(option::Some(r.cur))};
+                    r.cur = @{
+                        readme: (*tts),
+                        mut idx: 0u,
+                        dotdotdoted: true,
+                        sep: (*sep),
+                        up: tt_frame_up(option::Some(r.cur))
+                    };
                 }
               }
             }
diff --git a/src/libsyntax/fold.rs b/src/libsyntax/fold.rs
index 39da8531da8..c69a2b62b18 100644
--- a/src/libsyntax/fold.rs
+++ b/src/libsyntax/fold.rs
@@ -519,7 +519,8 @@ fn noop_fold_ty(t: ty_, fld: ast_fold) -> ty_ {
       ty_vec(mt) => ty_vec(fold_mt(mt, fld)),
       ty_ptr(mt) => ty_ptr(fold_mt(mt, fld)),
       ty_rptr(region, mt) => ty_rptr(region, fold_mt(mt, fld)),
-      ty_rec(ref fields) => ty_rec(vec::map((*fields), |f| fold_field(*f, fld))),
+      ty_rec(ref fields) =>
+        ty_rec(vec::map((*fields), |f| fold_field(*f, fld))),
       ty_fn(f) =>
         ty_fn(@TyFn {
             proto: f.proto,
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index bebced8f38a..86907706bbf 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -155,7 +155,9 @@ macro_rules! maybe_whole (
       _ => ()
     }) ;
     (pair_empty $p:expr, $constructor:ident) => ( match copy $p.token {
-      INTERPOLATED(token::$constructor(ref x)) => { $p.bump(); return (~[], (*x)); }
+      INTERPOLATED(token::$constructor(ref x)) => {
+        $p.bump(); return (~[], (*x));
+      }
       _ => ()
     })
 
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 547f0141d33..14ef7c56b76 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -744,7 +744,8 @@ fn print_struct(s: ps, struct_def: @ast::struct_def, tps: ~[ast::ty_param],
 /// expression arguments as expressions). It can be done! I think.
 fn print_tt(s: ps, tt: ast::token_tree) {
     match tt {
-      ast::tt_delim(ref tts) => for (*tts).each() |tt_elt| { print_tt(s, *tt_elt); },
+      ast::tt_delim(ref tts) =>
+        for (*tts).each() |tt_elt| { print_tt(s, *tt_elt); },
       ast::tt_tok(_, ref tk) => {
         match (*tk) {
           parse::token::IDENT(*) => { // don't let idents run together