Skip to content

Commit 8542843

Browse files
committed
---
yaml --- r: 163196 b: refs/heads/snap-stage3 c: 807066f h: refs/heads/master v: v3
1 parent 6e460e1 commit 8542843

File tree

659 files changed

+10414
-13798
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

+10414
-13798
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: 872ba2ccd3a428ad3b3a5f621a12aaa5e8043366
4+
refs/heads/snap-stage3: 807066f8c9cacf1f8acf3a7be25c14cc46d99f58
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,18 +1040,19 @@ 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
10431044
make_dir $h/test/doc-guide
10441045
make_dir $h/test/doc-guide-ffi
10451046
make_dir $h/test/doc-guide-runtime
10461047
make_dir $h/test/doc-guide-macros
1047-
make_dir $h/test/doc-guide-ownership
1048+
make_dir $h/test/doc-guide-lifetimes
10481049
make_dir $h/test/doc-guide-pointers
10491050
make_dir $h/test/doc-guide-container
10501051
make_dir $h/test/doc-guide-tasks
10511052
make_dir $h/test/doc-guide-plugin
10521053
make_dir $h/test/doc-guide-crates
10531054
make_dir $h/test/doc-guide-error-handling
1054-
make_dir $h/test/doc-reference
1055+
make_dir $h/test/doc-rust
10551056
done
10561057

10571058
# Configure submodules

branches/snap-stage3/mk/crates.mk

Lines changed: 7 additions & 15 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-
RUSTC_CRATES := rustc rustc_typeck rustc_driver rustc_trans rustc_back rustc_llvm
57-
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
56+
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5858
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5959
TOOLS := compiletest rustdoc rustc
6060

@@ -67,16 +67,12 @@ 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_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
70+
DEPS_rustc_trans := rustc rustc_back rustc_llvm libc
7571
DEPS_rustc := syntax flate arena serialize getopts rbml \
7672
time log graphviz rustc_llvm rustc_back
7773
DEPS_rustc_llvm := native:rustllvm libc std
7874
DEPS_rustc_back := std syntax rustc_llvm flate log libc
79-
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
75+
DEPS_rustdoc := rustc rustc_trans native:hoedown serialize getopts \
8076
test time
8177
DEPS_flate := std native:miniz
8278
DEPS_arena := std
@@ -98,7 +94,7 @@ DEPS_fmt_macros = std
9894

9995
TOOL_DEPS_compiletest := test getopts
10096
TOOL_DEPS_rustdoc := rustdoc
101-
TOOL_DEPS_rustc := rustc_driver
97+
TOOL_DEPS_rustc := rustc_trans
10298
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
10399
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
104100
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
@@ -114,12 +110,8 @@ ONLY_RLIB_unicode := 1
114110
# You should not need to edit below this line
115111
################################################################################
116112

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
113+
DOC_CRATES := $(filter-out rustc, $(filter-out rustc_trans, $(filter-out syntax, $(CRATES))))
114+
COMPILER_DOC_CRATES := rustc rustc_trans syntax
123115

