Skip to content

Commit 2c11596

Browse files
committed
---
yaml --- r: 11628 b: refs/heads/master c: 0ee96de h: refs/heads/master v: v3
1 parent 9d762b5 commit 2c11596

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+108
-109
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 13a07ce1d4df500d18ce393a7b46775174560d01
2+
refs/heads/master: 0ee96de4ee21643546908065fbf3bc7a3f436a3f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ fn build_link_meta(sess: session, c: ast::crate, output: str,
439439
{
440440
let os = str::split_char(fs::basename(output), '.');
441441
if (vec::len(os) < 2u) {
442-
sess.fatal(#fmt("Output file name %s doesn't\
442+
sess.fatal(#fmt("output file name %s doesn't\
443443
appear to have an extension", output));
444444
}
445445
vec::pop(os);

trunk/src/rustc/driver/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,12 @@ fn build_target_config(sopts: @session::options,
309309
demitter: diagnostic::emitter) -> @session::config {
310310
let os = alt get_os(sopts.target_triple) {
311311
some(os) { os }
312-
none { early_error(demitter, "Unknown operating system!") }
312+
none { early_error(demitter, "unknown operating system") }
313313
};
314314
let arch = alt get_arch(sopts.target_triple) {
315315
some(arch) { arch }
316316
none { early_error(demitter,
317-
"Unknown architecture! " + sopts.target_triple) }
317+
"unknown architecture: " + sopts.target_triple) }
318318
};
319319
let (int_type, uint_type, float_type) = alt arch {
320320
session::arch_x86 {(ast::ty_i32, ast::ty_u32, ast::ty_f64)}
@@ -607,7 +607,7 @@ fn build_output_filenames(ifile: str,
607607
}
608608

609609
if odir != none {
610-
sess.warn("Ignoring --out-dir flag due to -o flag.");
610+
sess.warn("ignoring --out-dir flag due to -o flag.");
611611
}
612612
}
613613
}

trunk/src/rustc/driver/rustc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ fn run_compiler(args: [str], demitter: diagnostic::emitter) {
9393
ret;
9494
}
9595
let ifile = alt vec::len(match.free) {
96-
0u { early_error(demitter, "No input filename given.") }
96+
0u { early_error(demitter, "o input filename given") }
9797
1u { match.free[0] }
98-
_ { early_error(demitter, "Multiple input filenames provided.") }
98+
_ { early_error(demitter, "multiple input filenames provided") }
9999
};
100100

101101
let sopts = build_session_options(match, demitter);

trunk/src/rustc/metadata/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ fn decode_side_tables(xcx: extended_decode_ctxt,
823823
val_dsr.read_dict_res(xcx));
824824
} else {
825825
xcx.dcx.tcx.sess.bug(
826-
#fmt["Unknown tag found in side tables: %x", tag]);
826+
#fmt["unknown tag found in side tables: %x", tag]);
827827
}
828828
}
829829

trunk/src/rustc/metadata/creader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn list_file_metadata(sess: session::session, path: str, out: io::writer) {
9696
alt get_metadata_section(sess, path) {
9797
option::some(bytes) { decoder::list_crate_metadata(bytes, out); }
9898
option::none {
99-
out.write_str("Could not find metadata in " + path + ".\n");
99+
out.write_str("could not find metadata in " + path + ".\n");
100100
}
101101
}
102102
}

trunk/src/rustc/middle/capture.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ fn check_capture_clause(tcx: ty::ctxt,
4040
if !vec::any(*freevars, {|fv| fv.def == cap_def}) {
4141
tcx.sess.span_warn(
4242
cap_item.span,
43-
#fmt("Captured variable '%s' not used in closure",
43+
#fmt("captured variable '%s' not used in closure",
4444
cap_item.name));
4545
}
4646

4747
let cap_def_id = ast_util::def_id_of_def(cap_def).node;
4848
if !seen_defs.insert(cap_def_id, ()) {
4949
tcx.sess.span_err(
5050
cap_item.span,
51-
#fmt("Variable '%s' captured more than once",
51+
#fmt("variable '%s' captured more than once",
5252
cap_item.name));
5353
}
5454
};
@@ -58,7 +58,7 @@ fn check_capture_clause(tcx: ty::ctxt,
5858
ast::def_upvar(_, _, _) {
5959
tcx.sess.span_err(
6060
cap_item.span,
61-
#fmt("Upvars (like '%s') cannot be moved into a closure",
61+
#fmt("upvars (like '%s') cannot be moved into a closure",
6262
cap_item.name));
6363
}
6464
_ {}
@@ -70,7 +70,7 @@ fn check_capture_clause(tcx: ty::ctxt,
7070
let cap_item0 = vec::head(v);
7171
tcx.sess.span_err(
7272
cap_item0.span,
73-
"Cannot capture values explicitly with a block closure");
73+
"cannot capture values explicitly with a block closure");
7474
}
7575
};
7676

