Skip to content

Commit b46e9f2

Browse files
author
Lai Jiangshan
committed
---
yaml --- r: 188349 b: refs/heads/master c: cd65156 h: refs/heads/master i: 188347: 78caf99 v: v3
1 parent 150858f commit b46e9f2

File tree

483 files changed

+3010
-4999
lines changed

Some content is hidden

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

483 files changed

+3010
-4999
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fed12499e7d91f9cdfba5833e34d20e8fd19b898
2+
refs/heads/master: cd65156514ae527365df8d693921d0e22256ff5d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/mk/debuggers.mk

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,29 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
5656
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
5757
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
5858
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
59-
$(Q)touch $$@.start_time
6059
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
6160
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
6261
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
6362
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
64-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
63+
$(Q)touch $$@
6564

6665
tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
6766
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
6867
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
69-
$(Q)touch $$@.start_time
7068
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
7169
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
7270
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
7371
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
74-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
72+
$(Q)touch $$@
7573

7674
tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
7775
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
7876
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
79-
$(Q)touch $$@.start_time
8077
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
8178
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
8279
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
8380
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
84-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
81+
$(Q)touch $$@
8582

8683
tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
8784
$(Q)touch $$@
@@ -101,32 +98,29 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
10198
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
10299
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
103100
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
104-
$(Q)touch $$@.start_time
105101
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
106102
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
107103
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
108104
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
109-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
105+
$(Q)touch $$@
110106

111107
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
112108
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
113109
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
114-
$(Q)touch $$@.start_time
115110
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
116111
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
117112
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
118113
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
119-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
114+
$(Q)touch $$@
120115

121116
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
122117
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
123118
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
124-
$(Q)touch $$@.start_time
125119
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
126120
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
127121
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
128122
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
129-
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
123+
$(Q)touch $$@
130124

131125
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
132126
$(Q)touch $$@

trunk/mk/llvm.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ endif
3838
# the stamp in the source dir.
3939
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4040
@$$(call E, make: cleaning llvm)
41-
$(Q)touch $$@.start_time
4241
$(Q)$(MAKE) clean-llvm$(1)
4342
@$$(call E, make: done cleaning llvm)
44-
touch -r $$@.start_time $$@ && rm $$@.start_time
43+
touch $$@
4544

4645
ifeq ($$(CFG_ENABLE_LLVM_STATIC_STDCPP),1)
4746
LLVM_STDCPP_LOCATION_$(1) = $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \

trunk/mk/target.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7575
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7676
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7777
@$$(call E, rustc: $$(@D)/lib$(4))
78-
@touch $$@.start_time
7978
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
8079
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8180
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
@@ -90,7 +89,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9089
--out-dir $$(@D) \
9190
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9291
$$<
93-
@touch -r $$@.start_time $$@ && rm $$@.start_time
92+
@touch $$@
9493
$$(call LIST_ALL_OLD_GLOB_MATCHES, \
9594
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
9695
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

trunk/mk/tests.mk

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,10 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
389389
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
390390
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
391391
@$$(call E, run: $$<)
392-
$$(Q)touch $$@.start_time
393392
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(1),$(2),$(3)) $$(TESTARGS) \
394393
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
395394
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
396-
&& touch -r $$@.start_time $$@ && rm $$@.start_time
395+
&& touch $$@
397396
endef
398397

399398
define DEF_TEST_CRATE_RULES_android
@@ -402,7 +401,6 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
402401
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
403402
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
404403
@$$(call E, run: $$< via adb)
405-
$$(Q)touch $$@.start_time
406404
$$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
407405
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=./$(2) \
408406
./$$(notdir $$<) \
@@ -416,7 +414,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
416414
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
417415
then \
418416
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
419-
touch -r $$@.start_time $$@ && rm $$@.start_time; \
417+
touch $$@; \
420418
else \
421419
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
422420
exit 101; \
@@ -692,11 +690,10 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
692690
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
693691
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
694692
@$$(call E, run $(4) [$(2)]: $$<)
695-
$$(Q)touch [email protected]_time
696693
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
697694
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
698695
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
699-
&& touch -r $$@.start_time $$@ && rm [email protected]_time
696+
&& touch $$@
700697

