]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-proc-bound-capture.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / regions / regions-proc-bound-capture.stderr
1 error[E0621]: explicit lifetime required in the type of `x`
2   --> $DIR/regions-proc-bound-capture.rs:9:5
3    |
4 LL | fn static_proc(x: &isize) -> Box<FnMut()->(isize) + 'static> {
5    |                   ------ help: add explicit lifetime `'static` to the type of `x`: `&'static isize`
6 LL |     // This is illegal, because the region bound on `proc` is 'static.
7 LL |     Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621]
8    |     ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0621`.