1 error[E0505]: cannot move out of `fancy_num` because it is borrowed
4 LL | let fancy_num = FancyNum { num: 5 };
5 | --------- binding `fancy_num` declared here
6 LL | let fancy_ref = &fancy_num;
7 | ---------- borrow of `fancy_num` occurs here
10 | ^^^^^^^ move out of `fancy_num` occurs here
11 LL | println!("child function: {}", fancy_num.num);
12 | ------------- move occurs due to use in closure
14 LL | println!("main function: {}", fancy_ref.num);
15 | ------------- borrow later used here
17 error: aborting due to previous error
19 For more information about this error, try `rustc --explain E0505`.