2018-05-06 16:54:00 -05:00
|
|
|
error[E0389]: cannot borrow data mutably in a `&` reference
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:6:5
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
|
|
|
|
| --------------- use `&'a mut &'a mut i32` here to make mutable
|
|
|
|
LL | *t //~ ERROR
|
|
|
|
| ^^ assignment into an immutable reference
|
|
|
|
|
|
|
|
error[E0389]: cannot borrow data mutably in a `&` reference
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6
|
2018-05-06 16:54:00 -05:00
|
|
|
|
|
|
|
|
LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
|
|
|
|
| --------------- use `&'a mut &'a mut i32` here to make mutable
|
|
|
|
LL | {*t} //~ ERROR
|
|
|
|
| ^^ assignment into an immutable reference
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0389`.
|