Skip to content

Commit b28de04

Browse files
committed
---
yaml --- r: 136699 b: refs/heads/dist-snap c: fc58dcb h: refs/heads/master i: 136697: 28d1f84 136695: 70d3f6c v: v3
1 parent d79e2fc commit b28de04

File tree

360 files changed

+8974
-11212
lines changed

Some content is hidden

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

360 files changed

+8974
-11212
lines changed

[refs]

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

branches/dist-snap/CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ If you're just reporting a bug, please see:
44

55
http://doc.rust-lang.org/complement-bugreport.html
66

7-
## Submitting an issue
8-
9-
Please submit issues here for bug reports or implementation details. For feature
10-
requests, language changes, or major changes to the libraries, please submit an
11-
issue against the [RFCs repository](https://github.com/rust-lang/rfcs).
12-
137
## Pull request procedure
148

159
Pull requests should be targeted at Rust's `master` branch.

branches/dist-snap/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ case $CFG_OSTYPE in
306306
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
307307
# MINGW64 on x86_64.
308308
CFG_CPUTYPE=i686
309-
CFG_OSTYPE=w64-mingw32
309+
CFG_OSTYPE=pc-mingw32
310310
if [ "$MSYSTEM" = MINGW64 ]
311311
then
312312
CFG_CPUTYPE=x86_64

branches/dist-snap/mk/crates.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

6161
DEPS_core :=
62-
DEPS_libc := core
6362
DEPS_rlibc := core
6463
DEPS_unicode := core
6564
DEPS_alloc := core libc native:jemalloc

branches/dist-snap/mk/docs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
2929
guide-tasks guide-container guide-pointers guide-testing \
3030
guide-runtime complement-bugreport \
3131
complement-lang-faq complement-design-faq complement-project-faq rust \
32-
rustdoc guide-unsafe guide-strings reference
32+
rustdoc guide-unsafe guide-strings
3333

34-
PDF_DOCS := guide reference
34+
PDF_DOCS := guide rust
3535

3636
RUSTDOC_DEPS_rust := doc/full-toc.inc
3737
RUSTDOC_FLAGS_rust := --html-in-header=doc/full-toc.inc

branches/dist-snap/mk/rt.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,6 @@ LIBUV_CFLAGS_$(1) := $(subst -Werror,,$(CFG_GCCISH_CFLAGS_$(1)))
203203

204204
$$(LIBUV_MAKEFILE_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
205205
(cd $(S)src/libuv/ && \
206-
CC="$$(CC_$(1))" \
207-
CXX="$$(CXX_$(1))" \
208-
AR="$$(AR_$(1))" \
209206
$$(CFG_PYTHON) ./gyp_uv.py -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) \
210207
-D ninja \
211208
-DOS=$$(LIBUV_OSTYPE_$(1)) \
@@ -228,9 +225,6 @@ else ifeq ($(OSTYPE_$(1)), apple-ios) # iOS
228225
$$(LIBUV_XCODEPROJ_$(1)): $$(LIBUV_DEPS) $$(MKFILE_DEPS) $$(LIBUV_STAMP_$(1))
229226
cp -rf $(S)src/libuv/ $$(LIBUV_BUILD_DIR_$(1))
230227
(cd $$(LIBUV_BUILD_DIR_$(1)) && \
231-
CC="$$(CC_$(1))" \
232-
CXX="$$(CXX_$(1))" \
233-
AR="$$(AR_$(1))" \
234228
$$(CFG_PYTHON) ./gyp_uv.py -f xcode \
235229
-D ninja \
236230
-R libuv)

branches/dist-snap/mk/tests.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,11 @@ ifdef VERBOSE
6060
CTEST_TESTARGS += --verbose
6161
endif
6262

63-
# Setting locale ensures that gdb's output remains consistent.
64-
# This prevents tests from failing with some locales (fixes #17423).
65-
export LC_ALL=C
66-
6763
# If we're running perf then set this environment variable
6864
# to put the benchmarks into 'hard mode'
6965
ifeq ($(MAKECMDGOALS),perf)
70-
export RUST_BENCH=1
66+
RUST_BENCH=1
67+
export RUST_BENCH
7168
endif
7269

7370
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ pub struct TestProps {
4242
pub pretty_mode: String,
4343
// Only compare pretty output and don't try compiling
4444
pub pretty_compare_only: bool,
45-
// Patterns which must not appear in the output of a cfail test.
46-
pub forbid_output: Vec<String>,
4745
}
4846

4947
// Load any test directives embedded in the file
@@ -61,7 +59,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
6159
let mut no_pretty_expanded = false;
6260
let mut pretty_mode = None;
6361
let mut pretty_compare_only = false;
64-
let mut forbid_output = Vec::new();
6562
iter_header(testfile, |ln| {
6663
match parse_error_pattern(ln) {
6764
Some(ep) => error_patterns.push(ep),
@@ -119,11 +116,6 @@ pub fn load_props(testfile: &Path) -> TestProps {
119116
None => ()
120117
};
121118

122-
match parse_forbid_output(ln) {
123-
Some(of) => forbid_output.push(of),
124-
None => (),
125-
}
126-
127119
true
128120
});
129121

@@ -140,8 +132,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
140132
no_prefer_dynamic: no_prefer_dynamic,
141133
no_pretty_expanded: no_pretty_expanded,
142134
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
143-
pretty_compare_only: pretty_compare_only,
144-
forbid_output: forbid_output,
135+
pretty_compare_only: pretty_compare_only
145136
}
146137
}
147138

@@ -219,10 +210,6 @@ fn parse_error_pattern(line: &str) -> Option<String> {
219210
parse_name_value_directive(line, "error-pattern")
220211
}
221212

222-
fn parse_forbid_output(line: &str) -> Option<String> {
223-
parse_name_value_directive(line, "forbid-output")
224-
}
225-
226213
fn parse_aux_build(line: &str) -> Option<String> {
227214
parse_name_value_directive(line, "aux-build")
228215
}

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

Lines changed: 42 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,6 @@ pub fn run_metrics(config: Config, testfile: String, mm: &mut MetricMap) {
7171
}
7272
}
7373

