diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-07-27 18:06:24 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-07-27 18:06:24 -0700 |
| commit | eabd233dcd208bc21ca0f8eea02d87d56e5314eb (patch) | |
| tree | 2ce72ee16c9e2fd5ad84b5f150bc791daffc49da /src/libsyntax/ext | |
| parent | 1d9f01cb421eae8e7ace0fa6b4d7f5ddf3ce4f65 (diff) | |
| download | rust-eabd233dcd208bc21ca0f8eea02d87d56e5314eb.tar.gz rust-eabd233dcd208bc21ca0f8eea02d87d56e5314eb.zip | |
Start killing off obsolete/unused quoters, and fix long lines.
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/simplext.rs | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/libsyntax/ext/simplext.rs b/src/libsyntax/ext/simplext.rs index 333c510b7cd..2f8e63facf9 100644 --- a/src/libsyntax/ext/simplext.rs +++ b/src/libsyntax/ext/simplext.rs @@ -539,7 +539,7 @@ fn block_to_ident(blk: blk_) -> option<ident> { } } -fn p_t_s_r_mac(cx: ext_ctxt, mac: ast::mac, s: selector, b: binders) { +fn p_t_s_r_mac(cx: ext_ctxt, mac: ast::mac, _s: selector, _b: binders) { fn select_pt_1(cx: ext_ctxt, m: matchable, fn_m: fn(ast::mac) -> match_result) -> match_result { ret alt m { @@ -556,44 +556,6 @@ fn p_t_s_r_mac(cx: ext_ctxt, mac: ast::mac, s: selector, b: binders) { ast::mac_ellipsis { cx.span_fatal(mac.span, ~"misused `...`"); } ast::mac_invoc(_, _, _) { no_des(cx, mac.span, ~"macro calls"); } ast::mac_invoc_tt(_, _) { no_des(cx, mac.span, ~"macro calls"); } - ast::mac_embed_type(ty) { - alt ty.node { - ast::ty_path(pth, _) { - alt path_to_ident(pth) { - some(id) { - /* look for an embedded type */ - fn select_pt_2(m: ast::mac) -> match_result { - ret alt m.node { - ast::mac_embed_type(t) { some(leaf(match_ty(t))) } - _ { none } - } - } - let final_step = |x| select_pt_1(cx, x, select_pt_2); - b.real_binders.insert(id, compose_sels(s, final_step)); - } - none { no_des(cx, pth.span, ~"under `#<>`"); } - } - } - _ { no_des(cx, ty.span, ~"under `#<>`"); } - } - } - ast::mac_embed_block(blk) { - alt block_to_ident(blk.node) { - some(id) { - fn select_pt_2(m: ast::mac) -> match_result { - ret alt m.node { - ast::mac_embed_block(blk) { - some(leaf(match_block(blk))) - } - _ { none } - } - } - let final_step = |x| select_pt_1(cx, x, select_pt_2); - b.real_binders.insert(id, compose_sels(s, final_step)); - } - none { no_des(cx, blk.span, ~"under `#{}`"); } - } - } ast::mac_aq(_,_) { no_des(cx, mac.span, ~"antiquotes"); } ast::mac_var(_) { no_des(cx, mac.span, ~"antiquote variables"); } } |
