Skip to content

Commit f7ced70

Browse files
committed
---
yaml --- r: 272979 b: refs/heads/beta c: 3820d38 h: refs/heads/master i: 272977: 6237560 272975: e528058
1 parent dfffbe9 commit f7ced70

File tree

200 files changed

+3213
-2644
lines changed

Some content is hidden

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

200 files changed

+3213
-2644
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: d7e406eab811ae5cbb01c986c6e9ff681e5a6657
26+
refs/heads/beta: 3820d38e90127c9542d11a5677a2a0ec7804aacb
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std flate arena term \
53-
serialize getopts collections test rand \
54-
log graphviz core rbml alloc \
52+
TARGET_CRATES := libc std term \
53+
getopts collections test rand \
54+
core 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
61+
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
62+
flate arena graphviz rbml log serialize
6263
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6364

6465
DEPS_core :=
@@ -84,8 +85,8 @@ DEPS_log := std
8485
DEPS_num := std
8586
DEPS_rbml := std log serialize
8687
DEPS_serialize := std log
87-
DEPS_term := std log
88-
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
88+
DEPS_term := std
89+
DEPS_test := std getopts term native:rust_test_helpers
8990

9091
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9192
DEPS_syntax_ext := syntax fmt_macros

branches/beta/mk/tests.mk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ 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 \
305302
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
306303
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
307304
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
@@ -317,6 +314,15 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
317314
# able to build a compiler (when the target triple is in the set of host triples)
318315
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
319316

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+
320326
check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
321327
$$(foreach crate,$$(TEST_CRATES), \
322328
check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
@@ -340,9 +346,7 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
340346
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
341347
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
342348
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
343-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
344349
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
345-
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
346350
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
347351

348352
endef

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] is created on [the stack][stack],
54+
When `v` comes into scope, a new [vector][vectors] 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.
46+
* `%=` (`var %= expr`): arithmetic remainder & assignment. Overloadable (`RemAssign`).
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.
50+
* `&=` (`var &= expr`): bitwise and & assignment. Overloadable (`BitAndAssign`).
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.
55+
* `*=` (`var *= expr`): arithmetic multiplication & assignment. Overloadable (`MulAssign`).
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.
58+
* `+=` (`var += expr`): arithmetic addition & assignment. Overloadable (`AddAssign`).
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.
62+
* `-=` (`var -= expr`): arithmetic subtraction & assignment. Overloadable (`SubAssign`).
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.
72+
* `/=` (`var /= expr`): arithmetic division & assignment. Overloadable (`DivAssign`).
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.
79+
* `<<=` (`var <<= expr`): left-shift & assignment. Overloadable (`ShlAssign`).
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.
88+
* `>>=` (`var >>= expr`): right-shift & assignment. Overloadable (`ShrAssign`).
8989
* `@` (`ident @ pat`): pattern binding. See [Patterns (Bindings)].
9090
* `^` (`expr ^ expr`): bitwise exclusive or. Overloadable (`BitXor`).
91-
* `^=` (`var ^= expr`): bitwise exclusive or & assignment.
91+
* `^=` (`var ^= expr`): bitwise exclusive or & assignment. Overloadable (`BitXorAssign`).
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.
95+
* `|=` (`var |= expr`): bitwise or & assignment. Overloadable (`BitOrAssign`).
9696
* `||` (`expr || expr`): logical or.
9797
* `_`: "ignored" pattern binding. See [Patterns (Ignoring bindings)].
9898

branches/beta/src/doc/reference.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,16 @@ 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+
11211131
### Structs
11221132

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

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

12001211
```
12011212
enum Foo {
12021213
Bar = 123,
12031214
}
12041215
```
12051216

1206-
If a discriminant isn't assigned, they start at zero, and add one for each
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
12071223
variant, in order.
12081224

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

12111227
```
12121228
# enum Foo { Bar = 123 }

branches/beta/src/liballoc/lib.rs

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

9494
#![cfg_attr(not(test), feature(raw, fn_traits, placement_new_protocol))]
95-
#![cfg_attr(test, feature(test, rustc_private, box_heap))]
95+
#![cfg_attr(test, feature(test, 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;
105102

106103
// Heaps provided for low-level allocation strategies
107104

0 commit comments

Comments
 (0)