]> git.proxmox.com Git - rustc.git/blob - src/test/ui/closures/2229_closure_analysis/diagnostics/borrowck/borrowck-4.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / closures / 2229_closure_analysis / diagnostics / borrowck / borrowck-4.stderr
1 error[E0373]: closure may outlive the current function, but it borrows `p`, which is owned by the current function
2 --> $DIR/borrowck-4.rs:10:17
3 |
4 LL | let mut c = || {
5 | ^^ may outlive borrowed value `p`
6 ...
7 LL | println!("{:?}", p);
8 | - `p` is borrowed here
9 |
10 note: closure is returned here
11 --> $DIR/borrowck-4.rs:15:5
12 |
13 LL | c
14 | ^
15 help: to force the closure to take ownership of `p` (and any other referenced variables), use the `move` keyword
16 |
17 LL | let mut c = move || {
18 | ++++
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0373`.