trunk/src/rustc/middle/kind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn check_expr(e: @expr, cx: ctx, v: visit::vt<ctx>) {
150150
let t = ty::expr_ty(cx.tcx, ex);
151151
let ty_fields = alt ty::get(t).struct {
152152
ty::ty_rec(f) { f }
153-
_ { cx.tcx.sess.span_bug(ex.span, "Bad expr type in record"); }
153+
_ { cx.tcx.sess.span_bug(ex.span, "bad expr type in record"); }
154154
};
155155
for tf in ty_fields {
156156
if !vec::any(fields, {|f| f.node.ident == tf.ident}) &&

trunk/src/rustc/middle/mutbl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn expr_root(tcx: ty::ctxt, ex: @expr, autoderef: bool) ->
9898
is_mutbl = mt.mutbl == m_mutbl;
9999
ptr = true;
100100
}
101-
_ { tcx.sess.span_bug(base.span, "Ill-typed base \
101+
_ { tcx.sess.span_bug(base.span, "ill-typed base \
102102
expression in deref"); }
103103
}
104104
ds += [@{mutbl: is_mutbl, kind: unbox(ptr && is_mutbl),

trunk/src/rustc/middle/resolve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn map_crate(e: @env, c: @ast::crate) {
329329
e.mod_map.get(ast::crate_node_id).glob_imports
330330
+= [glob];
331331
}
332-
_ { e.sess.span_bug(vi.span, "Unexpected scope in a \
332+
_ { e.sess.span_bug(vi.span, "unexpected scope in a \
333333
glob import"); }
334334
}
335335
}
@@ -376,7 +376,7 @@ fn resolve_imports(e: env) {
376376
resolve_import(e, local_def(node_id), name, *path, span, scopes);
377377
}
378378
resolved(_, _, _, _, _, _) | is_glob(_, _, _) { }
379-
_ { e.sess.bug("Shouldn't see a resolving in resolve_imports"); }
379+
_ { e.sess.bug("shouldn't see a resolving in resolve_imports"); }
380380
}
381381
};
382382
e.used_imports.track = false;
@@ -658,7 +658,7 @@ fn visit_local_with_scope(e: @env, loc: @local, sc:scopes, v:vt<scopes>) {
658658
// Declaration shadows a enum that's in scope.
659659
// That's an error.
660660
e.sess.span_err(loc.span,
661-
#fmt("Declaration of %s shadows a enum that's in scope",
661+
#fmt("declaration of `%s` shadows a enum that's in scope",
662662
path_to_ident(an_ident)));
663663
}
664664
_ {}
@@ -1324,7 +1324,7 @@ fn lookup_in_block(e: env, name: ident, sp: span, b: ast::blk_, pos: uint,
13241324
}
13251325
}
13261326
}
1327-
_ { e.sess.span_bug(vi.span, "Unexpected view_item in block"); }
1327+
_ { e.sess.span_bug(vi.span, "unexpected view_item in block"); }
13281328
}
13291329
}
13301330
ret none;

trunk/src/rustc/middle/trans/alt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ fn compile_submatch(bcx: block, m: match, vals: [ValueRef], f: mk_fail,
428428
let tup_ty = node_id_type(bcx, pat_id);
429429
let n_tup_elts = alt ty::get(tup_ty).struct {
430430
ty::ty_tup(elts) { elts.len() }
431-
_ { ccx.sess.bug("Non-tuple type in tuple pattern"); }
431+
_ { ccx.sess.bug("non-tuple type in tuple pattern"); }
432432
};
433433
let tup_vals = [], i = 0u;
434434
while i < n_tup_elts {
@@ -588,7 +588,7 @@ fn make_phi_bindings(bcx: block, map: [exit_node],
588588
if bcx.ccx().maps.copy_map.contains_key(node_id) {
589589
let local = alt bcx.fcx.lllocals.find(node_id) {
590590
some(local_mem(x)) { x }
591-
_ { bcx.tcx().sess.bug("Someone \
591+
_ { bcx.tcx().sess.bug("someone \
592592
forgot to document an invariant in \
593593
make_phi_bindings"); }
594594
};

trunk/src/rustc/middle/trans/base.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,7 @@ fn trans_if(cx: block, cond: @ast::expr, thn: ast::blk,
19571957
trans_block(else_cx, blk, else_dest)
19581958
}
19591959
// would be nice to have a constraint on ifs
1960-
_ { cx.tcx().sess.bug("Strange alternative in if"); }
1960+
_ { cx.tcx().sess.bug("strange alternative in if"); }
19611961
}
19621962
}
19631963
_ { else_cx }
@@ -2119,7 +2119,7 @@ fn monomorphic_fn(ccx: crate_ctxt, fn_id: ast::def_id, substs: [ty::t],
21192119
ast_map::node_method(m, _, pt) { (pt, m.ident) }
21202120
// We can't monomorphize native functions
21212121
ast_map::node_native_item(_, _) { ret none; }
2122-
_ { fail "Unexpected node type"; }
2122+
_ { fail "unexpected node type"; }
21232123
};
21242124
let pt = *pt + [path_name(ccx.names(name))];
21252125
let s = mangle_exported_name(ccx, pt, mono_ty);
@@ -2614,10 +2614,10 @@ fn trans_cast(cx: block, e: @ast::expr, id: ast::node_id,
26142614
integral {int_cast(e_res.bcx, ll_t_out,
26152615
val_ty(lldiscrim_a), lldiscrim_a, true)}
26162616
float {SIToFP(e_res.bcx, lldiscrim_a, ll_t_out)}
2617-
_ { ccx.sess.bug("Translating unsupported cast.") }
2617+
_ { ccx.sess.bug("translating unsupported cast.") }
26182618
}
26192619
}
2620-
_ { ccx.sess.bug("Translating unsupported cast.") }
2620+
_ { ccx.sess.bug("translating unsupported cast.") }
26212621
};
26222622
ret store_in_dest(e_res.bcx, newval, dest);
26232623
}
@@ -3139,7 +3139,7 @@ fn trans_expr(bcx: block, e: @ast::expr, dest: dest) -> block {
31393139
bcx, proto, decl, body, e.span, e.id, cap_clause, dest);
31403140
}
31413141
_ {
3142-
fail "Type of fn block is not a function!";
3142+
fail "type of fn block is not a function!";
31433143
}
31443144
}
31453145
}
@@ -3993,7 +3993,7 @@ fn copy_args_to_allocas(fcx: fn_ctxt, bcx: block, args: [ast::arg],
39933993
let tcx = bcx.tcx();
39943994
let arg_n: uint = 0u, bcx = bcx;
39953995
let epic_fail = fn@() -> ! {
3996-
tcx.sess.bug("Someone forgot\
3996+
tcx.sess.bug("someone forgot\
39973997
to document an invariant in copy_args_to_allocas!");
39983998
};
39993999
for arg in arg_tys {
@@ -4306,7 +4306,7 @@ fn trans_const(cx: crate_ctxt, e: @ast::expr, id: ast::node_id) {
43064306
llvm::LLVMSetInitializer(g, v);
43074307
llvm::LLVMSetGlobalConstant(g, True);
43084308
}
4309-
_ { cx.sess.span_fatal(e.span, "Unbound const in trans_const"); }
4309+
_ { cx.sess.span_bug(e.span, "unbound const in trans_const"); }
43104310
}
43114311
}
43124312

@@ -4319,7 +4319,7 @@ fn trans_item(ccx: crate_ctxt, item: ast::item) {
43194319
let llfndecl = alt ccx.item_ids.find(item.id) {
43204320
some(llfndecl) { llfndecl }
43214321
_ {
4322-
ccx.sess.span_fatal(item.span,
4322+
ccx.sess.span_bug(item.span,
43234323
"unbound function item in trans_item");
43244324
}
43254325
};

trunk/src/rustc/middle/trans/closure.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn store_environment(
325325
bcx = base::copy_val(bcx, INIT, bound_data, val, ty);
326326
}
327327
env_copy(_, _, temporary) {
328-
fail "Cannot capture temporary upvar";
328+
fail "cannot capture temporary upvar";
329329
}
330330
env_move(val, ty, kind) {
331331
let src = {bcx:bcx, val:val, kind:kind};
@@ -339,7 +339,7 @@ fn store_environment(
339339
Store(bcx, addr, bound_data);
340340
}
341341
env_ref(_, _, temporary) {
342-
fail "Cannot capture temporary upvar";
342+
fail "cannot capture temporary upvar";
343343
}
344344
}
345345
}

trunk/src/rustc/middle/trans/impl.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn trans_impl(ccx: crate_ctxt, path: path, name: ast::ident,
5555
m_bounds, none, m.id, none);
5656
}
5757
_ {
58-
ccx.sess.bug("Unbound id in trans_impl");
58+
ccx.sess.bug("unbound id in trans_impl");
5959
}
6060
}
6161
}
@@ -347,7 +347,7 @@ fn trans_impl_vtable(ccx: crate_ctxt, pt: path,
347347
extra_tps, target)
348348
}
349349
_ {
350-
ccx.sess.span_bug(it.span, "No matching method \
350+
ccx.sess.span_bug(it.span, "no matching method \
351351
in trans_impl_vtable");
352352
}
353353
}
@@ -459,7 +459,7 @@ fn dict_id(tcx: ty::ctxt, origin: typeck::dict_origin) -> dict_id {
459459
@{def: did, params: []}
460460
}
461461
_ {
462-
tcx.sess.bug("Unexpected dict_param in dict_id");
462+
tcx.sess.bug("unexpected dict_param in dict_id");
463463
}
464464
}
465465
}
@@ -523,7 +523,7 @@ fn get_dict_ptrs(bcx: block, origin: typeck::dict_origin)
523523
{bcx: bcx, ptrs: [get_vtable(ccx, did)]}
524524
}
525525
_ {
526-
bcx.tcx().sess.bug("Unexpected dict_param in get_dict_ptrs");
526+
bcx.tcx().sess.bug("unexpected dict_param in get_dict_ptrs");
527527
}
528528
}
529529
}

