Skip to content

Commit 385ac08

Browse files
committed
---
yaml --- r: 234286 b: refs/heads/tmp c: 9ea8f3e h: refs/heads/master v: v3
1 parent 6ea561f commit 385ac08

File tree

21 files changed

+736
-638
lines changed

21 files changed

+736
-638
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 06fb196256bbab1e7aa4f43daf45321efaa6e0eb
28+
refs/heads/tmp: 9ea8f3e2ddf281ce02985a0757c599a9b9971616
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,17 @@ And finally, we can try running it:
217217

218218
```bash
219219
$ ruby embed.rb
220+
Thread finished with count=5000000
221+
Thread finished with count=5000000
222+
Thread finished with count=5000000
223+
Thread finished with count=5000000
224+
Thread finished with count=5000000
225+
Thread finished with count=5000000
226+
Thread finished with count=5000000
227+
Thread finished with count=5000000
228+
Thread finished with count=5000000
229+
Thread finished with count=5000000
230+
done!
220231
done!
221232
$
222233
```

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Structs
22

3-
Structs are a way of creating more complex data types. For example, if we were
3+
`struct`s are a way of creating more complex data types. For example, if we were
44
doing calculations involving coordinates in 2D space, we would need both an `x`
55
and a `y` value:
66

@@ -9,7 +9,7 @@ let origin_x = 0;
99
let origin_y = 0;
1010
```
1111

12-
A struct lets us combine these two into a single, unified datatype:
12+
A `struct` lets us combine these two into a single, unified datatype:
1313

1414
```rust
1515
struct Point {
@@ -28,14 +28,14 @@ There’s a lot going on here, so let’s break it down. We declare a `struct` w
2828
the `struct` keyword, and then with a name. By convention, `struct`s begin with
2929
a capital letter and are camel cased: `PointInSpace`, not `Point_In_Space`.
3030

31-
We can create an instance of our struct via `let`, as usual, but we use a `key:
31+
We can create an instance of our `struct` via `let`, as usual, but we use a `key:
3232
value` style syntax to set each field. The order doesn’t need to be the same as
3333
in the original declaration.
3434

3535
Finally, because fields have names, we can access the field through dot
3636
notation: `origin.x`.
3737

38-
The values in structs are immutable by default, like other bindings in Rust.
38+
The values in `struct`s are immutable by default, like other bindings in Rust.
3939
Use `mut` to make them mutable:
4040

4141
```rust
@@ -91,7 +91,7 @@ fn main() {
9191
# Update syntax
9292

9393
A `struct` can include `..` to indicate that you want to use a copy of some
94-
other struct for some of the values. For example:
94+
other `struct` for some of the values. For example:
9595

9696
```rust
9797
struct Point3d {
@@ -121,7 +121,7 @@ let point = Point3d { z: 1, x: 2, .. origin };
121121
# Tuple structs
122122

123123
Rust has another data type that’s like a hybrid between a [tuple][tuple] and a
124-
struct, called a ‘tuple struct’. Tuple structs have a name, but
124+
`struct`, called a ‘tuple struct’. Tuple structs have a name, but
125125
their fields don’t:
126126

127127
```rust
@@ -140,7 +140,7 @@ let black = Color(0, 0, 0);
140140
let origin = Point(0, 0, 0);
141141
```
142142

143-
It is almost always better to use a struct than a tuple struct. We would write
143+
It is almost always better to use a `struct` than a tuple struct. We would write
144144
`Color` and `Point` like this instead:
145145

146146
```rust
@@ -158,7 +158,7 @@ struct Point {
158158
```
159159

160160
Now, we have actual names, rather than positions. Good names are important,
161-
and with a struct, we have actual names.
161+
and with a `struct`, we have actual names.
162162

163163
There _is_ one case when a tuple struct is very useful, though, and that’s a
164164
tuple struct with only one element. We call this the ‘newtype’ pattern, because
@@ -180,13 +180,13 @@ destructuring `let`, just as with regular tuples. In this case, the
180180

181181
# Unit-like structs
182182

183-
You can define a struct with no members at all:
183+
You can define a `struct` with no members at all:
184184

185185
```rust
186186
struct Electron;
187187
```
188188

189-
Such a struct is called ‘unit-like’ because it resembles the empty
189+
Such a `struct` is called ‘unit-like’ because it resembles the empty
190190
tuple, `()`, sometimes called ‘unit’. Like a tuple struct, it defines a
191191
new type.
192192

@@ -195,6 +195,6 @@ marker type), but in combination with other features, it can become
195195
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
198-
unit-like struct.
198+
unit-like `struct`.
199199

200200
[trait]: traits.html

branches/tmp/src/doc/trpl/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fn normal<T: ConvertTo<i64>>(x: &T) -> i64 {
390390

391391
// can be called with T == i64
392392
fn inverse<T>() -> T
393-
// this is using ConvertTo as if it were "ConvertFrom<i32>"
393+
// this is using ConvertTo as if it were "ConvertTo<i64>"
394394
where i32: ConvertTo<T> {
395395
42.convert()
396396
}

branches/tmp/src/librustc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#![feature(rustc_diagnostic_macros)]
5252
#![feature(rustc_private)]
5353
#![feature(scoped_tls)]
54-
#![feature(slice_bytes)]
5554
#![feature(slice_splits)]
5655
#![feature(slice_patterns)]
5756
#![feature(staged_api)]

0 commit comments

Comments
 (0)