Skip to content

Commit 1190492

Browse files
committed
---
yaml --- r: 165417 b: refs/heads/master c: c76590c h: refs/heads/master i: 165415: 5d41952 v: v3
1 parent 0252f3e commit 1190492

File tree

638 files changed

+17148
-21397
lines changed

Some content is hidden

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

638 files changed

+17148
-21397
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: 6875eb574802c4ea7da5b83bfc690bd1118be364
2+
refs/heads/master: c76590cb145c60b72b972f0fc88a66dd66e85ffa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
55
refs/heads/try: aee614fc4973262a5a68efc643026e2b1458d65b

trunk/.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
[submodule "src/jemalloc"]
1212
path = src/jemalloc
1313
url = https://github.com/rust-lang/jemalloc.git
14+
[submodule "src/rust-installer"]
15+
path = src/rust-installer
16+
url = https://github.com/rust-lang/rust-installer

trunk/mk/crates.mk

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151

5252
TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test time rand \
54-
log regex graphviz core rbml alloc rustrt \
54+
log regex graphviz core rbml alloc \
5555
unicode
56-
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_driver rustc_trans rustc_back rustc_llvm
56+
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
57+
rustc_trans rustc_back rustc_llvm
5758
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc regex_macros fmt_macros
5859
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5960
TOOLS := compiletest rustdoc rustc
@@ -62,17 +63,17 @@ DEPS_core :=
6263
DEPS_libc := core
6364
DEPS_unicode := core
6465
DEPS_alloc := core libc native:jemalloc
65-
DEPS_rustrt := alloc core libc collections native:rustrt_native
66-
DEPS_std := core libc rand alloc collections rustrt unicode \
67-
native:rust_builtin native:backtrace
66+
DEPS_std := core libc rand alloc collections unicode \
67+
native:rust_builtin native:backtrace native:rustrt_native
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
7070
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
71-
rustc_typeck log syntax serialize rustc_llvm rustc_trans
71+
rustc_typeck rustc_resolve log syntax serialize rustc_llvm rustc_trans
7272
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7373
log syntax serialize rustc_llvm
7474
DEPS_rustc_typeck := rustc syntax
7575
DEPS_rustc_borrowck := rustc log graphviz syntax
76+
DEPS_rustc_resolve := rustc log syntax
7677
DEPS_rustc := syntax flate arena serialize getopts rbml \
7778
time log graphviz rustc_llvm rustc_back
7879
DEPS_rustc_llvm := native:rustllvm libc std
@@ -119,9 +120,11 @@ DOC_CRATES := $(filter-out rustc, \
119120
$(filter-out rustc_trans, \
120121
$(filter-out rustc_typeck, \
121122
$(filter-out rustc_borrowck, \
123+
$(filter-out rustc_resolve, \
122124
$(filter-out rustc_driver, \
123-
$(filter-out syntax, $(CRATES)))))))
124-
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_typeck rustc_driver syntax
125+
$(filter-out syntax, $(CRATES))))))))
126+
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
127+
rustc_typeck rustc_driver syntax
125128

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

trunk/mk/ctags.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
2727
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \
2828
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
2929
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
30-
)))))))))
30+
))))))))
3131
CTAGS_OPTS=--options="${CFG_SRC_DIR}src/etc/ctags.rust" --languages=-javascript --recurse ${CTAGS_LOCATIONS}
3232
# We could use `--languages=Rust`, but there is value in producing tags for the
3333
# C++ parts of the code base too (at the time of writing, those are .h and .cpp

trunk/mk/dist.mk

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ PKG_FILES := \
5858
rt \
5959
rustllvm \
6060
snapshots.txt \
61+
rust-installer \
6162
test) \
6263
$(PKG_GITMODULES) \
6364
$(filter-out config.stamp, \
@@ -209,33 +210,40 @@ distcheck-osx: dist-osx
209210
# Unix binary installer tarballs
210211
######################################################################
211212

213+
NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,doc
214+
212215
define DEF_INSTALLER
213216

214217
$$(eval $$(call DEF_PREPARE,dir-$(1)))
215218

216219
dist-install-dir-$(1): PREPARE_HOST=$(1)
217220
dist-install-dir-$(1): PREPARE_TARGETS=$(2)
218-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
221+
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)-image
219222
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
220223
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
221224
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
222225
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
223226
dist-install-dir-$(1): PREPARE_CLEAN=true
224227
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
225-
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
226-
> tmp/dist/manifest-$(1).in
227-
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
228-
# Add remaining non-installed files
229228
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
230229
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
231230
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
232231
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
233-
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
234-
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
232+
$$(Q)[ ! -d doc ] || cp -r doc $$(PREPARE_DEST_DIR)
235233

