summary refs log tree commit diff
path: root/src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr
blob: f50c3e3b531590d98942c01931332dfe5e99e097 (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0621]: explicit lifetime required in the type of `x`
  --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
   |
LL | fn foo(x: &()) {
   |           --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()`
LL |     bar(|| {
   |     ^^^ lifetime `'static` required

error: aborting due to previous error

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