]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0504.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / error-codes / E0504.stderr
1 error[E0504]: cannot move `fancy_num` into closure because it is borrowed
2   --> $DIR/E0504.rs:20:40
3    |
4 LL |     let fancy_ref = &fancy_num;
5    |                      --------- borrow of `fancy_num` occurs here
6 ...
7 LL |         println!("child function: {}", fancy_num.num); //~ ERROR E0504
8    |                                        ^^^^^^^^^ move into closure occurs here
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0504`.