Skip to content

Commit 10c7e3f

Browse files
committed
---
yaml --- r: 192510 b: refs/heads/auto c: 4ccf374 h: refs/heads/master v: v3
1 parent 9b7fdf0 commit 10c7e3f

File tree

2,059 files changed

+2814
-9318
lines changed

Some content is hidden

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

2,059 files changed

+2814
-9318
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 020efc78f106d507cef9ec0605efba0a82ec692d
13+
refs/heads/auto: 4ccf374b4a2ef24862d365783b70217bbfbf3bc7
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -479,19 +479,10 @@ esac
479479
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
480480
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
481481
then
482-
# $SHELL does not exist in standard 'sh', so probably only exists
483-
# if configure is running in an interactive bash shell. /usr/bin/env
484-
# exists *everywhere*.
485-
BIN_TO_PROBE="$SHELL"
486-
if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then
487-
BIN_TO_PROBE="/usr/bin/env"
482+
file -L "$SHELL" | grep -q "x86[_-]64"
483+
if [ $? != 0 ]; then
484+
CFG_CPUTYPE=i686
488485
fi
489-
if [ -n "$BIN_TO_PROBE" ]; then
490-
file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
491-
if [ $? != 0 ]; then
492-
CFG_CPUTYPE=i686
493-
fi
494-
fi
495486
fi
496487

497488

branches/auto/src/compiletest/compiletest.rs

Lines changed: 4 additions & 6 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"),

branches/auto/src/compiletest/header.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub struct TestProps {
4040
pub check_stdout: bool,
4141
// Don't force a --crate-type=dylib flag on the command line
4242
pub no_prefer_dynamic: bool,
43-
// Run --pretty expanded when running pretty printing tests
44-
pub pretty_expanded: bool,
43+
// Don't run --pretty expanded when running pretty printing tests
44+
pub no_pretty_expanded: bool,
4545
// Which pretty mode are we testing with, default to 'normal'
4646
pub pretty_mode: String,
4747
// Only compare pretty output and don't try compiling
@@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
6262
let mut force_host = false;
6363
let mut check_stdout = false;
6464
let mut no_prefer_dynamic = false;
65-
let mut pretty_expanded = false;
65+
let mut no_pretty_expanded = false;
6666
let mut pretty_mode = None;
6767
let mut pretty_compare_only = false;
6868
let mut forbid_output = Vec::new();
@@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
9696
no_prefer_dynamic = parse_no_prefer_dynamic(ln);
9797
}
9898

