Skip to content

Commit 8ba5605

Browse files
committed
remove usage of notrust from the docs
Fixes rust-lang#19599
1 parent f7d18b9 commit 8ba5605

File tree

10 files changed

+75
-75
lines changed

10 files changed

+75
-75
lines changed

src/doc/guide-crates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ fn main() {
452452
453453
Rust will give us a compile-time error:
454454
455-
```{notrust,ignore}
455+
```{ignore}
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn main() {
7676

7777
This will give us an error:
7878

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

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

190190
gives
191191

192-
```{notrust,ignore}
192+
```{ignore}
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-
```{notrust,ignore}
133+
```{ignore}
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-
```{notrust,ignore}
409+
```{ignore}
410410
error: use of moved value: `car`
411411
Wheel { size: 360, owner: car };
412412
^~~

src/doc/guide-pointers.md

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

8585
This gives us an error:
8686

87-
```{notrust,ignore}
87+
```{ignore}
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
^
@@ -132,7 +132,7 @@ Pointers are useful in languages that are pass-by-value, rather than
132132
pass-by-reference. Basically, languages can make two choices (this is made
133133
up syntax, it's not Rust):
134134

135-
```{notrust,ignore}
135+
```{ignore}
136136
func foo(x) {
137137
x = 5
138138
}
@@ -152,7 +152,7 @@ and therefore, can change its value. At the comment, `i` will be `5`.
152152
So what do pointers have to do with this? Well, since pointers point to a
153153
location in memory...
154154

155-
```{notrust,ignore}
155+
```{ignore}
156156
func foo(&int x) {
157157
*x = 5
158158
}
@@ -179,7 +179,7 @@ but here are problems with pointers in other languages:
179179
Uninitialized pointers can cause a problem. For example, what does this program
180180
do?
181181

182-
```{notrust,ignore}
182+
```{ignore}
183183
&int x;
184184
*x = 5; // whoops!
185185
```
@@ -191,7 +191,7 @@ knows. This might be harmless, and it might be catastrophic.
191191
When you combine pointers and functions, it's easy to accidentally invalidate
192192
the memory the pointer is pointing to. For example:
193193

194-
```{notrust,ignore}
194+
```{ignore}
195195
func make_pointer(): &int {
196196
x = 5;
197197
@@ -213,7 +213,7 @@ As one last example of a big problem with pointers, **aliasing** can be an
213213
issue. Two pointers are said to alias when they point at the same location
214214
in memory. Like this:
215215

216-
```{notrust,ignore}
216+
```{ignore}
217217
func mutate(&int i, int j) {
218218
*i = j;
219219
}
@@ -398,7 +398,7 @@ fn main() {
398398

399399
It gives this error:
400400

401-
```{notrust,ignore}
401+
```{ignore}
402402
test.rs:5:8: 5:10 error: cannot assign to `*x` because it is borrowed
403403
test.rs:5 *x -= 1;
404404
^~
@@ -522,7 +522,7 @@ boxes, though. As a rough approximation, you can treat this Rust code:
522522

523523
As being similar to this C code:
524524

525-
```{notrust,ignore}
525+
```{ignore}
526526
{
527527
int *x;
528528
x = (int *)malloc(sizeof(int));
@@ -626,7 +626,7 @@ fn main() {
626626

627627
This prints:
628628

629-
```{notrust,ignore}
629+
```{ignore}
630630
Cons(1, box Cons(2, box Cons(3, box Nil)))
631631
```
632632

src/doc/guide-strings.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ for l in s.graphemes(true) {
181181

182182
This prints:
183183

184-
```{notrust,ignore}
184+
```{text}
185185
186186
n͈̰̎
187187
i̙̮͚̦
@@ -207,7 +207,7 @@ for l in s.chars() {
207207

208208
This prints:
209209

210-
```{notrust,ignore}
210+
```{text}
211211
u
212212
͔
213213
n
@@ -252,7 +252,7 @@ for l in s.bytes() {
252252

253253
This will print:
254254

255-
```{notrust,ignore}
255+
```{text}
256256
117
257257
205
258258
148

0 commit comments

Comments
 (0)