]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17545.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-17545.stderr
1 error[E0597]: borrowed value does not live long enough
2   --> $DIR/issue-17545.rs:17:10
3    |
4 LL |         &id(()), //~ ERROR borrowed value does not live long enough
5    |          ^^^^^^ temporary value does not live long enough
6 LL |     ));
7    |       - temporary value only lives until here
8    |
9 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 15:12...
10   --> $DIR/issue-17545.rs:15:12
11    |
12 LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
13    |            ^^
14    = note: consider using a `let` binding to increase its lifetime
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0597`.