2018-01-11 17:08:28 -06:00
|
|
|
error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
|
2019-09-06 08:47:50 -05:00
|
|
|
--> $DIR/borrowed-referent-issue-38899.rs:11:21
|
2018-01-11 17:08:28 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let x = &mut block;
|
2018-01-11 17:08:28 -06:00
|
|
|
| ---------- mutable borrow occurs here
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | println!("{}", x.current);
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let p: &'a u8 = &*block.current;
|
2018-01-11 17:08:28 -06:00
|
|
|
| ^^^^^^^^^^^^^^^ immutable borrow occurs here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL |
|
2018-03-05 16:29:05 -06:00
|
|
|
LL | drop(x);
|
2018-09-29 05:47:47 -05:00
|
|
|
| - mutable borrow later used here
|
2018-01-11 17:08:28 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about this error, try `rustc --explain E0502`.
|