Skip to content

Commit 40a2dce

Browse files
committed
---
yaml --- r: 194275 b: refs/heads/tmp c: 9231ceb h: refs/heads/master i: 194273: cdead41 194271: 4e0da72 v: v3
1 parent 90e1259 commit 40a2dce

File tree

243 files changed

+2139
-3007
lines changed

Some content is hidden

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

243 files changed

+2139
-3007
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: a3b13610c5b93d9ada072471a001a5613df6a960
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: fd13400627108fbf3998545f782ed44422e344bf
37+
refs/heads/tmp: 9231ceb6dd273d8101e1b3906e6060f802e6423d
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 28a0b25f424090255966273994748a9f9901059f
4040
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/Makefile.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@
9797
# make check-stage1-rpass TESTNAME=my-shiny-new-test
9898
#
9999
# // Having trouble figuring out which test is failing? Turn off parallel tests
100-
# make check-stage1-std RUST_TEST_THREADS=1
100+
# make check-stage1-std RUST_TEST_TASKS=1
101+
#
102+
# This is hardly all there is to know of The Rust Build System's
103+
# mysteries. The tale continues on the wiki[1].
104+
#
105+
# [1]: https://github.com/rust-lang/rust/wiki/Note-testsuite
101106
#
102107
# If you really feel like getting your hands dirty, then:
103108
#

branches/tmp/man/rustc.1

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -242,28 +242,6 @@ full debug info with variable and type information.
242242
\fBopt\-level\fR=\fIVAL\fR
243243
Optimize with possible levels 0\[en]3
244244

245-
.SH ENVIRONMENT
246-
247-
Some of these affect the output of the compiler, while others affect programs
248-
which link to the standard library.
249-
250-
.TP
251-
\fBRUST_TEST_THREADS\fR
252-
The test framework Rust provides executes tests in parallel. This variable sets
253-
the maximum number of threads used for this purpose.
254-
255-
.TP
256-
\fBRUST_TEST_NOCAPTURE\fR
257-
A synonym for the --nocapture flag.
258-
259-
.TP
260-
\fBRUST_MIN_STACK\fR
261-
Sets the minimum stack size for new threads.
262-
263-
.TP
264-
\fBRUST_BACKTRACE\fR
265-
If set, produces a backtrace in the output of a program which panics.
266-
267245
.SH "EXAMPLES"
268246
To build an executable from a source file with a main function:
269247
$ rustc \-o hello hello.rs

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#![feature(std_misc)]
2121
#![feature(test)]
2222
#![feature(path_ext)]
23-
#![feature(convert)]
24-
#![feature(str_char)]
2523

2624
#![deny(warnings)]
2725

@@ -117,7 +115,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
117115

118116
fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
119117
match m.opt_str(nm) {
120-
Some(s) => PathBuf::from(&s),
118+
Some(s) => PathBuf::new(&s),
121119
None => panic!("no option (=path) found for {}", nm),
122120
}
123121
}
@@ -132,18 +130,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
132130
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
133131
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
134132
rustc_path: opt_path(matches, "rustc-path"),
135-
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)),
133+
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
136134
valgrind_path: matches.opt_str("valgrind-path"),
137135
force_valgrind: matches.opt_present("force-valgrind"),
138-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)),
136+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
139137
src_base: opt_path(matches, "src-base"),
140138
build_base: opt_path(matches, "build-base"),
141139
aux_base: opt_path(matches, "aux-base"),
142140
stage_id: matches.opt_str("stage-id").unwrap(),
143141
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
144142
run_ignored: matches.opt_present("ignored"),
145143
filter: filter,
146-
logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)),
144+
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
147145
runtool: matches.opt_str("runtool"),
148146
host_rustcflags: matches.opt_str("host-rustcflags"),
149147
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -226,15 +224,15 @@ pub fn run_tests(config: &Config) {
226224
// android debug-info test uses remote debugger
227225
// so, we test 1 task at once.
228226
// also trying to isolate problems with adb_run_wrapper.sh ilooping
229-
env::set_var("RUST_TEST_THREADS","1");
227+
env::set_var("RUST_TEST_TASKS","1");
230228
}
231229

