]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference |
0731742a | 2 | --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:6:5 |
94b46f34 | 3 | | |
532ac7d7 | 4 | LL | *t |
48663c56 | 5 | | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable |
9c376795 FG |
6 | | |
7 | help: consider changing this to be a mutable reference | |
8 | | | |
9 | LL | fn reborrow_mut<'a>(t: &'a mut &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | |
49aad941 | 10 | | +++ |
94b46f34 | 11 | |
48663c56 | 12 | error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference |
0731742a | 13 | --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6 |
94b46f34 | 14 | | |
532ac7d7 | 15 | LL | {*t} |
48663c56 | 16 | | ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable |
9c376795 FG |
17 | | |
18 | help: consider changing this to be a mutable reference | |
19 | | | |
20 | LL | fn copy_reborrow_mut<'a>(t: &'a mut &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy { | |
49aad941 | 21 | | +++ |
94b46f34 XL |
22 | |
23 | error: aborting due to 2 previous errors | |
24 | ||
48663c56 | 25 | For more information about this error, try `rustc --explain E0596`. |