1 error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable
2 --> $DIR/simple-struct-min-capture.rs:22:22
5 | -- mutable borrow occurs here
7 | --- capture is mutable because of use here
8 LL | println!("{:?}", p);
9 | - first borrow occurs due to use of `p` in closure
11 LL | println!("{:?}", p);
12 | ^ immutable borrow occurs here
15 | - mutable borrow later used here
17 = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
19 error: aborting due to previous error
21 For more information about this error, try `rustc --explain E0502`.