2018-01-11 17:08:28 -06:00
|
|
|
error[E0502]: cannot borrow `*block.current` as immutable because it is also borrowed as mutable
|
2018-01-12 09:37:55 -06:00
|
|
|
--> $DIR/borrowed-referent-issue-38899.rs:24:21
|
2018-01-11 17:08:28 -06:00
|
|
|
|
|
2018-01-12 09:37:55 -06:00
|
|
|
22 | let x = &mut block;
|
2018-01-11 17:08:28 -06:00
|
|
|
| ---------- mutable borrow occurs here
|
2018-01-12 09:37:55 -06:00
|
|
|
23 | println!("{}", x.current);
|
|
|
|
24 | let p: &'a u8 = &*block.current;
|
2018-01-11 17:08:28 -06:00
|
|
|
| ^^^^^^^^^^^^^^^ immutable borrow occurs here
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0502"
|