error[E0499]: cannot borrow `*f` as mutable more than once at a time --> $DIR/two-phase-nonrecv-autoref.rs:70:11 | LL | f(f(10)); | --^----- | | | | | second mutable borrow occurs here | first mutable borrow occurs here | borrow later used here error[E0382]: use of moved value: `*f` --> $DIR/two-phase-nonrecv-autoref.rs:79:11 | LL | f(f(10)); | - ^ value used here after move | | | value moved here error[E0499]: cannot borrow `*f` as mutable more than once at a time --> $DIR/two-phase-nonrecv-autoref.rs:86:11 | LL | f(f(10)); | --^----- | | | | | second mutable borrow occurs here | first mutable borrow occurs here | borrow later used here error[E0161]: cannot move a value of type dyn std::ops::FnOnce(i32) -> i32: the size of dyn std::ops::FnOnce(i32) -> i32 cannot be statically determined --> $DIR/two-phase-nonrecv-autoref.rs:95:9 | LL | f(f(10)); | ^ error[E0161]: cannot move a value of type dyn std::ops::FnOnce(i32) -> i32: the size of dyn std::ops::FnOnce(i32) -> i32 cannot be statically determined --> $DIR/two-phase-nonrecv-autoref.rs:95:11 | LL | f(f(10)); | ^ error[E0382]: use of moved value: `*f` --> $DIR/two-phase-nonrecv-autoref.rs:95:11 | LL | f(f(10)); | - ^ value used here after move | | | value moved here error[E0502]: cannot borrow `a` as immutable because it is also borrowed as mutable --> $DIR/two-phase-nonrecv-autoref.rs:139:27 | LL | double_access(&mut a, &a); | ----------------------^^- | | | | | | | immutable borrow occurs here | | mutable borrow occurs here | borrow later used here error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable --> $DIR/two-phase-nonrecv-autoref.rs:167:7 | LL | i[i[3]] = 4; | --^---- | | | | | immutable borrow occurs here | mutable borrow occurs here | borrow later used here error[E0502]: cannot borrow `i` as immutable because it is also borrowed as mutable --> $DIR/two-phase-nonrecv-autoref.rs:173:7 | LL | i[i[3]] = i[4]; | --^---- | | | | | immutable borrow occurs here | mutable borrow occurs here | borrow later used here error: aborting due to 9 previous errors Some errors occurred: E0161, E0382, E0499, E0502. For more information about an error, try `rustc --explain E0161`.