Skip to content

Commit c668b71

Browse files
committed
---
yaml --- r: 163197 b: refs/heads/snap-stage3 c: dea7143 h: refs/heads/master i: 163195: 6e460e1 v: v3
1 parent 8542843 commit c668b71

File tree

659 files changed

+13798
-10385
lines changed

Some content is hidden

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

659 files changed

+13798
-10385
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 807066f8c9cacf1f8acf3a7be25c14cc46d99f58
4+
refs/heads/snap-stage3: dea71432049312f1312b18e11213f43bffbe3f19
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,19 +1040,18 @@ do
10401040
make_dir $h/test/debuginfo-gdb
10411041
make_dir $h/test/debuginfo-lldb
10421042
make_dir $h/test/codegen
1043-
make_dir $h/test/doc-tutorial
10441043
make_dir $h/test/doc-guide
10451044
make_dir $h/test/doc-guide-ffi
10461045
make_dir $h/test/doc-guide-runtime
10471046
make_dir $h/test/doc-guide-macros
1048-
make_dir $h/test/doc-guide-lifetimes
1047+
make_dir $h/test/doc-guide-ownership
10491048
make_dir $h/test/doc-guide-pointers
10501049
make_dir $h/test/doc-guide-container
10511050
make_dir $h/test/doc-guide-tasks
10521051
make_dir $h/test/doc-guide-plugin
10531052
make_dir $h/test/doc-guide-crates
10541053
make_dir $h/test/doc-guide-error-handling
1055-
make_dir $h/test/doc-rust
1054+
make_dir $h/test/doc-reference
10561055
done
10571056

10581057
# Configure submodules

branches/snap-stage3/mk/crates.mk

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
5454
log regex graphviz core rbml alloc rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
57-
rustc_llvm rustc_back
56+
RUSTC_CRATES := rustc rustc_typeck rustc_driver rustc_trans rustc_back rustc_llvm
57+
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

@@ -67,12 +67,16 @@ DEPS_std := core libc rand alloc collections rustrt unicode \
6767
native:rust_builtin native:backtrace
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
70-
DEPS_rustc_trans := rustc rustc_back rustc_llvm libc
70+
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back \
71+
rustc_typeck log syntax serialize rustc_llvm rustc_trans
72+
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
73+
log syntax serialize rustc_llvm
74+
DEPS_rustc_typeck := rustc syntax
7175
DEPS_rustc := syntax flate arena serialize getopts rbml \
7276
time log graphviz rustc_llvm rustc_back
7377
DEPS_rustc_llvm := native:rustllvm libc std
7478
DEPS_rustc_back := std syntax rustc_llvm flate log libc
75-
DEPS_rustdoc := rustc rustc_trans native:hoedown serialize getopts \
79+
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
7680
test time
7781
DEPS_flate := std native:miniz
7882
DEPS_arena := std
@@ -94,7 +98,7 @@ DEPS_fmt_macros = std
9498

9599
TOOL_DEPS_compiletest := test getopts
96100
TOOL_DEPS_rustdoc := rustdoc
97-
TOOL_DEPS_rustc := rustc_trans
101+
TOOL_DEPS_rustc := rustc_driver
98102
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
99103
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
100104
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
@@ -110,8 +114,12 @@ ONLY_RLIB_unicode := 1
110114
# You should not need to edit below this line
111115
################################################################################
112116

113-
DOC_CRATES := $(filter-out rustc, $(filter-out rustc_trans, $(filter-out syntax, $(CRATES))))
114-
COMPILER_DOC_CRATES := rustc rustc_trans syntax
117+
DOC_CRATES := $(filter-out rustc, \
118+
$(filter-out rustc_trans, \
119+
$(filter-out rustc_typeck, \
120+
$(filter-out rustc_driver, \
121+
$(filter-out syntax, $(CRATES))))))
122+
COMPILER_DOC_CRATES := rustc rustc_trans rustc_typeck rustc_driver syntax
115123

116124
# This macro creates some simple definitions for each crate being built, just
117125
# some munging of all of the parameters above.

