Skip to content

Commit 1e93cee

Browse files
committed
---
yaml --- r: 149019 b: refs/heads/try2 c: fddc18e h: refs/heads/master i: 149017: 6505e41 149015: 0364bee v: v3
1 parent 9de84bc commit 1e93cee

File tree

105 files changed

+680
-680
lines changed

Some content is hidden

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

105 files changed

+680
-680
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 38447344f1f1dc3c3bb0cbcf361deee49e2f9828
8+
refs/heads/try2: fddc18ec4b8a9c261ae732dde1120d663599ef64
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/dist.mk

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,12 @@ PKG_FILES := \
2626
$(S)man \
2727
$(S)doc \
2828
$(addprefix $(S)src/, \
29-
README.txt \
30-
driver \
31-
librustc \
29+
README.md \
3230
compiletest \
31+
driver \
3332
etc \
34-
libextra \
35-
libstd \
36-
libsyntax \
37-
librustuv \
38-
libgreen \
39-
libnative \
33+
$(foreach crate,$(CRATES),lib$(crate)) \
4034
rt \
41-
librustdoc \
4235
rustllvm \
4336
snapshots.txt \
4437
test) \

branches/try2/src/compiletest/runtest.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,7 @@ fn check_error_patterns(props: &TestProps,
442442
testfile: &Path,
443443
ProcRes: &ProcRes) {
444444
if props.error_patterns.is_empty() {
445-
testfile.display().with_str(|s| {
446-
fatal(~"no error pattern specified in " + s);
447-
})
445+
fatal(~"no error pattern specified in " + testfile.display().as_maybe_owned().as_slice());
448446
}
449447
450448
if ProcRes.status.success() {

branches/try2/src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ li {list-style-type: none; }
5151
# Tooling
5252

5353
* [The `rustdoc` manual](rustdoc.html)
54-
* [The `rustpkg` manual](rustpkg.html)
5554

5655
# FAQs
5756

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
8787
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
8888
syn keyword rustTrait RawPtr
8989
syn keyword rustTrait Buffer Writer Reader Seek
90-
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
91-
syn keyword rustTrait Str StrVector StrSlice OwnedStr
90+
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
9291
syn keyword rustTrait IterBytes
9392
syn keyword rustTrait ToStr IntoStr
9493
syn keyword rustTrait CloneableTuple ImmutableTuple

branches/try2/src/libextra/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,8 @@ pub fn run_test(force_ignore: bool,
893893
spawn(proc() {
894894
let mut task = task::task();
895895
task.name(match desc.name {
896-
DynTestName(ref name) => SendStrOwned(name.clone()),
897-
StaticTestName(name) => SendStrStatic(name),
896+
DynTestName(ref name) => name.to_owned().into_maybe_owned(),
897+
StaticTestName(name) => name.into_maybe_owned()
898898
});
899899
let result_future = task.future_result();
900900
task.spawn(testfn);

branches/try2/src/libgreen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub fn run(main: proc()) -> int {
257257
let (port, chan) = Chan::new();
258258
let mut opts = TaskOpts::new();
259259
opts.notify_chan = Some(chan);
260-
opts.name = Some(SendStrStatic("<main>"));
260+
opts.name = Some("<main>".into_maybe_owned());
261261
pool.spawn(opts, main);
262262

263263
// Wait for the main task to return, and set the process error code

branches/try2/src/libgreen/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ mod tests {
510510
#[test]
511511
fn smoke_opts() {
512512
let mut opts = TaskOpts::new();
513-
opts.name = Some(SendStrStatic("test"));
513+
opts.name = Some("test".into_maybe_owned());
514514
opts.stack_size = Some(20 * 4096);
515515
let (p, c) = Chan::new();
516516
opts.notify_chan = Some(c);

branches/try2/src/libnative/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ mod tests {
294294
#[test]
295295
fn smoke_opts() {
296296
let mut opts = TaskOpts::new();
297-
opts.name = Some(SendStrStatic("test"));
297+
opts.name = Some("test".into_maybe_owned());
298298
opts.stack_size = Some(20 * 4096);
299299
let (p, c) = Chan::new();
300300
opts.notify_chan = Some(c);

branches/try2/src/librustc/back/link.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn WriteOutputFile(
7676
let result = llvm::LLVMRustWriteOutputFile(
7777
Target, PM, M, Output, FileType);
7878
if !result {
79-
llvm_err(sess, ~"Could not write output");
79+
llvm_err(sess, ~"could not write output");
8080
}
8181
})
8282
}
@@ -189,7 +189,7 @@ pub mod write {
189189
for pass in sess.opts.custom_passes.iter() {
190190
pass.with_c_str(|s| {
191191
if !llvm::LLVMRustAddPass(mpm, s) {
192-
sess.warn(format!("Unknown pass {}, ignoring", *pass));
192+
sess.warn(format!("unknown pass {}, ignoring", *pass));
193193
}
194194
})
195195
}
@@ -876,11 +876,11 @@ fn link_binary_output(sess: Session,
876876
let obj_is_writeable = is_writeable(&obj_filename);
877877
let out_is_writeable = is_writeable(&out_filename);
878878
if !out_is_writeable {
879-
sess.fatal(format!("Output file {} is not writeable -- check its permissions.",
879+
sess.fatal(format!("output file {} is not writeable -- check its permissions.",
880880
out_filename.display()));
881881
}
882882
else if !obj_is_writeable {
883-
sess.fatal(format!("Object file {} is not writeable -- check its permissions.",
883+
sess.fatal(format!("object file {} is not writeable -- check its permissions.",
884884
obj_filename.display()));
885885
}
886886

branches/try2/src/librustc/driver/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,6 @@ mod test {
11811181
use getopts::getopts;
11821182
use syntax::attr;
11831183
use syntax::attr::AttrMetaMethods;
1184-
use syntax::diagnostic;
11851184

11861185
// When the user supplies --test we should implicitly supply --cfg test
11871186
#[test]

branches/try2/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl Session_ {
308308
// This exists to help with refactoring to eliminate impossible
309309
// cases later on
310310
pub fn impossible_case(&self, sp: Span, msg: &str) -> ! {
311-
self.span_bug(sp, format!("Impossible case reached: {}", msg));
311+
self.span_bug(sp, format!("impossible case reached: {}", msg));
312312
}
313313
pub fn verbose(&self) -> bool { self.debugging_opt(VERBOSE) }
314314
pub fn time_passes(&self) -> bool { self.debugging_opt(TIME_PASSES) }

branches/try2/src/librustc/metadata/tydecode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ fn parse_sig(st: &mut PState, conv: conv_did) -> ty::FnSig {
527527
let variadic = match next(st) {
528528
'V' => true,
529529
'N' => false,
530-
r => fail!(format!("Bad variadic: {}", r)),
530+
r => fail!(format!("bad variadic: {}", r)),
531531
};
532532
let ret_ty = parse_ty(st, |x,y| conv(x,y));
533533
ty::FnSig {binder_id: id,

branches/try2/src/librustc/metadata/tyencode.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn enc_region(w: &mut MemWriter, cx: @ctxt, r: ty::Region) {
195195
}
196196
ty::ReInfer(_) => {
197197
// these should not crop up after typeck
198-
cx.diag.handler().bug("Cannot encode region variables");
198+
cx.diag.handler().bug("cannot encode region variables");
199199
}
200200
}
201201
}
@@ -320,7 +320,7 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
320320
enc_bare_fn_ty(w, cx, f);
321321
}
322322
ty::ty_infer(_) => {
323-
cx.diag.handler().bug("Cannot encode inference variable types");
323+
cx.diag.handler().bug("cannot encode inference variable types");
324324
}
325325
ty::ty_param(param_ty {idx: id, def_id: did}) => {
326326
mywrite!(w, "p{}|{}", (cx.ds)(did), id);
@@ -334,7 +334,7 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
334334
enc_substs(w, cx, substs);
335335
mywrite!(w, "]");
336336
}
337-
ty::ty_err => fail!("Shouldn't encode error type")
337+
ty::ty_err => fail!("shouldn't encode error type")
338338
}
339339
}
340340

branches/try2/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<'a> GuaranteeLifetimeContext<'a> {
215215
// the check above should fail for anything is not ReScope
216216
self.bccx.tcx.sess.span_bug(
217217
cmt_base.span,
218-
format!("Cannot issue root for scope region: {:?}",
218+
format!("cannot issue root for scope region: {:?}",
219219
self.loan_region));
220220
}
221221
};

branches/try2/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ impl<'a> GatherLoanCtxt<'a> {
496496
ty::ReInfer(..) => {
497497
self.tcx().sess.span_bug(
498498
cmt.span,
499-
format!("Invalid borrow lifetime: {:?}", loan_region));
499+
format!("invalid borrow lifetime: {:?}", loan_region));
500500
}
501501
};
502502
debug!("loan_scope = {:?}", loan_scope);
@@ -820,7 +820,7 @@ impl<'a> GatherLoanCtxt<'a> {
820820
_ => {
821821
self.tcx().sess.span_bug(
822822
pat.span,
823-
format!("Type of slice pattern is not a slice"));
823+
format!("type of slice pattern is not a slice"));
824824
}
825825
}
826826
}

branches/try2/src/librustc/middle/borrowck/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,14 +769,14 @@ impl BorrowckCtxt {
769769
}
770770
_ => {
771771
self.tcx.sess.bug(
772-
format!("Loan path LpVar({:?}) maps to {:?}, not local",
772+
format!("loan path LpVar({:?}) maps to {:?}, not local",
773773
id, pat));
774774
}
775775
}
776776
}
777777
r => {
778778
self.tcx.sess.bug(
779-
format!("Loan path LpVar({:?}) maps to {:?}, not local",
779+
format!("loan path LpVar({:?}) maps to {:?}, not local",
780780
id, r));
781781
}
782782
}

branches/try2/src/librustc/middle/borrowck/move_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl MoveData {
494494
dfcx_assign.add_kill(kill_id, assignment_index);
495495
}
496496
LpExtend(..) => {
497-
tcx.sess.bug("Var assignment for non var path");
497+
tcx.sess.bug("var assignment for non var path");
498498
}
499499
}
500500
}

branches/try2/src/librustc/middle/cfg/construct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,13 +507,13 @@ impl CFGBuilder {
507507
}
508508
self.tcx.sess.span_bug(
509509
expr.span,
510-
format!("No loop scope for id {:?}", loop_id));
510+
format!("no loop scope for id {:?}", loop_id));
511511
}
512512

513513
r => {
514514
self.tcx.sess.span_bug(
515515
expr.span,
516-
format!("Bad entry `{:?}` in def_map for label", r));
516+
format!("bad entry `{:?}` in def_map for label", r));
517517
}
518518
}
519519
}

branches/try2/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ fn check_legality_of_move_bindings(cx: &MatchCheckCtxt,
971971
_ => {
972972
cx.tcx.sess.span_bug(
973973
p.span,
974-
format!("Binding pattern {} is \
974+
format!("binding pattern {} is \
975975
not an identifier: {:?}",
976976
p.id, p.node));
977977
}

branches/try2/src/librustc/middle/const_eval.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
342342
Ok(const_float(f)) => Ok(const_float(-f)),
343343
Ok(const_int(i)) => Ok(const_int(-i)),
344344
Ok(const_uint(i)) => Ok(const_uint(-i)),
345-
Ok(const_str(_)) => Err(~"Negate on string"),
346-
Ok(const_bool(_)) => Err(~"Negate on boolean"),
345+
Ok(const_str(_)) => Err(~"negate on string"),
346+
Ok(const_bool(_)) => Err(~"negate on boolean"),
347347
ref err => ((*err).clone())
348348
}
349349
}
@@ -352,7 +352,7 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
352352
Ok(const_int(i)) => Ok(const_int(!i)),
353353
Ok(const_uint(i)) => Ok(const_uint(!i)),
354354
Ok(const_bool(b)) => Ok(const_bool(!b)),
355-
_ => Err(~"Not on float or string")
355+
_ => Err(~"not on float or string")
356356
}
357357
}
358358
ExprBinary(_, op, a, b) => {
@@ -371,7 +371,7 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
371371
BiNe => fromb(a != b),
372372
BiGe => fromb(a >= b),
373373
BiGt => fromb(a > b),
374-
_ => Err(~"Can't do this op on floats")
374+
_ => Err(~"can't do this op on floats")
375375
}
376376
}
377377
(Ok(const_int(a)), Ok(const_int(b))) => {
@@ -423,14 +423,14 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
423423
match op {
424424
BiShl => Ok(const_int(a << b)),
425425
BiShr => Ok(const_int(a >> b)),
426-
_ => Err(~"Can't do this op on an int and uint")
426+
_ => Err(~"can't do this op on an int and uint")
427427
}
428428
}
429429
(Ok(const_uint(a)), Ok(const_int(b))) => {
430430
match op {
431431
BiShl => Ok(const_uint(a << b)),
432432
BiShr => Ok(const_uint(a >> b)),
433-
_ => Err(~"Can't do this op on a uint and int")
433+
_ => Err(~"can't do this op on a uint and int")
434434
}
435435
}
436436
(Ok(const_bool(a)), Ok(const_bool(b))) => {
@@ -442,10 +442,10 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
442442
BiBitOr => a | b,
443443
BiEq => a == b,
444444
BiNe => a != b,
445-
_ => return Err(~"Can't do this op on bools")
445+
_ => return Err(~"can't do this op on bools")
446446
}))
447447
}
448-
_ => Err(~"Bad operands for binary")
448+
_ => Err(~"bad operands for binary")
449449
}
450450
}
451451
ExprCast(base, target_ty) => {
@@ -456,7 +456,7 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
456456
.or_else(|| astconv::ast_ty_to_prim_ty(tcx.ty_ctxt(), target_ty))
457457
.unwrap_or_else(|| tcx.ty_ctxt().sess.span_fatal(
458458
target_ty.span,
459-
format!("Target type not found for const cast")
459+
format!("target type not found for const cast")
460460
));
461461

462462
let base = eval_const_expr_partial(tcx, base);
@@ -469,41 +469,41 @@ pub fn eval_const_expr_partial<T: ty::ExprTyProvider>(tcx: &T, e: &Expr)
469469
const_uint(u) => Ok(const_float(u as f64)),
470470
const_int(i) => Ok(const_float(i as f64)),
471471
const_float(f) => Ok(const_float(f)),
472-
_ => Err(~"Can't cast float to str"),
472+
_ => Err(~"can't cast float to str"),
473473
}
474474
}
475475
ty::ty_uint(_) => {
476476
match val {
477477
const_uint(u) => Ok(const_uint(u)),
478478
const_int(i) => Ok(const_uint(i as u64)),
479479
const_float(f) => Ok(const_uint(f as u64)),
480-
_ => Err(~"Can't cast str to uint"),
480+
_ => Err(~"can't cast str to uint"),
481481
}
482482
}
483483
ty::ty_int(_) | ty::ty_bool => {
484484
match val {
485485
const_uint(u) => Ok(const_int(u as i64)),
486486
const_int(i) => Ok(const_int(i)),
487487
const_float(f) => Ok(const_int(f as i64)),
488-
_ => Err(~"Can't cast str to int"),
488+
_ => Err(~"can't cast str to int"),
489489
}
490490
}
491-
_ => Err(~"Can't cast this type")
491+
_ => Err(~"can't cast this type")
492492
}
493493
}
494494
}
495495
}
496496
ExprPath(_) => {
497497
match lookup_const(tcx.ty_ctxt(), e) {
498498
Some(actual_e) => eval_const_expr_partial(&tcx.ty_ctxt(), actual_e),
499-
None => Err(~"Non-constant path in constant expr")
499+
None => Err(~"non-constant path in constant expr")
500500
}
501501
}
502502
ExprLit(lit) => Ok(lit_to_const(lit)),
503503
// If we have a vstore, just keep going; it has to be a string
504504
ExprVstore(e, _) => eval_const_expr_partial(tcx, e),
505505
ExprParen(e) => eval_const_expr_partial(tcx, e),
506-
_ => Err(~"Unsupported constant expr")
506+
_ => Err(~"unsupported constant expr")
507507
}
508508
}
509509

branches/try2/src/librustc/middle/dataflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,15 +879,15 @@ impl<'a, O:DataFlowOperator> PropagationContext<'a, O> {
879879
None => {
880880
self.tcx().sess.span_bug(
881881
expr.span,
882-
format!("No loop scope for id {:?}", loop_id));
882+
format!("no loop scope for id {:?}", loop_id));
883883
}
884884
}
885885
}
886886

887887
r => {
888888
self.tcx().sess.span_bug(
889889
expr.span,
890-
format!("Bad entry `{:?}` in def_map for label", r));
890+
format!("bad entry `{:?}` in def_map for label", r));
891891
}
892892
}
893893
}

0 commit comments

Comments
 (0)