Skip to content

Commit 5d03567

Browse files
committed
---
yaml --- r: 274923 b: refs/heads/stable c: c49edbc h: refs/heads/master i: 274921: 5e6826f 274919: 96238fe
1 parent 5254881 commit 5d03567

File tree

300 files changed

+5512
-3006
lines changed

Some content is hidden

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

300 files changed

+5512
-3006
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: b499e5a08906658e2fb1652f773670b7910a7855
32+
refs/heads/stable: c49edbc5eefe9526b66c0f922a2ce10bd394b15d
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*.elc
1818
*.epub
1919
*.exe
20+
*.pdb
2021
*.fn
2122
*.html
2223
*.kdev4
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# i586-unknown-linux-gnu configuration
2+
CC_i586-unknown-linux-gnu=$(CC)
3+
CXX_i586-unknown-linux-gnu=$(CXX)
4+
CPP_i586-unknown-linux-gnu=$(CPP)
5+
AR_i586-unknown-linux-gnu=$(AR)
6+
CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
7+
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
8+
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
13+
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
14+
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
15+
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=
16+
CFG_INSTALL_NAME_i586-unknown-linux-gnu =
17+
CFG_EXE_SUFFIX_i586-unknown-linux-gnu =
18+
CFG_WINDOWSY_i586-unknown-linux-gnu :=
19+
CFG_UNIXY_i586-unknown-linux-gnu := 1
20+
CFG_LDPATH_i586-unknown-linux-gnu :=
21+
CFG_RUN_i586-unknown-linux-gnu=$(2)
22+
CFG_RUN_TARG_i586-unknown-linux-gnu=$(call CFG_RUN_i586-unknown-linux-gnu,,$(2))
23+
CFG_GNU_TRIPLE_i586-unknown-linux-gnu := i586-unknown-linux-gnu

branches/stable/mk/docs.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
6262
# The error-index-generator executable...
6363
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD))
6464
ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
65+
ERR_IDX_GEN_MD = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE) markdown
6566

6667
D := $(S)src/doc
6768

@@ -217,6 +218,12 @@ doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
217218

218219
error-index: doc/error-index.html
219220

220-
doc/error-index.html: $(ERR_IDX_GEN_EXE) | doc/
221+
# Metadata used to generate the index is created as a side effect of
222+
# the build so this depends on every crate being up to date.
223+
doc/error-index.html: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
221224
$(Q)$(call E, error-index-generator: $@)
222225
$(Q)$(ERR_IDX_GEN)
226+
227+
doc/error-index.md: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
228+
$(Q)$(call E, error-index-generator: $@)
229+
$(Q)$(ERR_IDX_GEN_MD)

branches/stable/mk/tests.mk

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,14 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
298298
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
299299
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
300300
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
301-
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
302-
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
303-
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
301+
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
302+
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
303+
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
304304
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
305305
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
307-
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
308-
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
307+
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
308+
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
309309
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
310310
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
311311
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
@@ -673,8 +673,8 @@ CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
673673
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
674674
CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS)
675675
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
676-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
677-
$(S)src/etc/htmldocck.py
676+
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
677+
$(S)src/etc/htmldocck.py
678678

679679
endef
680680

@@ -892,6 +892,28 @@ $(foreach host,$(CFG_HOST), \
892892
$(foreach crate,$(TEST_DOC_CRATES), \
893893
$(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate)))))))
894894