branches/snap-stage3/mk/dist.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ PKG_FILES := \
4848
$(S)configure $(S)Makefile.in \
4949
$(S)man \
5050
$(addprefix $(S)src/, \
51-
README.md \
5251
compiletest \
5352
doc \
5453
driver \
@@ -123,15 +122,16 @@ PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
123122
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
124123
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
125124
dist-prepare-win
126-
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win $(CFG_BUILD)
125+
$(Q)rm -rf tmp/dist/win/gcc
126+
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win/rust tmp/dist/win/gcc $(CFG_BUILD)
127127
@$(call E, ISCC: $@)
128128
$(Q)$(CFG_ISCC) $<
129129

130130
$(eval $(call DEF_PREPARE,win))
131131

132132
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
133133
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
134-
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
134+
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win/rust
135135
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
136136
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
137137
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# L10N_LANGS are the languages for which the docs have been
2626
# translated.
2727
######################################################################
28-
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
28+
DOCS := index intro tutorial guide guide-ffi guide-macros guide-ownership \
2929
guide-tasks guide-container guide-pointers guide-testing \
3030
guide-plugin guide-crates complement-bugreport guide-error-handling \
3131
complement-lang-faq complement-design-faq complement-project-faq \

branches/snap-stage3/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7979
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8080
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
8181
$$(dir $$@)$$(call CFG_RLIB_GLOB,$(4)))
82-
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
82+
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
8383
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
8484
$$(RUST_LIB_FLAGS_ST$(1)) \
8585
-L "$$(RT_OUTPUT_DIR_$(2))" \

branches/snap-stage3/mk/tests.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $(eval $(call RUST_CRATE,coretest))
2121

2222
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
24-
TEST_HOST_CRATES = $(HOST_CRATES)
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_trans,$(HOST_CRATES))
2525
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2626

2727
######################################################################
@@ -412,7 +412,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
412412
$$(CRATEFILE_$(4)) \
413413
$$(TESTDEP_$(1)_$(2)_$(3)_$(4))
414414
@$$(call E, rustc: $$@)
415-
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
415+
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
416416
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
417417
-L "$$(RT_OUTPUT_DIR_$(2))" \
418418
-L "$$(LLVM_LIBDIR_$(2))" \
@@ -598,7 +598,7 @@ CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
598598
endif
599599

600600
ifeq ($(CFG_OSTYPE),apple-darwin)
601-
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
601+
CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root"
602602
endif
603603

604604
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
@@ -891,7 +891,7 @@ endif
891891
ifeq ($(2),$$(CFG_BUILD))
892892
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
893893
@$$(call E, run doc-crate-$(4) [$(2)])
894-
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
894+
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
895895
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
896896
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
897897
else

branches/snap-stage3/src/README.md

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

branches/snap-stage3/src/compiletest/common.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pub enum Mode {
2525
Codegen
2626
}
2727

28+
impl Copy for Mode {}
29+
2830
impl FromStr for Mode {
2931
fn from_str(s: &str) -> Option<Mode> {
3032
match s {

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
286286
test_shard: config.test_shard.clone(),
287287
nocapture: false,
288288
color: test::AutoColor,
289+
show_boxplot: false,
290+
boxplot_width: 50,
291+
show_all_stats: false,
289292
}
290293
}
291294

@@ -343,7 +346,7 @@ pub fn make_test(config: &Config, testfile: &Path, f: || -> test::TestFn)
343346
desc: test::TestDesc {
344347
name: make_test_name(config, testfile),
345348
ignore: header::is_test_ignored(config, testfile),
346-
should_fail: false
349+
should_fail: test::ShouldFail::No,
347350
},
348351
testfn: f(),
349352
}

branches/snap-stage3/src/doc/complement-lang-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The `str` type is UTF-8 because we observe more text in the wild in this encodin
108108

109109
This does mean that indexed access to a Unicode codepoint inside a `str` value is an O(n) operation. On the one hand, this is clearly undesirable; on the other hand, this problem is full of trade-offs and we'd like to point a few important qualifications:
110110

