Skip to content

Commit c2ad2d0

Browse files
committed
---
yaml --- r: 183547 b: refs/heads/beta c: d414a39 h: refs/heads/master i: 183545: ac0f326 183543: 4d324d1 v: v3
1 parent c96d304 commit c2ad2d0

File tree

127 files changed

+3458
-6616
lines changed

Some content is hidden

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

127 files changed

+3458
-6616
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 828a8644c7d4ccd98e08aaf53191632de575b037
34+
refs/heads/beta: d414a3919740726e18897b6e39f66e8a25f00a5c
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/configure

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,8 +1379,7 @@ do
13791379
done
13801380

13811381
# Munge any paths that appear in config.mk back to posix-y
1382-
cp config.tmp config.tmp.bak
1383-
sed -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' <config.tmp.bak >config.tmp
1382+
sed -i.bak -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' config.tmp
13841383
rm -f config.tmp.bak
13851384

13861385
msg

branches/beta/mk/main.mk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,13 @@ SPACE :=
6161
SPACE +=
6262
ifneq ($(CFG_GIT),)
6363
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
64-
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --date=short --pretty=format:'%cd')
64+
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci')
6565
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
6666
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
6767
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
6868
endif
6969
endif
7070

71-
CFG_BUILD_DATE = $(shell date +%F)
72-
CFG_VERSION += (built $(CFG_BUILD_DATE))
73-
7471
# Windows exe's need numeric versions - don't use anything but
7572
# numbers and dots here
7673
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
@@ -320,7 +317,6 @@ endif
320317
ifdef CFG_VER_HASH
321318
export CFG_VER_HASH
322319
endif
323-
export CFG_BUILD_DATE
324320
export CFG_VERSION
325321
export CFG_VERSION_WIN
326322
export CFG_RELEASE

branches/beta/src/doc/complement-bugreport.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ $ RUST_BACKTRACE=1 rustc ...
5656

5757
# I submitted a bug, but nobody has commented on it!
5858