99-
if !pretty_expanded {
100-
pretty_expanded = parse_pretty_expanded(ln);
99+
if !no_pretty_expanded {
100+
no_pretty_expanded = parse_no_pretty_expanded(ln);
101101
}
102102

103103
if pretty_mode.is_none() {
@@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
152152
force_host: force_host,
153153
check_stdout: check_stdout,
154154
no_prefer_dynamic: no_prefer_dynamic,
155-
pretty_expanded: pretty_expanded,
155+
no_pretty_expanded: no_pretty_expanded,
156156
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
157157
pretty_compare_only: pretty_compare_only,
158158
forbid_output: forbid_output,
@@ -295,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
295295
parse_name_directive(line, "no-prefer-dynamic")
296296
}
297297

298-
fn parse_pretty_expanded(line: &str) -> bool {
299-
parse_name_directive(line, "pretty-expanded")
298+
fn parse_no_pretty_expanded(line: &str) -> bool {
299+
parse_name_directive(line, "no-pretty-expanded")
300300
}
301301

302302
fn parse_pretty_mode(line: &str) -> Option<String> {
@@ -328,10 +328,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
328328

329329
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
330330
match parse_name_value_directive(line, "pp-exact") {
331-
Some(s) => Some(PathBuf::from(&s)),
331+
Some(s) => Some(PathBuf::new(&s)),
332332
None => {
333333
if parse_name_directive(line, "pp-exact") {
334-
testfile.file_name().map(|s| PathBuf::from(s))
334+
testfile.file_name().map(|s| PathBuf::new(s))
335335
} else {
336336
None
337337
}
@@ -340,8 +340,7 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
340340
}
341341

342342
fn parse_name_directive(line: &str, directive: &str) -> bool {
343-
// This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
344-
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
343+
line.contains(directive)
345344
}
346345

347346
pub fn parse_name_value_directive(line: &str, directive: &str)

branches/auto/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
245245
if !proc_res.status.success() {
246246
fatal_proc_rec("pretty-printed source does not typecheck", &proc_res);
247247
}
248-
if !props.pretty_expanded { return }
248+
if props.no_pretty_expanded { return }
249249

250250
// additionally, run `--pretty expanded` and try to build it.
251251
let proc_res = print_source(config, props, testfile, srcs[round].clone(), "expanded");
@@ -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/auto/src/doc/intro.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -446,16 +446,16 @@ It gives us this error:
446446
error: aborting due to previous error
447447
```
448448
449-
This is a little confusing because there are two closures here: the one passed
450-
to `map`, and the one passed to `thread::scoped`. In this case, the closure for
451-
`thread::scoped` is attempting to reference `numbers`, a `Vec<i32>`. This
452-
closure is a `FnOnce` closure, as that’s what `thread::scoped` takes as an
453-
argument. `FnOnce` closures take ownership of their environment. That’s fine,
454-
but there’s one detail: because of `map`, we’re going to make three of these
455-
closures. And since all three try to take ownership of `numbers`, that would be
456-
a problem. That’s what it means by ‘cannot move out of captured outer
457-
variable’: our `thread::scoped` closure wants to take ownership, and it can’t,
458-
because the closure for `map` won’t let it.
449+
It mentions that "captured outer variable in an `FnMut` closure".
450+
Because we declared the closure as a moving closure, and it referred
451+
to `numbers`, the closure will try to take ownership of the
452+
vector. But the closure itself is created in a loop, and hence we will
453+
actually create three closures, one for every iteration of the
454+
loop. This means that all three of those closures would try to own
455+
`numbers`, which is impossible -- `numbers` must have just one
456+
owner. Rust detects this and gives us the error: we claim that
457+
`numbers` has ownership, but our code tries to make three owners. This
458+
may cause a safety problem, so Rust disallows it.
459459
460460
What to do here? Rust has two types that helps us: `Arc<T>` and `Mutex<T>`.
461461
*Arc* stands for "atomically reference counted". In other words, an Arc will

branches/auto/src/doc/reference.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,8 @@ may optionally begin with any number of `attributes` that apply to the
816816
containing module. Attributes on the anonymous crate module define important
817817
metadata that influences the behavior of the compiler.
818818

819-
```no_run
819+
```{.rust}
820+
# #![allow(unused_attribute)]
820821
// Crate name
821822
#![crate_name = "projx"]
822823
@@ -1019,7 +1020,6 @@ Use declarations support a number of convenient shortcuts:
10191020
An example of `use` declarations:
10201021

10211022
```
1022-
# #![feature(core)]
10231023
use std::iter::range_step;
10241024
use std::option::Option::{Some, None};
10251025
use std::collections::hash_map::{self, HashMap};
@@ -1080,7 +1080,6 @@ declarations.
10801080
An example of what will and will not work for `use` items:
10811081

10821082
```
1083-
# #![feature(core)]
10841083
# #![allow(unused_imports)]
10851084
use foo::core::iter; // good: foo is at the root of the crate
10861085
use foo::baz::foobaz; // good: foo is at the root of the crate
@@ -1265,7 +1264,7 @@ be undesired.
12651264
* Sending signals
12661265
* Accessing/modifying the file system
12671266
* Unsigned integer overflow (well-defined as wrapping)
1268-
* Signed integer overflow (well-defined as twos complement representation
1267+
* Signed integer overflow (well-defined as two's complement representation
12691268
wrapping)
12701269

12711270
#### Diverging functions
@@ -1782,7 +1781,6 @@ functions, with the exception that they may not have a body and are instead
17821781
terminated by a semicolon.
17831782

17841783
```
1785-
# #![feature(libc)]
17861784
extern crate libc;
17871785
use libc::{c_char, FILE};
17881786
@@ -2961,10 +2959,10 @@ meaning of the operators on standard types is given here.
29612959
: Exclusive or.
29622960
Calls the `bitxor` method of the `std::ops::BitXor` trait.
29632961
* `<<`
2964-
: Left shift.
2962+
: Logical left shift.
29652963
Calls the `shl` method of the `std::ops::Shl` trait.
29662964
* `>>`
2967-
: Right shift.
2965+
: Logical right shift.
29682966
Calls the `shr` method of the `std::ops::Shr` trait.
29692967

29702968
#### Lazy boolean operators

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* [More Strings](more-strings.md)
2323
* [Patterns](patterns.md)
2424
* [Method Syntax](method-syntax.md)
25-
* [Associated Types](associated-types.md)
2625
* [Closures](closures.md)
2726
* [Iterators](iterators.md)
2827
* [Generics](generics.md)

0 commit comments

Comments
 (0)