Skip to content

Commit 5799fc9

Browse files
committed
---
yaml --- r: 173044 b: refs/heads/snap-stage3 c: 6a48b18 h: refs/heads/master v: v3
1 parent 61dff7a commit 5799fc9

File tree

862 files changed

+11939
-10694
lines changed

Some content is hidden

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

862 files changed

+11939
-10694
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: 896cb36ecab3eaeb7f101087e030e43771eca5ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 78c7faf5a61dbadb757122e35abed4ab9549898d
4+
refs/heads/snap-stage3: 6a48b181bd0f1c01ad3d29f75a5c858d023990b4
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ documentation.
66
## Quick Start
77

88
1. Download a [binary installer][installer] for your platform.
9-
2. Read the [guide].
9+
2. Read [The Rust Programming Language][trpl].
1010
3. Enjoy!
1111

1212
> ***Note:*** Windows users can read the detailed
1313
> [using Rust on Windows][win-wiki] notes on the wiki.
1414
1515
[installer]: http://www.rust-lang.org/install.html
16-
[guide]: http://doc.rust-lang.org/guide.html
16+
[trpl]: http://doc.rust-lang.org/book/index.html
1717
[win-wiki]: https://github.com/rust-lang/rust/wiki/Using-Rust-on-Windows
1818

1919
## Building from Source
@@ -53,7 +53,7 @@ documentation.
5353
When complete, `make install` will place several programs into
5454
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
5555
API-documentation tool.
56-
3. Read the [guide].
56+
3. Read [The Rust Programming Language][trpl].
5757
4. Enjoy!
5858

5959
### Building on Windows
@@ -75,7 +75,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
7575

7676
[repo]: https://github.com/rust-lang/rust
7777
[tarball]: https://static.rust-lang.org/dist/rust-nightly.tar.gz
78-
[guide]: http://doc.rust-lang.org/guide.html
78+
[trpl]: http://doc.rust-lang.org/book/index.html
7979

8080
## Notes
8181

branches/snap-stage3/RELEASES.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ Version 1.0.0-alpha (January 2015)
1919
distribution into the Cargo ecosystem so they can evolve
2020
separately and don't need to be stabilized as quickly, including
2121
'time', 'getopts', 'num', 'regex', and 'term'.
22-
* Documentation continues to be expanded with more guides, more
23-
API coverage and more examples.
22+
* Documentation continues to be expanded with more API coverage, more
23+
examples, and more in-depth explanations. The guides have been
24+
consolidated into [The Rust Programming Language][trpl].
25+
* "Rust By Example" is now maintained by the Rust team.
2426
* All official Rust binary installers now come with [Cargo], the
2527
Rust package manager.
2628