trunk/src/rustc/middle/tstate/auxiliary.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ fn expr_to_constr_arg(tcx: ty::ctxt, e: @expr) -> @constr_arg_use {
596596
expr_lit(l) { ret @respan(e.span, carg_lit(l)); }
597597
_ {
598598
tcx.sess.span_fatal(e.span,
599-
"Arguments to constrained functions must be " +
599+
"arguments to constrained functions must be " +
600600
"literals or local variables");
601601
}
602602
}
@@ -619,16 +619,13 @@ fn expr_to_constr(tcx: ty::ctxt, e: @expr) -> sp_constr {
619619
exprs_to_constr_args(tcx, args)));
620620
}
621621
_ {
622-
tcx.sess.span_fatal(operator.span,
623-
"Internal error: " +
624-
" ill-formed operator \
625-
in predicate");
622+
tcx.sess.span_bug(operator.span,
623+
"ill-formed operator in predicate");
626624
}
627625
}
628626
}
629627
_ {
630-
tcx.sess.span_fatal(e.span,
631-
"Internal error: " + " ill-formed predicate");
628+
tcx.sess.span_bug(e.span, "ill-formed predicate");
632629
}
633630
}
634631
}
@@ -656,7 +653,7 @@ fn substitute_arg(cx: ty::ctxt, actuals: [@expr], a: @constr_arg) ->
656653
if i < num_actuals {
657654
ret expr_to_constr_arg(cx, actuals[i]);
658655
} else {
659-
cx.sess.span_fatal(a.span, "Constraint argument out of bounds");
656+
cx.sess.span_fatal(a.span, "constraint argument out of bounds");
660657
}
661658
}
662659
carg_base { ret @respan(a.span, carg_base); }
@@ -1029,7 +1026,7 @@ fn args_to_constr_args(tcx: ty::ctxt, args: [arg],
10291026
node: args[i].id})
10301027
} else {
10311028
tcx.sess.span_bug(a.span,
1032-
"Index out of bounds in \
1029+
"index out of bounds in \
10331030
constraint arg");
10341031
}
10351032
}

