fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.0 KiB19 linesraw
1error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference
2  --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:6:5
3   |
4LL | fn reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
5   |                        --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32`
6LL |     *t
7   |     ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable
8
9error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference
10  --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6
11   |
12LL | fn copy_reborrow_mut<'a>(t: &'a &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
13   |                             --------------- help: consider changing this to be a mutable reference: `&'a mut &'a mut i32`
14LL |     {*t}
15   |      ^^ `t` is a `&` reference, so the data it refers to cannot be borrowed as mutable
16
17error: aborting due to 2 previous errors
18
19For more information about this error, try `rustc --explain E0596`.