Skip to content

Commit 6ce8948

Browse files
committed
---
yaml --- r: 174444 b: refs/heads/batch c: 35d46fa h: refs/heads/master v: v3
1 parent c398032 commit 6ce8948

File tree

125 files changed

+1005
-944
lines changed

Some content is hidden

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

125 files changed

+1005
-944
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: dcaeb6aa23ecba2dc2af870668a9239136d20fa3
32+
refs/heads/batch: 35d46fabaf63c0b1b607bd91cd5680eeaa2f9a14
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 The Rust Project Developers
1+
Copyright (c) 2014 The Rust Project Developers
22

33
Permission is hereby granted, free of charge, to any
44
person obtaining a copy of this software and associated

branches/batch/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ putvar CFG_RELEASE_CHANNEL
612612
# channel.
613613
# Basing CFG_BOOTSTRAP_KEY on CFG_BOOTSTRAP_KEY lets it get picked up
614614
# during a Makefile reconfig.
615-
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%H:%M:%S`}"
615+
CFG_BOOTSTRAP_KEY="${CFG_BOOTSTRAP_KEY-`date +%N`}"
616616
putvar CFG_BOOTSTRAP_KEY
617617

618618
step_msg "looking for build programs"

branches/batch/mk/crates.mk

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test rand \
5454
log regex graphviz core rbml alloc \
55-
unicode rustc_bitflags
55+
unicode
5656
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5757
rustc_trans rustc_back rustc_llvm rustc_privacy
5858
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
@@ -64,8 +64,7 @@ DEPS_libc := core
6464
DEPS_unicode := core
6565
DEPS_alloc := core libc native:jemalloc
6666
DEPS_std := core libc rand alloc collections unicode \
67-
native:rust_builtin native:backtrace native:rustrt_native \
68-
rustc_bitflags
67+
native:rust_builtin native:backtrace native:rustrt_native
6968
DEPS_graphviz := std
7069
DEPS_syntax := std term serialize log fmt_macros arena libc
7170
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
@@ -84,7 +83,6 @@ DEPS_rustc_llvm := native:rustllvm libc std
8483
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8584
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
8685
test
87-
DEPS_rustc_bitflags := core
8886
DEPS_flate := std native:miniz
8987
DEPS_arena := std
9088
DEPS_graphviz := std
@@ -116,7 +114,6 @@ ONLY_RLIB_alloc := 1
116114
ONLY_RLIB_rand := 1
117115
ONLY_RLIB_collections := 1
118116
ONLY_RLIB_unicode := 1
119-
ONLY_RLIB_rustc_bitflags := 1
120117

121118
################################################################################
122119
# You should not need to edit below this line

branches/batch/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ ifdef CFG_DISABLE_UNSTABLE_FEATURES
330330
CFG_INFO := $(info cfg: disabling unstable features (CFG_DISABLE_UNSTABLE_FEATURES))
331331
# Turn on feature-staging
332332
export CFG_DISABLE_UNSTABLE_FEATURES
333-
# Subvert unstable feature lints to do the self-build
334-
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
335333
endif
334+
# Subvert unstable feature lints to do the self-build
336335
export CFG_BOOTSTRAP_KEY
336+
export RUSTC_BOOTSTRAP_KEY:=$(CFG_BOOTSTRAP_KEY)
337337

338338
######################################################################
339339
# Per-stage targets and runner

branches/batch/src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(slicing_syntax, unboxed_closures)]
1414
#![feature(box_syntax)]
1515
#![feature(int_uint)]
16-
#![allow(unstable)]
1716

1817
#![deny(warnings)]
1918

branches/batch/src/doc/intro.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ Let's see an example. This Rust code will not compile:
424424
use std::thread::Thread;
425425
426426
fn main() {
427-
let mut numbers = vec![1is, 2, 3];
427+
let mut numbers = vec![1i, 2i, 3i];
428428
429-
for i in 0..3 {
429+
for i in range(0u, 3u) {
430430
Thread::spawn(move || {
431-
for j in 0..3 { numbers[j] += 1 }
431+
for j in range(0, 3) { numbers[j] += 1 }
432432
});
433433
}
434434
}
@@ -438,15 +438,15 @@ It gives us this error:
438438
439439
```text
440440
6:71 error: capture of moved value: `numbers`
441-
for j in 0..3 { numbers[j] += 1 }
442-
^~~~~~~
441+
for j in range(0, 3) { numbers[j] += 1 }
442+
^~~~~~~
443443
7:50 note: `numbers` moved into closure environment here
444444
spawn(move || {
445-
for j in 0..3 { numbers[j] += 1 }
445+
for j in range(0, 3) { numbers[j] += 1 }
446446
});
447447
6:79 error: cannot assign to immutable dereference (dereference is implicit, due to indexing)
448-
for j in 0..3 { numbers[j] += 1 }
449-
^~~~~~~~~~~~~~~
448+
for j in range(0, 3) { numbers[j] += 1 }
449+
^~~~~~~~~~~~~~~
450450
```
451451
452452
It mentions that "numbers moved into closure environment". Because we
@@ -478,9 +478,9 @@ use std::thread::Thread;
478478
use std::sync::{Arc,Mutex};
479479
480480
fn main() {
481-
let numbers = Arc::new(Mutex::new(vec![1is, 2, 3]));
481+
let numbers = Arc::new(Mutex::new(vec![1i, 2i, 3i]));
482482
483-
for i in 0..3 {
483+
for i in range(0u, 3u) {
484484
let number = numbers.clone();
485485
Thread::spawn(move || {
486486
let mut array = number.lock().unwrap();
@@ -541,12 +541,12 @@ safety check that makes this an error about moved values:
541541
use std::thread::Thread;
542542
543543
fn main() {
544-
let vec = vec![1is, 2, 3];
544+
let vec = vec![1i, 2, 3];
545545
546-
for i in 0us..3 {
546+
for i in range(0u, 3) {
547547
Thread::spawn(move || {
548548
println!("{}", vec[i]);
549-
});
549+
}).detach();
550550
}
551551
}
552552
```
@@ -557,9 +557,9 @@ you can remove it. As an example, this is a poor way to iterate through
557557
a vector:
558558
559559
```{rust}
560-
let vec = vec![1, 2, 3];
560+
let vec = vec![1i, 2, 3];
561561
562-
for i in 0..vec.len() {
562+
for i in range(0u, vec.len()) {
563563
println!("{}", vec[i]);
564564
}
565565
```
@@ -569,7 +569,7 @@ that we don't try to access an invalid index. However, we can remove this
569569
while retaining safety. The answer is iterators:
570570
571571
```{rust}
572-
let vec = vec![1, 2, 3];
572+
let vec = vec![1i, 2, 3];
573573
574574
for x in vec.iter() {
575575
println!("{}", x);

branches/batch/src/doc/reference.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,27 +1413,6 @@ a = Animal::Cat { name: "Spotty".to_string(), weight: 2.7 };
14131413
In this example, `Cat` is a _struct-like enum variant_,
14141414
whereas `Dog` is simply called an enum variant.
14151415

1416-
Enums have a discriminant. You can assign them explicitly:
1417-
1418-
```
1419-
enum Foo {
1420-
Bar = 123,
1421-
}
1422-
```
1423-
1424-
If a discriminant isn't assigned, they start at zero, and add one for each
1425-
variant, in order.
1426-
1427-
You can cast an enum to get this value:
1428-
1429-
```
1430-
# enum Foo { Bar = 123 }
1431-
let x = Foo::Bar as u32; // x is now 123u32
1432-
```
1433-
1434-
This only works as long as none of the variants have data attached. If
1435-
it were `Bar(i32)`, this is disallowed.
1436-
14371416
### Constant items
14381417

14391418
```{.ebnf .gram}

