Skip to content

Commit c07d9f4

Browse files
committed
---
yaml --- r: 274427 b: refs/heads/stable c: 0316013 h: refs/heads/master i: 274425: ba188ea 274423: 6fcab7d
1 parent 6c1b80d commit c07d9f4

File tree

84 files changed

+88930
-1242
lines changed

Some content is hidden

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

84 files changed

+88930
-1242
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: aaab14dd3f5e66097e5ef3dba1a6bfe3fcab68fb
32+
refs/heads/stable: 0316013b49614aef084a9b2357a3bd335dcc3a7b
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and documentation.
99

1010
Read ["Installing Rust"] from [The Book].
1111

12-
["Installing Rust"]: https://doc.rust-lang.org/book/getting-started.html#installing-rust
12+
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
1313
[The Book]: https://doc.rust-lang.org/book/index.html
1414

1515
## Building from Source

branches/stable/RELEASES.md

Lines changed: 0 additions & 352 deletions
Large diffs are not rendered by default.

branches/stable/configure

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ enable_if_not_disabled() {
334334
fi
335335
}
336336

337+
to_llvm_triple() {
338+
case $1 in
339+
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
340+
x86_64-w64-mingw32) echo x86_64-pc-windows-gnu ;;
341+
*) echo $1 ;;
342+
esac
343+
}
344+
337345
to_gnu_triple() {
338346
case $1 in
339347
i686-pc-windows-gnu) echo i686-w64-mingw32 ;;
@@ -638,6 +646,12 @@ valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
638646
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
639647
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
640648

649+
# Temporarily support old triples until buildbots get updated
650+
CFG_BUILD=$(to_llvm_triple $CFG_BUILD)
651+
putvar CFG_BUILD # Yes, this creates a duplicate entry, but the last one wins.
652+
CFG_HOST=$(to_llvm_triple $CFG_HOST)
653+
CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
654+
641655
# On Windows this determines root of the subtree for target libraries.
642656
# Host runtime libs always go to 'bin'.
643657
valopt libdir "${CFG_PREFIX}/lib" "install libraries"
@@ -1164,7 +1178,7 @@ do
11641178
;;
11651179

11661180

1167-
x86_64-*-musl)
1181+
*-musl)
11681182
if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ]
11691183
then
11701184
err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found"

branches/stable/mk/cfg/armv7-unknown-linux-gnueabihf.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# armv7-unknown-linux-gnueabihf configuration
2-
CROSS_PREFIX_armv7-unknown-linux-gnueabihf=arm-linux-gnueabihf-
2+
CROSS_PREFIX_armv7-unknown-linux-gnueabihf=armv7-unknown-linux-gnueabihf-
33
CC_armv7-unknown-linux-gnueabihf=gcc
44
CXX_armv7-unknown-linux-gnueabihf=g++
55
CPP_armv7-unknown-linux-gnueabihf=gcc -E
@@ -8,8 +8,8 @@ CFG_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).so
88
CFG_STATIC_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).a
99
CFG_LIB_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS) -march=armv7-a
12-
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS) -march=armv7-a
11+
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS)
1313
CFG_GCCISH_CXXFLAGS_armv7-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_armv7-unknown-linux-gnueabihf := -shared -fPIC -g
1515
CFG_GCCISH_DEF_FLAG_armv7-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=

branches/stable/mk/cfg/mips-unknown-linux-gnu.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mips-unknown-linux-gnu := 1
2020
CFG_LDPATH_mips-unknown-linux-gnu :=
2121
CFG_RUN_mips-unknown-linux-gnu=
2222
CFG_RUN_TARG_mips-unknown-linux-gnu=
23-
RUSTC_FLAGS_mips-unknown-linux-gnu := -C target-cpu=mips32r2 -C target-feature="+mips32r2" -C soft-float
23+
RUSTC_FLAGS_mips-unknown-linux-gnu :=
2424
CFG_GNU_TRIPLE_mips-unknown-linux-gnu := mips-unknown-linux-gnu

branches/stable/mk/cfg/mips-unknown-linux-musl.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

branches/stable/mk/cfg/mipsel-unknown-linux-gnu.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ CFG_UNIXY_mipsel-unknown-linux-gnu := 1
2020
CFG_LDPATH_mipsel-unknown-linux-gnu :=
2121
CFG_RUN_mipsel-unknown-linux-gnu=
2222
CFG_RUN_TARG_mipsel-unknown-linux-gnu=
23-
RUSTC_FLAGS_mipsel-unknown-linux-gnu := -C target-cpu=mips32 -C target-feature="+mips32"
23+
RUSTC_FLAGS_mipsel-unknown-linux-gnu :=
2424
CFG_GNU_TRIPLE_mipsel-unknown-linux-gnu := mipsel-unknown-linux-gnu

branches/stable/mk/cfg/mipsel-unknown-linux-musl.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

