File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3419,7 +3419,7 @@ let y = &mut x;
3419
3419
Rust will complain:
3420
3420
3421
3421
``` {ignore,notrust}
3422
- 6:19 error: cannot borrow immutable local variable `x` as mutable
3422
+ error: cannot borrow immutable local variable `x` as mutable
3423
3423
let y = &mut x;
3424
3424
^
3425
3425
```
@@ -3734,10 +3734,10 @@ let y = &mut x;
3734
3734
This gives us this error:
3735
3735
3736
3736
``` {notrust,ignore}
3737
- 8:7 error: cannot use `*x` because it was mutably borrowed
3737
+ error: cannot use `*x` because it was mutably borrowed
3738
3738
*x;
3739
3739
^~
3740
- 6:19 note: borrow of `x` occurs here
3740
+ note: borrow of `x` occurs here
3741
3741
let y = &mut x;
3742
3742
^
3743
3743
```
@@ -4530,8 +4530,8 @@ So this would give us the numbers from `2-100`. Well, almost! If you
4530
4530
compile the example, you'll get a warning:
4531
4531
4532
4532
``` {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
4535
4535
range(1i, 100i).map(|x| x + 1i);
4536
4536
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4537
4537
```
You can’t perform that action at this time.
0 commit comments