branches/batch/src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ things. The most basic is the *array*, a fixed-size list of elements of the
55
same type. By default, arrays are immutable.
66

77
```{rust}
8-
let a = [1, 2, 3]; // a: [i32; 3]
8+
let a = [1, 2, 3]; // a: [i32; 3]
99
let mut m = [1, 2, 3]; // mut m: [i32; 3]
1010
```
1111

@@ -68,7 +68,7 @@ let mut nums = vec![1, 2, 3]; // mut nums: Vec<i32>
6868
6969
nums.push(4);
7070
71-
println!("The length of nums is now {}", nums.len()); // Prints 4
71+
println!("The length of nums is now {}", nums.len()); // Prints 4
7272
```
7373

7474
Vectors have many more useful methods.
@@ -82,10 +82,10 @@ arrays:
8282

8383
```{rust}
8484
let a = [0, 1, 2, 3, 4];
85-
let middle = &a[1..4]; // A slice of a: just the elements 1, 2, and 3
85+
let middle = &a[1..4]; // A slice of a: just the elements 1, 2, and 3
8686
8787
for e in middle.iter() {
88-
println!("{}", e); // Prints 1, 2, 3
88+
println!("{}", e); // Prints 1, 2, 3
8989
}
9090
```
9191

branches/batch/src/doc/trpl/compound-data-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ arity and contained types.
5151

5252
```rust
5353
let mut x = (1, 2); // x: (i32, i32)
54-
let y = (2, 3); // y: (i32, i32)
54+
let y = (2, 3); // y: (i32, i32)
5555

