fork/rust
git clone https://git.julia.blue/fork/rust
5e1a799842b
1.41.0
1error[E0505]: cannot move out of `fancy_num` because it is borrowed 2 --> $DIR/E0504.rs:9:13 3 | 4LL | let fancy_ref = &fancy_num; 5 | ---------- borrow of `fancy_num` occurs here 6LL | 7LL | let x = move || { 8 | ^^^^^^^ move out of `fancy_num` occurs here 9LL | println!("child function: {}", fancy_num.num); 10 | --------- move occurs due to use in closure 11... 12LL | println!("main function: {}", fancy_ref.num); 13 | ------------- borrow later used here 14 15error: aborting due to previous error 16 17For more information about this error, try `rustc --explain E0505`.