111-
* Scanning a `str` for ASCII-range codepoints can still be done safely octet-at-a-time, with each indexing operation pulling out a `u8` costing only O(1) and producing a value that can be cast and compared to an ASCII-range `char`. So if you're (say) line-breaking on `'\n'`, octet-based treatment still works. UTF8 was well-designed this way.
111+
* Scanning a `str` for ASCII-range codepoints can still be done safely octet-at-a-time. If you use `.as_bytes()`, pulling out a `u8` costs only O(1) and produces a value that can be cast and compared to an ASCII-range `char`. So if you're (say) line-breaking on `'\n'`, octet-based treatment still works. UTF8 was well-designed this way.
112112
* Most "character oriented" operations on text only work under very restricted language assumptions sets such as "ASCII-range codepoints only". Outside ASCII-range, you tend to have to use a complex (non-constant-time) algorithm for determining linguistic-unit (glyph, word, paragraph) boundaries anyways. We recommend using an "honest" linguistically-aware, Unicode-approved algorithm.
113113
* The `char` type is UCS4. If you honestly need to do a codepoint-at-a-time algorithm, it's trivial to write a `type wstr = [char]`, and unpack a `str` into it in a single pass, then work with the `wstr`. In other words: the fact that the language is not "decoding to UCS4 by default" shouldn't stop you from decoding (or re-encoding any other way) if you need to work with that encoding.
114114

branches/snap-stage3/src/doc/guide-crates.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ two languages for those phrases to be in. We'll use this module layout:
3232
+---------+ | +-----------+
3333
| +---| farewells |
3434
+---------+ | +-----------+
35-
| phrases |---+
35+
| phrases |---+
3636
+---------+ | +-----------+
3737
| +---| greetings |
3838
+----------+ | +-----------+
@@ -219,7 +219,7 @@ Put this in `src/english/greetings.rs`:
219219

220220
fn hello() -> String {
221221
"Hello!".to_string()
222-
}
222+
}
223223
```
224224

225225
Put this in `src/english/farewells.rs`:
@@ -229,7 +229,7 @@ Put this in `src/english/farewells.rs`:
229229

230230
fn goodbye() -> String {
231231
"Goodbye.".to_string()
232-
}
232+
}
233233
```
234234

235235
Put this in `src/japanese/greetings.rs`:
@@ -239,7 +239,7 @@ Put this in `src/japanese/greetings.rs`:
239239

240240
fn hello() -> String {
241241
"こんにちは".to_string()
242-
}
242+
}
243243
```
244244

245245
Of course, you can copy and paste this from this web page, or just type
@@ -253,7 +253,7 @@ Put this in `src/japanese/farewells.rs`:
253253

254254
fn goodbye() -> String {
255255
"さようなら".to_string()
256-
}
256+
}
257257
```
258258

259259
(This is "Sayoonara", if you're curious.)
@@ -381,11 +381,11 @@ $ cargo run
381381
/home/you/projects/phrases/src/japanese/greetings.rs:1:1: 3:2 warning: code is never used: `hello`, #[warn(dead_code)] on by default
382382
/home/you/projects/phrases/src/japanese/greetings.rs:1 fn hello() -> String {
383383
/home/you/projects/phrases/src/japanese/greetings.rs:2 "こんにちは".to_string()
384-
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
384+
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
385385
/home/you/projects/phrases/src/japanese/farewells.rs:1:1: 3:2 warning: code is never used: `goodbye`, #[warn(dead_code)] on by default
386386
/home/you/projects/phrases/src/japanese/farewells.rs:1 fn goodbye() -> String {
387387
/home/you/projects/phrases/src/japanese/farewells.rs:2 "さようなら".to_string()
388-
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
388+
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
389389
Running `target/phrases`
390390
Hello in English: Hello!
391391
Goodbye in English: Goodbye.
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{notrust,ignore}
455+
```{notrust}
456456
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
457457
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
458458
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;

branches/snap-stage3/src/doc/guide-error-handling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> The best-laid plans of mice and men
44
> Often go awry
5-
>
5+
>
66
> "Tae a Moose", Robert Burns
77
88
Sometimes, things just go wrong. It's important to have a plan for when the
@@ -76,7 +76,7 @@ fn main() {
7676

7777
This will give us an error:
7878

79-
```{notrust,ignore}
79+
```{notrust}
8080
error: non-exhaustive patterns: `_` not covered [E0004]
8181
```
8282

@@ -189,7 +189,7 @@ panic!("boom");
189189

190190
gives
191191

192-
```{notrust,ignore}
192+
```{notrust}
193193
task '<main>' panicked at 'boom', hello.rs:2
194194
```
195195

0 commit comments

Comments
 (0)