74-
fn get_output(props: &TestProps, proc_res: &ProcRes) -> String {
75-
if props.check_stdout {
76-
format!("{}{}", proc_res.stdout, proc_res.stderr)
77-
} else {
78-
proc_res.stderr.clone()
79-
}
80-
}
81-
8274
fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
8375
let proc_res = compile_test(config, props, testfile);
8476

@@ -89,22 +81,16 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
8981

9082
check_correct_failure_status(&proc_res);
9183

92-
if proc_res.status.success() {
93-
fatal("process did not return an error status");
94-
}
95-
96-
let output_to_check = get_output(props, &proc_res);
9784
let expected_errors = errors::load_errors(&config.cfail_regex, testfile);
9885
if !expected_errors.is_empty() {
9986
if !props.error_patterns.is_empty() {
10087
fatal("both error pattern and expected errors specified");
10188
}
10289
check_expected_errors(expected_errors, testfile, &proc_res);
10390
} else {
104-
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
91+
check_error_patterns(props, testfile, &proc_res);
10592
}
10693
check_no_compiler_crash(&proc_res);
107-
check_forbid_output(props, output_to_check.as_slice(), &proc_res);
10894
}
10995

11096
fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
@@ -126,9 +112,8 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
126112
fatal_proc_rec("run-fail test isn't valgrind-clean!", &proc_res);
127113
}
128114

129-
let output_to_check = get_output(props, &proc_res);
130115
check_correct_failure_status(&proc_res);
131-
check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
116+
check_error_patterns(props, testfile, &proc_res);
132117
}
133118

134119
fn check_correct_failure_status(proc_res: &ProcRes) {
@@ -273,8 +258,8 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
273258
format!("--target={}", config.target),
274259
"-L".to_string(),
275260
aux_dir.as_str().unwrap().to_string());
276-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
277-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
261+
args.push_all_move(split_maybe_args(&config.target_rustcflags));
262+
args.push_all_move(split_maybe_args(&props.compile_flags));
278263
return ProcArgs {
279264
prog: config.rustc_path.as_str().unwrap().to_string(),
280265
args: args,
@@ -321,8 +306,8 @@ actual:\n\
321306
config.build_base.as_str().unwrap().to_string(),
322307
"-L".to_string(),
323308
aux_dir.as_str().unwrap().to_string());
324-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
325-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
309+
args.push_all_move(split_maybe_args(&config.target_rustcflags));
310+
args.push_all_move(split_maybe_args(&props.compile_flags));
326311
// FIXME (#9639): This needs to handle non-utf8 paths
327312
return ProcArgs {
328313
prog: config.rustc_path.as_str().unwrap().to_string(),
@@ -444,8 +429,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
444429
"-nx".to_string(),
445430
format!("-command={}", debugger_script.as_str().unwrap()));
446431

