Skip to content

Commit 34fb04d

Browse files
committed
---
yaml --- r: 120823 b: refs/heads/dist-snap c: cd844c5 h: refs/heads/master i: 120821: 2114adc 120819: b970bb0 120815: a908e39 v: v3
1 parent 1f6fc14 commit 34fb04d

File tree

369 files changed

+4350
-3252
lines changed

Some content is hidden

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

369 files changed

+4350
-3252
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 0839e940a517fcf6cf8124b22399e75c31703e2c
9+
refs/heads/dist-snap: cd844c5fb54913bced99a046230e9af7b3704c9e
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ config.mk
6060
/rt/
6161
/rustllvm/
6262
/test/
63+
/build
6364
/inst/
6465
/mingw-build/
6566
src/.DS_Store
@@ -84,7 +85,7 @@ config.stamp
8485
.DS_Store
8586
src/etc/dl
8687
.settings/
87-
/build
88+
build/
8889
i686-pc-mingw32/
8990
src/librustc/lib/llvmdeps.rs
9091
*.pot

branches/dist-snap/mk/crates.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
url log regex graphviz core rlibc alloc debug
54+
workcache url log regex graphviz core rlibc alloc debug
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
@@ -60,9 +60,9 @@ DEPS_core :=
6060
DEPS_rlibc :=
6161
DEPS_alloc := core libc native:jemalloc
6262
DEPS_debug := std
63-
DEPS_std := core rand libc alloc native:rustrt native:backtrace
63+
DEPS_std := core libc alloc native:rustrt native:backtrace
6464
DEPS_graphviz := std
65-
DEPS_green := std native:context_switch
65+
DEPS_green := std rand native:context_switch
6666
DEPS_rustuv := std native:uv native:uv_support
6767
DEPS_native := std
6868
DEPS_syntax := std term serialize collections log fmt_macros debug
@@ -77,17 +77,18 @@ DEPS_glob := std
7777
DEPS_serialize := std collections log
7878
DEPS_term := std collections log
7979
DEPS_semver := std
80-
DEPS_uuid := std serialize
80+
DEPS_uuid := std serialize rand
8181
DEPS_sync := std alloc
8282
DEPS_getopts := std
83-
DEPS_collections := std debug
83+
DEPS_collections := std rand debug
8484
DEPS_fourcc := syntax std
8585
DEPS_hexfloat := syntax std
86-
DEPS_num := std
86+
DEPS_num := std rand
8787
DEPS_test := std collections getopts serialize term time regex
8888
DEPS_time := std serialize sync
89-
DEPS_rand := core
89+
DEPS_rand := std
9090
DEPS_url := std collections
91+
DEPS_workcache := std serialize collections log
9192
DEPS_log := std sync
9293
DEPS_regex := std collections
9394
DEPS_regex_macros = syntax std regex
@@ -103,7 +104,6 @@ TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
103104
ONLY_RLIB_core := 1
104105
ONLY_RLIB_rlibc := 1
105106
ONLY_RLIB_alloc := 1
106-
ONLY_RLIB_rand := 1
107107

108108
################################################################################
109109
# You should not need to edit below this line

branches/dist-snap/src/compiletest/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::from_str::FromStr;
1212
use std::fmt;
1313
use regex::Regex;
1414