branches/stable/mk/cfg/powerpc64-unknown-linux-gnu.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ CFG_LIB_NAME_powerpc64-unknown-linux-gnu=lib$(1).so
88
CFG_STATIC_LIB_NAME_powerpc64-unknown-linux-gnu=lib$(1).a
99
CFG_LIB_GLOB_powerpc64-unknown-linux-gnu=lib$(1)-*.so
1010
CFG_LIB_DSYM_GLOB_powerpc64-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_powerpc64-unknown-linux-gnu := -m64
1211
CFG_CFLAGS_powerpc64-unknown-linux-gnu := -m64 $(CFLAGS)
1312
CFG_GCCISH_CFLAGS_powerpc64-unknown-linux-gnu := -Wall -Werror -g -fPIC -m64 $(CFLAGS)
1413
CFG_GCCISH_CXXFLAGS_powerpc64-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)

branches/stable/mk/tests.mk

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ifdef CHECK_IGNORED
4545
TESTARGS += --ignored
4646
endif
4747

48-
# Arguments to the cfail/rfail/rpass tests
48+
# Arguments to the cfail/rfail/rpass/bench tests
4949
ifdef CFG_VALGRIND
5050
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
5151
endif
@@ -306,6 +306,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
306306
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
307307
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
308308
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
309+
check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
309310
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
310311
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
311312
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
@@ -343,6 +344,7 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
343344
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
344345
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
345346
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
347+
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-exec \
346348
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
347349

348350
endef
@@ -466,6 +468,7 @@ CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
466468
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
467469
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
468470
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
471+
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
469472
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
470473
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
471474
DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@@ -482,6 +485,7 @@ CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
482485
RFAIL_TESTS := $(RFAIL_RS)
483486
CFAIL_TESTS := $(CFAIL_RS)
484487
PFAIL_TESTS := $(PFAIL_RS)
488+
BENCH_TESTS := $(BENCH_RS)
485489
PRETTY_TESTS := $(PRETTY_RS)
486490
DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
487491
DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
@@ -529,6 +533,11 @@ CTEST_BUILD_BASE_pfail = parse-fail
529533
CTEST_MODE_pfail = parse-fail
530534
CTEST_RUNTOOL_pfail = $(CTEST_RUNTOOL)
531535

536+
CTEST_SRC_BASE_bench = bench
537+
CTEST_BUILD_BASE_bench = bench
538+
CTEST_MODE_bench = run-pass
539+
CTEST_RUNTOOL_bench = $(CTEST_RUNTOOL)
540+
532541
CTEST_SRC_BASE_debuginfo-gdb = debuginfo
533542
CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
534543
CTEST_MODE_debuginfo-gdb = debuginfo-gdb
@@ -603,7 +612,7 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
603612
$$(HBIN$(1)_H_$(3))/compiletest$$(X_$(3)) \
604613
$$(SREQ$(1)_T_$(2)_H_$(3))
605614

606-
# Rules for the cfail/rfail/rpass test runner
615+
# Rules for the cfail/rfail/rpass/bench test runner
607616

608617
# The tests select when to use debug configuration on their own;
609618
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
@@ -666,6 +675,7 @@ CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$
666675
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
667676
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
668677
CTEST_DEPS_pfail_$(1)-T-$(2)-H-$(3) = $$(PFAIL_TESTS)
678+
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
669679
CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
670680
CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
671681
$(S)src/etc/lldb_batchmode.py \
@@ -738,7 +748,7 @@ endif
738748
endef
739749

740750
CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
741-
debuginfo-gdb debuginfo-lldb codegen codegen-units rustdocck
751+
bench debuginfo-gdb debuginfo-lldb codegen codegen-units rustdocck
742752

743753
$(foreach host,$(CFG_HOST), \
744754
$(eval $(foreach target,$(CFG_TARGET), \
@@ -747,18 +757,20 @@ $(foreach host,$(CFG_HOST), \
747757
$(eval $(call DEF_RUN_COMPILETEST,$(stage),$(target),$(host),$(name))))))))))
748758

749759
PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass-full pretty-rfail-full pretty-rfail \
750-
pretty-pretty
760+
pretty-bench pretty-pretty
751761
PRETTY_DEPS_pretty-rpass = $(RPASS_TESTS)
752762
PRETTY_DEPS_pretty-rpass-valgrind = $(RPASS_VALGRIND_TESTS)
753763
PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
754764
PRETTY_DEPS_pretty-rfail-full = $(RFAIL_FULL_TESTS)
755765
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
766+
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
756767
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
757768
PRETTY_DIRNAME_pretty-rpass = run-pass
758769
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
759770
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
760771
PRETTY_DIRNAME_pretty-rfail-full = run-fail-fulldeps
761772
PRETTY_DIRNAME_pretty-rfail = run-fail
773+
PRETTY_DIRNAME_pretty-bench = bench
762774
PRETTY_DIRNAME_pretty-pretty = pretty
763775

