Skip to content

Commit 45067ee

Browse files
committed
---
yaml --- r: 116383 b: refs/heads/snap-stage3 c: 2f221c7 h: refs/heads/master i: 116381: ed4b04f 116379: 9034b9d 116375: 492c1ba 116367: 808c73c 116351: f61254c v: v3
1 parent eec97b1 commit 45067ee

File tree

369 files changed

+3218
-4340
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

+3218
-4340
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: bee4e6adac17f87b1cdc26ab69f8c0f5d82575a3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: cd844c5fb54913bced99a046230e9af7b3704c9e
4+
refs/heads/snap-stage3: 2f221c766b10867a30d799d0899125b2dcccb872
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ config.mk
6060
/rt/
6161
/rustllvm/
6262
/test/
63-
/build
6463
/inst/
6564
/mingw-build/
6665
src/.DS_Store
@@ -85,7 +84,7 @@ config.stamp
8584
.DS_Store
8685
src/etc/dl
8786
.settings/
88-
build/
87+
/build
8988
i686-pc-mingw32/
9089
src/librustc/lib/llvmdeps.rs
9190
*.pot

branches/snap-stage3/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-
workcache url log regex graphviz core rlibc alloc debug
54+
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 libc alloc native:rustrt native:backtrace
63+
DEPS_std := core rand libc alloc native:rustrt native:backtrace
6464
DEPS_graphviz := std
65-
DEPS_green := std rand native:context_switch
65+
DEPS_green := std 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,18 +77,17 @@ DEPS_glob := std
7777
DEPS_serialize := std collections log
7878
DEPS_term := std collections log
7979
DEPS_semver := std
80-
DEPS_uuid := std serialize rand
80+
DEPS_uuid := std serialize
8181
DEPS_sync := std alloc
8282
DEPS_getopts := std
83-
DEPS_collections := std rand debug
83+
DEPS_collections := std debug
8484
DEPS_fourcc := syntax std
8585
DEPS_hexfloat := syntax std
86-
DEPS_num := std rand
86+
DEPS_num := std
8787
DEPS_test := std collections getopts serialize term time regex
8888
DEPS_time := std serialize sync
89-
DEPS_rand := std
89+
DEPS_rand := core
9090
DEPS_url := std collections
91-
DEPS_workcache := std serialize collections log
9291
DEPS_log := std sync
9392
DEPS_regex := std collections
9493
DEPS_regex_macros = syntax std regex
@@ -104,6 +103,7 @@ TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
104103
ONLY_RLIB_core := 1
105104
ONLY_RLIB_rlibc := 1
106105
ONLY_RLIB_alloc := 1
106+
ONLY_RLIB_rand := 1
107107

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

branches/snap-stage3/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, Eq)]
15+
#[deriving(Clone, PartialEq)]
1616
pub enum Mode {
1717
CompileFail,
1818
RunFail,

branches/snap-stage3/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_ProcRes("compile-fail test compiled successfully!".to_string(),
76+
fatal_proc_rec("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_ProcRes("compilation failed!".to_string(), &proc_res);
100+
fatal_proc_rec("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_ProcRes("run-fail test isn't valgrind-clean!".to_string(),
111+
fatal_proc_rec("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_ProcRes(
123+
fatal_proc_rec(
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_ProcRes("compilation failed!".to_string(), &proc_res);
134+
fatal_proc_rec("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_ProcRes("test run failed!".to_string(), &proc_res);
140+
fatal_proc_rec("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_ProcRes("jit failed!".to_string(), &proc_res);
146+
fatal_proc_rec("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_ProcRes(format!("pretty-printing failed in round {}", round),
175+
fatal_proc_rec(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_ProcRes("pretty-printed source does not typecheck".to_string(),
207+
fatal_proc_rec("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_ProcRes(format!("pretty-printing (expanded) failed"), &proc_res);
215+
fatal_proc_rec(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_ProcRes(format!("pretty-printed source (expanded) does \
221+
fatal_proc_rec(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_ProcRes("compilation failed!".to_string(), &compiler_run_result);
329+
fatal_proc_rec("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_ProcRes("compilation failed!".to_string(), &compile_result);
520+
fatal_proc_rec("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_ProcRes("Error while running LLDB".to_string(),
563+
fatal_proc_rec("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_ProcRes(format!("line not found in debugger output: {}",
723+
fatal_proc_rec(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_ProcRes(format!("error pattern '{}' not found!",
767+
fatal_proc_rec(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_ProcRes("multiple error patterns not found".to_string(),
774+
fatal_proc_rec("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_ProcRes("compiler encountered internal error".to_string(),
782+
fatal_proc_rec("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_ProcRes(format!("unexpected compiler error or warning: '{}'",
860+
fatal_proc_rec(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_ProcRes(format!("expected {} on line {} not found: {}",
869+
fatal_proc_rec(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_ProcRes(
1050+
fatal_proc_rec(
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_ProcRes(err: String, proc_res: &ProcRes) -> ! {
1289+
fn fatal_proc_rec(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_ProcRes("compilation failed!".to_string(), &proc_res);
1565+
fatal_proc_rec("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_ProcRes("extracting 'test' function failed".to_string(),
1570+
fatal_proc_rec("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_ProcRes("disassembling extract failed".to_string(), &proc_res);
1576+
fatal_proc_rec("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_ProcRes("compilation failed!".to_string(), &proc_res);
1582+
fatal_proc_rec("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_ProcRes("extracting 'test' function failed".to_string(),
1587+
fatal_proc_rec("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_ProcRes("disassembling extract failed".to_string(), &proc_res);
1593+
fatal_proc_rec("disassembling extract failed".to_string(), &proc_res);
15941594
}
15951595

15961596
let base = output_base_name(config, testfile);

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ 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: Option<&str> = str::from_utf8(bytes);
58-
let y: &str = x.unwrap();
56+
let bytes = &[104u8,105u8];
57+
let x: &str = str::from_utf8(bytes).unwrap();
5958
~~~
6059

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

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

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

branches/snap-stage3/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/snap-stage3/src/doc/guide-ffi.md

Lines changed: 3 additions & 2 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://code.google.com/p/snappy/)
5+
This guide will use the [snappy](https://github.com/google/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://code.google.com/p/snappy/source/browse/trunk/snappy-c.h)).
9+
[`snappy-c.h`](https://github.com/google/snappy/blob/master/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,6 +476,7 @@ extern crate libc;
476476
477477
#[cfg(target_os = "win32", target_arch = "x86")]
478478
#[link(name = "kernel32")]
479+
#[allow(non_snake_case_functions)]
479480
extern "stdcall" {
480481
fn SetEnvironmentVariableA(n: *u8, v: *u8) -> libc::c_int;
481482
}

branches/snap-stage3/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`, `~[(char, String)]`, `&T`.)
88+
* `ty` (a type. Examples: `int`, `Vec<(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)