summary refs log tree commit diff
path: root/src/test/ui/issues/issue-17545.stderr
blob: 62ec25e1d1a4fa83a494a7a665920dc1f82f0663 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
error[E0597]: borrowed value does not live long enough
  --> $DIR/issue-17545.rs:7: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 5:12...
  --> $DIR/issue-17545.rs:5:12
   |
LL | pub fn foo<'a, F: Fn(&'a ())>(bar: F) {
   |            ^^
   = note: consider using a `let` binding to increase its lifetime

error: aborting due to previous error

For more information about this error, try `rustc --explain E0597`.