error[E0759]: `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:9 | LL | fn foo(x: &()) { | --- this data with an anonymous lifetime `'_`... LL | bar(|| { | _________^ LL | | LL | | let _ = x; LL | | }) | |_____^ ...is used here... | note: ...and is required to live as long as `'static` here --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5 | LL | bar(|| { | ^^^ note: `'static` lifetime requirement introduced by this bound --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:1:39 | LL | fn bar(blk: F) where F: FnOnce() + 'static { | ^^^^^^^ error: aborting due to previous error For more information about this error, try `rustc --explain E0759`.