提交 09df8f1a 编写于 作者: B Brian Anderson

Fix more unused variable warnings

上级 0cece20e
......@@ -272,7 +272,7 @@ fn pretty_print_input(sess: session, cfg: ast::crate_cfg, input: input,
ppm: pp_mode) {
fn ann_paren_for_expr(node: pprust::ann_node) {
match node {
pprust::node_expr(s, expr) => pprust::popen(s),
pprust::node_expr(s, _) => pprust::popen(s),
_ => ()
}
}
......
......@@ -105,7 +105,7 @@ fn fold_item(cx: test_ctxt, &&i: @ast::item, fld: fold::ast_fold) ->
if is_test_fn(i) {
match i.node {
ast::item_fn(decl, purity, _, _) if purity == ast::unsafe_fn => {
ast::item_fn(_, purity, _, _) if purity == ast::unsafe_fn => {
cx.sess.span_fatal(
i.span,
~"unsafe functions cannot be used for tests");
......
......@@ -990,7 +990,7 @@ fn synthesize_link_attr(ecx: @encode_ctxt, items: ~[@meta_item]) ->
attr
} else {
match attr.node.value.node {
meta_list(n, l) => {
meta_list(_, l) => {
found_link_attr = true;;
synthesize_link_attr(ecx, l)
}
......
......@@ -187,7 +187,7 @@ fn check_completeness() {
none => {
self.session.err(fmt!("no item found for `%s`", key));
}
some(did) => {
some(_) => {
// OK.
}
}
......
......@@ -729,7 +729,7 @@ fn build_reduced_graph(this: @Resolver) {
fn visibility_to_privacy(visibility: visibility) -> Privacy {
match visibility {
inherited | public => Public,
privacy => Private
private => Private
}
}
......
......@@ -179,10 +179,10 @@ fn region_to_str(cx: ctxt, region: region) -> ~str {
// to fit that into a short string. Hence the recommendation to use
// `explain_region()` or `note_and_explain_region()`.
match region {
re_scope(node_id) => ~"&",
re_scope(_) => ~"&",
re_bound(br) => bound_region_to_str(cx, br),
re_free(id, br) => bound_region_to_str(cx, br),
re_var(id) => ~"&",
re_free(_, br) => bound_region_to_str(cx, br),
re_var(_) => ~"&",
re_static => ~"&static"
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册