@@ -179,6 +181,7 @@ Version 1.0.0-alpha (January 2015)
179181
[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
180182
[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
181183
[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
184+
[trpl]: http://doc.rust-lang.org/book/index.html
182185

183186
Version 0.12.0 (October 2014)
184187
-----------------------------

branches/snap-stage3/configure

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,18 @@ then
599599
fi
600600
putvar CFG_RELEASE_CHANNEL
601601

602+
# A magic value that allows the compiler to use unstable features
603+
# during the bootstrap even when doing so would normally be an error
604+
# because of feature staging or because the build turns on
605+
# warnings-as-errors and unstable features default to warnings. The
606+
# build has to match this key in an env var. Meant to be a mild
607+
# deterrent from users just turning on unstable features on the stable
608+
# channel.
609+
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
610+
# during a Makefile reconfig.
611+
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%N`}"
612+
putvar CFG_BOOTSTRAP_KEY
613+
602614
step_msg "looking for build programs"
603615

604616
probe_need CFG_PERL perl
@@ -1043,18 +1055,6 @@ do
10431055
make_dir $h/test/debuginfo-gdb
10441056
make_dir $h/test/debuginfo-lldb
10451057
make_dir $h/test/codegen
1046-
make_dir $h/test/doc-guide
1047-
make_dir $h/test/doc-guide-ffi
1048-
make_dir $h/test/doc-guide-runtime
1049-
make_dir $h/test/doc-guide-macros
1050-
make_dir $h/test/doc-guide-ownership
1051-
make_dir $h/test/doc-guide-pointers
1052-
make_dir $h/test/doc-guide-container
1053-
make_dir $h/test/doc-guide-tasks
1054-
make_dir $h/test/doc-guide-plugin
1055-
make_dir $h/test/doc-guide-crates
1056-
make_dir $h/test/doc-guide-error-handling
1057-
make_dir $h/test/doc-reference
10581058
done
10591059

10601060
# Configure submodules

branches/snap-stage3/mk/crates.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5757
rustc_trans rustc_back rustc_llvm
5858
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
5959
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
60-
TOOLS := compiletest rustdoc rustc
60+
TOOLS := compiletest rustdoc rustc rustbook
6161

6262
DEPS_core :=
6363
DEPS_libc := core
@@ -99,9 +99,11 @@ DEPS_fmt_macros = std
9999
TOOL_DEPS_compiletest := test getopts
100100
TOOL_DEPS_rustdoc := rustdoc
101101
TOOL_DEPS_rustc := rustc_driver
102+
TOOL_DEPS_rustbook := std regex rustdoc
102103
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
103104
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
104105
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
106+
TOOL_SOURCE_rustbook := $(S)src/rustbook/main.rs
105107

106108
ONLY_RLIB_core := 1
107109
ONLY_RLIB_libc := 1

branches/snap-stage3/mk/docs.mk

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# except according to those terms.
1010

1111
######################################################################
12-
# The various pieces of standalone documentation: guides, manual, etc
12+
# The various pieces of standalone documentation.
1313
#
1414
# The DOCS variable is their names (with no file extension).
1515
#
@@ -25,13 +25,11 @@
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 \
29-
guide-tasks guide-container guide-pointers guide-testing \
30-
guide-plugin guide-crates complement-bugreport guide-error-handling \
31-
complement-lang-faq complement-design-faq complement-project-faq \
32-
rustdoc guide-unsafe guide-strings reference
28+
DOCS := index intro tutorial complement-bugreport \
29+
complement-lang-faq complement-design-faq complement-project-faq \
30+
rustdoc reference
3331

34-
PDF_DOCS := guide reference
32+
PDF_DOCS := reference
3533

3634
RUSTDOC_DEPS_reference := doc/full-toc.inc
3735
RUSTDOC_FLAGS_reference := --html-in-header=doc/full-toc.inc
@@ -61,9 +59,15 @@ RUSTDOC_EXE = $(HBIN2_H_$(CFG_BUILD))/rustdoc$(X_$(CFG_BUILD))
6159
# ./configure
6260
RUSTDOC = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTDOC_EXE)
6361

62+
# The rustbook executable...
63+
RUSTBOOK_EXE = $(HBIN2_H_$(CFG_BUILD))/rustbook$(X_$(CFG_BUILD))
64+
# ...with rpath included in case --disable-rpath was provided to
65+
# ./configure
66+
RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
67+
6468
D := $(S)src/doc
6569

66-
DOC_TARGETS :=
70+
DOC_TARGETS := trpl
6771
COMPILER_DOC_TARGETS :=
6872
DOC_L10N_TARGETS :=
6973

@@ -270,3 +274,10 @@ endif
270274

271275
docs: $(DOC_TARGETS)
272276
compiler-docs: $(COMPILER_DOC_TARGETS)
277+
278+
trpl: tmp/trpl.ok
279+
280+
tmp/trpl.ok: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/trpl/*.md)
281+
$(Q)rm -rf doc/book
282+
$(Q)$(RUSTBOOK) build $(S)src/doc/trpl doc/book
283+
$(Q)touch $@

branches/snap-stage3/mk/main.mk

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ ifeq ($(CFG_RELEASE_CHANNEL),stable)
2525
CFG_RELEASE=$(CFG_RELEASE_NUM)
2626
# This is the string used in dist artifact file names, e.g. "0.12.0", "nightly"
2727
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)
28+
CFG_DISABLE_UNSTABLE_FEATURES=1
2829
endif
2930
ifeq ($(CFG_RELEASE_CHANNEL),beta)
3031
# The beta channel is temporarily called 'alpha'
3132
CFG_RELEASE=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
3233
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-alpha$(CFG_BETA_CYCLE)
34+
CFG_DISABLE_UNSTABLE_FEATURES=1
3335
endif
3436
ifeq ($(CFG_RELEASE_CHANNEL),nightly)
3537
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
@@ -121,11 +123,9 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
121123

122124
ifdef CFG_DISABLE_DEBUG
123125
CFG_RUSTC_FLAGS += --cfg ndebug
124-
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
125126
else
126127
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
127128
CFG_RUSTC_FLAGS += --cfg debug
128-
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
129129
endif
130130

131131
ifdef SAVE_TEMPS
@@ -319,11 +319,20 @@ export CFG_VERSION_WIN
319319
export CFG_RELEASE
320320
export CFG_PACKAGE_NAME
321321
export CFG_BUILD
322+
export CFG_RELEASE_CHANNEL
322323
export CFG_LLVM_ROOT
323324
export CFG_PREFIX
324325
export CFG_LIBDIR
325326
export CFG_LIBDIR_RELATIVE
326327
export CFG_DISABLE_INJECT_STD_VERSION
328+
ifdef CFG_DISABLE_UNSTABLE_FEATURES
329+
CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATURES))
330+
# Turn on feature-staging
331+
export CFG_DISABLE_UNSTABLE_FEATURES
332+
endif
333+
# Subvert unstable feature lints to do the self-build
334+
export CFG_BOOTSTRAP_KEY
335+
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
327336

328337
######################################################################
329338
# Per-stage targets and runner

branches/snap-stage3/mk/prepare.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ define PREPARE_MAN
7070
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
7171
endef
7272

73-
PREPARE_TOOLS = $(filter-out compiletest, $(TOOLS))
73+
PREPARE_TOOLS = $(filter-out compiletest rustbook, $(TOOLS))
7474

7575

7676
# $(1) is tool

branches/snap-stage3/mk/tests.mk

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ else
147147
CFG_ADB_TEST_DIR=
148148
endif
149149

150+
# $(1) - name of doc test
151+
# $(2) - file of the test
152+
define DOCTEST
153+
DOC_NAMES := $$(DOC_NAMES) $(1)
154+
DOCFILE_$(1) := $(2)
155+
endef
156+
157+
$(foreach doc,$(DOCS), \
158+
$(eval $(call DOCTEST,md-$(doc),$(S)src/doc/$(doc).md)))
159+
$(foreach file,$(wildcard $(S)src/doc/trpl/src/*), \
160+
$(eval $(call DOCTEST,$(file:$(S)src/doc/trpl/src/%.md=trpl-%),$(file))))
150161

151162
######################################################################
152163
# Main test targets
@@ -292,6 +303,7 @@ tidy:
292303
| grep '^$(S)src/rust-installer' -v \
293304
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
294305

306+
295307
endif
296308

297309

@@ -339,8 +351,8 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec: \
339351
check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$$(crate)-exec)
340352

341353
check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
342-
$$(foreach docname,$$(DOCS), \
343-
check-stage$(1)-T-$(2)-H-$(3)-doc-$$(docname)-exec)
354+
$$(foreach docname,$$(DOC_NAMES), \
355+
check-stage$(1)-T-$(2)-H-$(3)-doc-$$(docname)-exec) \
344356

345357
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
346358
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
@@ -795,17 +807,18 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3)
795807
# rustdoc etc.
796808
ifeq ($(NO_REBUILD),)
797809
DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = \
798-
$$(D)/$(4).md \
810+
$$(DOCFILE_$(4)) \
799811
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
800812
$$(RUSTDOC_EXE_$(1)_T_$(2)_H_$(3))
801813
else
802-
DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(D)/$(4).md
814+
DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(DOCFILE_$(4))
803815
endif
804816

805817
ifeq ($(2),$$(CFG_BUILD))
806818
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
807819
@$$(call E, run doc-$(4) [$(2)])
808-
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< --test-args "$$(TESTARGS)" && touch $$@
820+
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< \
821+
--test-args "$$(TESTARGS)" && touch $$@
809822
else
810823
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
811824
touch $$@
@@ -815,7 +828,7 @@ endef
815828
$(foreach host,$(CFG_HOST), \
816829
$(foreach target,$(CFG_TARGET), \
817830
$(foreach stage,$(STAGES), \
818-
$(foreach docname,$(DOCS), \
831+
$(foreach docname,$(DOC_NAMES), \
819832
$(eval $(call DEF_DOC_TEST,$(stage),$(target),$(host),$(docname)))))))
820833

821834
# Crates
@@ -877,7 +890,7 @@ TEST_GROUPS = \
877890
debuginfo-lldb \
878891
codegen \
879892
doc \
880-
$(foreach docname,$(DOCS),doc-$(docname)) \
893+
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \
881894
pretty \
882895
pretty-rpass \
883896
pretty-rpass-valgrind \
@@ -946,7 +959,7 @@ $(foreach stage,$(STAGES), \
946959
$(eval $(call DEF_CHECK_FOR_STAGE_AND_HOSTS_AND_GROUP,$(stage),$(host),$(group))))))
947960

948961
define DEF_CHECK_DOC_FOR_STAGE
949-
check-stage$(1)-docs: $$(foreach docname,$$(DOCS), \
962+
check-stage$(1)-docs: $$(foreach docname,$$(DOC_NAMES), \
950963
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
951964
$$(foreach crate,$$(TEST_DOC_CRATES), \
952965
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate))

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
// except according to those terms.
1010

1111
#![crate_type = "bin"]
12+
#![allow(unknown_features)]
1213
#![feature(slicing_syntax, unboxed_closures)]
14+
#![feature(box_syntax)]
1315

1416
#![deny(warnings)]
1517

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,7 @@ fn check_error_patterns(props: &TestProps,
908908
}
909909
if done { return; }
910910

911-
let missing_patterns =
912-
props.error_patterns.index(&(next_err_idx..));
911+
let missing_patterns = &props.error_patterns[next_err_idx..];
913912
if missing_patterns.len() == 1u {
914913
fatal_proc_rec(format!("error pattern '{}' not found!",
915914
missing_patterns[0]).as_slice(),

branches/snap-stage3/src/doc/footer.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<footer><p>
2-
Copyright &copy; 2011-2014 The Rust Project Developers. Licensed under the
2+
Copyright &copy; 2011-2015 The Rust Project Developers. Licensed under the
33
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
44
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
55
</p><p>

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

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

0 commit comments

Comments
 (0)