Skip to content

Commit 9be04d5

Browse files
committed
Guide: drop line-number cruft from elided error examples
1 parent c7182ba commit 9be04d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/doc/guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3419,7 +3419,7 @@ let y = &mut x;
34193419
Rust will complain:
34203420

34213421
```{ignore,notrust}
3422-
6:19 error: cannot borrow immutable local variable `x` as mutable
3422+
error: cannot borrow immutable local variable `x` as mutable
34233423
let y = &mut x;
34243424
^
34253425
```
@@ -3734,10 +3734,10 @@ let y = &mut x;
37343734
This gives us this error:
37353735

37363736
```{notrust,ignore}
3737-
8:7 error: cannot use `*x` because it was mutably borrowed
3737+
error: cannot use `*x` because it was mutably borrowed
37383738
*x;
37393739
^~
3740-
6:19 note: borrow of `x` occurs here
3740+
note: borrow of `x` occurs here
37413741
let y = &mut x;
37423742
^
37433743
```
@@ -4530,8 +4530,8 @@ So this would give us the numbers from `2-100`. Well, almost! If you
45304530
compile the example, you'll get a warning:
45314531

45324532
```{notrust,ignore}
4533-
2:37 warning: unused result which must be used: iterator adaptors are lazy and
4534-
do nothing unless consumed, #[warn(unused_must_use)] on by default
4533+
warning: unused result which must be used: iterator adaptors are lazy and
4534+
do nothing unless consumed, #[warn(unused_must_use)] on by default
45354535
range(1i, 100i).map(|x| x + 1i);
45364536
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45374537
```

0 commit comments

Comments
 (0)