1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/issue-17545.rs:7:10
4 LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
5 | -- lifetime `'a` defined here
8 | | ^^^^^^ creates a temporary value which is freed while still in use
10 | | -- temporary value is freed at the end of this statement
12 | argument requires that borrow lasts for `'a`
14 error: aborting due to previous error
16 For more information about this error, try `rustc --explain E0716`.