trunk/src/rustc/middle/tstate/ck.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ fn check_states_expr(e: @expr, fcx: fn_ctxt, v: visit::vt<fn_ctxt>) {
5151
let s = "";
5252
let diff = first_difference_string(fcx, prec, pres);
5353
s +=
54-
"Unsatisfied precondition constraint (for example, " + diff +
54+
"unsatisfied precondition constraint (for example, " + diff +
5555
") for expression:\n";
5656
s += syntax::print::pprust::expr_to_str(e);
57-
s += "\nPrecondition:\n";
57+
s += "\nprecondition:\n";
5858
s += tritv_to_str(fcx, prec);
59-
s += "\nPrestate:\n";
59+
s += "\nprestate:\n";
6060
s += tritv_to_str(fcx, pres);
6161
fcx.ccx.tcx.sess.span_fatal(e.span, s);
6262
}
@@ -81,12 +81,12 @@ fn check_states_stmt(s: @stmt, fcx: fn_ctxt, v: visit::vt<fn_ctxt>) {
8181
let ss = "";
8282
let diff = first_difference_string(fcx, prec, pres);
8383
ss +=
84-
"Unsatisfied precondition constraint (for example, " + diff +
84+
"unsatisfied precondition constraint (for example, " + diff +
8585
") for statement:\n";
8686
ss += syntax::print::pprust::stmt_to_str(*s);
87-
ss += "\nPrecondition:\n";
87+
ss += "\nprecondition:\n";
8888
ss += tritv_to_str(fcx, prec);
89-
ss += "\nPrestate: \n";
89+
ss += "\nprestate: \n";
9090
ss += tritv_to_str(fcx, pres);
9191
fcx.ccx.tcx.sess.span_fatal(s.span, ss);
9292
}
@@ -115,7 +115,7 @@ fn check_states_against_conditions(fcx: fn_ctxt,
115115
fcx.ccx.tcx, id))) &&
116116
f_decl.cf == return_val {
117117
fcx.ccx.tcx.sess.span_err(f_body.span,
118-
"In function " + fcx.name +
118+
"in function " + fcx.name +
119119
", not all control paths \
120120
return a value");
121121
fcx.ccx.tcx.sess.span_fatal(f_decl.output.span,
@@ -129,7 +129,7 @@ fn check_states_against_conditions(fcx: fn_ctxt,
129129

130130
if !promises(fcx, post, fcx.enclosing.i_diverge) {
131131
fcx.ccx.tcx.sess.span_fatal(f_body.span,
132-
"In non-returning function " +
132+
"in non-returning function " +
133133
fcx.name +
134134
", some control paths may \
135135
return to the caller");

0 commit comments

Comments
 (0)