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