764776
define DEF_PRETTY_FULLDEPS
@@ -908,6 +920,7 @@ TEST_GROUPS = \
908920
rfail \
909921
cfail \
910922
pfail \
923+
bench \
911924
rmake \
912925
rustdocck \
913926
debuginfo-gdb \
@@ -922,6 +935,7 @@ TEST_GROUPS = \
922935
pretty-rpass-full \
923936
pretty-rfail-full \
924937
pretty-rfail \
938+
pretty-bench \
925939
pretty-pretty \
926940
$(NULL)
927941

branches/stable/src/compiletest/runtest.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -929,13 +929,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
929929
format!("{}:{}:", testfile.display(), ee.line)
930930
}).collect::<Vec<String>>();
931931

932-
let (expect_help, expect_note) =
933-
expected_errors.iter()
934-
.fold((false, false),
935-
|(acc_help, acc_note), ee|
936-
(acc_help || ee.kind == "help:", acc_note ||
937-
ee.kind == "note:"));
938-
939932
fn prefix_matches(line: &str, prefix: &str) -> bool {
940933
use std::ascii::AsciiExt;
941934
// On windows just translate all '\' path separators to '/'
@@ -999,8 +992,8 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
999992
was_expected = true;
1000993
}
1001994

1002-
if !was_expected && is_unexpected_compiler_message(line, expect_help, expect_note) {
1003-
fatal_proc_rec(&format!("unexpected compiler message: '{}'",
995+
if !was_expected && is_compiler_error_or_warning(line) {
996+
fatal_proc_rec(&format!("unexpected compiler error or warning: '{}'",
1004997
line),
1005998
proc_res);
1006999
}
@@ -1016,15 +1009,16 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
10161009
}
10171010
}
10181011

1019-
fn is_unexpected_compiler_message(line: &str, expect_help: bool, expect_note: bool) -> bool {
1012+
fn is_compiler_error_or_warning(line: &str) -> bool {
10201013
let mut c = Path::new(line).components();
10211014
let line = match c.next() {
10221015
Some(Component::Prefix(_)) => c.as_path().to_str().unwrap(),
10231016
_ => line,
10241017
};
10251018

10261019
let mut i = 0;
1027-
return scan_until_char(line, ':', &mut i) &&
1020+
return
1021+
scan_until_char(line, ':', &mut i) &&
10281022
scan_char(line, ':', &mut i) &&
10291023
scan_integer(line, &mut i) &&
10301024
scan_char(line, ':', &mut i) &&
@@ -1036,10 +1030,7 @@ fn is_unexpected_compiler_message(line: &str, expect_help: bool, expect_note: bo
10361030
scan_integer(line, &mut i) &&
10371031
scan_char(line, ' ', &mut i) &&
10381032
(scan_string(line, "error", &mut i) ||
1039-
scan_string(line, "warning", &mut i) ||
1040-
(expect_help && scan_string(line, "help", &mut i)) ||
1041-
(expect_note && scan_string(line, "note", &mut i))
1042-
);
1033+
scan_string(line, "warning", &mut i));
10431034
}
10441035

10451036
fn scan_until_char(haystack: &str, needle: char, idx: &mut usize) -> bool {

branches/stable/src/doc/book/error-handling.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ fn map<F, T, A>(option: Option<T>, f: F) -> Option<A> where F: FnOnce(T) -> A {
265265
```
266266

267267
Indeed, `map` is [defined as a method][2] on `Option<T>` in the standard library.
268-
As a method, it has a slighly different signature: methods take `self`, `&self`,
269-
or `&mut self` as their first argument.
270268

271269
Armed with our new combinator, we can rewrite our `extension_explicit` method
272270
to get rid of the case analysis:
@@ -296,9 +294,6 @@ fn unwrap_or<T>(option: Option<T>, default: T) -> T {
296294
}
297295
```
298296

299-
Like with `map` above, the standard library implementation is a method instead
300-
of a free function.
301-
302297
The trick here is that the default value must have the same type as the value
303298
that might be inside the `Option<T>`. Using it is dead simple in our case:
304299

branches/stable/src/doc/book/guessing-game.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ displaying the message.
279279
[expect]: ../std/option/enum.Option.html#method.expect
280280
[panic]: error-handling.html
281281

282-
If we leave off calling this method, our program will compile, but
282+
If we leave off calling these two methods, our program will compile, but
283283
we’ll get a warning:
284284

285285
```bash
@@ -680,7 +680,7 @@ fn main() {
680680
}
681681
```
682682
683-
The new two lines:
683+
The new three lines:
684684
685685
```rust,ignore
686686
let guess: u32 = guess.trim().parse()

0 commit comments

Comments
 (0)