701698
else
702699

@@ -753,11 +750,10 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
753750
$$(PRETTY_DEPS_$(4)) \
754751
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
755752
@$$(call E, run pretty-rpass [$(2)]: $$<)
756-
$$(Q)touch $$@.start_time
757753
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
758754
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
759755
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
760-
&& touch -r $$@.start_time $$@ && rm $$@.start_time
756+
&& touch $$@
761757

762758
endef
763759

@@ -803,10 +799,8 @@ endif
803799
ifeq ($(2),$$(CFG_BUILD))
804800
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
805801
@$$(call E, run doc-$(4) [$(2)])
806-
$$(Q)touch $$@.start_time
807802
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< \
808-
--test-args "$$(TESTARGS)" && \
809-
touch -r $$@.start_time $$@ && rm $$@.start_time
803+
--test-args "$$(TESTARGS)" && touch $$@
810804
else
811805
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
812806
touch $$@
@@ -841,11 +835,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
841835
ifeq ($(2),$$(CFG_BUILD))
842836
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
843837
@$$(call E, run doc-crate-$(4) [$(2)])
844-
$$(Q)touch $$@.start_time
845838
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
846839
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
847-
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && \
848-
touch -r $$@.start_time $$@ && rm $$@.start_time
840+
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
849841
else
850842
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)):
851843
touch $$@
@@ -992,7 +984,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
992984
$$(CSREQ$(1)_T_$(2)_H_$(3))
993985
@rm -rf $(3)/test/run-make/$$*
994986
@mkdir -p $(3)/test/run-make/$$*
995-
$$(Q)touch $$@.start_time
996987
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
997988
$$(MAKE) \
998989
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
@@ -1005,7 +996,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
1005996
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
1006997
$(1) \
1007998
$$(S)
1008-
@touch -r $$@.start_time $$@ && rm [email protected]_time
999+
@touch $$@
10091000
else
10101001
# FIXME #11094 - The above rule doesn't work right for multiple targets
10111002
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec:

trunk/src/compiletest/runtest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
127127
};
128128

129129
// The value our Makefile configures valgrind to return on failure
130-
const VALGRIND_ERR: int = 100;
130+
static VALGRIND_ERR: int = 100;
131131
if proc_res.status.matches_exit_status(VALGRIND_ERR) {
132132
fatal_proc_rec("run-fail test isn't valgrind-clean!", &proc_res);
133133
}
@@ -139,7 +139,7 @@ fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
139139

