Skip to content

Commit 27bfd14

Browse files
committed
---
yaml --- r: 189304 b: refs/heads/auto c: 977d789 h: refs/heads/master v: v3
1 parent d2236fb commit 27bfd14

File tree

827 files changed

+5147
-7406
lines changed

Some content is hidden

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

827 files changed

+5147
-7406
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: 098daa1d7fe468beef7b67e1d67360fa76855351
13+
refs/heads/auto: 977d7897fe3f5271ee2e993e5df4fe5b15c6a9ac
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,17 +697,15 @@ probe CFG_ADB adb
697697

698698
if [ ! -z "$CFG_PANDOC" ]
699699
then
700-
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc' |
701-
# Extract "MAJOR MINOR" from Pandoc's version number
702-
sed -E 's/pandoc(.exe)? ([0-9]+)\.([0-9]+).*/\2 \3/')
700+
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc\(.exe\)\? ' |
701+
# extract the first 2 version fields, ignore everything else
702+
sed 's/pandoc\(.exe\)\? \([0-9]*\)\.\([0-9]*\).*/\2 \3/')
703703

704704
MIN_PV_MAJOR="1"
705705
MIN_PV_MINOR="9"
706-
707706
# these patterns are shell globs, *not* regexps
708707
PV_MAJOR=${PV_MAJOR_MINOR% *}
709708
PV_MINOR=${PV_MAJOR_MINOR#* }
710-
711709
if [ "$PV_MAJOR" -lt "$MIN_PV_MAJOR" ] || [ "$PV_MINOR" -lt "$MIN_PV_MINOR" ]
712710
then
713711
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. Need at least $MIN_PV_MAJOR.$MIN_PV_MINOR. Disabling"

branches/auto/mk/docs.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,11 @@ compiler-docs: $(COMPILER_DOC_TARGETS)
273273
trpl: doc/book/index.html
274274

275275
doc/book/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md) | doc/
276-
@$(call E, rustbook: $@)
277276
$(Q)rm -rf doc/book
278277
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
279278

280279
style: doc/style/index.html
281280

282281
doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
283-
@$(call E, rustbook: $@)
284282
$(Q)rm -rf doc/style
285283
$(Q)$(RUSTBOOK) build $(S)src/doc/style doc/style

branches/auto/mk/main.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.0.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

@@ -30,8 +30,8 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
3030
CFG_DISABLE_UNSTABLE_FEATURES=1
3131
endif
3232
ifeq ($(CFG_RELEASE_CHANNEL),beta)
33-
CFG_RELEASE=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
34-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-beta(CFG_PRERELEASE_VERSION)
33+
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
34+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_PRERELEASE_VERSION)
3535
CFG_DISABLE_UNSTABLE_FEATURES=1
3636
endif
3737
ifeq ($(CFG_RELEASE_CHANNEL),nightly)

branches/auto/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
590590

591591
# The tests select when to use debug configuration on their own;
592592
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
593-
CTEST_RUSTC_FLAGS := $$(subst -C debug-assertions,,$$(CFG_RUSTC_FLAGS))
593+
CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
594594

595595
# The tests cannot be optimized while the rest of the compiler is optimized, so
596596
# filter out the optimization (if any) from rustc and then figure out if we need

branches/auto/src/compiletest/common.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub use self::Mode::*;
1111

1212
use std::fmt;
1313
use std::str::FromStr;
14-
use std::path::PathBuf;
1514

