Fix more unused variable warnings
This commit is contained in:
parent
0cece20ea5
commit
09df8f1abf
src/rustc
@ -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_crate_attrs(ecx: @encode_ctxt, crate: @crate) -> ~[attribute] {
|
||||
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 @@ struct LanguageItemCollector {
|
||||
none => {
|
||||
self.session.err(fmt!("no item found for `%s`", key));
|
||||
}
|
||||
some(did) => {
|
||||
some(_) => {
|
||||
// OK.
|
||||
}
|
||||
}
|
||||
|
@ -729,7 +729,7 @@ struct 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"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user