blob: 50a4b3f7f3e82b9c1804537c4e611d21bac901e3 [file] [log] [blame]
error[E0597]: borrowed value does not live long enough
--> $DIR/issue-17545.rs:17:10
|
LL | &id(()), //~ ERROR borrowed value does not live long enough
| ^^^^^^ temporary value does not live long enough
LL | ));
| - temporary value only lives until here
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:12...
--> $DIR/issue-17545.rs:15:12
|
LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.