]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/issue-17545.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / borrowck / issue-17545.stderr
1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/issue-17545.rs:7:10
3 |
4 LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
5 | -- lifetime `'a` defined here
6 LL | / bar.call((
7 LL | | &id(()),
8 | | ^^^^^^ creates a temporary value which is freed while still in use
9 LL | | ));
10 | | -- temporary value is freed at the end of this statement
11 | |______|
12 | argument requires that borrow lasts for `'a`
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0716`.