Skip to content

Commit f4607f9

Browse files
committed
---
yaml --- r: 211581 b: refs/heads/master c: 06c6b3c h: refs/heads/master i: 211579: d418086 v: v3
1 parent 93262ad commit f4607f9

File tree

141 files changed

+3299
-1222
lines changed

Some content is hidden

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

141 files changed

+3299
-1222
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: 25d0ef347affe79557cdfbaa4e66144c7f476fc0
2+
refs/heads/master: 06c6b3caaf5fdd79be11377492547639dc975652
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/CONTRIBUTING.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ feature. We use the 'fork and pull' model described there.
8484
Please make pull requests against the `master` branch.
8585

8686
All pull requests are reviewed by another person. We have a bot,
87-
@rust-highfive, that will automatically assign a random person to review your request.
87+
@rust-highfive, that will automatically assign a random person to review your
88+
request.
8889

8990
If you want to request that a specific person reviews your pull request,
9091
you can add an `r?` to the message. For example, Steve usually reviews
@@ -124,6 +125,10 @@ To save @bors some work, and to get small changes through more quickly, when
124125
the other rollup-eligible patches too, and they'll get tested and merged at
125126
the same time.
126127

128+
To find documentation-related issues, sort by the [A-docs label][adocs].
129+
130+
[adocs]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-docs
131+
127132
## Issue Triage
128133

129134
Sometimes, an issue will stay open, even though the bug has been fixed. And
@@ -132,8 +137,40 @@ meantime.
132137

133138
It can be helpful to go through older bug reports and make sure that they are
134139
still valid. Load up an older issue, double check that it's still true, and
135-
leave a comment letting us know if it is or is not. The [least recently updated sort][lru] is good for finding issues like this.
140+
leave a comment letting us know if it is or is not. The [least recently
141+
updated sort][lru] is good for finding issues like this.
142+
143+
Contributors with sufficient permissions on the Rust repo can help by adding
144+
labels to triage issues:
145+
146+
* Yellow, **A**-prefixed labels state which **area** of the project an issue
147+
relates to.
148+
149+
* Magenta, **B**-prefixed labels identify bugs which **belong** elsewhere.
150+
151+
* Green, **E**-prefixed labels explain the level of **experience** necessary
152+
to fix the issue.
153+
154+
* Red, **I**-prefixed labels indicate the **importance** of the issue. The
155+
[I-nominated][inom] label indicates that an issue has been nominated for
156+
prioritizing at the next triage meeting.
157+
158+
* Orange, **P**-prefixed labels indicate a bug's **priority**. These labels
159+
are only assigned during triage meetings, and replace the [I-nominated][inom]
160+
label.
161+
162+
* Blue, **T**-prefixed bugs denote which **team** the issue belongs to.
163+
164+
* Dark blue, **beta-** labels track changes which need to be backported into
165+
the beta branches.
166+
167+
* The purple **metabug** label marks lists of bugs collected by other
168+
categories.
169+
170+
If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
136171

172+
[inom]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-nominated
173+
[eeasy]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy
137174
[lru]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc
138175

139176
## Out-of-tree Contributions

trunk/configure

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ opt rpath 0 "build rpaths into rustc itself"
565565
# This is used by the automation to produce single-target nightlies
566566
opt dist-host-only 0 "only install bins for the host architecture"
567567
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
568-
opt llvm-version-check 1 "don't check if the LLVM version is supported, build anyway"
568+
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
569569

570570
# Optimization and debugging options. These may be overridden by the release channel, etc.
571571
opt_nosave optimize 1 "build optimized rust code"
@@ -582,6 +582,7 @@ valopt sysconfdir "/etc" "install system configuration files"
582582
valopt datadir "${CFG_PREFIX}/share" "install data"
583583
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
584584
valopt llvm-root "" "set LLVM root"
585+
valopt python "" "set path to python"
585586
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
586587
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
587588
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
@@ -593,6 +594,7 @@ valopt musl-root "/usr/local" "MUSL root installation directory"
593594
opt_nosave manage-submodules 1 "let the build manage the git submodules"
594595
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
595596
opt_nosave jemalloc 1 "build liballoc with jemalloc"
597+
opt elf-tls 1 "elf thread local storage on platforms where supported"
596598