15-
#[deriving(Clone, PartialEq)]
15+
#[deriving(Clone, Eq)]
1616
pub enum Mode {
1717
CompileFail,
1818
RunFail,

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
7373
let proc_res = compile_test(config, props, testfile);
7474

7575
if proc_res.status.success() {
76-
fatal_proc_rec("compile-fail test compiled successfully!".to_string(),
76+
fatal_ProcRes("compile-fail test compiled successfully!".to_string(),
7777
&proc_res);
7878
}
7979

@@ -97,7 +97,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
9797
let proc_res = compile_test(config, props, testfile);
9898

9999
if !proc_res.status.success() {
100-
fatal_proc_rec("compilation failed!".to_string(), &proc_res);
100+
fatal_ProcRes("compilation failed!".to_string(), &proc_res);
101101
}
102102

103103
exec_compiled_test(config, props, testfile)
@@ -108,7 +108,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
108108
// The value our Makefile configures valgrind to return on failure
109109
static VALGRIND_ERR: int = 100;
110110
if proc_res.status.matches_exit_status(VALGRIND_ERR) {
111-
fatal_proc_rec("run-fail test isn't valgrind-clean!".to_string(),
111+
fatal_ProcRes("run-fail test isn't valgrind-clean!".to_string(),
112112
&proc_res);
113113
}
114114

@@ -120,7 +120,7 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
120120
// The value the rust runtime returns on failure
121121
static RUST_ERR: int = 101;
122122
if !proc_res.status.matches_exit_status(RUST_ERR) {
123-
fatal_proc_rec(
123+
fatal_ProcRes(
124124
format!("failure produced the wrong error: {}", proc_res.status),
125125
proc_res);
126126
}
@@ -131,19 +131,19 @@ fn run_rpass_test(config: &Config, props: &TestProps, testfile: &Path) {
131131
let mut proc_res = compile_test(config, props, testfile);
132132

133133
if !proc_res.status.success() {
134-
fatal_proc_rec("compilation failed!".to_string(), &proc_res);
134+
fatal_ProcRes("compilation failed!".to_string(), &proc_res);
135135
}
136136

137137
proc_res = exec_compiled_test(config, props, testfile);
138138

139139
if !proc_res.status.success() {
140-
fatal_proc_rec("test run failed!".to_string(), &proc_res);
140+
fatal_ProcRes("test run failed!".to_string(), &proc_res);
141141
}
142142
} else {
143143
let proc_res = jit_test(config, props, testfile);
144144

145145
if !proc_res.status.success() {
146-
fatal_proc_rec("jit failed!".to_string(), &proc_res);
146+
fatal_ProcRes("jit failed!".to_string(), &proc_res);
147147
}
148148
}
149149
}
@@ -172,7 +172,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
172172
"normal");
173173

174174
if !proc_res.status.success() {
175-
fatal_proc_rec(format!("pretty-printing failed in round {}", round),
175+
fatal_ProcRes(format!("pretty-printing failed in round {}", round),
176176
&proc_res);
177177
}
178178

@@ -204,21 +204,21 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
204204
let proc_res = typecheck_source(config, props, testfile, actual);
205205

206206
if !proc_res.status.success() {
207-
fatal_proc_rec("pretty-printed source does not typecheck".to_string(),
207+
fatal_ProcRes("pretty-printed source does not typecheck".to_string(),
208208
&proc_res);
209209
}
210210
if props.no_pretty_expanded { return }
211211

212212
// additionally, run `--pretty expanded` and try to build it.
213213
let proc_res = print_source(config, props, testfile, (*srcs.get(round)).clone(), "expanded");
214214
if !proc_res.status.success() {
215-
fatal_proc_rec(format!("pretty-printing (expanded) failed"), &proc_res);
215+
fatal_ProcRes(format!("pretty-printing (expanded) failed"), &proc_res);
216216
}
217217

218218
let ProcRes{ stdout: expanded_src, .. } = proc_res;
219219
let proc_res = typecheck_source(config, props, testfile, expanded_src);
220220
if !proc_res.status.success() {
221-
fatal_proc_rec(format!("pretty-printed source (expanded) does \
221+
fatal_ProcRes(format!("pretty-printed source (expanded) does \
222222
not typecheck"),
223223
&proc_res);
224224
}
@@ -326,7 +326,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
326326
// compile test file (it shoud have 'compile-flags:-g' in the header)
327327
let compiler_run_result = compile_test(config, props, testfile);
328328
if !compiler_run_result.status.success() {
329-
fatal_proc_rec("compilation failed!".to_string(), &compiler_run_result);
329+
fatal_ProcRes("compilation failed!".to_string(), &compiler_run_result);
330330
}
331331

332332
let exe_file = make_exe_name(config, testfile);
@@ -517,7 +517,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
517517
// compile test file (it shoud have 'compile-flags:-g' in the header)
518518
let compile_result = compile_test(config, props, testfile);
519519
if !compile_result.status.success() {
520-
fatal_proc_rec("compilation failed!".to_string(), &compile_result);
520+
fatal_ProcRes("compilation failed!".to_string(), &compile_result);
521521
}
522522

523523
let exe_file = make_exe_name(config, testfile);
@@ -560,7 +560,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
560560
let debugger_run_result = run_lldb(config, &exe_file, &debugger_script);
561561

562562
if !debugger_run_result.status.success() {
563-
fatal_proc_rec("Error while running LLDB".to_string(),
563+
fatal_ProcRes("Error while running LLDB".to_string(),
564564
&debugger_run_result);
565565
}
566566

@@ -720,7 +720,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
720720
}
721721
}
722722
if i != num_check_lines {
723-
fatal_proc_rec(format!("line not found in debugger output: {}",
723+
fatal_ProcRes(format!("line not found in debugger output: {}",
724724
check_lines.get(i).unwrap()),
725725
debugger_run_result);
726726
}
@@ -764,22 +764,22 @@ fn check_error_patterns(props: &TestProps,
764764
let missing_patterns =
765765
props.error_patterns.slice(next_err_idx, props.error_patterns.len());
766766
if missing_patterns.len() == 1u {
767-
fatal_proc_rec(format!("error pattern '{}' not found!",
767+
fatal_ProcRes(format!("error pattern '{}' not found!",
768768
missing_patterns[0]),
769769
proc_res);
770770
} else {
771771
for pattern in missing_patterns.iter() {
772772
error(format!("error pattern '{}' not found!", *pattern));
773773
}
774-
fatal_proc_rec("multiple error patterns not found".to_string(),
774+
fatal_ProcRes("multiple error patterns not found".to_string(),
775775
proc_res);
776776
}
777777
}
778778

779779
fn check_no_compiler_crash(proc_res: &ProcRes) {
780780
for line in proc_res.stderr.as_slice().lines() {
781781
if line.starts_with("error: internal compiler error:") {
782-
fatal_proc_rec("compiler encountered internal error".to_string(),
782+
fatal_ProcRes("compiler encountered internal error".to_string(),
783783
proc_res);
784784
}
785785
}
@@ -857,7 +857,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
857857
}
858858

859859
if !was_expected && is_compiler_error_or_warning(line) {
860-
fatal_proc_rec(format!("unexpected compiler error or warning: '{}'",
860+
fatal_ProcRes(format!("unexpected compiler error or warning: '{}'",
861861
line),
862862
proc_res);
863863
}
@@ -866,7 +866,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
866866
for (i, &flag) in found_flags.iter().enumerate() {
867867
if !flag {
868868
let ee = expected_errors.get(i);
869-
fatal_proc_rec(format!("expected {} on line {} not found: {}",
869+
fatal_ProcRes(format!("expected {} on line {} not found: {}",
870870
ee.kind, ee.line, ee.msg),
871871
proc_res);
872872
}
@@ -1047,7 +1047,7 @@ fn compose_and_run_compiler(
10471047
config.compile_lib_path.as_slice(),
10481048
None);
10491049
if !auxres.status.success() {
1050-
fatal_proc_rec(
1050+
fatal_ProcRes(
10511051
format!("auxiliary build of {} failed to compile: ",
10521052
abs_ab.display()),
10531053
&auxres);
@@ -1286,7 +1286,7 @@ fn error(err: String) { println!("\nerror: {}", err); }
12861286

12871287
fn fatal(err: String) -> ! { error(err); fail!(); }
12881288

1289-
fn fatal_proc_rec(err: String, proc_res: &ProcRes) -> ! {
1289+
fn fatal_ProcRes(err: String, proc_res: &ProcRes) -> ! {
12901290
print!("\n\
12911291
error: {}\n\
12921292
status: {}\n\
@@ -1562,35 +1562,35 @@ fn run_codegen_test(config: &Config, props: &TestProps,
15621562

15631563
let mut proc_res = compile_test_and_save_bitcode(config, props, testfile);
15641564
if !proc_res.status.success() {
1565-
fatal_proc_rec("compilation failed!".to_string(), &proc_res);
1565+
fatal_ProcRes("compilation failed!".to_string(), &proc_res);
15661566
}
15671567

15681568
proc_res = extract_function_from_bitcode(config, props, "test", testfile, "");
15691569
if !proc_res.status.success() {
1570-
fatal_proc_rec("extracting 'test' function failed".to_string(),
1570+
fatal_ProcRes("extracting 'test' function failed".to_string(),
15711571
&proc_res);
15721572
}
15731573

15741574
proc_res = disassemble_extract(config, props, testfile, "");
15751575
if !proc_res.status.success() {
1576-
fatal_proc_rec("disassembling extract failed".to_string(), &proc_res);
1576+
fatal_ProcRes("disassembling extract failed".to_string(), &proc_res);
15771577
}
15781578

15791579

15801580
let mut proc_res = compile_cc_with_clang_and_save_bitcode(config, props, testfile);
15811581
if !proc_res.status.success() {
1582-
fatal_proc_rec("compilation failed!".to_string(), &proc_res);
1582+
fatal_ProcRes("compilation failed!".to_string(), &proc_res);
15831583
}
15841584

15851585
proc_res = extract_function_from_bitcode(config, props, "test", testfile, "clang");
15861586
if !proc_res.status.success() {
1587-
fatal_proc_rec("extracting 'test' function failed".to_string(),
1587+
fatal_ProcRes("extracting 'test' function failed".to_string(),
15881588
&proc_res);
15891589
}
15901590

15911591
proc_res = disassemble_extract(config, props, testfile, "clang");
15921592
if !proc_res.status.success() {
1593-
fatal_proc_rec("disassembling extract failed".to_string(), &proc_res);
1593+
fatal_ProcRes("disassembling extract failed".to_string(), &proc_res);
15941594
}
15951595

15961596
let base = output_base_name(config, testfile);

branches/dist-snap/src/doc/complement-cheatsheet.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ To return a Borrowed String Slice (&str) use the str helper function
5353
~~~
5454
use std::str;
5555
56-
let bytes = &[104u8,105u8];
57-
let x: &str = str::from_utf8(bytes).unwrap();
56+
let bytes = ~[104u8,105u8];
57+
let x: Option<&str> = str::from_utf8(bytes);
58+
let y: &str = x.unwrap();
5859
~~~
5960

6061
To return an Owned String use the str helper function
@@ -135,7 +136,7 @@ let index: Option<uint> = str.find_str("rand");
135136
The [`Container`](../std/container/trait.Container.html) trait provides the `len` method.
136137

137138
~~~
138-
let u: Vec<u32> = vec![0, 1, 2];
139+
let u: ~[u32] = ~[0, 1, 2];
139140
let v: &[u32] = &[0, 1, 2, 3];
140141
let w: [u32, .. 5] = [0, 1, 2, 3, 4];
141142
@@ -147,7 +148,7 @@ println!("u: {}, v: {}, w: {}", u.len(), v.len(), w.len()); // 3, 4, 5
147148
Use the [`iter`](../std/vec/trait.ImmutableVector.html#tymethod.iter) method.
148149

149150
~~~
150-
let values: Vec<int> = vec![1, 2, 3, 4, 5];
151+
let values: ~[int] = ~[1, 2, 3, 4, 5];
151152
for value in values.iter() { // value: &int
152153
println!("{}", *value);
153154
}

branches/dist-snap/src/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ underlying iterators are.
396396

397397
~~~
398398
let xs = [1, 2, 3, 4, 5];
399-
let ys = [7, 9, 11];
399+
let ys = ~[7, 9, 11];
400400
let mut it = xs.iter().chain(ys.iter());
401401
println!("{}", it.idx(0)); // prints `Some(1)`
402402
println!("{}", it.idx(5)); // prints `Some(7)`

branches/dist-snap/src/doc/guide-ffi.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# Introduction
44

5-
This guide will use the [snappy](https://github.com/google/snappy)
5+
This guide will use the [snappy](https://code.google.com/p/snappy/)
66
compression/decompression library as an introduction to writing bindings for
77
foreign code. Rust is currently unable to call directly into a C++ library, but
88
snappy includes a C interface (documented in
9-
[`snappy-c.h`](https://github.com/google/snappy/blob/master/snappy-c.h)).
9+
[`snappy-c.h`](https://code.google.com/p/snappy/source/browse/trunk/snappy-c.h)).
1010

1111
The following is a minimal example of calling a foreign function which will
1212
compile if snappy is installed:
@@ -476,7 +476,6 @@ extern crate libc;
476476
477477
#[cfg(target_os = "win32", target_arch = "x86")]
478478
#[link(name = "kernel32")]
479-
#[allow(non_snake_case_functions)]
480479
extern "stdcall" {
481480
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int;
482481
}

branches/dist-snap/src/doc/guide-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ To take as an argument a fragment of Rust code, write `$` followed by a name
8585
`foo`.)
8686
* `expr` (an expression. Examples: `2 + 2`; `if true then { 1 } else { 2 }`;
8787
`f(42)`.)
88-
* `ty` (a type. Examples: `int`, `Vec<(char, String)>`, `&T`.)
88+
* `ty` (a type. Examples: `int`, `~[(char, String)]`, `&T`.)
8989
* `pat` (a pattern, usually appearing in a `match` or on the left-hand side of
9090
a declaration. Examples: `Some(t)`; `(17, 'a')`; `_`.)
9191
* `block` (a sequence of actions. Example: `{ log(error, "hi"); return 12; }`)

0 commit comments

Comments
 (0)