Skip to content

Commit 54af195

Browse files
committed
---
yaml --- r: 225015 b: refs/heads/stable c: 5f39ceb h: refs/heads/master i: 225013: e761169 225011: 5c7a995 225007: c92c70f v: v3
1 parent f571d68 commit 54af195

File tree

174 files changed

+2780
-4406
lines changed

Some content is hidden

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

174 files changed

+2780
-4406
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 2e7d7bc05db986b9747c7e8b2a766165ab5faeab
32+
refs/heads/stable: 5f39ceb729e3bb209e9cf52701fe4424e7431ca0
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Aaron Raimist <[email protected]>
88
Aaron Todd <[email protected]>
99
Aaron Turon <[email protected]>
1010
Aaron Weiss <[email protected]>
11-
Abhishek Chanda <abhishek.becs@gmail.com>
11+
Abhishek Chanda <abhishek@cloudscaling.com>
1212
Adam Bozanich <[email protected]>
1313
Adam Jacob <[email protected]>
1414
Adam Roben <[email protected]>

branches/stable/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/stable/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.2.0
16+
CFG_RELEASE_NUM=1.1.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/stable/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ feature.
7979
A nice replacement is the [lazy constructor macro][lcm] by [Marvin
8080
Löbel][kim].
8181

82-
[fqa]: http://yosefk.com/c++fqa/ctors.html#fqa-10.12
82+
[fqa]: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003815.html
8383
[elp]: http://ericlippert.com/2013/02/06/static-constructors-part-one/
8484
[lcm]: https://gist.github.com/Kimundi/8782487
8585
[kim]: https://github.com/Kimundi

branches/stable/src/doc/complement-lang-faq.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
There aren't many large programs yet. The Rust [compiler][rustc], 60,000+ lines at the time of writing, is written in Rust. As the oldest body of Rust code it has gone through many iterations of the language, and some parts are nicer to look at than others. It may not be the best code to learn from, but [borrowck] and [resolve] were written recently.
66

77
[rustc]: https://github.com/rust-lang/rust/tree/master/src/librustc
8-
[resolve]: https://github.com/rust-lang/rust/tree/master/src/librustc_resolve
9-
[borrowck]: https://github.com/rust-lang/rust/tree/master/src/librustc_borrowck/borrowck
8+
[resolve]: https://github.com/rust-lang/rust/blob/master/src/librustc/middle/resolve.rs
9+
[borrowck]: https://github.com/rust-lang/rust/blob/master/src/librustc/middle/borrowck/
1010

1111
A research browser engine called [Servo][servo], currently 30,000+ lines across more than a dozen crates, will be exercising a lot of Rust's distinctive type-system and concurrency features, and integrating many native libraries.
1212

@@ -20,8 +20,8 @@ Some examples that demonstrate different aspects of the language:
2020
* The standard library's [json] module. Enums and pattern matching
2121

2222
[sprocketnes]: https://github.com/pcwalton/sprocketnes
23-
[hash]: https://github.com/rust-lang/rust/tree/master/src/libcore/hash
24-
[HashMap]: https://github.com/rust-lang/rust/tree/master/src/libstd/collections/hash
23+
[hash]: https://github.com/rust-lang/rust/blob/master/src/libstd/hash/mod.rs
24+
[HashMap]: https://github.com/rust-lang/rust/blob/master/src/libcollections/hashmap.rs
2525
[json]: https://github.com/rust-lang/rust/blob/master/src/libserialize/json.rs
2626

2727
You may also be interested in browsing [trending Rust repositories][github-rust] on GitHub.

branches/stable/src/doc/reference.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,9 +3529,7 @@ The actual implementation for each vtable entry can vary on an object-by-object
35293529
basis.
35303530

35313531
Note that for a trait object to be instantiated, the trait must be
3532-
_object-safe_. Object safety rules are defined in [RFC 255].
3533-
3534-
[RFC 255]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
3532+
_object-safe_. Object safety rules are defined in [RFC 255][rfc255].
35353533

35363534
Given a pointer-typed expression `E` of type `&T` or `Box<T>`, where `T`
35373535
implements trait `R`, casting `E` to the corresponding pointer type `&R` or

branches/stable/src/doc/trpl/closures.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ The second is that the syntax is similar, but a bit different. I’ve added spac
5454
here to make them look a little closer:
5555

5656
```rust
57-
fn plus_one_v1 (x: i32) -> i32 { x + 1 }
58-
let plus_one_v2 = |x: i32| -> i32 { x + 1 };
59-
let plus_one_v3 = |x: i32| x + 1 ;
57+
fn plus_one_v1 (x: i32 ) -> i32 { x + 1 }
58+
let plus_one_v2 = |x: i32 | -> i32 { x + 1 };
59+
let plus_one_v3 = |x: i32 | x + 1 ;
6060
```
6161

