blob: c4371d9d9cc901031f25fc42647a2791d5c0ac08 [file]
error[E0506]: cannot assign to `*refr` because it is borrowed
--> $DIR/cannot-assign-borrowed-ref-in-slice.rs:17:5
|
LL | save_ref(&*refr, &mut out);
| ------ `*refr` is borrowed here
...
LL | *refr = 3;
| ^^^^^^^^^ `*refr` is assigned to here but it was already borrowed
...
LL | println!("{:?}", out[0]);
| ------ borrow later used here
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0506`.