Skip to content

Commit 8f58120

Browse files
committed
---
yaml --- r: 272991 b: refs/heads/beta c: d961323 h: refs/heads/master i: 272989: f6a0ce2 272987: c2c999e 272983: 86d4d92 272975: e528058 272959: 9df4812
1 parent 657a6e2 commit 8f58120

File tree

257 files changed

+2822
-4078
lines changed

Some content is hidden

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

257 files changed

+2822
-4078
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 6d6ae1ffe665610ae235dd95e849248a6741ff0f
26+
refs/heads/beta: d9613237fd1736fa8e9ce95686d85463a38dc976
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/mk/crates.mk

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std term \
53-
getopts collections test rand \
54-
core alloc \
52+
TARGET_CRATES := libc std flate arena term \
53+
serialize getopts collections test rand \
54+
log graphviz core rbml alloc \
5555
rustc_unicode rustc_bitflags \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes
61-
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
62-
flate arena graphviz rbml log serialize
61+
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
6362
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6463

6564
DEPS_core :=
@@ -85,10 +84,10 @@ DEPS_log := std
8584
DEPS_num := std
8685
DEPS_rbml := std log serialize
8786
DEPS_serialize := std log
88-
DEPS_term := std
89-
DEPS_test := std getopts term native:rust_test_helpers
87+
DEPS_term := std log
88+
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
9089

91-
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
90+
DEPS_syntax := std term serialize log arena libc rustc_bitflags
9291
DEPS_syntax_ext := syntax fmt_macros
9392

9493
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\

branches/beta/mk/tests.mk

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
299299
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
300300
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
301301
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 \
304+
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
302305
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
303306
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
304307
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
@@ -314,15 +317,6 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
314317
# able to build a compiler (when the target triple is in the set of host triples)
315318
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
316319

317-
check-stage$(1)-T-$(2)-H-$(3)-exec: \
318-
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
319-
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
320-
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec
321-
322-
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
323-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
324-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec
325-
326320
check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
327321
$$(foreach crate,$$(TEST_CRATES), \
328322
check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
@@ -346,7 +340,9 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
346340
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
347341
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
348342
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
343+
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
349344
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
345+
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
350346
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
351347

352348
endef

branches/beta/src/bootstrap/bootstrap.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def download_rust_nightly(self):
7373

7474
if self.rustc().startswith(self.bin_root()) and \
7575
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
76-
if os.path.exists(self.bin_root()):
77-
shutil.rmtree(self.bin_root())
76+
shutil.rmtree(self.bin_root())
7877
filename = "rust-std-nightly-" + self.build + ".tar.gz"
7978
url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date()
8079
tarball = os.path.join(rustc_cache, filename)

branches/beta/src/bootstrap/build/compile.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ pub fn std_link(build: &Build,
8383
libdir.join(staticlib("compiler-rt", target))));
8484
}
8585
add_to_sysroot(&out_dir, &libdir);
86-
87-
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
88-
copy_third_party_objects(build, target, &libdir);
89-
}
90-
}
91-
92-
/// Copies the crt(1,i,n).o startup objects
93-
///
94-
/// Only required for musl targets that statically link to libc
95-
fn copy_third_party_objects(build: &Build, target: &str, into: &Path) {
96-
for &obj in &["crt1.o", "crti.o", "crtn.o"] {
97-
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
98-
}
9986
}
10087

10188
/// Build and prepare startup objects like rsbegin.o and rsend.o

branches/beta/src/bootstrap/build/sanity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub fn check(build: &mut Build) {
7979
}
8080