124116
# This macro creates some simple definitions for each crate being built, just
125117
# 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,6 +48,7 @@ PKG_FILES := \
4848
$(S)configure $(S)Makefile.in \
4949
$(S)man \
5050
$(addprefix $(S)src/, \
51+
README.md \
5152
compiletest \
5253
doc \
5354
driver \
@@ -122,16 +123,15 @@ PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
122123
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
123124
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
124125
dist-prepare-win
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)
126+
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win $(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/rust
134+
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
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-ownership \
28+
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
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_$(3)) \
82+
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
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 = $(filter-out rustc_typeck rustc_trans,$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(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_$(3)) \
415+
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
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 darwin needs root"
601+
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing 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_$(3)) \
894+
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
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: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
This is a preliminary version of the Rust compiler, libraries and tools.
2+
3+
Source layout:
4+
5+
| Path | Description |
6+
| ------------------- | --------------------------------------------------------- |
7+
| `librustc/` | The self-hosted compiler |
8+
| `liballoc/` | Rust's core allocation library |
9+
| `libcore/` | The Rust core library |
10+
| `libdebug/` | Debugging utilities |
11+
| `libstd/` | The standard library (imported and linked by default) |
12+
| `libsyntax/` | The Rust parser and pretty-printer |
13+
| `libtest/` | Rust's test-runner code |
14+
| ------------------- | --------------------------------------------------------- |
15+
| `libarena/` | The arena (a fast but limited) memory allocator |
16+
| `libbacktrace/` | The libbacktrace library |
17+
| `libcollections/` | A collection of useful data structures and containers |
18+
| `libflate/` | Simple compression library |
19+
| `libfmt_macros/` | Macro support for format strings |
20+
| `libfourcc/` | Data format identifier library |
21+
| `libgetopts/` | Get command-line-options library |
22+
| `libglob/` | Unix glob patterns library |
23+
| `libgraphviz/` | Generating files for Graphviz |
24+
| `libhexfloat/` | Hexadecimal floating-point literals |
25+
| `liblibc/` | Bindings for the C standard library |
26+
| `liblog/` | Utilities for program-wide and customizable logging |
27+
| `libnum/` | Extended number support library (complex, rational, etc) |
28+
| `librand/` | Random numbers and distributions |
29+
| `libregex/` | Regular expressions |
30+
| `libregex_macros/` | The regex! syntax extension |
31+
| `libsemver/` | Rust's semantic versioning library |
32+
| `libserialize/` | Encode-Decode types library |
33+
| `libsync/` | Concurrency mechanisms and primitives |
34+
| `libterm/` | ANSI color library for terminals |
35+
| `libtime/` | Time operations library |
36+
| `liburl/` | URL handling lirary |
37+
| `libuuid/` | UUID's handling code |
38+
| ------------------- | --------------------------------------------------------- |
39+
| `rt/` | The runtime system |
40+
| `rt/rust_*.c` | - Some of the runtime services |
41+
| `rt/vg` | - Valgrind headers |
42+
| `rt/msvc` | - MSVC support |
43+
| `rt/sundown` | - The Markdown library used by rustdoc |
44+
| ------------------- | --------------------------------------------------------- |
45+
| `compiletest/` | The test runner |
46+
| `test/` | Testsuite |
47+
| `test/codegen` | - Tests for the LLVM IR infrastructure |
48+
| `test/compile-fail` | - Tests that should fail to compile |
49+
| `test/debug-info` | - Tests for the `debuginfo` tool |
50+
| `test/run-fail` | - Tests that should compile, run and fail |
51+
| `test/run-make` | - Tests that depend on a Makefile infrastructure |
52+
| `test/run-pass` | - Tests that should compile, run and succeed |
53+
| `test/bench` | - Benchmarks and miscellaneous |
54+
| `test/pretty` | - Pretty-printer tests |
55+
| `test/auxiliary` | - Dependencies of tests |
56+
| ------------------- | --------------------------------------------------------- |
57+
| `librustdoc/` | The Rust API documentation tool |
58+
| ------------------- | --------------------------------------------------------- |
59+
| `llvm/` | The LLVM submodule |
60+
| `rustllvm/` | LLVM support code |
61+
| ------------------- | --------------------------------------------------------- |
62+
| `etc/` | Scripts, editors support, misc |
63+
64+
65+
NOTE: This list (especially the second part of the table which contains modules and libraries)
66+
is highly volatile and subject to change.

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

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

28-
impl Copy for Mode {}
29-
3028
impl FromStr for Mode {
3129
fn from_str(s: &str) -> Option<Mode> {
3230
match s {

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ 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,
292289
}
293290
}
294291

@@ -346,7 +343,7 @@ pub fn make_test(config: &Config, testfile: &Path, f: || -> test::TestFn)
346343
desc: test::TestDesc {
347344
name: make_test_name(config, testfile),
348345
ignore: header::is_test_ignored(config, testfile),
349-
should_fail: test::ShouldFail::No,
346+
should_fail: false
350347
},
351348
testfn: f(),
352349
}

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. 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.
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.
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}
455+
```{notrust,ignore}
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}
79+
```{notrust,ignore}
8080
error: non-exhaustive patterns: `_` not covered [E0004]
8181
```
8282

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

190190
gives
191191

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

0 commit comments

Comments
 (0)