]> git.proxmox.com Git - rustc.git/blob - src/test/ui/error-codes/E0504.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / error-codes / E0504.stderr
1 error[E0505]: cannot move out of `fancy_num` because it is borrowed
2 --> $DIR/E0504.rs:9:13
3 |
4 LL | let fancy_ref = &fancy_num;
5 | ---------- borrow of `fancy_num` occurs here
6 LL |
7 LL | let x = move || {
8 | ^^^^^^^ move out of `fancy_num` occurs here
9 LL | println!("child function: {}", fancy_num.num);
10 | ------------- move occurs due to use in closure
11 ...
12 LL | println!("main function: {}", fancy_ref.num);
13 | ------------- borrow later used here
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0505`.