8181
// Make sure musl-root is valid if specified
82-
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
82+
if target.contains("musl") && target.contains("x86_64") {
8383
match build.config.musl_root {
8484
Some(ref root) => {
8585
if fs::metadata(root.join("lib/libc.a")).is_err() {

branches/beta/src/doc/book/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Rust warns us that we haven’t used the `Result` value. This warning comes from
295295
a special annotation that `io::Result` has. Rust is trying to tell you that
296296
you haven’t handled a possible error. The right way to suppress the error is
297297
to actually write error handling. Luckily, if we want to crash if there’s
298-
a problem, we can use `expect()`. If we can recover from the
298+
a problem, we can use these two little methods. If we can recover from the
299299
error somehow, we’d do something else, but we’ll save that for a future
300300
project.
301301

branches/beta/src/doc/book/inline-assembly.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
For extremely low-level manipulations and performance reasons, one
44
might wish to control the CPU directly. Rust supports using inline
5-
assembly to do this via the `asm!` macro.
5+
assembly to do this via the `asm!` macro. The syntax roughly matches
6+
that of GCC & Clang:
67

78
```ignore
89
asm!(assembly template

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn foo() {
5151
}
5252
```
5353

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

branches/beta/src/doc/book/references-and-borrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Before we get to the details, two important notes about the ownership system.
2323
Rust has a focus on safety and speed. It accomplishes these goals through many
2424
‘zero-cost abstractions’, which means that in Rust, abstractions cost as little
2525
as possible in order to make them work. The ownership system is a prime example
26-
of a zero-cost abstraction. All of the analysis we’ll talk about in this guide
26+
of a zero cost abstraction. All of the analysis we’ll talk about in this guide
2727
is _done at compile time_. You do not pay any run-time cost for any of these
2828
features.
2929

branches/beta/src/doc/book/syntax-index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,23 @@
4343
* `!` (`!expr`): bitwise or logical complement. Overloadable (`Not`).
4444
* `!=` (`var != expr`): nonequality comparison. Overloadable (`PartialEq`).
4545
* `%` (`expr % expr`): arithmetic remainder. Overloadable (`Rem`).
46-
* `%=` (`var %= expr`): arithmetic remainder & assignment. Overloadable (`RemAssign`).
46+
* `%=` (`var %= expr`): arithmetic remainder & assignment.
4747
* `&` (`expr & expr`): bitwise and. Overloadable (`BitAnd`).
4848
* `&` (`&expr`): borrow. See [References and Borrowing].
4949
* `&` (`&type`, `&mut type`, `&'a type`, `&'a mut type`): borrowed pointer type. See [References and Borrowing].
50-
* `&=` (`var &= expr`): bitwise and & assignment. Overloadable (`BitAndAssign`).
50+
* `&=` (`var &= expr`): bitwise and & assignment.
5151
* `&&` (`expr && expr`): logical and.
5252
* `*` (`expr * expr`): arithmetic multiplication. Overloadable (`Mul`).
5353
* `*` (`*expr`): dereference.
5454
* `*` (`*const type`, `*mut type`): raw pointer. See [Raw Pointers].
55-
* `*=` (`var *= expr`): arithmetic multiplication & assignment. Overloadable (`MulAssign`).
55+
* `*=` (`var *= expr`): arithmetic multiplication & assignment.
5656
* `+` (`expr + expr`): arithmetic addition. Overloadable (`Add`).
5757
* `+` (`trait + trait`, `'a + trait`): compound type constraint. See [Traits (Multiple Trait Bounds)].
58-
* `+=` (`var += expr`): arithmetic addition & assignment. Overloadable (`AddAssign`).
58+
* `+=` (`var += expr`): arithmetic addition & assignment.
5959
* `,`: argument and element separator. See [Attributes], [Functions], [Structs], [Generics], [Match], [Closures], [Crates and Modules (Importing Modules with `use`)].
6060
* `-` (`expr - expr`): arithmetic subtraction. Overloadable (`Sub`).
6161
* `-` (`- expr`): arithmetic negation. Overloadable (`Neg`).
62-
* `-=` (`var -= expr`): arithmetic subtraction & assignment. Overloadable (`SubAssign`).
62+
* `-=` (`var -= expr`): arithmetic subtraction & assignment.
6363
* `->` (`fn(…) -> type`, `|…| -> type`): function and closure return type. See [Functions], [Closures].
6464
* `-> !` (`fn(…) -> !`, `|…| -> !`): diverging function or closure. See [Diverging Functions].
6565
* `.` (`expr.ident`): member access. See [Structs], [Method Syntax].
@@ -69,14 +69,14 @@
6969
* `...` (`...expr`, `expr...expr`) *in an expression*: inclusive range expression. See [Iterators].
7070
* `...` (`expr...expr`) *in a pattern*: inclusive range pattern. See [Patterns (Ranges)].
7171
* `/` (`expr / expr`): arithmetic division. Overloadable (`Div`).
72-
* `/=` (`var /= expr`): arithmetic division & assignment. Overloadable (`DivAssign`).
72+
* `/=` (`var /= expr`): arithmetic division & assignment.
7373
* `:` (`pat: type`, `ident: type`): constraints. See [Variable Bindings], [Functions], [Structs], [Traits].
7474
* `:` (`ident: expr`): struct field initializer. See [Structs].
7575
* `:` (`'a: loop {…}`): loop label. See [Loops (Loops Labels)].
7676
* `;`: statement and item terminator.
7777
* `;` (`[…; len]`): part of fixed-size array syntax. See [Primitive Types (Arrays)].
7878
* `<<` (`expr << expr`): left-shift. Overloadable (`Shl`).
79-
* `<<=` (`var <<= expr`): left-shift & assignment. Overloadable (`ShlAssign`).
79+
* `<<=` (`var <<= expr`): left-shift & assignment.
8080
* `<` (`expr < expr`): less-than comparison. Overloadable (`PartialOrd`).
8181
* `<=` (`var <= expr`): less-than or equal-to comparison. Overloadable (`PartialOrd`).
8282
* `=` (`var = expr`, `ident = type`): assignment/equivalence. See [Variable Bindings], [`type` Aliases], generic parameter defaults.
@@ -85,14 +85,14 @@
8585
* `>` (`expr > expr`): greater-than comparison. Overloadable (`PartialOrd`).
8686
* `>=` (`var >= expr`): greater-than or equal-to comparison. Overloadable (`PartialOrd`).
8787
* `>>` (`expr >> expr`): right-shift. Overloadable (`Shr`).
88-
* `>>=` (`var >>= expr`): right-shift & assignment. Overloadable (`ShrAssign`).
88+
* `>>=` (`var >>= expr`): right-shift & assignment.
8989
* `@` (`ident @ pat`): pattern binding. See [Patterns (Bindings)].
9090
* `^` (`expr ^ expr`): bitwise exclusive or. Overloadable (`BitXor`).
91-
* `^=` (`var ^= expr`): bitwise exclusive or & assignment. Overloadable (`BitXorAssign`).
91+
* `^=` (`var ^= expr`): bitwise exclusive or & assignment.
9292
* `|` (`expr | expr`): bitwise or. Overloadable (`BitOr`).
9393
* `|` (`pat | pat`): pattern alternatives. See [Patterns (Multiple patterns)].
9494
* `|` (`|…| expr`): closures. See [Closures].
95-
* `|=` (`var |= expr`): bitwise or & assignment. Overloadable (`BitOrAssign`).
95+
* `|=` (`var |= expr`): bitwise or & assignment.
9696
* `||` (`expr || expr`): logical or.
9797
* `_`: "ignored" pattern binding. See [Patterns (Ignoring bindings)].
9898

branches/beta/src/doc/book/testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,3 +515,7 @@ you add more examples.
515515

516516
We haven’t covered all of the details with writing documentation tests. For more,
517517
please see the [Documentation chapter](documentation.html).
518+
519+
One final note: documentation tests *cannot* be run on binary crates.
520+
To see more on file arrangement see the [Crates and
521+
Modules](crates-and-modules.html) section.

branches/beta/src/doc/reference.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,16 +1118,6 @@ type Point = (u8, u8);
11181118
let p: Point = (41, 68);
11191119
```
11201120

1121-
Currently a type alias to an enum type cannot be used to qualify the
1122-
constructors:
1123-
1124-
```
1125-
enum E { A }
1126-
type F = E;
1127-
let _: F = E::A; // OK
1128-
// let _: F = F::A; // Doesn't work
1129-
```
1130-
11311121
### Structs
11321122

11331123
A _struct_ is a nominal [struct type](#struct-types) defined with the
@@ -1205,24 +1195,18 @@ a = Animal::Cat { name: "Spotty".to_string(), weight: 2.7 };
12051195
In this example, `Cat` is a _struct-like enum variant_,
12061196
whereas `Dog` is simply called an enum variant.
12071197

1208-
Each enum value has a _discriminant_ which is an integer associated to it. You
1209-
can specify it explicitly:
1198+
Enums have a discriminant. You can assign them explicitly:
12101199

12111200
```
12121201
enum Foo {
12131202
Bar = 123,
12141203
}
12151204
```
12161205

1217-
The right hand side of the specification is interpreted as an `isize` value,
1218-
but the compiler is allowed to use a smaller type in the actual memory layout.
1219-
The [`repr` attribute](#ffi-attributes) can be added in order to change
1220-
the type of the right hand side and specify the memory layout.
1221-
1222-
If a discriminant isn't specified, they start at zero, and add one for each
1206+
If a discriminant isn't assigned, they start at zero, and add one for each
12231207
variant, in order.
12241208

1225-
You can cast an enum to get its discriminant:
1209+
You can cast an enum to get this value:
12261210

12271211
```
12281212
# enum Foo { Bar = 123 }
@@ -3328,10 +3312,6 @@ The primitive types are the following:
33283312
* The boolean type `bool` with values `true` and `false`.
33293313
* The machine types (integer and floating-point).
33303314
* The machine-dependent integer types.
3331-
* Arrays
3332-
* Tuples
3333-
* Slices
3334-
* Function pointers
33353315

33363316
#### Machine types
33373317

branches/beta/src/etc/unicode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
398398
derived = load_properties("DerivedCoreProperties.txt", want_derived)
399399
scripts = load_properties("Scripts.txt", [])
400400
props = load_properties("PropList.txt",
401-
["White_Space", "Join_Control", "Noncharacter_Code_Point", "Pattern_White_Space"])
401+
["White_Space", "Join_Control", "Noncharacter_Code_Point"])
402402
norm_props = load_properties("DerivedNormalizationProps.txt",
403403
["Full_Composition_Exclusion"])
404404

@@ -408,7 +408,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
408408
# category tables
409409
for (name, cat, pfuns) in ("general_category", gencats, ["N", "Cc"]), \
410410
("derived_property", derived, want_derived), \
411-
("property", props, ["White_Space", "Pattern_White_Space"]):
411+
("property", props, ["White_Space"]):
412412
emit_property_module(rf, name, cat, pfuns)
413413

414414
# normalizations and conversions module

branches/beta/src/liballoc/arc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,11 @@ impl<T> Arc<T> {
201201
Arc { _ptr: unsafe { Shared::new(Box::into_raw(x)) } }
202202
}
203203

204-
/// Unwraps the contained value if the `Arc<T>` has exactly one strong reference.
204+
/// Unwraps the contained value if the `Arc<T>` has only one strong reference.
205+
/// This will succeed even if there are outstanding weak references.
205206
///
206207
/// Otherwise, an `Err` is returned with the same `Arc<T>`.
207208
///
208-
/// This will succeed even if there are outstanding weak references.
209-
///
210209
/// # Examples
211210
///
212211
/// ```

branches/beta/src/liballoc/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,16 @@
9292
#![feature(unsize)]
9393

9494
#![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
95-
#![cfg_attr(test, feature(test, box_heap))]
95+
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
9696

9797
// Allow testing this library
9898

9999
#[cfg(test)]
100100
#[macro_use]
101101
extern crate std;
102+
#[cfg(test)]
103+
#[macro_use]
104+
extern crate log;
102105

103106
// Heaps provided for low-level allocation strategies
104107

branches/beta/src/liballoc/rc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,11 @@ impl<T> Rc<T> {
224224
}
225225
}
226226

227-
/// Unwraps the contained value if the `Rc<T>` has exactly one strong reference.
227+
/// Unwraps the contained value if the `Rc<T>` has only one strong reference.
228+
/// This will succeed even if there are outstanding weak references.
228229
///
229230
/// Otherwise, an `Err` is returned with the same `Rc<T>`.
230231
///
231-
/// This will succeed even if there are outstanding weak references.
232-
///
233232
/// # Examples
234233
///
235234
/// ```

branches/beta/src/liballoc_jemalloc/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fn main() {
111111
println!("cargo:rustc-link-search=native={}/lib", build_dir.display());
112112
if target.contains("android") {
113113
println!("cargo:rustc-link-lib=gcc");
114-
} else if !target.contains("windows") && !target.contains("musl") {
114+
} else if !target.contains("windows") {
115115
println!("cargo:rustc-link-lib=pthread");
116116
}
117117
}

0 commit comments

Comments
 (0)