140140
fn check_correct_failure_status(proc_res: &ProcRes) {
141141
// The value the rust runtime returns on failure
142-
const RUST_ERR: int = 101;
142+
static RUST_ERR: int = 101;
143143
if !proc_res.status.matches_exit_status(RUST_ERR) {
144144
fatal_proc_rec(
145145
&format!("failure produced the wrong error: {:?}",

trunk/src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use common::Config;
1414
use std::env;
1515

1616
/// Conversion table from triple OS name to Rust SYSNAME
17-
const OS_TABLE: &'static [(&'static str, &'static str)] = &[
17+
static OS_TABLE: &'static [(&'static str, &'static str)] = &[
1818
("mingw32", "windows"),
1919
("win32", "windows"),
2020
("windows", "windows"),

trunk/src/doc/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,10 @@ numbers[1] is 3
510510
numbers[0] is 2
511511
```
512512
513-
Each time, we can get a slightly different output because the threads are not
514-
guaranteed to run in any set order. If you get the same order every time it is
515-
because each of these threads are very small and complete too fast for their
516-
indeterminate behavior to surface.
513+
Each time, we can get a slithtly different output because the threads
514+
are not quaranteed to run in any set order. If you get the same order
515+
every time it is because each of these threads are very small and
516+
complete too fast for their indeterminate behavior to surface.
517517
518518
The important part here is that the Rust compiler was able to use ownership to
519519
give us assurance _at compile time_ that we weren't doing something incorrect

trunk/src/doc/reference.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,12 +2495,6 @@ The currently implemented features of the reference compiler are:
24952495

24962496
* `staged_api` - Allows usage of stability markers and `#![staged_api]` in a crate
24972497

2498-
* `static_assert` - The `#[static_assert]` functionality is experimental and
2499-
unstable. The attribute can be attached to a `static` of
2500-
type `bool` and the compiler will error if the `bool` is
2501-
`false` at compile time. This version of this functionality
2502-
is unintuitive and suboptimal.
2503-
25042498
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
25052499
into a Rust program. This capabiilty, especially the signature for the
25062500
annotated function, is subject to change.

trunk/src/doc/trpl/guessing-game.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,11 @@ In this case, we say `x` is a `u32` explicitly, so Rust is able to properly
422422
tell `random()` what to generate. In a similar fashion, both of these work:
423423
424424
```{rust,ignore}
425-
let input_num_option = "5".parse::<u32>().ok(); // input_num: Option<u32>
426-
let input_num_result: Result<u32, _> = "5".parse(); // input_num: Result<u32, <u32 as FromStr>::Err>
425+
let input_num = "5".parse::<u32>(); // input_num: Option<u32>
426+
let input_num: Result<u32, _> = "5".parse(); // input_num: Result<u32, <u32 as FromStr>::Err>
427427
```
428428
429-
Above, we're converting the `Result` returned by `parse` to an `Option` by using
429+
Here we're converting the `Result` returned by `parse` to an `Option` by using
430430
the `ok` method as well. Anyway, with us now converting our input to a number,
431431
our code looks like this:
432432
@@ -470,14 +470,14 @@ Let's try it out!
470470
```bash
471471
$ cargo build
472472
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
473-
src/main.rs:21:15: 21:24 error: mismatched types: expected `u32`, found `core::result::Result<u32, core::num::ParseIntError>` (expected u32, found enum `core::result::Result`) [E0308]
474-
src/main.rs:21 match cmp(input_num, secret_number) {
473+
src/main.rs:22:15: 22:24 error: mismatched types: expected `u32` but found `core::option::Option<u32>` (expected u32 but found enum core::option::Option)
474+
src/main.rs:22 match cmp(input_num, secret_number) {
475475
^~~~~~~~~
476476
error: aborting due to previous error
477477
```
478478
479-
Oh yeah! Our `input_num` has the type `Result<u32, <some error>>`, rather than `u32`. We
480-
need to unwrap the Result. If you remember from before, `match` is a great way
479+
Oh yeah! Our `input_num` has the type `Option<u32>`, rather than `u32`. We
480+
need to unwrap the Option. If you remember from before, `match` is a great way
481481
to do that. Try this code:
482482
483483
```{rust,no_run}
@@ -500,7 +500,7 @@ fn main() {
500500
let input_num: Result<u32, _> = input.parse();
501501

502502
let num = match input_num {
503-
Ok(n) => n,
503+
Ok(num) => num,
504504
Err(_) => {
505505
println!("Please input a number!");
506506
return;
@@ -524,7 +524,7 @@ fn cmp(a: u32, b: u32) -> Ordering {
524524
}
525525
```
526526
527-
We use a `match` to either give us the `u32` inside of the `Result`, or else
527+
We use a `match` to either give us the `u32` inside of the `Option`, or else
528528
print an error message and return. Let's give this a shot:
529529
530530
```bash

trunk/src/doc/trpl/pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ fn main() {
709709
one_hundred: 100,
710710
});
711711

712-
let y: Box<BigStruct> = box foo(x);
712+
let y = box foo(x);
713713
}
714714
```
715715

0 commit comments

Comments
 (0)