rustc: more pattern cleanup

This commit is contained in:
Erick Tryzelaar 2012-08-26 12:12:05 -07:00 committed by Niko Matsakis
parent 5ce5ee86bc
commit 65bd46c8a5
24 changed files with 74 additions and 79 deletions

View file

@ -197,7 +197,7 @@ fn expand_item_mac(exts: hashmap<~str, syntax_extension>,
cx: ext_ctxt, &&it: @ast::item,
fld: ast_fold) -> Option<@ast::item> {
match it.node {
item_mac({node: mac_invoc_tt(pth, tts), span}) => {
item_mac({node: mac_invoc_tt(pth, tts), _}) => {
let extname = cx.parse_sess().interner.get(pth.idents[0]);
match exts.find(*extname) {
None => {

View file

@ -504,7 +504,7 @@ fn p_t_s_r_path(cx: ext_ctxt, p: @path, s: selector, b: binders) {
Some(p_id) => {
fn select(cx: ext_ctxt, m: matchable) -> match_result {
return match m {
match_expr(e) => Some(leaf(specialize_match(m))),
match_expr(*) => Some(leaf(specialize_match(m))),
_ => cx.bug(~"broken traversal in p_t_s_r")
}
}
@ -646,7 +646,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
match elts[0u].node {
expr_mac(mac) => {
match mac.node {
mac_invoc(pth, invoc_arg, body) => {
mac_invoc(pth, invoc_arg, _) => {
match path_to_ident(pth) {
Some(id) => {
let id_str = cx.str_of(id);