236234
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
237235
@$(call E, build: $$@)
238-
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)
236+
$$(Q)$$(S)src/rust-installer/gen-installer.sh \
237+
--product-name=Rust \
238+
--verify-bin=rustc \
239+
--rel-manifest-dir=rustlib \
240+
--success-message=Rust-is-ready-to-roll. \
241+
--image-dir=tmp/dist/$$(PKG_NAME)-$(1)-image \
242+
--work-dir=tmp/dist \
243+
--output-dir=dist \
244+
--non-installed-prefixes=$$(NON_INSTALLED_PREFIXES) \
245+
--package-name=$$(PKG_NAME)-$(1)
246+
$$(Q)rm -R tmp/dist/$$(PKG_NAME)-$(1)-image
239247

240248
endef
241249

@@ -304,9 +312,17 @@ MAYBE_DIST_TAR_SRC=dist-tar-src
304312
MAYBE_DISTCHECK_TAR_SRC=distcheck-tar-src
305313
endif
306314

307-
dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins dist-docs
315+
ifneq ($(CFG_DISABLE_DOCS),)
316+
MAYBE_DIST_DOCS=
317+
MAYBE_DISTCHECK_DOCS=
318+
else
319+
MAYBE_DIST_DOCS=dist-docs
320+
MAYBE_DISTCHECK_DOCS=distcheck-docs
321+
endif
322+
323+
dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-tar-bins $(MAYBE_DIST_DOCS)
308324

309-
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins distcheck-docs
325+
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-tar-bins $(MAYBE_DISTCHECK_DOCS)
310326
$(Q)rm -Rf tmp/distcheck
311327
@echo
312328
@echo -----------------------------------------------

trunk/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif
2525
# Remove tmp files because it's a decent amount of disk space
2626
$(Q)rm -R tmp/dist
2727

28-
prepare_install: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
28+
prepare_install: dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz | tmp/empty_dir
2929

3030
uninstall:
3131
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
@@ -38,7 +38,7 @@ endif
3838
# Remove tmp files because it's a decent amount of disk space
3939
$(Q)rm -R tmp/dist
4040

41-
prepare_uninstall: dist-install-dir-$(CFG_BUILD) | tmp/empty_dir
41+
prepare_uninstall: dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz | tmp/empty_dir
4242

4343
.PHONY: install prepare_install uninstall prepare_uninstall
4444

trunk/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ $(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_borrowck rustc_trans,$(HOST_CRATES))
24+
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
25+
$(HOST_CRATES))
2526
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2627

2728
######################################################################

trunk/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
394394

