Skip to content

Commit 212677e

Browse files
committed
---
yaml --- r: 103995 b: refs/heads/try c: b029a18 h: refs/heads/master i: 103993: 38f6d4d 103991: a695e52 v: v3
1 parent a65ecbf commit 212677e

File tree

106 files changed

+695
-683
lines changed

Some content is hidden

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

106 files changed

+695
-683
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: a2290db7971a1e14e4d15316cecaf5c33cc6b0ba
5+
refs/heads/try: b029a188205b704fed28d4fbe0037a453ace0ea1
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/dist.mk

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

branches/try/src/compiletest/runtest.rs

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

branches/try/src/doc/index.md

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

5353
* [The `rustdoc` manual](rustdoc.html)
54+
* [The `rustpkg` manual](rustpkg.html)
5455

5556
# FAQs
5657

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ 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 Str StrVector StrSlice OwnedStr IntoMaybeOwned
90+
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
91+
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9192
syn keyword rustTrait IterBytes
9293
syn keyword rustTrait ToStr IntoStr
9394
syn keyword rustTrait CloneableTuple ImmutableTuple

branches/try/src/libextra/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Rust extras are part of the standard Rust distribution.
2929
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
3030
html_root_url = "http://static.rust-lang.org/doc/master")];
3131

32-
#[feature(macro_rules, globs, managed_boxes)];
32+
#[feature(macro_rules, globs, managed_boxes, asm)];
3333

3434
#[deny(non_camel_case_types)];
3535
#[deny(missing_doc)];

branches/try/src/libextra/test.rs

Lines changed: 16 additions & 4 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) => name.to_owned().into_maybe_owned(),
897-
StaticTestName(name) => name.into_maybe_owned()
896+
DynTestName(ref name) => SendStrOwned(name.clone()),
897+
StaticTestName(name) => SendStrStatic(name),
898898
});
899899
let result_future = task.future_result();
900900
task.spawn(testfn);
@@ -1091,13 +1091,25 @@ impl MetricMap {
10911091
10921092
// Benchmarking
10931093
1094+
/// A function that is opaque to the optimiser, to allow benchmarks to
1095+
/// pretend to use outputs to assist in avoiding dead-code
1096+
/// elimination.
1097+
///
1098+
/// This function is a no-op, and does not even read from `dummy`.
1099+
pub fn black_box<T>(dummy: T) {
1100+
// we need to "use" the argument in some way LLVM can't
1101+
// introspect.
1102+
unsafe {asm!("" : : "r"(&dummy))}
1103+
}
1104+
1105+
10941106
impl BenchHarness {
10951107
/// Callback for benchmark functions to run in their body.
1096-
pub fn iter(&mut self, inner: ||) {
1108+
pub fn iter<T>(&mut self, inner: || -> T) {
10971109
self.ns_start = precise_time_ns();
10981110
let k = self.iterations;
10991111
for _ in range(0u64, k) {
1100-
inner();
1112+
black_box(inner());
11011113
}
11021114
self.ns_end = precise_time_ns();
11031115
}

branches/try/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("<main>".into_maybe_owned());
260+
opts.name = Some(SendStrStatic("<main>"));
261261
pool.spawn(opts, main);
262262

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

branches/try/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("test".into_maybe_owned());
513+
opts.name = Some(SendStrStatic("test"));
514514
opts.stack_size = Some(20 * 4096);
515515
let (p, c) = Chan::new();
516516
opts.notify_chan = Some(c);

branches/try/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("test".into_maybe_owned());
297+
opts.name = Some(SendStrStatic("test"));
298298
opts.stack_size = Some(20 * 4096);
299299
let (p, c) = Chan::new();
300300
opts.notify_chan = Some(c);

branches/try/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/try/src/librustc/driver/driver.rs

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

11851186
// When the user supplies --test we should implicitly supply --cfg test
11861187
#[test]

branches/try/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/try/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/try/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/try/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/try/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/try/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/try/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/try/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/try/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
}

0 commit comments

Comments
 (0)