6262
Small differences, but they’re similar in ways.
@@ -136,7 +136,7 @@ This gives us:
136136
note: `nums` moved into closure environment here because it has type
137137
`[closure(()) -> collections::vec::Vec<i32>]`, which is non-copyable
138138
let takes_nums = || nums;
139-
^~~~~~~
139+
^~~~~~~
140140
```
141141

142142
`Vec<T>` has ownership over its contents, and therefore, when we refer to it
@@ -352,8 +352,8 @@ error: the trait `core::marker::Sized` is not implemented for the type
352352
factory() -> (Fn(i32) -> Vec<i32>) {
353353
^~~~~~~~~~~~~~~~~~~~~
354354
note: `core::ops::Fn(i32) -> collections::vec::Vec<i32>` does not have a constant size known at compile-time
355-
factory() -> (Fn(i32) -> Vec<i32>) {
356-
^~~~~~~~~~~~~~~~~~~~~
355+
fa ctory() -> (Fn(i32) -> Vec<i32>) {
356+
^~~~~~~~~~~~~~~~~~~~~
357357
358358
```
359359

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and more cores, yet many programmers aren't prepared to fully utilize them.
66

77
Rust's memory safety features also apply to its concurrency story too. Even
88
concurrent Rust programs must be memory safe, having no data races. Rust's type
9-
system is up to the task, and gives you powerful ways to reason about
9+
system is up to the thread, and gives you powerful ways to reason about
1010
concurrent code at compile time.
1111

1212
Before we talk about the concurrency features that come with Rust, it's important

branches/stable/src/doc/trpl/const-and-static.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ 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+
3436
Statics live for the entire lifetime of a program, and therefore any
35-
reference stored in a constant has a [`'static` lifetime][lifetimes]:
37+
reference stored in a constant has a [`static` lifetime][lifetimes]:
3638

3739
```rust
3840
static NAME: &'static str = "Steve";

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ a name is all we need. We choose the [`String`][string] type for the name,
7373
rather than `&str`. Generally speaking, working with a type which owns its
7474
data is easier than working with one that uses references.
7575

76-
[struct]: structs.html
77-
[string]: strings.html
78-
7976
Let’s continue:
8077

8178
```rust
@@ -320,7 +317,7 @@ from the standard library, and so we need to `use` it.
320317
We now print out two messages, with a `sleep_ms()` in the middle. This will
321318
simulate the time it takes a philosopher to eat.
322319

323-
If you run this program, you should see each philosopher eat in turn:
320+
If you run this program, You should see each philosopher eat in turn:
324321

325322
```text
326323
Baruch Spinoza is eating.
@@ -396,7 +393,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
396393
}).collect();
397394
```
398395

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

401398
```rust,ignore
402399
let handles: Vec<_> =
@@ -480,7 +477,7 @@ struct Table {
480477
}
481478
```
482479

483-
This `Table` has a vector of `Mutex`es. A mutex is a way to control
480+
This `Table` has an vector of `Mutex`es. A mutex is a way to control
484481
concurrency: only one thread can access the contents at once. This is exactly
485482
the property we need with our forks. We use an empty tuple, `()`, inside the
486483
mutex, since we’re not actually going to use the value, just hold onto it.

