Skip to content

Commit 27bf5d8

Browse files
committed
---
yaml --- r: 4794 b: refs/heads/master c: cd440d3 h: refs/heads/master v: v3
1 parent f9fb556 commit 27bf5d8

36 files changed

+188
-193
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2885c67d473b4522441f118149945b516d5ca658
2+
refs/heads/master: cd440d338efa935713c92a56dc8eec67a703e521

trunk/src/comp/back/link.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
313313
}
314314

315315
// This calculates CMH as defined above
316-
fn crate_meta_extras_hash(sha: sha1, crate: &ast::crate,
316+
fn crate_meta_extras_hash(sha: sha1, _crate: &ast::crate,
317317
metas: &provided_metas) -> str {
318318
fn len_and_str(s: &str) -> str {
319319
ret #fmt("%u_%s", str::byte_len(s), s);
@@ -349,7 +349,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
349349
name, default));
350350
}
351351

352-
fn crate_meta_name(sess: &session::session, crate: &ast::crate,
352+
fn crate_meta_name(sess: &session::session, _crate: &ast::crate,
353353
output: &str, metas: &provided_metas) -> str {
354354
ret alt metas.name {
355355
some(v) { v }
@@ -368,7 +368,7 @@ fn build_link_meta(sess: &session::session, c: &ast::crate, output: &str,
368368
};
369369
}
370370

371-
fn crate_meta_vers(sess: &session::session, crate: &ast::crate,
371+
fn crate_meta_vers(sess: &session::session, _crate: &ast::crate,
372372
metas: &provided_metas) -> str {
373373
ret alt metas.vers {
374374
some(v) { v }
@@ -435,7 +435,7 @@ fn mangle(ss: &[str]) -> str {
435435
ret n;
436436
}
437437

438-
fn exported_name(path: &[str], hash: &str, vers: &str) -> str {
438+
fn exported_name(path: &[str], hash: &str, _vers: &str) -> str {
439439
// FIXME: versioning isn't working yet
440440

441441
ret mangle(path + ~[hash]); // + "@" + vers;
@@ -459,7 +459,7 @@ fn mangle_internal_name_by_path_and_seq(ccx: &@crate_ctxt, path: &[str],
459459
ret mangle(path + ~[ccx.names.next(flav)]);
460460
}
461461

462-
fn mangle_internal_name_by_path(ccx: &@crate_ctxt, path: &[str]) -> str {
462+
fn mangle_internal_name_by_path(_ccx: &@crate_ctxt, path: &[str]) -> str {
463463
ret mangle(path);
464464
}
465465

trunk/src/comp/back/upcall.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@ type upcalls =
5050
dynastack_alloc: ValueRef,
5151
dynastack_free: ValueRef};
5252

53-
fn declare_upcalls(tn: type_names, tydesc_type: TypeRef,
53+
fn declare_upcalls(_tn: type_names, tydesc_type: TypeRef,
5454
taskptr_type: TypeRef, llmod: ModuleRef) -> @upcalls {
55-
fn decl(tn: type_names, llmod: ModuleRef, name: str, tys: [TypeRef],
55+
fn decl(llmod: ModuleRef, name: str, tys: [TypeRef],
5656
rv: TypeRef) -> ValueRef {
5757
let arg_tys: [TypeRef] = ~[];
5858
for t: TypeRef in tys { arg_tys += ~[t]; }
5959
let fn_ty = T_fn(arg_tys, rv);
6060
ret trans::decl_cdecl_fn(llmod, "upcall_" + name, fn_ty);
6161
}
62-
fn decl_with_taskptr(taskptr_type: TypeRef, tn: type_names,
62+
fn decl_with_taskptr(taskptr_type: TypeRef,
6363
llmod: ModuleRef, name: str, tys: [TypeRef],
6464
rv: TypeRef) -> ValueRef {
65-
ret decl(tn, llmod, name, ~[taskptr_type] + tys, rv);
65+
ret decl(llmod, name, ~[taskptr_type] + tys, rv);
6666
}
67-
let dv = bind decl_with_taskptr(taskptr_type, tn, llmod, _, _, T_void());
68-
let d = bind decl_with_taskptr(taskptr_type, tn, llmod, _, _, _);
69-
let dr = bind decl(tn, llmod, _, _, _);
67+
let dv = bind decl_with_taskptr(taskptr_type, llmod, _, _, T_void());
68+
let d = bind decl_with_taskptr(taskptr_type, llmod, _, _, _);
69+
let dr = bind decl(llmod, _, _, _);
7070

7171
let empty_vec: [TypeRef] = ~[];
7272
ret @{grow_task: dv("grow_task", ~[T_size_t()]),

trunk/src/comp/front/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ fn modify_for_testing(crate: @ast::crate) -> @ast::crate {
5151
ret res;
5252
}
5353

54-
fn fold_mod(cx: &test_ctxt, m: &ast::_mod, fld: fold::ast_fold) -> ast::_mod {
54+
fn fold_mod(_cx: &test_ctxt, m: &ast::_mod, fld: fold::ast_fold)
55+
-> ast::_mod {
5556

5657
// Remove any defined main function from the AST so it doesn't clash with
5758
// the one we're going to add. FIXME: This is sloppy. Instead we should

trunk/src/comp/lib/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ obj builder(B: BuilderRef, terminated: @mutable bool,
12641264
ret llvm::LLVMBuildTruncOrBitCast(B, Val, DestTy, str::buf(""));
12651265
}
12661266

1267-
fn Cast(Op: Opcode, Val: ValueRef, DestTy: TypeRef, Name: sbuf) ->
1267+
fn Cast(Op: Opcode, Val: ValueRef, DestTy: TypeRef, _Name: sbuf) ->
12681268
ValueRef {
12691269
assert (!*terminated);
12701270
ret llvm::LLVMBuildCast(B, Op, Val, DestTy, str::buf(""));

trunk/src/comp/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ fn get_symbol(data: @[u8], id: ast::node_id) -> str {
224224
ret item_symbol(lookup_item(id, data));
225225
}
226226

227-
fn get_tag_variants(data: &@[u8], def: ast::def_id, tcx: &ty::ctxt,
227+
fn get_tag_variants(_data: &@[u8], def: ast::def_id, tcx: &ty::ctxt,
228228
extres: &external_resolver) -> [ty::variant_info] {
229229
let external_crate_id = def.crate;
230230
let data =

trunk/src/comp/metadata/tydecode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn parse_ident(st: @pstate, sd: str_def, last: char) -> ast::ident {
3939
ret parse_ident_(st, sd, bind is_last(last, _));
4040
}
4141

42-
fn parse_ident_(st: @pstate, sd: str_def, is_last: fn(char) -> bool ) ->
42+
fn parse_ident_(st: @pstate, _sd: str_def, is_last: fn(char) -> bool ) ->
4343
ast::ident {
4444
let rslt = "";
4545
while !is_last(peek(st) as char) {
@@ -117,7 +117,7 @@ fn parse_path(st: @pstate, sd: str_def) -> ast::path {
117117

118118
type arg_parser<T> = fn(@pstate, str_def) -> ast::constr_arg_general_<T> ;
119119

120-
fn parse_constr_arg(st: @pstate, sd: str_def) -> ast::fn_constr_arg {
120+
fn parse_constr_arg(st: @pstate, _sd: str_def) -> ast::fn_constr_arg {
121121
alt peek(st) as char {
122122
'*' { st.pos += 1u; ret ast::carg_base; }
123123
c {

trunk/src/comp/middle/alias.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ fn check_crate(tcx: ty::ctxt, crate: &@ast::crate) {
5151
tcx.sess.abort_if_errors();
5252
}
5353

54-
fn visit_fn(cx: &@ctx, f: &ast::_fn, tp: &[ast::ty_param], sp: &span,
55-
name: &fn_ident, id: ast::node_id, sc: &scope, v: &vt<scope>) {
54+
fn visit_fn(cx: &@ctx, f: &ast::_fn, _tp: &[ast::ty_param], _sp: &span,
55+
_name: &fn_ident, id: ast::node_id, sc: &scope, v: &vt<scope>) {
5656
visit::visit_fn_decl(f.decl, sc, v);
5757
for arg_: ast::arg in f.decl.inputs {
5858
cx.local_map.insert(arg_.id, arg(arg_.mode));

trunk/src/comp/middle/ast_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn new_smallintmap_adapter<@K,
8787
ret smallintmap::find(map, key_idx(key));
8888
}
8989

90-
fn remove(key: &K) -> option::t<V> { fail }
90+
fn remove(_key: &K) -> option::t<V> { fail }
9191

9292
fn rehash() { fail }
9393

trunk/src/comp/middle/freevars.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ fn collect_freevars(def_map: &resolve::def_map, sess: &session::session,
4444
for decl: ast::node_id in initial_decls { set_add(decls, decl); }
4545
let refs = @mutable ~[];
4646

47-
let walk_fn = lambda(f: &ast::_fn, tps: &[ast::ty_param], sp: &span,
48-
i: &ast::fn_ident, nid: ast::node_id) {
47+
let walk_fn = lambda(f: &ast::_fn, _tps: &[ast::ty_param], _sp: &span,
48+
_i: &ast::fn_ident, _nid: ast::node_id) {
4949
for a: ast::arg in f.decl.inputs { set_add(decls, a.id); }
5050
};
5151
let walk_expr = lambda(expr: &@ast::expr) {

trunk/src/comp/middle/resolve.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn map_crate(e: &@env, c: &@ast::crate) {
169169
index: index_mod(c.node.module),
170170
mutable glob_imports: ~[],
171171
glob_imported_names: new_str_hash::<import_state>()});
172-
fn index_vi(e: @env, i: &@ast::view_item, sc: &scopes, v: &vt<scopes>) {
172+
fn index_vi(e: @env, i: &@ast::view_item, sc: &scopes, _v: &vt<scopes>) {
173173
alt i.node {
174174
ast::view_item_import(name, ids, id) {
175175
e.imports.insert(id, todo(id, name, ids, i.span, sc));
@@ -215,7 +215,8 @@ fn map_crate(e: &@env, c: &@ast::crate) {
215215
with *visit::default_visitor::<scopes>()};
216216
visit::visit_crate(*c, cons(scope_crate, @nil),
217217
visit::mk_vt(v_link_glob));
218-
fn link_glob(e: @env, vi: &@ast::view_item, sc: &scopes, v: &vt<scopes>) {
218+
fn link_glob(e: @env, vi: &@ast::view_item, sc: &scopes,
219+
_v: &vt<scopes>) {
219220
fn find_mod(e: @env, sc: scopes) -> @indexed_mod {
220221
alt sc {
221222
cons(scope_item(i), tl) {
@@ -267,7 +268,7 @@ fn resolve_names(e: &@env, c: &@ast::crate) {
267268
visit_item: visit_item_with_scope,
268269
visit_block: visit_block_with_scope,
269270
visit_decl: visit_decl_with_scope,
270-
visit_arm: bind walk_arm(e, _, _, _),
271+
visit_arm: walk_arm,
271272
visit_pat: bind walk_pat(e, _, _, _),
272273
visit_expr: bind walk_expr(e, _, _, _),
273274
visit_ty: bind walk_ty(e, _, _, _),
@@ -299,10 +300,10 @@ fn resolve_names(e: &@env, c: &@ast::crate) {
299300
}
300301
}
301302
fn walk_constr(e: @env, p: &ast::path, sp: &span, id: node_id,
302-
sc: &scopes, v: &vt<scopes>) {
303+
sc: &scopes, _v: &vt<scopes>) {
303304
maybe_insert(e, id, lookup_path_strict(*e, sc, sp, p.node, ns_value));
304305
}
305-
fn walk_arm(e: @env, a: &ast::arm, sc: &scopes, v: &vt<scopes>) {
306+
fn walk_arm(a: &ast::arm, sc: &scopes, v: &vt<scopes>) {
306307
visit_arm_with_scope(a, sc, v);
307308
}
308309
fn walk_pat(e: &@env, pat: &@ast::pat, sc: &scopes, v: &vt<scopes>) {
@@ -359,7 +360,7 @@ fn visit_fn_with_scope(e: &@env, f: &ast::_fn, tp: &[ast::ty_param],
359360
// for f's constrs in the table.
360361

361362
for c: @ast::constr in f.decl.constraints {
362-
resolve_constr(e, id, c, sc, v);
363+
resolve_constr(e, c, sc, v);
363364
}
364365
visit::visit_fn(f, tp, sp, name, id,
365366
cons(scope_fn(f.decl, f.proto, tp), @sc), v);
@@ -436,8 +437,7 @@ fn follow_import(e: &env, sc: &scopes, path: &[ident], sp: &span) ->
436437
} else { ret none; }
437438
}
438439

439-
fn resolve_constr(e: @env, id: node_id, c: &@ast::constr, sc: &scopes,
440-
v: &vt<scopes>) {
440+
fn resolve_constr(e: @env, c: &@ast::constr, sc: &scopes, _v: &vt<scopes>) {
441441
let new_def =
442442
lookup_path_strict(*e, sc, c.span, c.node.path.node, ns_value);
443443
if option::is_some(new_def) {
@@ -921,7 +921,7 @@ fn lookup_in_mod(e: &env, m: &def, sp: &span, name: &ident, ns: namespace,
921921
}
922922
}
923923

924-
fn found_view_item(e: &env, vi: @ast::view_item, ns: namespace) ->
924+
fn found_view_item(e: &env, vi: @ast::view_item) ->
925925
option::t<def> {
926926
alt vi.node {
927927
ast::view_item_use(_, _, id) {
@@ -1040,7 +1040,9 @@ fn lookup_glob_in_mod(e: &env, info: @indexed_mod, sp: &span, id: &ident,
10401040
fn lookup_in_mie(e: &env, mie: &mod_index_entry, ns: namespace) ->
10411041
option::t<def> {
10421042
alt mie {
1043-
mie_view_item(view_item) { ret found_view_item(e, view_item, ns); }
1043+
mie_view_item(view_item) {
1044+
if ns == ns_module { ret found_view_item(e, view_item); }
1045+
}
10441046
mie_import_ident(id, _) { ret lookup_import(e, local_def(id), ns); }
10451047
mie_item(item) { ret found_def_item(item, ns); }
10461048
mie_tag_variant(item, variant_idx) {

trunk/src/comp/middle/shape.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ fn tag_kind(ccx : &@crate_ctxt, did : &ast::def_id) -> tag_kind {
231231

232232

233233
// Returns the code corresponding to the pointer size on this architecture.
234-
fn s_int(tcx : &ty_ctxt) -> u8 {
234+
fn s_int(_tcx : &ty_ctxt) -> u8 {
235235
ret shape_i32; // TODO: x86-64
236236
}
237237

238-
fn s_uint(tcx : &ty_ctxt) -> u8 {
238+
fn s_uint(_tcx : &ty_ctxt) -> u8 {
239239
ret shape_u32; // TODO: x86-64
240240
}
241241

242-
fn s_float(tcx : &ty_ctxt) -> u8 {
242+
fn s_float(_tcx : &ty_ctxt) -> u8 {
243243
ret shape_f64; // TODO: x86-64
244244
}
245245

0 commit comments

Comments
 (0)