395395
match re.captures(full_version_line) {
396396
Some(captures) => {
397-
Some(captures.at(2).to_string())
397+
Some(captures.at(2).unwrap_or("").to_string())
398398
}
399399
None => {
400400
println!("Could not extract GDB version from line '{}'",
@@ -428,7 +428,7 @@ fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
428428

429429
match re.captures(full_version_line) {
430430
Some(captures) => {
431-
Some(captures.at(1).to_string())
431+
Some(captures.at(1).unwrap_or("").to_string())
432432
}
433433
None => {
434434
println!("Could not extract LLDB version from line '{}'",

trunk/src/compiletest/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
6666
line: &str,
6767
re: &Regex) -> Option<(WhichLine, ExpectedError)> {
6868
re.captures(line).and_then(|caps| {
69-
let adjusts = caps.name("adjusts").len();
70-
let kind = caps.name("kind").to_ascii_lower();
71-
let msg = caps.name("msg").trim().to_string();
72-
let follow = caps.name("follow").len() > 0;
69+
let adjusts = caps.name("adjusts").unwrap_or("").len();
70+
let kind = caps.name("kind").unwrap_or("").to_ascii_lower();
71+
let msg = caps.name("msg").unwrap_or("").trim().to_string();
72+
let follow = caps.name("follow").unwrap_or("").len() > 0;
7373

7474
let (which, line) = if follow {
7575
assert!(adjusts == 0, "use either //~| or //~^, not both.");

trunk/src/compiletest/runtest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use std::io;
3232
use std::os;
3333
use std::str;
3434
use std::string::String;
35-
use std::task;
35+
use std::thread::Thread;
3636
use std::time::Duration;
3737
use test::MetricMap;
3838

@@ -445,9 +445,9 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
445445
loop {
446446
//waiting 1 second for gdbserver start
447447
timer::sleep(Duration::milliseconds(1000));
448-
let result = task::try(move || {
448+
let result = Thread::spawn(move || {
449449
tcp::TcpStream::connect("127.0.0.1:5039").unwrap();
450-
});
450+
}).join();
451451
if result.is_err() {
452452
continue;
453453
}
@@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
16091609
stderr_out.as_slice());
16101610

16111611
ProcRes {
1612-
status: process::ExitStatus(exitcode),
1612+
status: process::ProcessExit::ExitStatus(exitcode),
16131613
stdout: stdout_out,
16141614
stderr: stderr_out,
16151615
cmdline: cmdline
@@ -1666,7 +1666,7 @@ fn compile_test_and_save_bitcode(config: &Config, props: &TestProps,
16661666
// FIXME (#9639): This needs to handle non-utf8 paths
16671667
let mut link_args = vec!("-L".to_string(),
16681668
aux_dir.as_str().unwrap().to_string());
1669-
let llvm_args = vec!("--emit=bc,obj".to_string(),
1669+
let llvm_args = vec!("--emit=llvm-bc,obj".to_string(),
16701670
"--crate-type=lib".to_string());
16711671
link_args.extend(llvm_args.into_iter());
16721672
let args = make_compile_args(config,

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Some examples that demonstrate different aspects of the language:
2424
[HashMap]: https://github.com/rust-lang/rust/blob/master/src/libcollections/hashmap.rs
2525
[json]: https://github.com/rust-lang/rust/blob/master/src/libserialize/json.rs
2626

27-
You may also be interested in browsing [GitHub's Rust][github-rust] page.
27+
You may also be interested in browsing [trending Rust repositories][github-rust] on GitHub.
2828

2929
[github-rust]: https://github.com/trending?l=rust
3030

@@ -42,7 +42,7 @@ Let the fact that this is an easily countable number be a warning.
4242

4343
## Does it run on Windows?
4444

45-
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
45+
Yes. All development happens in lockstep on all 3 target platforms (using MinGW, not Cygwin). Note that the Windows implementation currently has some limitations; in particular, the 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
4646

4747
[win64]: https://github.com/rust-lang/rust/issues/1237
4848
[libgcc]: https://github.com/rust-lang/rust/issues/11782
@@ -104,7 +104,7 @@ Similar to the reasoning about default-sync: it wires fewer assumptions into the
104104

105105
## Why are strings UTF-8 by default? Why not UCS2 or UCS4?
106106

107-
The `str` type is UTF-8 because we observe more text in the wild in this encoding -- particularly in network transmissions, which are endian-agnostic -- and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.
107+
The `str` type is UTF-8 because we observe more text in the wild in this encoding particularly in network transmissions, which are endian-agnostic and we think it's best that the default treatment of I/O not involve having to recode codepoints in each direction.
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

@@ -145,23 +145,27 @@ For simplicity, we do not plan to do so. Implementing automatic semicolon insert
145145

146146
## How do I get my program to display the output of logging macros?
147147

148-
**Short answer** set the RUST_LOG environment variable to the name of your source file, sans extension.
148+
**Short Answer**: Set the `RUST_LOG` environment variable to the name of your source file, sans extension.
149149

150150
```sh
151151
rustc hello.rs
152152
export RUST_LOG=hello
153153
./hello
154154
```
155155

156-
**Long answer** RUST_LOG takes a 'logging spec' that consists of a
156+
**Long Answer**: `RUST_LOG` takes a 'logging spec' that consists of a
157157
comma-separated list of paths, where a path consists of the crate name and
158-
sequence of module names, each separated by double-colons. For standalone .rs
159-
files the crate is implicitly named after the source file, so in the above
160-
example we were setting RUST_LOG to the name of the hello crate. Multiple paths
158+
sequence of module names, each separated by double-colons. For standalone `.rs`
159+
files, the crate is implicitly named after the source file, so in the above
160+
example we were setting `RUST_LOG` to the name of the hello crate. Multiple paths
161161
can be combined to control the exact logging you want to see. For example, when
162-
debugging linking in the compiler you might set
163-
`RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath`
164-
For a full description see [the logging crate][1].
162+
debugging linking in the compiler, you might set the following:
163+
164+
```sh
165+
RUST_LOG=rustc::metadata::creader,rustc::util::filesearch,rustc::back::rpath
166+
```
167+
168+
For a full description, see [the logging crate][1].
165169

166170
## How fast is Rust?
167171

@@ -172,6 +176,6 @@ performance.
172176
That said, it is an explicit goal of Rust to be as fast as C++ for most things.
173177
Language decisions are made with performance in mind, and we want Rust to be as
174178
fast as possible. Given that Rust is built on top of LLVM, any performance
175-
improvements in it also help us be faster.
179+
improvements in it also help Rust become faster.
176180

177181
[1]:log/index.html

0 commit comments

Comments
 (0)