Skip to content

Commit

Permalink
Guide: drop line-number cruft from elided error examples
Browse files Browse the repository at this point in the history
  • Loading branch information
chastell committed Nov 4, 2014
1 parent c7182ba commit 9be04d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/doc/guide.md
Expand Up @@ -3419,7 +3419,7 @@ let y = &mut x;
Rust will complain:

```{ignore,notrust}
6:19 error: cannot borrow immutable local variable `x` as mutable
error: cannot borrow immutable local variable `x` as mutable
let y = &mut x;
^
```
Expand Down Expand Up @@ -3734,10 +3734,10 @@ let y = &mut x;
This gives us this error:

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

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

9 comments on commit 9be04d5

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at chastell@9be04d5

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chastell/rust/guide_pointer_fixes = 9be04d5 into auto

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chastell/rust/guide_pointer_fixes = 9be04d5 merged ok, testing candidate = 5d8aaae9

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at chastell@9be04d5

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chastell/rust/guide_pointer_fixes = 9be04d5 into auto

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chastell/rust/guide_pointer_fixes = 9be04d5 merged ok, testing candidate = ceeac26

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 9be04d5 Nov 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = ceeac26

Please sign in to comment.