Skip to content

Commit 7d140aa

Browse files
committed
---
yaml --- r: 209787 b: refs/heads/try c: bf13103 h: refs/heads/master i: 209785: 2557c9f 209783: f51b1b2 v: v3
1 parent ed95e08 commit 7d140aa

File tree

382 files changed

+8822
-4762
lines changed

Some content is hidden

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

382 files changed

+8822
-4762
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: bd8101d698cc0f599ff10f9b5550716502bb1e91
5+
refs/heads/try: bf1310389ed2f2bbff529929e1606b59c8a20dfa
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.1.0
16+
CFG_RELEASE_NUM=1.0.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
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.1
21+
CFG_PRERELEASE_VERSION=.3
2222

2323
CFG_FILENAME_EXTRA=4e7c5e5c
2424

branches/try/src/doc/trpl/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ is the first. After this:
2424
* [Syntax and Semantics][ss] - Each bit of Rust, broken down into small chunks.
2525
* [Nightly Rust][nr] - Cutting-edge features that aren’t in stable builds yet.
2626
* [Glossary][gl] - A reference of terms used in the book.
27-
* [Academic Research][ar] - Literature that influenced Rust.
2827

2928
[gs]: getting-started.html
3029
[lr]: learn-rust.html
3130
[er]: effective-rust.html
3231
[ss]: syntax-and-semantics.html
3332
[nr]: nightly-rust.html
3433
[gl]: glossary.html
35-
[ar]: academic-research.html
3634

3735
After reading this introduction, you’ll want to dive into either ‘Learn Rust’
3836
or ‘Syntax and Semantics’, depending on your preference: ‘Learn Rust’ if you

branches/try/src/doc/trpl/SUMMARY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* [The Stack and the Heap](the-stack-and-the-heap.md)
1010
* [Debug and Display](debug-and-display.md)
1111
* [Testing](testing.md)
12-
* [Conditional Compilation](conditional-compilation.md)
1312
* [Documentation](documentation.md)
1413
* [Iterators](iterators.md)
1514
* [Concurrency](concurrency.md)
@@ -44,17 +43,18 @@
4443
* [Closures](closures.md)
4544
* [Universal Function Call Syntax](ufcs.md)
4645
* [Crates and Modules](crates-and-modules.md)
47-
* [`const` and `static`](const-and-static.md)
46+
* [`static`](static.md)
47+
* [`const`](const.md)
4848
* [Tuple Structs](tuple-structs.md)
4949
* [Attributes](attributes.md)
50+
* [Conditional Compilation](conditional-compilation.md)
5051
* [`type` aliases](type-aliases.md)
5152
* [Casting between types](casting-between-types.md)
5253
* [Associated Types](associated-types.md)
5354
* [Unsized Types](unsized-types.md)
5455
* [Deref coercions](deref-coercions.md)
5556
* [Macros](macros.md)
5657
* [Raw Pointers](raw-pointers.md)
57-
* [`unsafe`](unsafe.md)
5858
* [Nightly Rust](nightly-rust.md)
5959
* [Compiler Plugins](compiler-plugins.md)
6060
* [Inline Assembly](inline-assembly.md)

branches/try/src/doc/trpl/associated-types.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
% Associated Types
22

3-
Associated types are a powerful part of Rusts type system. Theyre related to
4-
the idea of a type family, in other words, grouping multiple types together. That
5-
description is a bit abstract, so lets dive right into an example. If you want
3+
Associated types are a powerful part of Rust's type system. They're related to
4+
the idea of a 'type family', in other words, grouping multiple types together. That
5+
description is a bit abstract, so let's dive right into an example. If you want
66
to write a `Graph` trait, you have two types to be generic over: the node type
77
and the edge type. So you might write a trait, `Graph<N, E>`, that looks like
88
this:
@@ -48,11 +48,11 @@ fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> uint { ... }
4848

4949
No need to deal with the `E`dge type here!
5050

51-
Lets go over all this in more detail.
51+
Let's go over all this in more detail.
5252

5353
## Defining associated types
5454