232230
match config.mode {
233231
DebugInfoLldb => {
234232
// Some older versions of LLDB seem to have problems with multiple
235233
// instances running in parallel, so only run one test task at a
236234
// time.
237-
env::set_var("RUST_TEST_THREADS", "1");
235+
env::set_var("RUST_TEST_TASKS", "1");
238236
}
239237
_ => { /* proceed */ }
240238
}

branches/tmp/src/compiletest/header.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
131131
true
132132
});
133133

134-
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
134+
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_TASKS"] {
135135
match env::var(key) {
136136
Ok(val) =>
137137
if exec_env.iter().find(|&&(ref x, _)| *x == key.to_string()).is_none() {
@@ -163,9 +163,6 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
163163
fn ignore_target(config: &Config) -> String {
164164
format!("ignore-{}", util::get_os(&config.target))
165165
}
166-
fn ignore_architecture(config: &Config) -> String {
167-
format!("ignore-{}", util::get_arch(&config.target))
168-
}
169166
fn ignore_stage(config: &Config) -> String {
170167
format!("ignore-{}",
171168
config.stage_id.split('-').next().unwrap())
@@ -229,7 +226,6 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
229226
let val = iter_header(testfile, &mut |ln| {
230227
!parse_name_directive(ln, "ignore-test") &&
231228
!parse_name_directive(ln, &ignore_target(config)) &&
232-
!parse_name_directive(ln, &ignore_architecture(config)) &&
233229
!parse_name_directive(ln, &ignore_stage(config)) &&
234230
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
235231
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
@@ -328,10 +324,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
328324

329325
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
330326
match parse_name_value_directive(line, "pp-exact") {
331-
Some(s) => Some(PathBuf::from(&s)),
327+
Some(s) => Some(PathBuf::new(&s)),
332328
None => {
333329
if parse_name_directive(line, "pp-exact") {
334-
testfile.file_name().map(|s| PathBuf::from(s))
330+
testfile.file_name().map(|s| PathBuf::new(s))
335331
} else {
336332
None
337333
}

branches/tmp/src/compiletest/procsrv.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010

1111
#![allow(deprecated)] // for old path, for dynamic_lib
1212

13-
use std::dynamic_lib::DynamicLibrary;
14-
use std::io::prelude::*;
15-
use std::old_path::Path;
1613
use std::process::{ExitStatus, Command, Child, Output, Stdio};
14+
use std::io::prelude::*;
15+
use std::dynamic_lib::DynamicLibrary;
1716

1817
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1918
// Need to be sure to put both the lib_path and the aux path in the dylib

branches/tmp/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ fn aux_output_dir_name(config: &Config, testfile: &Path) -> PathBuf {
14401440
}
14411441

14421442
fn output_testname(testfile: &Path) -> PathBuf {
1443-
PathBuf::from(testfile.file_stem().unwrap())
1443+
PathBuf::new(testfile.file_stem().unwrap())
14441444
}
14451445

14461446
fn output_base_name(config: &Config, testfile: &Path) -> PathBuf {

branches/tmp/src/compiletest/util.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,6 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
2525
("openbsd", "openbsd"),
2626
];
2727

28-
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[
29-
("i386", "x86"),
30-
("i686", "x86"),
31-
("amd64", "x86_64"),
32-
("x86_64", "x86_64"),
33-
("sparc", "sparc"),
34-
("powerpc", "powerpc"),
35-
("arm64", "aarch64"),
36-
("arm", "arm"),
37-
("aarch64", "aarch64"),
38-
("mips", "mips"),
39-
("xcore", "xcore"),
40-
("msp430", "msp430"),
41-
("hexagon", "hexagon"),
42-
("s390x", "systemz"),
43-
];
44-
4528
pub fn get_os(triple: &str) -> &'static str {
4629
for &(triple_os, os) in OS_TABLE {
4730
if triple.contains(triple_os) {
@@ -50,14 +33,6 @@ pub fn get_os(triple: &str) -> &'static str {
5033
}
5134
panic!("Cannot determine OS from triple");
5235
}
53-
pub fn get_arch(triple: &str) -> &'static str {
54-
for &(triple_arch, arch) in ARCH_TABLE {
55-
if triple.contains(triple_arch) {
56-
return arch
57-
}
58-
}
59-
panic!("Cannot determine Architecture from triple");
60-
}
6136

6237
pub fn make_new_path(path: &str) -> String {
6338
assert!(cfg!(windows));

branches/tmp/src/doc/reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@ the namespace hierarchy as it normally would.
19821982
## Attributes
19831983

19841984
```{.ebnf .gram}
1985-
attribute : '#' '!' ? '[' meta_item ']' ;
1985+
attribute : "#!" ? '[' meta_item ']' ;
19861986
meta_item : ident [ '=' literal
19871987
| '(' meta_seq ')' ] ? ;
19881988
meta_seq : meta_item [ ',' meta_seq ] ? ;
@@ -3158,7 +3158,7 @@ ten_times(|j| println!("hello, {}", j));
31583158
### While loops
31593159

31603160
```{.ebnf .gram}
3161-
while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
3161+
while_expr : "while" no_struct_literal_expr '{' block '}' ;
31623162
```
31633163

31643164
A `while` loop begins by evaluating the boolean loop conditional expression.
@@ -3223,7 +3223,7 @@ A `continue` expression is only permitted in the body of a loop.
32233223
### For expressions
32243224

32253225
```{.ebnf .gram}
3226-
for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}' ;
3226+
for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
32273227
```
32283228

32293229
A `for` expression is a syntactic construct for looping over elements provided

branches/tmp/src/doc/trpl/SUMMARY.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Summary
22

3-
* [The Basics](basic.md)
3+
* [I: The Basics](basic.md)
44
* [Installing Rust](installing-rust.md)
55
* [Hello, world!](hello-world.md)
66
* [Hello, Cargo!](hello-cargo.md)
@@ -14,7 +14,8 @@
1414
* [Strings](strings.md)
1515
* [Arrays, Vectors, and Slices](arrays-vectors-and-slices.md)
1616
* [Standard Input](standard-input.md)
17-
* [Intermediate Rust](intermediate.md)
17+
* [Guessing Game](guessing-game.md)
18+
* [II: Intermediate Rust](intermediate.md)
1819
* [Crates and Modules](crates-and-modules.md)
1920
* [Testing](testing.md)
2021
* [Pointers](pointers.md)
@@ -31,7 +32,7 @@
3132
* [Concurrency](concurrency.md)
3233
* [Error Handling](error-handling.md)
3334
* [Documentation](documentation.md)
34-
* [Advanced Topics](advanced.md)
35+
* [III: Advanced Topics](advanced.md)
3536
* [FFI](ffi.md)
3637
* [Unsafe Code](unsafe.md)
3738
* [Advanced Macros](advanced-macros.md)

branches/tmp/src/doc/trpl/advanced-macros.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ off.
66
# Syntactic requirements
77

88
Even when Rust code contains un-expanded macros, it can be parsed as a full
9-
[syntax tree][ast]. This property can be very useful for editors and other
10-
tools that process code. It also has a few consequences for the design of
11-
Rust's macro system.
12-
13-
[ast]: glossary.html#abstract-syntax-tree
9+
syntax tree. This property can be very useful for editors and other tools that
10+
process code. It also has a few consequences for the design of Rust's macro
11+
system.
1412

1513
One consequence is that Rust must determine, when it parses a macro invocation,
1614
whether the macro stands in for

0 commit comments

Comments
 (0)