Skip to content

Commit 1a61fe4

Browse files
committed
Test fixes and rebase conflicts from the rollup
1 parent 2457375 commit 1a61fe4

11 files changed

+62
-60
lines changed

src/doc/guide-crates.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ two languages for those phrases to be in. We'll use this module layout:
3232
+---------+ | +-----------+
3333
| +---| farewells |
3434
+---------+ | +-----------+
35-
| phrases |---+
35+
| phrases |---+
3636
+---------+ | +-----------+
3737
| +---| greetings |
3838
+----------+ | +-----------+
@@ -219,7 +219,7 @@ Put this in `src/english/greetings.rs`:
219219

220220
fn hello() -> String {
221221
"Hello!".to_string()
222-
}
222+
}
223223
```
224224

225225
Put this in `src/english/farewells.rs`:
@@ -229,7 +229,7 @@ Put this in `src/english/farewells.rs`:
229229

230230
fn goodbye() -> String {
231231
"Goodbye.".to_string()
232-
}
232+
}
233233
```
234234

235235
Put this in `src/japanese/greetings.rs`:
@@ -239,7 +239,7 @@ Put this in `src/japanese/greetings.rs`:
239239

240240
fn hello() -> String {
241241
"こんにちは".to_string()
242-
}
242+
}
243243
```
244244

245245
Of course, you can copy and paste this from this web page, or just type
@@ -253,7 +253,7 @@ Put this in `src/japanese/farewells.rs`:
253253

254254
fn goodbye() -> String {
255255
"さようなら".to_string()
256-
}
256+
}
257257
```
258258

259259
(This is "Sayoonara", if you're curious.)
@@ -381,11 +381,11 @@ $ cargo run
381381
/home/you/projects/phrases/src/japanese/greetings.rs:1:1: 3:2 warning: code is never used: `hello`, #[warn(dead_code)] on by default
382382
/home/you/projects/phrases/src/japanese/greetings.rs:1 fn hello() -> String {
383383
/home/you/projects/phrases/src/japanese/greetings.rs:2 "こんにちは".to_string()
384-
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
384+
/home/you/projects/phrases/src/japanese/greetings.rs:3 }
385385
/home/you/projects/phrases/src/japanese/farewells.rs:1:1: 3:2 warning: code is never used: `goodbye`, #[warn(dead_code)] on by default
386386
/home/you/projects/phrases/src/japanese/farewells.rs:1 fn goodbye() -> String {
387387
/home/you/projects/phrases/src/japanese/farewells.rs:2 "さようなら".to_string()
388-
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
388+
/home/you/projects/phrases/src/japanese/farewells.rs:3 }
389389
Running `target/phrases`
390390
Hello in English: Hello!
391391
Goodbye in English: Goodbye.
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{ignore}
455+
```{notrust}
456456
Compiling phrases v0.0.1 (file:///home/you/projects/phrases)
457457
/home/you/projects/phrases/src/main.rs:4:5: 4:40 error: a value named `hello` has already been imported in this module
458458
/home/you/projects/phrases/src/main.rs:4 use phrases::japanese::greetings::hello;

src/doc/guide-error-handling.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> The best-laid plans of mice and men
44
> Often go awry
5-
>
5+
>
66
> "Tae a Moose", Robert Burns
77
88
Sometimes, things just go wrong. It's important to have a plan for when the
@@ -76,7 +76,7 @@ fn main() {
7676

7777
This will give us an error:
7878

79-
```{ignore}
79+
```{notrust}
8080
error: non-exhaustive patterns: `_` not covered [E0004]
8181
```
8282

@@ -189,7 +189,7 @@ panic!("boom");
189189

190190
gives
191191

192-
```{ignore}
192+
```{notrust}
193193
task '<main>' panicked at 'boom', hello.rs:2
194194
```
195195

src/doc/guide-ownership.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn add_one(mut num: Box<int>) {
130130

131131
This does not compile, and gives us an error:
132132

133-
```{ignore}
133+
```{notrust}
134134
error: use of moved value: `x`
135135
println!("{}", x);
136136
^
@@ -406,7 +406,7 @@ fn main() {
406406
We try to make four `Wheel`s, each with a `Car` that it's attached to. But the
407407
compiler knows that on the second iteration of the loop, there's a problem:
408408

409-
```{ignore}
409+
```{notrust}
410410
error: use of moved value: `car`
411411
Wheel { size: 360, owner: car };
412412
^~~

src/doc/guide-pointers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ println!("{}", x + z);
8484

8585
This gives us an error:
8686

87-
```{ignore}
87+
```{notrust}
8888
hello.rs:6:24: 6:25 error: mismatched types: expected `int` but found `&int` (expected int but found &-ptr)
8989
hello.rs:6 println!("{}", x + z);
9090
^
@@ -398,7 +398,7 @@ fn main() {
398398

399399
It gives this error:
400400

401-
```{ignore}
401+
```{notrust}
402402
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
403403
test.rs:5 *x -= 1;
404404
^~

0 commit comments

Comments
 (0)