Skip to content

Commit 487dd41

Browse files
committed
---
yaml --- r: 214380 b: refs/heads/beta c: 716f920 h: refs/heads/master v: v3
1 parent 87f59d6 commit 487dd41

File tree

19 files changed

+1944
-1578
lines changed

19 files changed

+1944
-1578
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: 74f1818608f0e5055adb673a2798726403b6862a
26+
refs/heads/beta: 716f920b7e234b450f272346fea961832505c06e
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 8c0aa6d64ebab528f7eb182812007155d6044972
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/doc/trpl/dining-philosophers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
396396
}).collect();
397397
```
398398

399-
While this is only five lines, they’re a dense four. Let’s break it down.
399+
While this is only five lines, they’re a dense five. Let’s break it down.
400400

401401
```rust,ignore
402402
let handles: Vec<_> =

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Check out the generated `Cargo.toml`:
2727
[package]
2828

2929
name = "guessing_game"
30-
version = "0.0.1"
30+
version = "0.1.0"
3131
authors = ["Your Name <[email protected]>"]
3232
```
3333

@@ -46,7 +46,7 @@ Let’s try compiling what Cargo gave us:
4646

4747
```{bash}
4848
$ cargo build
49-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
49+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
5050
```
5151

5252
Excellent! Open up your `src/main.rs` again. We’ll be writing all of
@@ -58,7 +58,7 @@ Try it out:
5858

5959
```bash
6060
$ cargo run
61-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
61+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
6262
Running `target/debug/guessing_game`
6363
Hello, world!
6464
```
@@ -727,7 +727,7 @@ Let’s try our program out!
727727
728728
```bash
729729
$ cargo run
730-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
730+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
731731
Running `target/guessing_game`
732732
Guess the number!
733733
The secret number is: 58
@@ -792,7 +792,7 @@ and quit. Observe:
792792
793793
```bash
794794
$ cargo run
795-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
795+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
796796
Running `target/guessing_game`
797797
Guess the number!
798798
The secret number is: 59
@@ -929,7 +929,7 @@ Now we should be good! Let’s try:
929929
930930
```bash
931931
$ cargo run
932-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
932+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
933933
Running `target/guessing_game`
934934
Guess the number!
935935
The secret number is: 61

branches/beta/src/libcore/slice.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -665,14 +665,14 @@ macro_rules! iterator {
665665
#[inline]
666666
fn next(&mut self) -> Option<$elem> {
667667
// could be implemented with slices, but this avoids bounds checks
668-
if self.ptr == self.end {
669-
None
670-
} else {
671-
unsafe {
672-
if mem::size_of::<T>() != 0 {
673-
::intrinsics::assume(!self.ptr.is_null());
674-
::intrinsics::assume(!self.end.is_null());
675-
}
668+
unsafe {
669+
if mem::size_of::<T>() != 0 {
670+
assume(!self.ptr.is_null());
671+
assume(!self.end.is_null());
672+
}
673+
if self.ptr == self.end {
674+
None
675+
} else {
676676
let old = self.ptr;
677677
self.ptr = slice_offset!(self.ptr, 1);
678678
Some(slice_ref!(old))
@@ -710,15 +710,15 @@ macro_rules! iterator {
710710
#[inline]
711711
fn next_back(&mut self) -> Option<$elem> {
712712
// could be implemented with slices, but this avoids bounds checks
713-
if self.end == self.ptr {
714-
None
715-
} else {
716-
unsafe {
713+
unsafe {
714+
if mem::size_of::<T>() != 0 {
715+
assume(!self.ptr.is_null());
716+
assume(!self.end.is_null());
717+
}
718+
if self.end == self.ptr {
719+
None
720+
} else {
717721
self.end = slice_offset!(self.end, -1);
718-
if mem::size_of::<T>() != 0 {
719-
::intrinsics::assume(!self.ptr.is_null());
720-
::intrinsics::assume(!self.end.is_null());
721-
}
722722
Some(slice_ref!(self.end))
723723
}
724724
}

0 commit comments

Comments
 (0)