597599
valopt_nosave prefix "/usr/local" "set installation prefix"
598600
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
@@ -694,7 +696,9 @@ putvar CFG_BOOTSTRAP_KEY
694696
step_msg "looking for build programs"
695697

696698
probe_need CFG_CURLORWGET curl wget
697-
probe_need CFG_PYTHON python2.7 python2.6 python2 python
699+
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
700+
probe_need CFG_PYTHON python2.7 python2.6 python2 python
701+
fi
698702

699703
python_version=$($CFG_PYTHON -V 2>&1)
700704
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
@@ -848,13 +852,6 @@ then
848852
putvar CFG_LOCAL_RUST_ROOT
849853
fi
850854

851-
# Force freebsd to build with clang; gcc doesn't like us there
852-
if [ $CFG_OSTYPE = unknown-freebsd ]
853-
then
854-
step_msg "on FreeBSD, forcing use of clang"
855-
CFG_ENABLE_CLANG=1
856-
fi
857-
858855
# Force bitrig to build with clang; gcc doesn't like us there
859856
if [ $CFG_OSTYPE = unknown-bitrig ]
860857
then
@@ -972,8 +969,8 @@ fi
972969

973970
if [ ! -z "$CFG_ENABLE_CLANG" ]
974971
then
975-
if [ -z "$CC" ] || [[ $CC == *clang ]]
976-
then
972+
case "$CC" in
973+
(''|*clang)
977974
CFG_CLANG_VERSION=$($CFG_CC \
978975
--version \
979976
| grep version \
@@ -993,9 +990,11 @@ then
993990
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
994991
;;
995992
esac
996-
else
993+
;;
994+
(*)
997995
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
998-
fi
996+
;;
997+
esac
999998
fi
1000999

10011000
if [ ! -z "$CFG_ENABLE_CCACHE" ]

trunk/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,8 @@ CUSTOM_DEPS_rustc_llvm_T_x86_64-pc-windows-msvc += \
8080
x86_64-pc-windows-msvc/rt/rustc_llvm.def: $(S)src/etc/mklldef.py \
8181
$(S)src/librustc_llvm/lib.rs
8282
$(CFG_PYTHON) $^ $@ rustc_llvm-$(CFG_FILENAME_EXTRA)
83+
84+
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
85+
# bootstrapping from itself. This is relevant during stage0, and other parts of
86+
# the build system take this into account.
87+
BOOTSTRAP_FROM_x86_64-pc-windows-msvc := x86_64-pc-windows-gnu

trunk/mk/crates.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,7 @@ TOOL_INPUTS_$(1) := $$(call rwildcard,$$(dir $$(TOOL_SOURCE_$(1))),*.rs)
150150
endef
151151

152152
$(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))
153+
154+
ifdef CFG_DISABLE_ELF_TLS
155+
RUSTFLAGS_std := --cfg no_elf_tls
156+
endif

trunk/mk/debuggers.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
## GDB ##
1717
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB=gdb_load_rust_pretty_printers.py \
18-
gdb_rust_pretty_printing.py
18+
gdb_rust_pretty_printing.py \
19+
debugger_pretty_printers_common.py
1920
DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS=\
2021
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB), \
2122
$(CFG_SRC_DIR)src/etc/$(script))
@@ -27,7 +28,8 @@ DEBUGGER_BIN_SCRIPTS_GDB_ABS=\
2728

2829

2930
## LLDB ##
30-
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py
31+
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB=lldb_rust_formatters.py \
32+
debugger_pretty_printers_common.py
3133
DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS=\
3234
$(foreach script,$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB), \
3335
$(CFG_SRC_DIR)src/etc/$(script))

trunk/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ endef
265265
$(foreach crate,$(CRATES),$(eval $(call DEF_LIB_DOC,$(crate))))
266266

267267
COMPILER_DOC_TARGETS := $(CRATES:%=doc/%/index.html)
268-
ifdef CFG_COMPILER_DOCS
268+
ifdef CFG_ENABLE_COMPILER_DOCS
269269
DOC_TARGETS += $(COMPILER_DOC_TARGETS)
270270
else
271271
DOC_TARGETS += $(DOC_CRATES:%=doc/%/index.html)

trunk/mk/main.mk

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
7474
endif
7575
endif
7676

77-
CFG_BUILD_DATE = $(shell date +%F)
78-
CFG_VERSION += (built $(CFG_BUILD_DATE))
79-
8077
# Windows exe's need numeric versions - don't use anything but
8178
# numbers and dots here
8279
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -130,9 +127,7 @@ CFG_JEMALLOC_FLAGS += $(JEMALLOC_FLAGS)
130127