1615
#[derive(Clone, Copy, PartialEq, Debug)]
1716
pub enum Mode {
@@ -69,13 +68,13 @@ pub struct Config {
6968
pub run_lib_path: String,
7069

7170
// The rustc executable
72-
pub rustc_path: PathBuf,
71+
pub rustc_path: Path,
7372

7473
// The clang executable
75-
pub clang_path: Option<PathBuf>,
74+
pub clang_path: Option<Path>,
7675

7776
// The llvm binaries path
78-
pub llvm_bin_path: Option<PathBuf>,
77+
pub llvm_bin_path: Option<Path>,
7978

8079
// The valgrind path
8180
pub valgrind_path: Option<String>,
@@ -85,13 +84,13 @@ pub struct Config {
8584
pub force_valgrind: bool,
8685

8786
// The directory containing the tests to run
88-
pub src_base: PathBuf,
87+
pub src_base: Path,
8988

9089
// The directory where programs should be built
91-
pub build_base: PathBuf,
90+
pub build_base: Path,
9291

9392
// Directory for auxiliary libraries
94-
pub aux_base: PathBuf,
93+
pub aux_base: Path,
9594

9695
// The name of the stage being built (stage1, etc)
9796
pub stage_id: String,
@@ -106,7 +105,7 @@ pub struct Config {
106105
pub filter: Option<String>,
107106

108107
// Write out a parseable log of tests that were run
109-
pub logfile: Option<PathBuf>,
108+
pub logfile: Option<Path>,
110109

111110
// A command line to prefix program execution with,
112111
// for running under valgrind
@@ -134,7 +133,7 @@ pub struct Config {
134133
pub lldb_version: Option<String>,
135134

136135
// Path to the android tools
137-
pub android_cross_path: PathBuf,
136+
pub android_cross_path: Path,
138137

139138
// Extra parameter to run adb on arm-linux-androideabi
140139
pub adb_path: String,

branches/auto/src/compiletest/compiletest.rs

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
#![feature(test)]
2222
#![feature(unicode)]
2323
#![feature(core)]
24-
#![feature(path)]
25-
#![feature(io)]
26-
#![feature(net)]
27-
#![feature(path_ext)]
2824

2925
#![deny(warnings)]
3026

@@ -35,9 +31,8 @@ extern crate getopts;
3531
extern crate log;
3632

3733
use std::env;
38-
use std::fs;
3934
use std::old_io;
40-
use std::path::{Path, PathBuf};
35+
use std::old_io::fs;
4136
use std::thunk::Thunk;
4237
use getopts::{optopt, optflag, reqopt};
4338
use common::Config;
@@ -119,9 +114,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
119114
panic!()
120115
}
121116

122-
fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
117+
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
123118
match m.opt_str(nm) {
124-
Some(s) => PathBuf::new(&s),
119+
Some(s) => Path::new(s),
125120
None => panic!("no option (=path) found for {}", nm),
126121
}
127122
}
@@ -136,18 +131,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
136131
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
137132
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
138133
rustc_path: opt_path(matches, "rustc-path"),
139-
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
134+
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
140135
valgrind_path: matches.opt_str("valgrind-path"),
141136
force_valgrind: matches.opt_present("force-valgrind"),
142-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
137+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
143138
src_base: opt_path(matches, "src-base"),
144139
build_base: opt_path(matches, "build-base"),
145140
aux_base: opt_path(matches, "aux-base"),
146141
stage_id: matches.opt_str("stage-id").unwrap(),
147142
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
148143
run_ignored: matches.opt_present("ignored"),
149144
filter: filter,
150-
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
145+
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
151146
runtool: matches.opt_str("runtool"),
152147
host_rustcflags: matches.opt_str("host-rustcflags"),
153148
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -281,9 +276,9 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
281276
debug!("making tests from {:?}",
282277
config.src_base.display());
283278
let mut tests = Vec::new();
284-
let dirs = fs::read_dir(&config.src_base).unwrap();
285-
for file in dirs {
286-
let file = file.unwrap().path();
279+
let dirs = fs::readdir(&config.src_base).unwrap();
280+
for file in &dirs {
281+
let file = file.clone();
287282
debug!("inspecting file {:?}", file.display());
288283
if is_test(config, &file) {
289284
let t = make_test(config, &file, || {
@@ -306,7 +301,7 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
306301
_ => vec!(".rc".to_string(), ".rs".to_string())
307302
};
308303
let invalid_prefixes = vec!(".".to_string(), "#".to_string(), "~".to_string());
309-
let name = testfile.file_name().unwrap().to_str().unwrap();
304+
let name = testfile.filename_str().unwrap();
310305

311306
let mut valid = false;
312307

@@ -342,9 +337,9 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
342337

343338
// Try to elide redundant long paths
344339
fn shorten(path: &Path) -> String {
345-
let filename = path.file_name().unwrap().to_str();
346-
let p = path.parent().unwrap();
347-
let dir = p.file_name().unwrap().to_str();
340+
let filename = path.filename_str();
341+
let p = path.dir_path();
342+
let dir = p.filename_str();
348343
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
349344
}
350345

@@ -353,17 +348,19 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
353348

354349
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
355350
let config = (*config).clone();
356-
let testfile = testfile.to_path_buf();
351+
// FIXME (#9639): This needs to handle non-utf8 paths
352+
let testfile = testfile.as_str().unwrap().to_string();
357353
test::DynTestFn(Thunk::new(move || {
358-
runtest::run(config, &testfile)
354+
runtest::run(config, testfile)
359355
}))
360356
}
361357

362358
pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
363359
let config = (*config).clone();
364-
let testfile = testfile.to_path_buf();
360+
// FIXME (#9639): This needs to handle non-utf8 paths
361+
let testfile = testfile.as_str().unwrap().to_string();
365362
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
366-
runtest::run_metrics(config, &testfile, mm)
363+
runtest::run_metrics(config, testfile, mm)
367364
})
368365
}
369366

branches/auto/src/compiletest/errors.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
// except according to those terms.
1010
use self::WhichLine::*;
1111

12-
use std::fs::File;
13-
use std::io::BufReader;
14-
use std::io::prelude::*;
15-
use std::path::Path;
12+
use std::old_io::{BufferedReader, File};
1613

1714
pub struct ExpectedError {
1815
pub line: uint,
@@ -32,7 +29,7 @@ enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
3229
/// //~| ERROR message two for that same line.
3330
// Load any test directives embedded in the file
3431
pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
35-
let rdr = BufReader::new(File::open(testfile).unwrap());
32+
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
3633

3734
// `last_nonfollow_error` tracks the most recently seen
3835
// line with an error template that did not use the

branches/auto/src/compiletest/header.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
// except according to those terms.
1010

1111
use std::env;
12-
use std::fs::File;
13-
use std::io::BufReader;
14-
use std::io::prelude::*;
15-
use std::path::{Path, PathBuf};
1612

1713
use common::Config;
1814
use common;
@@ -27,7 +23,7 @@ pub struct TestProps {
2723
pub run_flags: Option<String>,
2824
// If present, the name of a file that this test should match when
2925
// pretty-printed
30-
pub pp_exact: Option<PathBuf>,
26+
pub pp_exact: Option<Path>,
3127
// Modules from aux directory that should be compiled
3228
pub aux_builds: Vec<String> ,
3329
// Environment settings to use during execution
@@ -66,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
6662
let mut pretty_mode = None;
6763
let mut pretty_compare_only = false;
6864
let mut forbid_output = Vec::new();
69-
iter_header(testfile, &mut |ln| {
65+
iter_header(testfile, |ln| {
7066
match parse_error_pattern(ln) {
7167
Some(ep) => error_patterns.push(ep),
7268
None => ()
@@ -223,7 +219,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
223219
}
224220
}
225221

226-
let val = iter_header(testfile, &mut |ln| {
222+
let val = iter_header(testfile, |ln| {
227223
!parse_name_directive(ln, "ignore-test") &&
228224
!parse_name_directive(ln, &ignore_target(config)) &&
229225
!parse_name_directive(ln, &ignore_stage(config)) &&
@@ -236,8 +232,12 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
236232
!val
237233
}
238234

239-
fn iter_header(testfile: &Path, it: &mut FnMut(&str) -> bool) -> bool {
240-
let rdr = BufReader::new(File::open(testfile).unwrap());
235+
fn iter_header<F>(testfile: &Path, mut it: F) -> bool where
236+
F: FnMut(&str) -> bool,
237+
{
238+
use std::old_io::{BufferedReader, File};
239+
240+
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
241241
for ln in rdr.lines() {
242242
// Assume that any directives will be found before the first
243243
// module or function. This doesn't seem to be an optimization
@@ -322,12 +322,12 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
322322
})
323323
}
324324

325-
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
325+
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<Path> {
326326
match parse_name_value_directive(line, "pp-exact") {
327-
Some(s) => Some(PathBuf::new(&s)),
327+
Some(s) => Some(Path::new(s)),
328328
None => {
329329
if parse_name_directive(line, "pp-exact") {
330-
testfile.file_name().map(|s| PathBuf::new(s))
330+
testfile.filename().map(|s| Path::new(s))
331331
} else {
332332
None
333333
}

0 commit comments

Comments
 (0)