55-
Lets build that `Graph` trait. Heres the definition:
55+
Let's build that `Graph` trait. Here's the definition:
5656

5757
```rust
5858
trait Graph {
@@ -86,7 +86,7 @@ trait Graph {
8686
## Implementing associated types
8787

8888
Just like any trait, traits that use associated types use the `impl` keyword to
89-
provide implementations. Heres a simple implementation of Graph:
89+
provide implementations. Here's a simple implementation of Graph:
9090

9191
```rust
9292
# trait Graph {
@@ -118,13 +118,13 @@ impl Graph for MyGraph {
118118
This silly implementation always returns `true` and an empty `Vec<Edge>`, but it
119119
gives you an idea of how to implement this kind of thing. We first need three
120120
`struct`s, one for the graph, one for the node, and one for the edge. If it made
121-
more sense to use a different type, that would work as well, were just going to
121+
more sense to use a different type, that would work as well, we're just going to
122122
use `struct`s for all three here.
123123

124124
Next is the `impl` line, which is just like implementing any other trait.
125125

126126
From here, we use `=` to define our associated types. The name the trait uses
127-
goes on the left of the `=`, and the concrete type were `impl`ementing this
127+
goes on the left of the `=`, and the concrete type we're `impl`ementing this
128128
for goes on the right. Finally, we use the concrete types in our function
129129
declarations.
130130

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,3 @@
11
% Attributes
22

3-
Declarations can be annotated with ‘attributes’ in Rust. They look like this:
4-
5-
```rust
6-
#[test]
7-
# fn foo() {}
8-
```
9-
10-
or like this:
11-
12-
```rust
13-
# mod foo {
14-
#![test]
15-
# }
16-
```
17-
18-
The difference between the two is the `!`, which changes what the attribute
19-
applies to:
20-
21-
```rust,ignore
22-
#[foo]
23-
struct Foo;
24-
25-
mod bar {
26-
#![bar]
27-
}
28-
```
29-
30-
The `#[foo]` attribute applies to the next item, which is the `struct`
31-
declaration. The `#![bar]` attribute applies to the item enclosing it, which is
32-
the `mod` declaration. Otherwise, they’re the same. Both change the meaning of
33-
the item they’re attached to somehow.
34-
35-
For example, consider a function like this:
36-
37-
```rust
38-
#[test]
39-
fn check() {
40-
assert_eq!(2, 1 + 1);
41-
}
42-
```
43-
44-
It is marked with `#[test]`. This means it’s special: when you run
45-
[tests][tests], this function will execute. When you compile as usual, it won’t
46-
even be included. This function is now a test function.
47-
48-
[tests]: testing.html
49-
50-
Attributes may also have additional data:
51-
52-
```rust
53-
#[inline(always)]
54-
fn super_fast_fn() {
55-
# }
56-
```
57-
58-
Or even keys and values:
59-
60-
```rust
61-
#[cfg(target_os = "macos")]
62-
mod macos_only {
63-
# }
64-
```
65-
66-
Rust attributes are used for a number of different things. There is a full list
67-
of attributes [in the reference][reference]. Currently, you are not allowed to
68-
create your own attributes, the Rust compiler defines them.
69-
70-
[reference]: reference.html#attributes
3+
Coming Soon!

branches/try/src/doc/trpl/casting-between-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let b = a as u32; // four eights makes 32
3333

3434
It’s a ‘non-scalar cast’ because we have multiple values here: the four
3535
elements of the array. These kinds of casts are very dangerous, because they
36-
make assumptions about the way that multiple underlying structures are
36+
make assumptions about the way that multiple underlying strucutres are
3737
implemented. For this, we need something more dangerous.
3838

3939
# `transmute`
@@ -59,7 +59,7 @@ unsafe {
5959
}
6060
```
6161

62-
We have to wrap the operation in an `unsafe` block for this to compile
62+
We have to wrap the operation in an `unsafe` block, but this will compile
6363
successfully. Technically, only the `mem::transmute` call itself needs to be in
6464
the block, but it's nice in this case to enclose everything related, so you
6565
know where to look. In this case, the details about `a` are also important, and

0 commit comments

Comments
 (0)