5656
x = y;
5757
```
@@ -156,7 +156,7 @@ These two will not be equal, even if they have the same values:
156156
```{rust}
157157
# struct Color(i32, i32, i32);
158158
# struct Point(i32, i32, i32);
159-
let black = Color(0, 0, 0);
159+
let black = Color(0, 0, 0);
160160
let origin = Point(0, 0, 0);
161161
```
162162

@@ -297,7 +297,7 @@ enum StringResult {
297297
}
298298
```
299299
Where a `StringResult` is either a `StringResult::StringOK`, with the result of
300-
a computation, or a `StringResult::ErrorReason` with a `String` explaining
300+
a computation, or an `StringResult::ErrorReason` with a `String` explaining
301301
what caused the computation to fail. These kinds of `enum`s are actually very
302302
useful and are even part of the standard library.
303303

branches/batch/src/doc/trpl/crates-and-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Crates and Modules
1+
% The Rust Crates and Modules Guide
22

33
When a project starts getting large, it's considered a good software
44
engineering practice to split it up into a bunch of smaller pieces, and then

branches/batch/src/doc/trpl/error-handling.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Error Handling
1+
% Error Handling in Rust
22

33
> The best-laid plans of mice and men
44
> Often go awry
@@ -60,12 +60,12 @@ fn probability(_: &Event) -> f64 {
6060
6161
fn descriptive_probability(event: Event) -> &'static str {
6262
match probability(&event) {
63-
1.00 => "certain",
64-
0.00 => "impossible",
63+
1.00 => "certain",
64+
0.00 => "impossible",
6565
0.00 ... 0.25 => "very unlikely",
6666
0.25 ... 0.50 => "unlikely",
6767
0.50 ... 0.75 => "likely",
68-
0.75 ... 1.00 => "very likely",
68+
0.75 ... 1.00 => "very likely",
6969
}
7070
}
7171
@@ -97,12 +97,12 @@ fn probability(_: &Event) -> f64 {
9797

9898
fn descriptive_probability(event: Event) -> &'static str {
9999
match probability(&event) {
100-
1.00 => "certain",
101-
0.00 => "impossible",
100+
1.00 => "certain",
101+
0.00 => "impossible",
102102
0.00 ... 0.25 => "very unlikely",
103103
0.25 ... 0.50 => "unlikely",
104104
0.50 ... 0.75 => "likely",
105-
0.75 ... 1.00 => "very likely",
105+
0.75 ... 1.00 => "very likely",
106106
_ => unreachable!()
107107
}
108108
}

0 commit comments

Comments
 (0)