59-
This is sad, but does happen sometimes, since we're short-staffed. If you submit a
60-
bug and you haven't received a comment on it within 3 business days, it's entirely
61-
reasonable to ask about the status of the bug in #rust on irc.mozilla.org.
59+
This is sad, but does happen sometimes, since we're short-staffed. If you
60+
submit a bug and you haven't received a comment on it within 3 business days,
61+
it's entirely reasonable to either ask on the #rust IRC channel,
62+
or post on the [rust-dev mailing list](https://mail.mozilla.org/listinfo/rust-dev)
63+
to ask what the status of the bug is.

branches/beta/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ segfault when we allocate more memory?
224224

225225
The answer is that in the C++ version, `x` is a *reference* to the memory
226226
location where the first element of the array is stored. But in Ruby, `x` is a
227-
standalone value, not connected to the underlying array at all. Let's dig into
227+
standalone value, not connected to the underyling array at all. Let's dig into
228228
the details for a moment. Your program has access to memory, provided to it by
229229
the operating system. Each location in memory has an address. So when we make
230230
our vector, `v`, it's stored in a memory location somewhere:

branches/beta/src/doc/reference.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,8 +2591,9 @@ of any reference that points to it.
25912591

25922592
When a [local variable](#memory-slots) is used as an
25932593
[rvalue](#lvalues,-rvalues-and-temporaries) the variable will either be moved
2594-
or copied, depending on its type. All values whose type implements `Copy` are
2595-
copied, all others are moved.
2594+
or copied, depending on its type. For types that contain [owning
2595+
pointers](#pointer-types) or values that implement the special trait `Drop`,
2596+
the variable is moved. All other types are copied.
25962597

25972598
### Literal expressions
25982599

@@ -3004,7 +3005,7 @@ Some examples of call expressions:
30043005
# fn add(x: i32, y: i32) -> i32 { 0 }
30053006
30063007
let x: i32 = add(1i32, 2i32);
3007-
let pi: Result<f32, _> = "3.14".parse();
3008+
let pi: Option<f32> = "3.14".parse().ok();
30083009
```
30093010

30103011
### Lambda expressions
@@ -3147,7 +3148,7 @@ An example of a for loop over a series of integers:
31473148

31483149
```
31493150
# fn bar(b:usize) { }
3150-
for i in 0us..256 {
3151+
for i in range(0us, 256) {
31513152
bar(i);
31523153
}
31533154
```
@@ -3531,7 +3532,7 @@ An example of each kind:
35313532
```{rust}
35323533
let vec: Vec<i32> = vec![1, 2, 3];
35333534
let arr: [i32; 3] = [1, 2, 3];
3534-
let s: &[i32] = &vec[];
3535+
let s: &[i32] = &vec;
35353536
```
35363537

35373538
As you can see, the `vec!` macro allows you to create a `Vec<T>` easily. The

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,15 @@ let four_is_smaller = four <= ten;
263263
let four_equals_ten = four == ten;
264264
```
265265

266-
This may seem rather limiting, but it's a limitation which we can overcome.
267-
There are two ways: by implementing equality ourselves, or by using the
268-
[`match`][match] keyword. We don't know enough about Rust to implement equality
269-
yet, but we can use the `Ordering` enum from the standard library, which does:
266+
This may seem rather limiting, particularly equality being invalid; in
267+
many cases however, it's unnecessary. Rust provides the [`match`][match]
268+
keyword, which will be examined in more detail in the next section, which
269+
often allows better and easier branch control than a series of `if`/`else`
270+
statements would. However, for our [game][game] we need the comparisons
271+
to work so we will utilize the `Ordering` `enum` provided by the standard
272+
library which supports such comparisons. It has this form:
270273

271-
```
274+
```{rust}
272275
enum Ordering {
273276
Less,
274277
Equal,

branches/beta/src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ use std::sync::mpsc;
354354
fn main() {
355355
let (tx, rx) = mpsc::channel();
356356
357-
for _ in 0..10 {
357+
for _ in range(0, 10) {
358358
let tx = tx.clone();
359359
360360
Thread::spawn(move || {

branches/beta/src/doc/trpl/documentation.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Documentation
1+
% Rust Documentation
22

33
`rustdoc` is the built-in tool for generating documentation. It integrates
44
with the compiler to provide accurate hyperlinking between usage of types and
@@ -294,26 +294,3 @@ Documentation` on the first line).
294294
Like with a Rust crate, the `--test` argument will run the code
295295
examples to check they compile, and obeys any `--test-args` flags. The
296296
tests are named after the last `#` heading.
297-
298-
# Re-exports
299-
300-
Rustdoc will show the documentation for a publc re-export in both places:
301-
302-
```{rust,ignore}
303-
extern crate foo;
304-
305-
pub use foo::bar;
306-
```
307-
308-
This will create documentation for `bar` both inside the documentation for
309-
the crate `foo`, as well as the documentation for your crate. It will use
310-
the same documentation in both places.
311-
312-
This behavior can be supressed with `no_inline`:
313-
314-
```{rust,ignore}
315-
extern crate foo;
316-
317-
#[doc(no_inline)]
318-
pub use foo::bar;
319-
```

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ a function for that:
400400
let input = old_io::stdin().read_line()
401401
.ok()
402402
.expect("Failed to read line");
403-
let input_num: Result<u32, _> = input.parse();
403+
let input_num: Option<u32> = input.parse().ok();
404404
```
405405
406406
The `parse` function takes in a `&str` value and converts it into something.
@@ -422,8 +422,8 @@ In this case, we say `x` is a `u32` explicitly, so Rust is able to properly
422422
tell `random()` what to generate. In a similar fashion, both of these work:
423423
424424
```{rust,ignore}
425-
let input_num = "5".parse::<u32>(); // input_num: Option<u32>
426-
let input_num: Result<u32, _> = "5".parse(); // input_num: Result<u32, <u32 as FromStr>::Err>
425+
let input_num = "5".parse::<u32>().ok(); // input_num: Option<u32>
426+
let input_num: Option<u32> = "5".parse().ok(); // input_num: Option<u32>
427427
```
428428
429429
Here we're converting the `Result` returned by `parse` to an `Option` by using
@@ -447,9 +447,9 @@ fn main() {
447447
let input = old_io::stdin().read_line()
448448
.ok()
449449
.expect("Failed to read line");
450-
let input_num: Result<u32, _> = input.parse();
450+
let input_num: Option<u32> = input.parse().ok();
451451
452-
println!("You guessed: {:?}", input_num);
452+
println!("You guessed: {}", input_num);
453453
454454
match cmp(input_num, secret_number) {
455455
Ordering::Less => println!("Too small!"),
@@ -497,11 +497,11 @@ fn main() {
497497
let input = old_io::stdin().read_line()
498498
.ok()
499499
.expect("Failed to read line");
500-
let input_num: Result<u32, _> = input.parse();
500+
let input_num: Option<u32> = input.parse().ok();
501501

502502
let num = match input_num {
503-
Ok(num) => num,
504-
Err(_) => {
503+
Some(num) => num,
504+
None => {
505505
println!("Please input a number!");
506506
return;
507507
}
@@ -564,11 +564,11 @@ fn main() {
564564
let input = old_io::stdin().read_line()
565565
.ok()
566566
.expect("Failed to read line");
567-
let input_num: Result<u32, _> = input.trim().parse();
567+
let input_num: Option<u32> = input.trim().parse().ok();
568568

569569
let num = match input_num {
570-
Ok(num) => num,
571-
Err(_) => {
570+
Some(num) => num,
571+
None => {
572572
println!("Please input a number!");
573573
return;
574574
}
@@ -640,11 +640,11 @@ fn main() {
640640
let input = old_io::stdin().read_line()
641641
.ok()
642642
.expect("Failed to read line");
643-
let input_num: Result<u32, _> = input.trim().parse();
643+
let input_num: Option<u32> = input.trim().parse().ok();
644644
645645
let num = match input_num {
646-
Ok(num) => num,
647-
Err(_) => {
646+
Some(num) => num,
647+
None => {
648648
println!("Please input a number!");
649649
return;
650650
}
@@ -716,11 +716,11 @@ fn main() {
716716
let input = old_io::stdin().read_line()
717717
.ok()
718718
.expect("Failed to read line");
719-
let input_num: Result<u32, _> = input.trim().parse();
719+
let input_num: Option<u32> = input.trim().parse().ok();
720720

721721
let num = match input_num {
722-
Ok(num) => num,
723-
Err(_) => {
722+
Some(num) => num,
723+
None => {
724724
println!("Please input a number!");
725725
return;
726726
}
@@ -772,11 +772,11 @@ fn main() {
772772
let input = old_io::stdin().read_line()
773773
.ok()
774774
.expect("Failed to read line");
775-
let input_num: Result<u32, _> = input.trim().parse();
775+
let input_num: Option<u32> = input.trim().parse().ok();
776776

777777
let num = match input_num {
778-
Ok(num) => num,
779-
Err(_) => {
778+
Some(num) => num,
779+
None => {
780780
println!("Please input a number!");
781781
continue;
782782
}
@@ -849,11 +849,11 @@ fn main() {
849849
let input = old_io::stdin().read_line()
850850
.ok()
851851
.expect("Failed to read line");
852-
let input_num: Result<u32, _> = input.trim().parse();
852+
let input_num: Option<u32> = input.trim().parse().ok();
853853

854854
let num = match input_num {
855-
Ok(num) => num,
856-
Err(_) => {
855+
Some(num) => num,
856+
None => {
857857
println!("Please input a number!");
858858
continue;
859859
}

0 commit comments

Comments
 (0)