Skip to content

Commit 2bb3809

Browse files
committed
---
yaml --- r: 163531 b: refs/heads/snap-stage3 c: 64faa74 h: refs/heads/master i: 163529: b5fc650 163527: 6eb15bd v: v3
1 parent 205e69b commit 2bb3809

File tree

218 files changed

+4868
-2562
lines changed

Some content is hidden

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

218 files changed

+4868
-2562
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: 8d6895a9c097a90bb00459eccacb6ba06c6437f9
4+
refs/heads/snap-stage3: 64faa74d08aa89fa3c4f46da386d4aa453fc0819
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/.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

branches/snap-stage3/configure

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,7 @@ do
988988
make_dir $t/rt/jemalloc
989989
for i in \
990990
isaac sync test \
991-
arch/i386 arch/x86_64 arch/arm arch/mips \
992-
sundown/src sundown/html
991+
arch/i386 arch/x86_64 arch/arm arch/mips
993992
do
994993
make_dir $t/rt/stage$s/$i
995994
done

branches/snap-stage3/mk/ctags.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
.PHONY: TAGS.emacs TAGS.vi
1717

1818
# This is using a blacklist approach, probably more durable than a whitelist.
19-
# We exclude: external dependencies (llvm, rt/{msvc,sundown,vg}),
19+
# We exclude: external dependencies (llvm, rt/{msvc,vg}),
2020
# tests (compiletest, test) and a couple of other things (rt/arch, etc)
2121
CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
2222
$(patsubst ${CFG_SRC_DIR}src/compiletest,, \
@@ -25,7 +25,6 @@ CTAGS_LOCATIONS=$(patsubst ${CFG_SRC_DIR}src/llvm,, \
2525
$(patsubst ${CFG_SRC_DIR}src/rt,, \
2626
$(patsubst ${CFG_SRC_DIR}src/rt/arch,, \
2727
$(patsubst ${CFG_SRC_DIR}src/rt/msvc,, \
28-
$(patsubst ${CFG_SRC_DIR}src/rt/sundown,, \
2928
$(patsubst ${CFG_SRC_DIR}src/rt/vg,, \
3029
$(wildcard ${CFG_SRC_DIR}src/*) $(wildcard ${CFG_SRC_DIR}src/rt/*) \
3130
)))))))))

branches/snap-stage3/mk/dist.mk

Lines changed: 15 additions & 7 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)
233232
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
234-
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(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

branches/snap-stage3/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

branches/snap-stage3/mk/rustllvm.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ LLVM_EXTRA_INCDIRS_$(1)= -iquote $(S)src/llvm/include \
2222
-iquote $$(CFG_LLVM_BUILD_DIR_$(1))/include
2323
endif
2424

25-
RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, RustWrapper.cpp PassWrapper.cpp)
25+
RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, \
26+
ExecutionEngineWrapper.cpp RustWrapper.cpp PassWrapper.cpp)
2627

2728
RUSTLLVM_DEF_$(1) := $(1)/rustllvm/rustllvm$(CFG_DEF_SUFFIX_$(1))
2829

branches/snap-stage3/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 '{}'",

branches/snap-stage3/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.");

branches/snap-stage3/src/doc/complement-bugreport.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ It's also helpful to provide the exact version and host by copying the output of
3737
re-running the erroneous rustc command with the `--version=verbose` flag, which will
3838
produce something like this:
3939

40-
```{ignore}
40+
```text
4141
rustc 0.12.0 (ba4081a5a 2014-10-07 13:44:41 -0700)
4242
binary: rustc
4343
commit-hash: ba4081a5a8573875fed17545846f6f6902c8ba8d
@@ -46,8 +46,13 @@ host: i686-apple-darwin
4646
release: 0.12.0
4747
```
4848

49-
Finally, if you can run the offending command under gdb, pasting a stack trace can be
50-
useful; to do so, you will need to set a breakpoint on `rust_panic`.
49+
Finally, if you can also provide a backtrace, that'd be great. You can get a
50+
backtrace by setting the `RUST_BACKTRACE` environment variable to `1`, like
51+
this:
52+
53+
```bash
54+
$ RUST_BACKTRACE=1 rustc ...
55+
```
5156

5257
# I submitted a bug, but nobody has commented on it!
5358

branches/snap-stage3/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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{notrust}
455+
```text
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn main() {
7676

7777
This will give us an error:
7878

79-
```{notrust}
79+
```text
8080
error: non-exhaustive patterns: `_` not covered [E0004]
8181
```
8282

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

190190
gives
191191

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ early_return!(input_2, [T::SpecialB]);
195195
As the above example demonstrates, `$(...)*` is also valid on the right-hand
196196
side of a macro definition. The behavior of `*` in transcription,
197197
especially in cases where multiple `*`s are nested, and multiple different
198-
names are involved, can seem somewhat magical and intuitive at first. The
198+
names are involved, can seem somewhat magical and unintuitive at first. The
199199
system that interprets them is called "Macro By Example". The two rules to
200200
keep in mind are (1) the behavior of `$(...)*` is to walk through one "layer"
201201
of repetitions for all of the `$name`s it contains in lockstep, and (2) each

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn add_one(mut num: Box<int>) {
130130

131131
This does not compile, and gives us an error:
132132

133-
```{notrust}
133+
```text
134134
error: use of moved value: `x`
135135
println!("{}", x);
136136
^
@@ -208,7 +208,7 @@ the function is over, and `num` goes out of scope, the borrow is over.
208208
Lending out a reference to a resource that someone else owns can be
209209
complicated, however. For example, imagine this set of operations:
210210

211-
1. I aquire a handle to some kind of resource.
211+
1. I acquire a handle to some kind of resource.
212212
2. I lend you a reference to the resource.
213213
3. I decide I'm done with the resource, and deallocate it, while you still have
214214
your reference.
@@ -341,7 +341,7 @@ fn main() {
341341
{ // |
342342
let y = &5i; // ---+ y goes into scope
343343
let f = Foo { x: y }; // ---+ f goes into scope
344-
x = &f.x; // | | error here
344+
x = &f.x; // | | error here
345345
} // ---+ f & y go out of scope
346346
// |
347347
println!("{}", x); // |
@@ -406,7 +406,7 @@ fn main() {
406406
We try to make four `Wheel`s, each with a `Car` that it's attached to. But the
407407
compiler knows that on the second iteration of the loop, there's a problem:
408408

409-
```{notrust}
409+
```text
410410
error: use of moved value: `car`
411411
Wheel { size: 360, owner: car };
412412
^~~

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ println!("{}", x + z);
8484

8585
This gives us an error:
8686

87-
```{notrust}
87+
```text
8888
hello.rs:6:24: 6:25 error: mismatched types: expected `int` but found `&int` (expected int but found &-ptr)
8989
hello.rs:6 println!("{}", x + z);
9090
^
@@ -132,7 +132,7 @@ Pointers are useful in languages that are pass-by-value, rather than
132132
pass-by-reference. Basically, languages can make two choices (this is made
133133
up syntax, it's not Rust):
134134

135-
```{ignore}
135+
```text
136136
func foo(x) {
137137
x = 5
138138
}
@@ -152,7 +152,7 @@ and therefore, can change its value. At the comment, `i` will be `5`.
152152
So what do pointers have to do with this? Well, since pointers point to a
153153
location in memory...
154154

155-
```{ignore}
155+
```text
156156
func foo(&int x) {
157157
*x = 5
158158
}
@@ -191,7 +191,7 @@ knows. This might be harmless, and it might be catastrophic.
191191
When you combine pointers and functions, it's easy to accidentally invalidate
192192
the memory the pointer is pointing to. For example:
193193

194-
```{ignore}
194+
```text
195195
func make_pointer(): &int {
196196
x = 5;
197197
@@ -213,7 +213,7 @@ As one last example of a big problem with pointers, **aliasing** can be an
213213
issue. Two pointers are said to alias when they point at the same location
214214
in memory. Like this:
215215

216-
```{ignore}
216+
```text
217217
func mutate(&int i, int j) {
218218
*i = j;
219219
}
@@ -398,7 +398,7 @@ fn main() {
398398

399399
It gives this error:
400400

401-
```{notrust}
401+
```text
402402
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
403403
test.rs:5 *x -= 1;
404404
^~
@@ -522,7 +522,7 @@ boxes, though. As a rough approximation, you can treat this Rust code:
522522

523523
As being similar to this C code:
524524

525-
```{ignore}
525+
```c
526526
{
527527
int *x;
528528
x = (int *)malloc(sizeof(int));
@@ -626,7 +626,7 @@ fn main() {
626626

627627
This prints:
628628

629-
```{ignore}
629+
```text
630630
Cons(1, box Cons(2, box Cons(3, box Nil)))
631631
```
632632

0 commit comments

Comments
 (0)