895+
define DEF_DOC_TEST_ERROR_INDEX
896+
897+
check-stage$(1)-T-$(2)-H-$(3)-doc-error-index-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index)
898+
899+
ifeq ($(2),$$(CFG_BUILD))
900+
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index): \
901+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
902+
doc/error-index.md
903+
$$(Q)touch $$@.start_time
904+
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test doc/error-index.md
905+
$$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
906+
else
907+
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index):
908+
$$(Q)touch $$@
909+
endif
910+
endef
911+
912+
$(foreach host,$(CFG_HOST), \
913+
$(foreach target,$(CFG_TARGET), \
914+
$(foreach stage,$(STAGES), \
915+
$(eval $(call DEF_DOC_TEST_ERROR_INDEX,$(stage),$(target),$(host))))))
916+
895917
######################################################################
896918
# Shortcut rules
897919
######################################################################
@@ -901,7 +923,7 @@ TEST_GROUPS = \
901923
$(foreach crate,$(TEST_CRATES),$(crate)) \
902924
$(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
903925
rpass \
904-
rpass-valgrind \
926+
rpass-valgrind \
905927
rpass-full \
906928
rfail-full \
907929
cfail-full \
@@ -918,7 +940,7 @@ TEST_GROUPS = \
918940
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \
919941
pretty \
920942
pretty-rpass \
921-
pretty-rpass-valgrind \
943+
pretty-rpass-valgrind \
922944
pretty-rpass-full \
923945
pretty-rfail-full \
924946
pretty-rfail \
@@ -987,7 +1009,8 @@ define DEF_CHECK_DOC_FOR_STAGE
9871009
check-stage$(1)-docs: $$(foreach docname,$$(DOC_NAMES), \
9881010
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
9891011
$$(foreach crate,$$(TEST_DOC_CRATES), \
990-
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate))
1012+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate)) \
1013+
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-error-index-exec
9911014
endef
9921015

