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