Skip to content

Commit db156f0

Browse files
committed
---
yaml --- r: 208567 b: refs/heads/snap-stage3 c: 7d0ae69 h: refs/heads/master i: 208565: 9848b77 208563: c4d3094 208559: 63aa6a0 v: v3
1 parent 8b67a3c commit db156f0

File tree

21 files changed

+1580
-1884
lines changed

21 files changed

+1580
-1884
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a9ea33fa30fc2c1a8084e035455ba2a0a0dfea3e
4+
refs/heads/snap-stage3: 7d0ae692c91150ea854ebfaaeef6de0bbaca55f7
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# The Rust Programming Language
22

3-
Rust is a systems programming language that is fast, memory safe and
4-
multithreaded, but does not employ a garbage collector or otherwise
5-
impose significant runtime overhead.
6-
7-
This repo contains the code for `rustc`, the Rust compiler, as well
8-
as standard libraries, tools and documentation for Rust.
3+
This is a compiler for Rust, including standard libraries, tools and
4+
documentation. Rust is a systems programming language that is fast,
5+
memory safe and multithreaded, but does not employ a garbage collector
6+
or otherwise impose significant runtime overhead.
97

108
## Quick Start
119

branches/snap-stage3/src/doc/trpl/const-and-static.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ static N: i32 = 5;
3131

3232
Unlike [`let`][let] bindings, you must annotate the type of a `static`.
3333

34-
[let]: variable-bindings.html
35-
3634
Statics live for the entire lifetime of a program, and therefore any
3735
reference stored in a constant has a [`’static` lifetime][lifetimes]:
3836

branches/snap-stage3/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 five. Let’s break it down.
399+
While this is only five lines, they’re a dense four. Let’s break it down.
400400

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

branches/snap-stage3/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.1.0"
30+
version = "0.0.1"
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.1.0 (file:///home/you/projects/guessing_game)
49+
Compiling guessing_game v0.0.1 (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.1.0 (file:///home/you/projects/guessing_game)
61+
Compiling guessing_game v0.0.1 (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.1.0 (file:///home/you/projects/guessing_game)
730+
Compiling guessing_game v0.0.1 (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.1.0 (file:///home/you/projects/guessing_game)
795+
Compiling guessing_game v0.0.1 (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.1.0 (file:///home/you/projects/guessing_game)
932+
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
933933
Running `target/guessing_game`
934934
Guess the number!
935935
The secret number is: 61

branches/snap-stage3/src/doc/trpl/nightly-rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ $ sh rustup.sh --channel=nightly
2626
If you're on Windows, please download either the [32-bit installer][win32] or
2727
the [64-bit installer][win64] and run it.
2828

29-
[win32]: https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.msi
30-
[win64]: https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi
29+
[win32]: https://static.rust-lang.org/dist/rust-1.0.0-beta-i686-pc-windows-gnu.msi
30+
[win64]: https://static.rust-lang.org/dist/rust-1.0.0-beta-x86_64-pc-windows-gnu.msi
3131

3232
## Uninstalling
3333

branches/snap-stage3/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-
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 {
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+
}
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-
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 {
713+
if self.end == self.ptr {
714+
None
715+
} else {
716+
unsafe {
721717
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)