9931016
$(foreach stage,$(STAGES), \
@@ -1048,7 +1071,8 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
10481071
$$(S) \
10491072
$(3) \
10501073
"$$(LLVM_LIBDIR_RUSTFLAGS_$(3))" \
1051-
"$$(LLVM_ALL_COMPONENTS_$(3))"
1074+
"$$(LLVM_ALL_COMPONENTS_$(3))" \
1075+
"$$(LLVM_CXXFLAGS_$(3))"
10521076
@touch -r $$@.start_time $$@ && rm $$@.start_time
10531077
else
10541078
# FIXME #11094 - The above rule doesn't work right for multiple targets
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::fs;
12+
use std::path::Path;
13+
14+
use build::Build;
15+
16+
pub fn clean(build: &Build) {
17+
for host in build.config.host.iter() {
18+
19+
let out = build.out.join(host);
20+
21+
rm_rf(build, &out.join("compiler-rt"));
22+
23+
for stage in 0..4 {
24+
rm_rf(build, &out.join(format!("stage{}", stage)));
25+
rm_rf(build, &out.join(format!("stage{}-std", stage)));
26+
rm_rf(build, &out.join(format!("stage{}-rustc", stage)));
27+
}
28+
}
29+
}
30+
31+
fn rm_rf(build: &Build, path: &Path) {
32+
if path.exists() {
33+
build.verbose(&format!("removing `{}`", path.display()));
34+
t!(fs::remove_dir_all(path));
35+
}
36+
}

branches/stable/src/bootstrap/build/flags.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub struct Flags {
2626
pub src: Option<PathBuf>,
2727
pub jobs: Option<u32>,
2828
pub args: Vec<String>,
29+
pub clean: bool,
2930
}
3031

3132
pub struct Filter {
@@ -44,6 +45,7 @@ impl Flags {
4445
opts.optopt("", "stage", "stage to build", "N");
4546
opts.optopt("", "src", "path to repo root", "DIR");
4647
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
48+
opts.optflag("", "clean", "clean output directory");
4749
opts.optflag("h", "help", "print this help message");
4850

4951
let usage = |n| -> ! {
@@ -75,6 +77,7 @@ impl Flags {
7577

7678
Flags {
7779
verbose: m.opt_present("v"),
80+
clean: m.opt_present("clean"),
7881
stage: m.opt_str("stage").map(|j| j.parse().unwrap()),
7982
build: m.opt_str("build").unwrap(),
8083
host: Filter { values: m.opt_strs("host") },

branches/stable/src/bootstrap/build/job.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,20 @@ pub unsafe fn setup() {
6464
mem::size_of_val(&info) as DWORD);
6565
assert!(r != 0, "{}", io::Error::last_os_error());
6666

67-
// Assign our process to this job object
67+
// Assign our process to this job object. Note that if this fails, one very
68+
// likely reason is that we are ourselves already in a job object! This can
69+
// happen on the build bots that we've got for Windows, or if just anyone
70+
// else is instrumenting the build. In this case we just bail out
71+
// immediately and assume that they take care of it.
72+
//
73+
// Also note that nested jobs (why this might fail) are supported in recent
74+
// versions of Windows, but the version of Windows that our bots are running
75+
// at least don't support nested job objects.
6876
let r = AssignProcessToJobObject(job, GetCurrentProcess());
69-
assert!(r != 0, "{}", io::Error::last_os_error());
77+
if r == 0 {
78+
CloseHandle(job);
79+
return
80+
}
7081

7182
// If we've got a parent process (e.g. the python script that called us)
7283
// then move ownership of this job object up to them. That way if the python

branches/stable/src/bootstrap/build/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ macro_rules! t {
3030

3131
mod cc;
3232
mod channel;
33+
mod clean;
3334
mod compile;
3435
mod config;
3536
mod flags;
@@ -122,6 +123,10 @@ impl Build {
122123
#[cfg(not(windows))] fn setup_job() {}
123124
setup_job();
124125

126+
if self.flags.clean {
127+
return clean::clean(self);
128+
}
129+
125130
cc::find(self);
126131
sanity::check(self);
127132
channel::collect(self);

branches/stable/src/bootstrap/mk/Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ BOOTSTRAP := $(CFG_PYTHON) $(CFG_SRC_DIR)src/bootstrap/bootstrap.py $(BOOTSTRAP_
2121

2222
all:
2323
$(Q)$(BOOTSTRAP)
24+
25+
clean:
26+
$(Q)$(BOOTSTRAP) --clean

branches/stable/src/doc/book/concurrency.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ use std::sync::mpsc;
286286
fn main() {
287287
let data = Arc::new(Mutex::new(0));
288288

289+
// `tx` is the "transmitter" or "sender"
290+
// `rx` is the "receiver"
289291
let (tx, rx) = mpsc::channel();
290292

291293
for _ in 0..10 {

branches/stable/src/doc/book/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,23 +319,23 @@ our source code:
319319
```text
320320
First, we set `x` to five:
321321
322-
```text
322+
```rust
323323
let x = 5;
324324
# let y = 6;
325325
# println!("{}", x + y);
326326
```
327327
328328
Next, we set `y` to six:
329329
330-
```text
330+
```rust
331331
# let x = 5;
332332
let y = 6;
333333
# println!("{}", x + y);
334334
```
335335
336336
Finally, we print the sum of `x` and `y`:
337337
338-
```text
338+
```rust
339339
# let x = 5;
340340
# let y = 6;
341341
println!("{}", x + y);

branches/stable/src/doc/book/ownership.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ fn foo() {
5151
}
5252
```
5353

54-
When `v` comes into scope, a new [vector] is created, and it allocates space on
55-
[the heap][heap] for each of its elements. When `v` goes out of scope at the
56-
end of `foo()`, Rust will clean up everything related to the vector, even the
57-
heap-allocated memory. This happens deterministically, at the end of the scope.
54+
When `v` comes into scope, a new [vector] is created on [the stack][stack],
55+
and it allocates space on [the heap][heap] for its elements. When `v` goes out
56+
of scope at the end of `foo()`, Rust will clean up everything related to the
57+
vector, even the heap-allocated memory. This happens deterministically, at the
58+
end of the scope.
5859

5960
We'll cover [vectors] in detail later in this chapter; we only use them
6061
here as an example of a type that allocates space on the heap at runtime. They
@@ -67,6 +68,7 @@ Vectors have a [generic type][generics] `Vec<T>`, so in this example `v` will ha
6768
[arrays]: primitive-types.html#arrays
6869
[vectors]: vectors.html
6970
[heap]: the-stack-and-the-heap.html
71+
[stack]: the-stack-and-the-heap.html#the-stack
7072
[bindings]: variable-bindings.html
7173
[generics]: generics.html
7274

branches/stable/src/doc/book/using-rust-without-the-standard-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ don’t want to use the standard library via an attribute: `#![no_std]`.
1111
> For details on binaries without the standard library, see [the nightly
1212
> chapter on `#![no_std]`](no-stdlib.html)
1313
14-
To use `#![no_std]`, add a it to your crate root:
14+
To use `#![no_std]`, add it to your crate root:
1515

1616
```rust
1717
#![no_std]

branches/stable/src/doc/uptack.tex

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

0 commit comments

Comments
 (0)