]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-4335.nll.stderr
8eede34747827f313a0d19fae5db147a28465aaa
[rust.git] / src / test / ui / issue-4335.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/issue-4335.rs:16:20
3    |
4 LL |     id(Box::new(|| *v))
5    |                    ^^ cannot move out of borrowed content
6
7 error[E0597]: `v` does not live long enough
8   --> $DIR/issue-4335.rs:16:17
9    |
10 LL |     id(Box::new(|| *v))
11    |                 ^^^^^ borrowed value does not live long enough
12 ...
13 LL | }
14    | - borrowed value only lives until here
15    |
16 note: borrowed value must be valid for the lifetime 'r as defined on the function body at 15:6...
17   --> $DIR/issue-4335.rs:15:6
18    |
19 LL | fn f<'r, T>(v: &'r T) -> Box<FnMut() -> T + 'r> {
20    |      ^^
21
22 error: aborting due to 2 previous errors
23
24 Some errors occurred: E0507, E0597.
25 For more information about an error, try `rustc --explain E0507`.