Skip to content

Commit 54bce8a

Browse files
committed
---
yaml --- r: 219005 b: refs/heads/snap-stage3 c: a3b19c8 h: refs/heads/master i: 219003: 300bf75 v: v3
1 parent edad65d commit 54bce8a

File tree

28 files changed

+234
-515
lines changed

28 files changed

+234
-515
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: ae74652b4a0e0e56a91d9a9dd71ab01e51131dc5
3+
refs/heads/snap-stage3: a3b19c8858ec6dd29d71fde7bc2d78b2ac386d34
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/doc/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ series of small examples.
2525
If you need help with something, or just want to talk about Rust with others,
2626
there are a few places you can do that:
2727

28-
The Rust IRC channels on [irc.mozilla.org](irc://irc.mozilla.org/) are the
28+
The Rust IRC channels on [irc.mozilla.org](http://irc.mozilla.org/) are the
2929
fastest way to get help.
3030
[`#rust`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) is
3131
the general discussion channel, and you'll find people willing to help you with
@@ -40,15 +40,15 @@ There's also
4040
[`#rust-internals`](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals), which is for discussion of the development of Rust itself.
4141

4242
You can also get help on [Stack
43-
Overflow](https://stackoverflow.com/questions/tagged/rust). Searching for your
43+
Overflow](http://stackoverflow.com/questions/tagged/rust). Searching for your
4444
problem might reveal someone who has asked it before!
4545

46-
There is an active [subreddit](https://reddit.com/r/rust) with lots of
46+
There is an active [subreddit](http://reddit.com/r/rust) with lots of
4747
discussion and news about Rust.
4848

49-
There is also a [user forum](https://users.rust-lang.org), for all
50-
user-oriented discussion, and a [developer
51-
forum](https://internals.rust-lang.org/), where the development of Rust
49+
There is also a [user forum](http://users.rust-lang.org), for all
50+
user-oriented discussion, and a [developer
51+
forum](http://internals.rust-lang.org/), where the development of Rust
5252
itself is discussed.
5353

5454
# Specification
@@ -61,7 +61,7 @@ the language in as much detail as possible is in [the reference](reference.html)
6161
Rust is still a young language, so there isn't a ton of tooling yet, but the
6262
tools we have are really nice.
6363

64-
[Cargo](https://crates.io) is Rust's package manager, and its website contains
64+
[Cargo](http://crates.io) is Rust's package manager, and its website contains
6565
lots of good documentation.
6666

6767
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.

branches/snap-stage3/src/doc/trpl/for-loops.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -41,45 +41,3 @@ so our loop will print `0` through `9`, not `10`.
4141
Rust does not have the “C-style” `for` loop on purpose. Manually controlling
4242
each element of the loop is complicated and error prone, even for experienced C
4343
developers.
44-
45-
# Enumerate
46-
47-
When you need to keep track of how many times you already looped, you can use the `.enumerate()` function.
48-
49-
## On ranges:
50-
51-
```rust
52-
for (i,j) in (5..10).enumerate() {
53-
println!("i = {} and j = {}", i, j);
54-
}
55-
```
56-
57-
Outputs:
58-
59-
```text
60-
i = 0 and j = 5
61-
i = 1 and j = 6
62-
i = 2 and j = 7
63-
i = 3 and j = 8
64-
i = 4 and j = 9
65-
```
66-
67-
Don't forget to add the parentheses around the range.
68-
69-
## On iterators:
70-
71-
```rust
72-
# let lines = "hello\nworld".lines();
73-
for (linenumber, line) in lines.enumerate() {
74-
println!("{}: {}", linenumber, line);
75-
}
76-
```
77-
78-
Outputs:
79-
80-
```text
81-
0: Content of line one
82-
1: Content of line two
83-
2: Content of line tree
84-
3: Content of line four
85-
```

branches/snap-stage3/src/doc/trpl/hello-cargo.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ $ mv main.rs src/main.rs
3333
```
3434

3535
Note that since we're creating an executable, we used `main.rs`. If we
36-
want to make a library instead, we should use `lib.rs`. This convention is required
37-
for Cargo to successfully compile our projects, but it can be overridden if we wish.
36+
want to make a library instead, we should use `lib.rs`.
3837
Custom file locations for the entry point can be specified
3938
with a [`[[lib]]` or `[[bin]]`][crates-custom] key in the TOML file described below.
4039

@@ -63,17 +62,18 @@ version = "0.0.1"
6362
authors = [ "Your name <[email protected]>" ]
6463
```
6564

66-
This file is in the [TOML][toml] format. TOML is similar to INI, but has some
67-
extra goodies. According to the TOML docs,
65+
This file is in the [TOML][toml] format. Let’s let it explain itself to you:
6866

6967
> TOML aims to be a minimal configuration file format that's easy to read due
7068
> to obvious semantics. TOML is designed to map unambiguously to a hash table.
7169
> TOML should be easy to parse into data structures in a wide variety of
7270
> languages.
7371
72+
TOML is very similar to INI, but with some extra goodies.
73+
7474
[toml]: https://github.com/toml-lang/toml
7575

76-
Once you have this file in place, we should be ready to build! To do so, run:
76+
Once you have this file in place, we should be ready to build! Try this:
7777

7878
```bash
7979
$ cargo build
@@ -82,7 +82,7 @@ $ ./target/debug/hello_world
8282
Hello, world!
8383
```
8484

85-
Bam! We built our project with `cargo build`, and ran it with
85+
Bam! We build our project with `cargo build`, and run it with
8686
`./target/debug/hello_world`. We can do both in one step with `cargo run`:
8787

8888
```bash
@@ -103,9 +103,9 @@ Hello, world!
103103
```
104104

105105
This hasn’t bought us a whole lot over our simple use of `rustc`, but think
106-
about the future: when our project gets more complex, we need to do more
106+
about the future: when our project gets more complex, we would need to do more
107107
things to get all of the parts to properly compile. With Cargo, as our project
108-
grows, we can just run `cargo build`, and it’ll work the right way.
108+
grows, we can just `cargo build`, and it’ll work the right way.
109109

110110
When your project is finally ready for release, you can use
111111
`cargo build --release` to compile your project with optimizations.
@@ -118,7 +118,7 @@ name = "hello_world"
118118
version = "0.0.1"
119119
```
120120

121-
The `Cargo.lock` file is used by Cargo to keep track of dependencies in your application.
121+
This file is used by Cargo to keep track of dependencies in your application.
122122
Right now, we don’t have any, so it’s a bit sparse. You won't ever need
123123
to touch this file yourself, just let Cargo handle it.
124124

@@ -170,7 +170,7 @@ This is all we need to get started. First, let’s check out `Cargo.toml`:
170170
[package]
171171

172172
name = "hello_world"
173-
version = "0.1.0"
173+
version = "0.0.1"
174174
authors = ["Your Name <[email protected]>"]
175175
```
176176

branches/snap-stage3/src/doc/trpl/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ more" match. Both forms optionally include a separator, which can be any token
224224
except `+` or `*`.
225225

226226
This system is based on
227-
"[Macro-by-Example](https://www.cs.indiana.edu/ftp/techreports/TR206.pdf)"
227+
"[Macro-by-Example](http://www.cs.indiana.edu/ftp/techreports/TR206.pdf)"
228228
(PDF link).
229229

230230
# Hygiene
@@ -319,7 +319,7 @@ syntax context where it was introduced. It’s as though the variable `state`
319319
inside `main` is painted a different "color" from the variable `state` inside
320320
the macro, and therefore they don’t conflict.
321321

322-
[hygienic macro system]: https://en.wikipedia.org/wiki/Hygienic_macro
322+
[hygienic macro system]: http://en.wikipedia.org/wiki/Hygienic_macro
323323

324324
This also restricts the ability of macros to introduce new bindings at the
325325
invocation site. Code such as the following will not work:
@@ -622,7 +622,7 @@ invocation gives you another opportunity to pattern-match the macro’s
622622
arguments.
623623

624624
As an extreme example, it is possible, though hardly advisable, to implement
625-
the [Bitwise Cyclic Tag](https://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
625+
the [Bitwise Cyclic Tag](http://esolangs.org/wiki/Bitwise_Cyclic_Tag) automaton
626626
within Rust’s macro system.
627627

628628
```rust

branches/snap-stage3/src/doc/trpl/references-and-borrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ First, any borrow must last for a smaller scope than the owner. Second, you may
155155
have one or the other of these two kinds of borrows, but not both at the same
156156
time:
157157

158-
* one or more references (`&T`) to a resource.
158+
* 0 to N references (`&T`) to a resource.
159159
* exactly one mutable reference (`&mut T`)
160160

161161

branches/snap-stage3/src/liballoc/arc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ use heap::deallocate;
9898
/// increase the reference counter.
9999
///
100100
/// ```
101-
/// # #![feature(alloc, core)]
102101
/// use std::sync::Arc;
103102
/// use std::thread;
104103
///
@@ -297,7 +296,6 @@ impl<T: ?Sized> Clone for Arc<T> {
297296
/// # Examples
298297
///
299298
/// ```
300-
/// # #![feature(alloc)]
301299
/// use std::sync::Arc;
302300
///
303301
/// let five = Arc::new(5);
@@ -392,7 +390,6 @@ impl<T: ?Sized> Drop for Arc<T> {
392390
/// # Examples
393391
///
394392
/// ```
395-
/// # #![feature(alloc)]
396393
/// use std::sync::Arc;
397394
///
398395
/// {

0 commit comments

Comments
 (0)