447-
let mut gdb_path = tool_path;
448-
gdb_path.push_str("/bin/arm-linux-androideabi-gdb");
432+
let gdb_path = tool_path.append("/bin/arm-linux-androideabi-gdb");
449433
let procsrv::Result {
450434
out,
451435
err,
@@ -850,15 +834,24 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
850834

851835
fn check_error_patterns(props: &TestProps,
852836
testfile: &Path,
853-
output_to_check: &str,
854837
proc_res: &ProcRes) {
855838
if props.error_patterns.is_empty() {
856839
fatal(format!("no error pattern specified in {}",
857840
testfile.display()).as_slice());
858841
}
842+
843+
if proc_res.status.success() {
844+
fatal("process did not return an error status");
845+
}
846+
859847
let mut next_err_idx = 0u;
860848
let mut next_err_pat = &props.error_patterns[next_err_idx];
861849
let mut done = false;
850+
let output_to_check = if props.check_stdout {
851+
format!("{}{}", proc_res.stdout, proc_res.stderr)
852+
} else {
853+
proc_res.stderr.clone()
854+
};
862855
for line in output_to_check.as_slice().lines() {
863856
if line.contains(next_err_pat.as_slice()) {
864857
debug!("found error pattern {}", next_err_pat);
@@ -897,16 +890,6 @@ fn check_no_compiler_crash(proc_res: &ProcRes) {
897890
}
898891
}
899892

900-
fn check_forbid_output(props: &TestProps,
901-
output_to_check: &str,
902-
proc_res: &ProcRes) {
903-
for pat in props.forbid_output.iter() {
904-
if output_to_check.contains(pat.as_slice()) {
905-
fatal_proc_rec("forbidden pattern found in compiler output", proc_res);
906-
}
907-
}
908-
}
909-
910893
fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
911894
testfile: &Path,
912895
proc_res: &ProcRes) {
@@ -1096,12 +1079,11 @@ fn compile_test_(config: &Config, props: &TestProps,
10961079
testfile: &Path, extra_args: &[String]) -> ProcRes {
10971080
let aux_dir = aux_output_dir_name(config, testfile);
10981081
// FIXME (#9639): This needs to handle non-utf8 paths
1099-
let mut link_args = vec!("-L".to_string(),
1100-
aux_dir.as_str().unwrap().to_string());
1101-
link_args.extend(extra_args.iter().map(|s| s.clone()));
1082+
let link_args = vec!("-L".to_string(),
1083+
aux_dir.as_str().unwrap().to_string());
11021084
let args = make_compile_args(config,
11031085
props,
1104-
link_args,
1086+
link_args.append(extra_args),
11051087
|a, b| ThisFile(make_exe_name(a, b)), testfile);
11061088
compose_and_run_compiler(config, props, testfile, args, None)
11071089
}
@@ -1148,16 +1130,16 @@ fn compose_and_run_compiler(
11481130
for rel_ab in props.aux_builds.iter() {
11491131
let abs_ab = config.aux_base.join(rel_ab.as_slice());
11501132
let aux_props = header::load_props(&abs_ab);
1151-
let mut crate_type = if aux_props.no_prefer_dynamic {
1133+
let crate_type = if aux_props.no_prefer_dynamic {
11521134
Vec::new()
11531135
} else {
11541136
vec!("--crate-type=dylib".to_string())
11551137
};
1156-
crate_type.extend(extra_link_args.clone().into_iter());
11571138
let aux_args =
11581139
make_compile_args(config,
11591140
&aux_props,
1160-
crate_type,
1141+
crate_type.append(
1142+
extra_link_args.as_slice()),
11611143
|a,b| {
11621144
let f = make_lib_name(a, b, testfile);
11631145
ThisDirectory(f.dir_path())
@@ -1248,11 +1230,11 @@ fn make_compile_args(config: &Config,
12481230
};
12491231
args.push(path.as_str().unwrap().to_string());
12501232
if props.force_host {
1251-
args.extend(split_maybe_args(&config.host_rustcflags).into_iter());
1233+
args.push_all_move(split_maybe_args(&config.host_rustcflags));
12521234
} else {
1253-
args.extend(split_maybe_args(&config.target_rustcflags).into_iter());
1235+
args.push_all_move(split_maybe_args(&config.target_rustcflags));
12541236
}
1255-
args.extend(split_maybe_args(&props.compile_flags).into_iter());
1237+
args.push_all_move(split_maybe_args(&props.compile_flags));
12561238
return ProcArgs {
12571239
prog: config.rustc_path.as_str().unwrap().to_string(),
12581240
args: args,
@@ -1269,9 +1251,10 @@ fn make_lib_name(config: &Config, auxfile: &Path, testfile: &Path) -> Path {
12691251
fn make_exe_name(config: &Config, testfile: &Path) -> Path {
12701252
let mut f = output_base_name(config, testfile);
12711253
if !os::consts::EXE_SUFFIX.is_empty() {
1272-
let mut fname = f.filename().unwrap().to_vec();
1273-
fname.extend(os::consts::EXE_SUFFIX.bytes());
1274-
f.set_filename(fname);
1254+
match f.filename().map(|s| Vec::from_slice(s).append(os::consts::EXE_SUFFIX.as_bytes())) {
1255+
Some(v) => f.set_filename(v),
1256+
None => ()
1257+
}
12751258
}
12761259
f
12771260
}
@@ -1287,7 +1270,7 @@ fn make_run_args(config: &Config, props: &TestProps, testfile: &Path) ->
12871270
args.push(exe_file.as_str().unwrap().to_string());
12881271

12891272
// Add the arguments in the run_flags directive
1290-
args.extend(split_maybe_args(&props.run_flags).into_iter());
1273+
args.push_all_move(split_maybe_args(&props.run_flags));
12911274

12921275
let prog = args.remove(0).unwrap();
12931276
return ProcArgs {
@@ -1382,10 +1365,12 @@ fn make_out_name(config: &Config, testfile: &Path, extension: &str) -> Path {
13821365
}
13831366

13841367
fn aux_output_dir_name(config: &Config, testfile: &Path) -> Path {
1385-
let f = output_base_name(config, testfile);
1386-
let mut fname = f.filename().unwrap().to_vec();
1387-
fname.extend("libaux".bytes());
1388-
f.with_filename(fname)
1368+
let mut f = output_base_name(config, testfile);
1369+
match f.filename().map(|s| Vec::from_slice(s).append(b".libaux")) {
1370+
Some(v) => f.set_filename(v),
1371+
None => ()
1372+
}
1373+
f
13891374
}
13901375

13911376
fn output_testname(testfile: &Path) -> Path {
@@ -1597,25 +1582,22 @@ fn append_suffix_to_stem(p: &Path, suffix: &str) -> Path {
15971582
if suffix.len() == 0 {
15981583
(*p).clone()
15991584
} else {
1600-
let mut stem = p.filestem().unwrap().to_vec();
1601-
stem.extend("-".bytes());
1602-
stem.extend(suffix.bytes());
1603-
p.with_filename(stem)
1585+
let stem = p.filestem().unwrap();
1586+
p.with_filename(Vec::from_slice(stem).append(b"-").append(suffix.as_bytes()))
16041587
}
16051588
}
16061589

16071590
fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
16081591
testfile: &Path) -> ProcRes {
16091592
let aux_dir = aux_output_dir_name(config, testfile);
16101593
// FIXME (#9639): This needs to handle non-utf8 paths
1611-
let mut link_args = vec!("-L".to_string(),
1612-
aux_dir.as_str().unwrap().to_string());
1594+
let link_args = vec!("-L".to_string(),
1595+
aux_dir.as_str().unwrap().to_string());
16131596
let llvm_args = vec!("--emit=bc,obj".to_string(),
16141597
"--crate-type=lib".to_string());
1615-
link_args.extend(llvm_args.into_iter());
16161598
let args = make_compile_args(config,
16171599
props,
1618-
link_args,
1600+
link_args.append(llvm_args.as_slice()),
16191601
|a, b| ThisDirectory(output_base_name(a, b).dir_path()),
16201602
testfile);
16211603
compose_and_run_compiler(config, props, testfile, args, None)

branches/dist-snap/src/doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To generate an HTML version of a doc from Markdown manually, you can do
3030
something like:
3131

3232
~~~~
33-
pandoc --from=markdown --to=html5 --number-sections -o reference.html reference.md
33+
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md
3434
~~~~
3535

3636
(rust.md being the Rust Reference Manual.)

0 commit comments

Comments
 (0)