1 error[E0521]: borrowed data escapes outside of function
2 --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
5 | - - let's call the lifetime of this reference `'1`
7 | `x` is a reference that is only valid in the function body
15 | |______`x` escapes the function body here
16 | argument requires that `'1` must outlive `'static`
18 error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
19 --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:9
22 | ^^ may outlive borrowed value `x`
25 | - `x` is borrowed here
27 note: function requires argument type to outlive `'static`
28 --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
36 help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
41 error: aborting due to 2 previous errors
43 Some errors have detailed explanations: E0373, E0521.
44 For more information about an error, try `rustc --explain E0373`.