131128
ifdef CFG_ENABLE_DEBUG_ASSERTIONS
132129
$(info cfg: enabling debug assertions (CFG_ENABLE_DEBUG_ASSERTIONS))
133-
CFG_RUSTC_FLAGS += --cfg debug -C debug-assertions=on
134-
else
135-
CFG_RUSTC_FLAGS += --cfg ndebug
130+
CFG_RUSTC_FLAGS += -C debug-assertions=on
136131
endif
137132

138133
ifdef CFG_ENABLE_DEBUGINFO
@@ -334,7 +329,6 @@ endif
334329
ifdef CFG_VER_HASH
335330
export CFG_VER_HASH
336331
endif
337-
export CFG_BUILD_DATE
338332
export CFG_VERSION
339333
export CFG_VERSION_WIN
340334
export CFG_RELEASE

trunk/mk/target.mk

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,42 @@ $(foreach host,$(CFG_HOST), \
181181
$(foreach stage,$(STAGES), \
182182
$(foreach tool,$(TOOLS), \
183183
$(eval $(call TARGET_TOOL,$(stage),$(target),$(host),$(tool)))))))
184+
185+
# We have some triples which are bootstrapped from other triples, and this means
186+
# that we need to fixup some of the native tools that a triple depends on.
187+
#
188+
# For example, MSVC requires the llvm-ar.exe executable to manage archives, but
189+
# it bootstraps from the GNU Windows triple. This means that the compiler will
190+
# add this directory to PATH when executing new processes:
191+
#
192+
# $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin
193+
#
194+
# Unfortunately, however, the GNU triple is not known about in stage0, so the
195+
# tools are actually located in:
196+
#
197+
# $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin
198+
#
199+
# To remedy this problem, the rules below copy all native tool dependencies into
200+
# the bootstrap triple's location in stage 0 so the bootstrap compiler can find
201+
# the right sets of tools. Later stages (1+) will have the right host triple for
202+
# the compiler, so there's no need to worry there.
203+
#
204+
# $(1) - stage
205+
# $(2) - triple that's being used as host/target
206+
# $(3) - triple snapshot is built for
207+
# $(4) - crate
208+
# $(5) - tool
209+
define MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR
210+
ifneq (,$(3))
211+
$$(TLIB$(1)_T_$(2)_H_$(2))/stamp.$(4): $$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5)
212+
213+
$$(HLIB$(1)_H_$(2))/rustlib/$(3)/bin/$(5): $$(TBIN$(1)_T_$(2)_H_$(2))/$(5)
214+
mkdir -p $$(@D)
215+
cp $$< $$@
216+
endif
217+
endef
218+
219+
$(foreach target,$(CFG_TARGET), \
220+
$(foreach crate,$(CRATES), \
221+
$(foreach tool,$(NATIVE_TOOL_DEPS_$(crate)_T_$(target)), \
222+
$(eval $(call MOVE_TOOLS_TO_SNAPSHOT_HOST_DIR,0,$(target),$(BOOTSTRAP_FROM_$(target)),$(crate),$(tool))))))

trunk/mk/tests.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,23 +172,24 @@ check: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2 tidy
172172
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
173173

174174
# As above but don't bother running tidy.
175-
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
175+
check-notidy: check-sanitycheck cleantmptestlogs cleantestlibs all check-stage2
176176
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
177177

