]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-static-cant-capture-borrowed.stderr
Fix unused 'mut' warning for capture's root variable
[rust.git] / src / test / ui / closures / closure-bounds-static-cant-capture-borrowed.stderr
1 error[E0621]: explicit lifetime required in the type of `x`
2   --> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
3    |
4 LL | fn foo(x: &()) {
5    |           --- help: add explicit lifetime `'static` to the type of `x`: `&'static ()`
6 LL |     bar(|| {
7    |     ^^^ lifetime `'static` required
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0621`.