1error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement
2  --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:9
3   |
4LL |   fn foo(x: &()) {
5   |             --- this data with an anonymous lifetime `'_`...
6LL |       bar(|| {
7   |  _________^
8LL | |
9LL | |         let _ = x;
10LL | |     })
11   | |_____^ ...is captured here...
12   |
13note: ...and is required to live as long as `'static` here
14  --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
15   |
16LL |     bar(|| {
17   |     ^^^
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0759`.
22