178178
# A slightly smaller set of tests for smoke testing.
179-
check-lite: cleantestlibs cleantmptestlogs \
179+
check-lite: check-sanitycheck cleantestlibs cleantmptestlogs \
180180
$(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
181181
check-stage2-rpass check-stage2-rpass-valgrind \
182182
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
183183
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
184184

185185
# Only check the 'reference' tests: rpass/cfail/rfail/rmake.
186-
check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
187-
check-stage2-rfail check-stage2-cfail check-stage2-pfail check-stage2-rmake
186+
check-ref: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-rpass \
187+
check-stage2-rpass-valgrind check-stage2-rfail check-stage2-cfail check-stage2-pfail \
188+
check-stage2-rmake
188189
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
189190

190191
# Only check the docs.
191-
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
192+
check-docs: check-sanitycheck cleantestlibs cleantmptestlogs check-stage2-docs
192193
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
193194

194195
# Some less critical tests that are not prone to breakage.

trunk/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ that all delimiters be balanced.
160160
## `->` for function return type
161161

162162
This is to make the language easier to parse for humans, especially in the face
163-
of higher-order functions. `fn foo<T>(f: fn(int): int, fn(T): U): U` is not
163+
of higher-order functions. `fn foo<T>(f: fn(i32): i32, fn(T): U): U` is not
164164
particularly easy to read.
165165

166166
## Why is `let` used to introduce variables?

trunk/src/doc/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,14 @@ something if you know its name.
8686

8787
If you encounter an error while compiling your code you may be able to look it
8888
up in the [Rust Compiler Error Index](error-index.html).
89+
90+
# Community Translations
91+
92+
Several projects have been started to translate the documentation into other
93+
languages:
94+
95+
- [Russian](https://github.com/kgv/rust_book_ru)
96+
- [Korean](https://github.com/rust-kr/doc.rust-kr.org)
97+
- [Chinese](https://github.com/KaiserY/rust-book-chinese)
98+
- [Spanish](https://github.com/goyox86/elpr)
99+

trunk/src/doc/reference.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,9 +1943,6 @@ macro scope.
19431943
- `simd` - on certain tuple structs, derive the arithmetic operators, which
19441944
lower to the target's SIMD instructions, if any; the `simd` feature gate
19451945
is necessary to use this attribute.
1946-
- `static_assert` - on statics whose type is `bool`, terminates compilation
1947-
with an error if it is not initialized to `true`. To use this, the `static_assert`
1948-
feature gate must be enabled.
19491946
- `unsafe_no_drop_flag` - on structs, remove the flag that prevents
19501947
destructors from being run twice. Destructors might be run multiple times on
19511948
the same object with this attribute. To use this, the `unsafe_no_drop_flag` feature
@@ -2301,12 +2298,6 @@ The currently implemented features of the reference compiler are:
23012298
crate. Stability markers are also attributes: `#[stable]`,
23022299
`#[unstable]`, and `#[deprecated]` are the three levels.
23032300

2304-
* `static_assert` - The `#[static_assert]` functionality is experimental and
2305-
unstable. The attribute can be attached to a `static` of
2306-
type `bool` and the compiler will error if the `bool` is
2307-
`false` at compile time. This version of this functionality
2308-
is unintuitive and suboptimal.
2309-
23102301
* `start` - Allows use of the `#[start]` attribute, which changes the entry point
23112302
into a Rust program. This capability, especially the signature for the
23122303
annotated function, is subject to change.
@@ -3255,8 +3246,8 @@ User-defined types have limited capabilities.
32553246
The primitive types are the following:
32563247

32573248
* The boolean type `bool` with values `true` and `false`.
3258-
* The machine types.
3259-
* The machine-dependent integer and floating-point types.
3249+
* The machine types (integer and floating-point).
3250+
* The machine-dependent integer types.
32603251

32613252
#### Machine types
32623253

trunk/src/doc/style/errors/ergonomics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use std::io::{File, Open, Write, IoError};
1414

1515
struct Info {
1616
name: String,
17-
age: int,
18-
rating: int
17+
age: i32,
18+
rating: i32
1919
}
2020

2121
fn write_info(info: &Info) -> Result<(), IoError> {
@@ -36,8 +36,8 @@ use std::io::{File, Open, Write, IoError};
3636

3737
struct Info {
3838
name: String,
39-
age: int,
40-
rating: int
39+
age: i32,
40+
rating: i32
4141
}
4242

4343
fn write_info(info: &Info) -> Result<(), IoError> {
@@ -63,4 +63,4 @@ for more details.
6363
### The `Result`-`impl` pattern [FIXME]
6464

6565
> **[FIXME]** Document the way that the `io` module uses trait impls
66-
> on `IoResult` to painlessly propagate errors.
66+
> on `std::io::Result` to painlessly propagate errors.

trunk/src/doc/style/features/functions-and-methods/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ for any operation that is clearly associated with a particular
2020
type.
2121

2222
Methods have numerous advantages over functions:
23+
2324
* They do not need to be imported or qualified to be used: all you
2425
need is a value of the appropriate type.
2526
* Their invocation performs autoborrowing (including mutable borrows).

0 commit comments

Comments
 (0)