11error[E0499]: cannot borrow `*f` as mutable more than once at a time
2- --> $DIR/two-phase-nonrecv-autoref.rs:50 :11
2+ --> $DIR/two-phase-nonrecv-autoref.rs:51 :11
33 |
44LL | f(f(10));
55 | - ^ second mutable borrow occurs here
@@ -8,7 +8,7 @@ LL | f(f(10));
88 | first borrow later used by call
99
1010error[E0382]: use of moved value: `f`
11- --> $DIR/two-phase-nonrecv-autoref.rs:57 :11
11+ --> $DIR/two-phase-nonrecv-autoref.rs:58 :11
1212 |
1313LL | fn twice_ten_so<F: FnOnce(i32) -> i32>(f: Box<F>) {
1414 | - move occurs because `f` has type `Box<F>`, which does not implement the `Copy` trait
@@ -18,7 +18,7 @@ LL | f(f(10));
1818 | value moved here
1919
2020error[E0499]: cannot borrow `*f` as mutable more than once at a time
21- --> $DIR/two-phase-nonrecv-autoref.rs:62 :11
21+ --> $DIR/two-phase-nonrecv-autoref.rs:63 :11
2222 |
2323LL | f(f(10));
2424 | - ^ second mutable borrow occurs here
@@ -27,7 +27,7 @@ LL | f(f(10));
2727 | first borrow later used by call
2828
2929error[E0382]: use of moved value: `f`
30- --> $DIR/two-phase-nonrecv-autoref.rs:69 :11
30+ --> $DIR/two-phase-nonrecv-autoref.rs:70 :11
3131 |
3232LL | fn twice_ten_oo(f: Box<dyn FnOnce(i32) -> i32>) {
3333 | - move occurs because `f` has type `Box<dyn FnOnce(i32) -> i32>`, which does not implement the `Copy` trait
@@ -37,7 +37,7 @@ LL | f(f(10));
3737 | value moved here
3838
3939error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable
40- --> $DIR/two-phase-nonrecv-autoref.rs:107 :27
40+ --> $DIR/two-phase-nonrecv-autoref.rs:108 :27
4141 |
4242LL | double_access(&mut a, &a);
4343 | ------------- ------ ^^ immutable borrow occurs here
@@ -46,7 +46,7 @@ LL | double_access(&mut a, &a);
4646 | mutable borrow later used by call
4747
4848error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable
49- --> $DIR/two-phase-nonrecv-autoref.rs:132 :7
49+ --> $DIR/two-phase-nonrecv-autoref.rs:133 :7
5050 |
5151LL | i[i[3]] = 4;
5252 | --^----
@@ -56,18 +56,18 @@ LL | i[i[3]] = 4;
5656 | mutable borrow occurs here
5757 |
5858help: try adding a local storing this...
59- --> $DIR/two-phase-nonrecv-autoref.rs:132 :8
59+ --> $DIR/two-phase-nonrecv-autoref.rs:133 :8
6060 |
6161LL | i[i[3]] = 4;
6262 | ^^^
6363help: ...and then using that local here
64- --> $DIR/two-phase-nonrecv-autoref.rs:132 :6
64+ --> $DIR/two-phase-nonrecv-autoref.rs:133 :6
6565 |
6666LL | i[i[3]] = 4;
6767 | ^^^^^^
6868
6969error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable
70- --> $DIR/two-phase-nonrecv-autoref.rs:138 :7
70+ --> $DIR/two-phase-nonrecv-autoref.rs:139 :7
7171 |
7272LL | i[i[3]] = i[4];
7373 | --^----
@@ -77,12 +77,12 @@ LL | i[i[3]] = i[4];
7777 | mutable borrow occurs here
7878 |
7979help: try adding a local storing this...
80- --> $DIR/two-phase-nonrecv-autoref.rs:138 :8
80+ --> $DIR/two-phase-nonrecv-autoref.rs:139 :8
8181 |
8282LL | i[i[3]] = i[4];
8383 | ^^^
8484help: ...and then using that local here
85- --> $DIR/two-phase-nonrecv-autoref.rs:138 :6
85+ --> $DIR/two-phase-nonrecv-autoref.rs:139 :6
8686 |
8787LL | i[i[3]] = i[4];
8888 | ^^^^^^
0 commit comments