Skip to content

Commit 46de31c

Browse files
ericktnikomatsakis
authored andcommitted
---
yaml --- r: 30125 b: refs/heads/incoming c: 65bd46c h: refs/heads/master i: 30123: ab72744 v: v3
1 parent aa49d01 commit 46de31c

25 files changed

+75
-80
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 5ce5ee86bc1264fe17f96606d648409b9508e4a3
9+
refs/heads/incoming: 65bd46c8a550af1d40543aeee92127d09ba4e062
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libsyntax/ast_map.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn map_item(i: @item, cx: ctx, v: vt) {
223223
map_struct_def(struct_def, node_item(i, item_path), i.ident, i.id, cx,
224224
v);
225225
}
226-
item_trait(tps, traits, methods) => {
226+
item_trait(_, traits, methods) => {
227227
// Map trait refs to their parent classes. This is
228228
// so we can find the self_ty
229229
for traits.each |p| {
@@ -318,16 +318,16 @@ fn node_id_to_str(map: map, id: node_id, itr: ident_interner) -> ~str {
318318
fmt!("foreign item %s with abi %? (id=%?)",
319319
path_ident_to_str(*path, item.ident, itr), abi, id)
320320
}
321-
Some(node_method(m, impl_did, path)) => {
321+
Some(node_method(m, _, path)) => {
322322
fmt!("method %s in %s (id=%?)",
323323
*itr.get(m.ident), path_to_str(*path, itr), id)
324324
}
325-
Some(node_trait_method(tm, impl_did, path)) => {
325+
Some(node_trait_method(tm, _, path)) => {
326326
let m = ast_util::trait_method_to_ty_method(*tm);
327327
fmt!("method %s in %s (id=%?)",
328328
*itr.get(m.ident), path_to_str(*path, itr), id)
329329
}
330-
Some(node_variant(variant, def_id, path)) => {
330+
Some(node_variant(variant, _, path)) => {
331331
fmt!("variant %s in %s (id=%?)",
332332
*itr.get(variant.node.name), path_to_str(*path, itr), id)
333333
}

branches/incoming/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fn expand_item_mac(exts: hashmap<~str, syntax_extension>,
197197
cx: ext_ctxt, &&it: @ast::item,
198198
fld: ast_fold) -> Option<@ast::item> {
199199
match it.node {
200-
item_mac({node: mac_invoc_tt(pth, tts), span}) => {
200+
item_mac({node: mac_invoc_tt(pth, tts), _}) => {
201201
let extname = cx.parse_sess().interner.get(pth.idents[0]);
202202
match exts.find(*extname) {
203203
None => {

branches/incoming/src/libsyntax/ext/simplext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ fn p_t_s_r_path(cx: ext_ctxt, p: @path, s: selector, b: binders) {
504504
Some(p_id) => {
505505
fn select(cx: ext_ctxt, m: matchable) -> match_result {
506506
return match m {
507-
match_expr(e) => Some(leaf(specialize_match(m))),
507+
match_expr(*) => Some(leaf(specialize_match(m))),
508508
_ => cx.bug(~"broken traversal in p_t_s_r")
509509
}
510510
}
@@ -646,7 +646,7 @@ fn add_new_extension(cx: ext_ctxt, sp: span, arg: ast::mac_arg,
646646
match elts[0u].node {
647647
expr_mac(mac) => {
648648
match mac.node {
649-
mac_invoc(pth, invoc_arg, body) => {
649+
mac_invoc(pth, invoc_arg, _) => {
650650
match path_to_ident(pth) {
651651
Some(id) => {
652652
let id_str = cx.str_of(id);

branches/incoming/src/libsyntax/print/pp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl printer {
378378
if !self.scan_stack_empty {
379379
let x = self.scan_top();
380380
match copy self.token[x] {
381-
BEGIN(b) => {
381+
BEGIN(_) => {
382382
if k > 0 {
383383
self.size[self.scan_pop()] = self.size[x] +
384384
self.right_total;

branches/incoming/src/libsyntax/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ fn visit_pat<E>(p: @pat, e: E, v: vt<E>) {
250250

251251
fn visit_foreign_item<E>(ni: @foreign_item, e: E, v: vt<E>) {
252252
match ni.node {
253-
foreign_item_fn(fd, purity, tps) => {
253+
foreign_item_fn(fd, _, tps) => {
254254
v.visit_ty_params(tps, e, v);
255255
visit_fn_decl(fd, e, v);
256256
}

branches/incoming/src/rustc/middle/borrowck/gather_loans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl gather_loan_ctxt {
410410
arm_id: ast::node_id, alt_id: ast::node_id) {
411411
do self.bccx.cat_pattern(discr_cmt, root_pat) |cmt, pat| {
412412
match pat.node {
413-
ast::pat_ident(bm, id, o_pat) if !self.pat_is_variant(pat) => {
413+
ast::pat_ident(bm, _, _) if !self.pat_is_variant(pat) => {
414414
match bm {
415415
ast::bind_by_value | ast::bind_by_move => {
416416
// copying does not borrow anything, so no check

branches/incoming/src/rustc/middle/borrowck/loan.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ impl loan_ctxt {
113113
// then the memory is freed.
114114
self.loan_unstable_deref(cmt, cmt_base, req_mutbl)
115115
}
116-
cat_deref(cmt1, _, unsafe_ptr) |
117-
cat_deref(cmt1, _, gc_ptr) |
118-
cat_deref(cmt1, _, region_ptr(_)) => {
116+
cat_deref(_, _, unsafe_ptr) |
117+
cat_deref(_, _, gc_ptr) |
118+
cat_deref(_, _, region_ptr(_)) => {
119119
// Aliased data is simply not lendable.
120120
self.bccx.tcx.sess.span_bug(
121121
cmt.span,

branches/incoming/src/rustc/middle/borrowck/preserve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl preserve_condition {
1616
fn combine(pc: preserve_condition) -> preserve_condition {
1717
match self {
1818
pc_ok => {pc}
19-
pc_if_pure(e) => {self}
19+
pc_if_pure(_) => {self}
2020
}
2121
}
2222
}

branches/incoming/src/rustc/middle/check_alt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fn specialize(tcx: ty::ctxt, r: ~[@pat], ctor_id: ctor, arity: uint,
351351
// Grab the class data that we care about.
352352
let class_fields, class_id;
353353
match ty::get(left_ty).struct {
354-
ty::ty_class(cid, substs) => {
354+
ty::ty_class(cid, _) => {
355355
class_id = cid;
356356
class_fields = ty::lookup_class_fields(tcx, class_id);
357357
}
@@ -414,7 +414,7 @@ fn check_local(tcx: ty::ctxt, loc: @local, &&s: (), v: visit::vt<()>) {
414414

415415
fn is_refutable(tcx: ty::ctxt, pat: @pat) -> bool {
416416
match tcx.def_map.find(pat.id) {
417-
Some(def_variant(enum_id, var_id)) => {
417+
Some(def_variant(enum_id, _)) => {
418418
if vec::len(*ty::enum_variants(tcx, enum_id)) != 1u {
419419
return true;
420420
}

branches/incoming/src/rustc/middle/check_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ fn check_item_recursion(sess: session, ast_map: ast_map::map,
179179

180180
fn visit_expr(e: @expr, &&env: env, v: visit::vt<env>) {
181181
match e.node {
182-
expr_path(path) => {
182+
expr_path(*) => {
183183
match env.def_map.find(e.id) {
184184
Some(def_const(def_id)) => {
185185
match env.ast_map.get(def_id.node) {

branches/incoming/src/rustc/middle/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ fn check_item_ctypes(cx: ty::ctxt, it: @ast::item) {
417417
either::Right(ast::foreign_abi_rust_intrinsic) => {
418418
for nmod.items.each |ni| {
419419
match ni.node {
420-
ast::foreign_item_fn(decl, _, tps) => {
420+
ast::foreign_item_fn(decl, _, _) => {
421421
check_foreign_fn(cx, it.id, decl);
422422
}
423423
ast::foreign_item_const(*) => {} // XXX: Not implemented.
@@ -434,7 +434,7 @@ fn check_item_path_statement(cx: ty::ctxt, it: @ast::item) {
434434
match s.node {
435435
ast::stmt_semi(@{id: id,
436436
callee_id: _,
437-
node: ast::expr_path(@path),
437+
node: ast::expr_path(_),
438438
span: _}, _) => {
439439
cx.sess.span_lint(
440440
path_statement, id, it.id,

branches/incoming/src/rustc/middle/liveness.rs

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -338,18 +338,13 @@ impl IrMaps {
338338
let vk = self.var_kinds[*var];
339339
debug!("Node %d is a last use of variable %?", expr_id, vk);
340340
match vk {
341-
Arg(id, name, by_move) |
342-
Arg(id, name, by_copy) |
343-
Local(LocalInfo {id:id, ident:name,
344-
kind: FromLetNoInitializer, _}) |
345-
Local(LocalInfo {id:id, ident:name,
346-
kind: FromLetWithInitializer, _}) |
347-
Local(LocalInfo {id:id, ident:name,
348-
kind: FromMatch(bind_by_value), _}) |
349-
Local(LocalInfo {id:id, ident:name,
350-
kind: FromMatch(bind_by_ref(_)), _}) |
351-
Local(LocalInfo {id:id, ident:name,
352-
kind: FromMatch(bind_by_move), _}) => {
341+
Arg(id, _, by_move) |
342+
Arg(id, _, by_copy) |
343+
Local(LocalInfo {id: id, kind: FromLetNoInitializer, _}) |
344+
Local(LocalInfo {id: id, kind: FromLetWithInitializer, _}) |
345+
Local(LocalInfo {id: id, kind: FromMatch(bind_by_value), _}) |
346+
Local(LocalInfo {id: id, kind: FromMatch(bind_by_ref(_)), _}) |
347+
Local(LocalInfo {id: id, kind: FromMatch(bind_by_move), _}) => {
353348
let v = match self.last_use_map.find(expr_id) {
354349
Some(v) => v,
355350
None => {
@@ -1493,7 +1488,7 @@ fn check_expr(expr: @expr, &&self: @Liveness, vt: vt<@Liveness>) {
14931488
visit::visit_expr(expr, self, vt);
14941489
}
14951490

1496-
expr_fn(_, _, _, cap_clause) | expr_fn_block(_, _, cap_clause) => {
1491+
expr_fn(*) | expr_fn_block(*) => {
14971492
let caps = (*self.ir).captures(expr);
14981493
for (*caps).each |cap| {
14991494
let var = self.variable_from_rdef(cap.rv, expr.span);

branches/incoming/src/rustc/middle/mem_categorization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl &mem_categorization_ctxt {
378378
mutbl:m_imm, ty:expr_ty}
379379
}
380380

381-
ast::def_upvar(upvid, inner, fn_node_id, _) => {
381+
ast::def_upvar(_, inner, fn_node_id, _) => {
382382
let ty = ty::node_id_to_type(self.tcx, fn_node_id);
383383
let proto = ty::ty_fn_proto(ty);
384384
match proto {
@@ -856,7 +856,7 @@ fn field_mutbl(tcx: ty::ctxt,
856856
}
857857
}
858858
}
859-
ty::ty_class(did, substs) => {
859+
ty::ty_class(did, _) => {
860860
for ty::lookup_class_fields(tcx, did).each |fld| {
861861
if fld.ident == f_name {
862862
let m = match fld.mutability {

branches/incoming/src/rustc/middle/resolve3.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ struct NameBindings {
529529
530530
fn span_for_namespace(namespace: Namespace) -> Option<span> {
531531
match self.def_for_namespace(namespace) {
532-
Some(d) => {
532+
Some(_) => {
533533
match namespace {
534534
TypeNS => self.type_span,
535535
ValueNS => self.value_span,
@@ -866,7 +866,7 @@ struct Resolver {
866866

867867
visit_mod(module_, sp, item.id, new_parent, visitor);
868868
}
869-
item_foreign_mod(foreign_module) => {
869+
item_foreign_mod(*) => {
870870
let (name_bindings, new_parent) = self.add_child(atom, parent,
871871
~[ModuleNS], sp);
872872

@@ -891,7 +891,7 @@ struct Resolver {
891891
def_const(local_def(item.id)),
892892
sp);
893893
}
894-
item_fn(decl, purity, _, _) => {
894+
item_fn(_, purity, _, _) => {
895895
let (name_bindings, new_parent) = self.add_child(atom, parent,
896896
~[ValueNS], sp);
897897

@@ -1217,7 +1217,7 @@ struct Resolver {
12171217
self.add_child(name, parent, ~[ValueNS], foreign_item.span);
12181218

12191219
match foreign_item.node {
1220-
foreign_item_fn(fn_decl, purity, type_parameters) => {
1220+
foreign_item_fn(_, purity, type_parameters) => {
12211221
let def = def_fn(local_def(foreign_item.id), purity);
12221222
(*name_bindings).define_value(Public, def, foreign_item.span);
12231223

@@ -1227,7 +1227,7 @@ struct Resolver {
12271227
visit_foreign_item(foreign_item, new_parent, visitor);
12281228
}
12291229
}
1230-
foreign_item_const(item_type) => {
1230+
foreign_item_const(*) => {
12311231
let def = def_const(local_def(foreign_item.id));
12321232
(*name_bindings).define_value(Public, def, foreign_item.span);
12331233

@@ -1319,8 +1319,8 @@ struct Resolver {
13191319
}
13201320
}
13211321
}
1322-
def_fn(def_id, _) | def_static_method(def_id, _) |
1323-
def_const(def_id) | def_variant(_, def_id) => {
1322+
def_fn(*) | def_static_method(*) | def_const(*) |
1323+
def_variant(*) => {
13241324
debug!("(building reduced graph for external \
13251325
crate) building value %s", final_ident);
13261326
(*child_name_bindings).define_value(Public, def, dummy_sp());
@@ -2710,7 +2710,7 @@ struct Resolver {
27102710
body_id);
27112711
}
27122712
}
2713-
MethodRibKind(item_id, method_id) => {
2713+
MethodRibKind(item_id, _) => {
27142714
// If the def is a ty param, and came from the parent
27152715
// item, it's ok
27162716
match def {
@@ -2954,7 +2954,7 @@ struct Resolver {
29542954
visitor);
29552955
}
29562956
}
2957-
foreign_item_const(item_type) => {
2957+
foreign_item_const(_) => {
29582958
visit_foreign_item(foreign_item, (),
29592959
visitor);
29602960
}
@@ -3033,7 +3033,7 @@ struct Resolver {
30333033
f();
30343034

30353035
match type_parameters {
3036-
HasTypeParameters(type_parameters, _, _, _) => {
3036+
HasTypeParameters(*) => {
30373037
(*self.type_ribs).pop();
30383038
}
30393039

@@ -4228,7 +4228,7 @@ struct Resolver {
42284228
fmt!("use of undeclared label \
42294229
`%s`", self.session.str_of(
42304230
label))),
4231-
Some(dl_def(def @ def_label(id))) =>
4231+
Some(dl_def(def @ def_label(_))) =>
42324232
self.record_def(expr.id, def),
42334233
Some(_) =>
42344234
self.session.span_bug(expr.span,
@@ -4514,7 +4514,7 @@ struct Resolver {
45144514
atoms.push(name);
45154515
current_module = module_;
45164516
}
4517-
BlockParentLink(module_, node_id) => {
4517+
BlockParentLink(module_, _) => {
45184518
atoms.push(syntax::parse::token::special_idents::opaque);
45194519
current_module = module_;
45204520
}
@@ -4555,7 +4555,7 @@ struct Resolver {
45554555
let mut module_repr;
45564556
match (*import_resolution).target_for_namespace(ModuleNS) {
45574557
None => { module_repr = ~""; }
4558-
Some(target) => {
4558+
Some(_) => {
45594559
module_repr = ~" module:?";
45604560
// XXX
45614561
}
@@ -4564,7 +4564,7 @@ struct Resolver {
45644564
let mut value_repr;
45654565
match (*import_resolution).target_for_namespace(ValueNS) {
45664566
None => { value_repr = ~""; }
4567-
Some(target) => {
4567+
Some(_) => {
45684568
value_repr = ~" value:?";
45694569
// XXX
45704570
}
@@ -4573,7 +4573,7 @@ struct Resolver {
45734573
let mut type_repr;
45744574
match (*import_resolution).target_for_namespace(TypeNS) {
45754575
None => { type_repr = ~""; }
4576-
Some(target) => {
4576+
Some(_) => {
45774577
type_repr = ~" type:?";
45784578
// XXX
45794579
}

branches/incoming/src/rustc/middle/ty.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2621,15 +2621,15 @@ fn unify_mode(cx: ctxt, modes: expected_found<ast::mode>)
26212621
(m1, m2) if (m1 == m2) => {
26222622
result::ok(m1)
26232623
}
2624-
(ast::infer(id1), ast::infer(id2)) => {
2624+
(ast::infer(_), ast::infer(id2)) => {
26252625
cx.inferred_modes.insert(id2, m1);
26262626
result::ok(m1)
26272627
}
26282628
(ast::infer(id), m) | (m, ast::infer(id)) => {
26292629
cx.inferred_modes.insert(id, m);
26302630
result::ok(m1)
26312631
}
2632-
(m1, m2) => {
2632+
(_, _) => {
26332633
result::err(terr_mode_mismatch(modes))
26342634
}
26352635
}
@@ -3325,7 +3325,7 @@ fn normalize_ty(cx: ctxt, t: t) -> t {
33253325
// This type has a vstore. Get rid of it
33263326
mk_estr(cx, normalize_vstore(vstore)),
33273327
3328-
ty_rptr(region, mt) =>
3328+
ty_rptr(_, mt) =>
33293329
// This type has a region. Get rid of it
33303330
mk_rptr(cx, re_static, normalize_mt(cx, mt)),
33313331

branches/incoming/src/rustc/middle/typeck.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ fn check_main_fn_ty(ccx: @crate_ctxt,
254254
let tcx = ccx.tcx;
255255
let main_t = ty::node_id_to_type(tcx, main_id);
256256
match ty::get(main_t).struct {
257-
ty::ty_fn({purity: ast::impure_fn, proto: ty::proto_bare, bounds,
258-
inputs, output, ret_style: ast::return_val}) => {
257+
ty::ty_fn({purity: ast::impure_fn, proto: ty::proto_bare,
258+
inputs, output, ret_style: ast::return_val, _}) => {
259259
match tcx.items.find(main_id) {
260260
Some(ast_map::node_item(it,_)) => {
261261
match it.node {

0 commit comments

Comments
 (0)