branches/stable/src/doc/trpl/enums.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ fn process_color_change(msg: Message) {
5555
}
5656
```
5757

58+
Both variants are named `Digit`, but since they’re scoped to the `enum` name
59+
there's no ambiguity.
60+
5861
Not supporting these operations may seem rather limiting, but it’s a limitation
5962
which we can overcome. There are two ways: by implementing equality ourselves,
6063
or by pattern matching variants with [`match`][match] expressions, which you’ll
@@ -63,4 +66,3 @@ equality yet, but we’ll find out in the [`traits`][traits] section.
6366

6467
[match]: match.html
6568
[if-let]: if-let.html
66-
[traits]: traits.html

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

Lines changed: 8 additions & 8 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
```
@@ -213,12 +213,12 @@ The next part will use this handle to get input from the user:
213213
```
214214

215215
Here, we call the [`read_line()`][read_line] method on our handle.
216-
[Methods][method] are like associated functions, but are only available on a
216+
[Method][method]s are like associated functions, but are only available on a
217217
particular instance of a type, rather than the type itself. We’re also passing
218218
one argument to `read_line()`: `&mut guess`.
219219

220220
[read_line]: ../std/io/struct.Stdin.html#method.read_line
221-
[method]: method-syntax.html
221+
[method]: methods.html
222222

223223
Remember how we bound `guess` above? We said it was mutable. However,
224224
`read_line` doesn’t take a `String` as an argument: it takes a `&mut String`.
@@ -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/stable/src/doc/trpl/installing-rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ $ sh rustup.sh
2323
If you're on Windows, please download either the [32-bit installer][win32] or
2424
the [64-bit installer][win64] and run it.
2525

26-
[win32]: https://static.rust-lang.org/dist/rust-1.0.0-i686-pc-windows-gnu.msi
27-
[win64]: https://static.rust-lang.org/dist/rust-1.0.0-x86_64-pc-windows-gnu.msi
26+
[win32]: https://static.rust-lang.org/dist/rust-1.0.0-beta-i686-pc-windows-gnu.msi
27+
[win64]: https://static.rust-lang.org/dist/rust-1.0.0-beta-x86_64-pc-windows-gnu.msi
2828

2929
## Uninstalling
3030

@@ -74,7 +74,7 @@ $ rustc --version
7474
You should see the version number, commit hash, commit date and build date:
7575

7676
```bash
77-
rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
77+
rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
7878
```
7979

8080
If you did, Rust has been installed successfully! Congrats!

branches/stable/src/doc/trpl/iterators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ loop is just a handy way to write this `loop`/`match`/`break` construct.
4242
`for` loops aren't the only thing that uses iterators, however. Writing your
4343
own iterator involves implementing the `Iterator` trait. While doing that is
4444
outside of the scope of this guide, Rust provides a number of useful iterators
45-
to accomplish various tasks. Before we talk about those, we should talk about a
45+
to accomplish various threads. Before we talk about those, we should talk about a
4646
Rust anti-pattern. And that's using ranges like this.
4747

4848
Yes, we just talked about how ranges are cool. But ranges are also very

branches/stable/src/doc/trpl/match.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ Unlike the previous uses of `match`, you can’t use the normal `if`
9797
statement to do this. You can use the [`if let`][if-let] statement,
9898
which can be seen as an abbreviated form of `match`.
9999

100-
[if-let]: if-let.html
100+
[if-let][if-let.html]

branches/stable/src/doc/trpl/method-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn main() {
156156

157157
This ‘associated function’ builds a new `Circle` for us. Note that associated
158158
functions are called with the `Struct::function()` syntax, rather than the
159-
`ref.method()` syntax. Some other languages call associated functions ‘static
159+
`ref.method()` syntax. Some other langauges call associated functions ‘static
160160
methods’.
161161

162162
# Builder Pattern

branches/stable/src/doc/trpl/mutability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let y = &mut x;
3535

3636
`y` is an immutable binding to a mutable reference, which means that you can’t
3737
bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s
38-
bound to `y` (`*y = 5`). A subtle distinction.
38+
bound to `y`. (`*y = 5`) A subtle distinction.
3939

4040
Of course, if you need both:
4141

branches/stable/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/stable/src/doc/trpl/patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ match x {
6666
}
6767
```
6868

69-
This prints `something else`.
69+
This prints `something else`
7070

7171
# Bindings
7272

@@ -152,7 +152,7 @@ match x {
152152
}
153153
```
154154

155-
This prints `Got an int!`.
155+
This prints `Got an int!`
156156

157157
# ref and ref mut
158158

branches/stable/src/doc/trpl/references-and-borrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ We can’t modify `v` because it’s borrowed by the loop.
297297
References must live as long as the resource they refer to. Rust will check the
298298
scopes of your references to ensure that this is true.
299299

300-
If Rust didn’t check this property, we could accidentally use a reference
300+
If Rust didn’t check that this property, we could accidentally use a reference
301301
which was invalid. For example:
302302

303303
```rust,ignore

branches/stable/src/doc/trpl/rust-inside-other-languages.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn process() {
104104
let handles: Vec<_> = (0..10).map(|_| {
105105
thread::spawn(|| {
106106
let mut _x = 0;
107-
for _ in (0..5_000_000) {
107+
for _ in (0..5_000_001) {
108108
_x += 1
109109
}
110110
})
@@ -217,7 +217,7 @@ end
217217

218218
Hello.process
219219

220-
puts "done!"
220+
puts "done!
221221
```
222222
223223
Before we can run this, we need to install the `ffi` gem:

branches/stable/src/doc/trpl/strings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Rust has two main types of strings: `&str` and `String`. Let’s talk about
1616
`&'static str`:
1717

1818
```rust
19-
let greeting = "Hello there."; // greeting: &'static str
19+
let string = "Hello there."; // string: &'static str
2020
```
2121

2222
This string is statically allocated, meaning that it’s saved inside our
23-
compiled program, and exists for the entire duration it runs. The `greeting`
23+
compiled program, and exists for the entire duration it runs. The `string`
2424
binding is a reference to this statically allocated string. String slices
2525
have a fixed size, and cannot be mutated.
2626

branches/stable/src/doc/trpl/structs.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,5 +196,3 @@ useful. For instance, a library may ask you to create a structure that
196196
implements a certain [trait][trait] to handle events. If you don’t have
197197
any data you need to store in the structure, you can just create a
198198
unit-like struct.
199-
200-
[trait]: traits.html

0 commit comments

Comments
 (0)