]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-proc-bound-capture.nll.stderr
introduce Guard enum
[rust.git] / src / test / ui / regions / regions-proc-bound-capture.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/regions-proc-bound-capture.rs:19:14
3    |
4 LL |     Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621]
5    |              ^^^^^^^^^^^^^
6
7 error[E0621]: explicit lifetime required in the type of `x`
8   --> $DIR/regions-proc-bound-capture.rs:17:62
9    |
10 LL |   fn static_proc(x: &isize) -> Box<FnMut()->(isize) + 'static> {
11    |  ___________________------_____________________________________^
12    | |                   |
13    | |                   help: add explicit lifetime `'static` to the type of `x`: `&'static isize`
14 LL | |     // This is illegal, because the region bound on `proc` is 'static.
15 LL | |     Box::new(move|| { *x }) //~ ERROR explicit lifetime required in the type of `x` [E0621]
16 LL | | }
17    | |_^ lifetime `'static` required
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0621`.