]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-10291.stderr
Rollup merge of #53321 - alexcrichton:wasm-target-feature, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-10291.stderr
1 error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2   --> $DIR/issue-10291.rs:13:9
3    |
4 LL |         x //~ ERROR E0312
5    |         ^
6    |
7 note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 12:65...
8   --> $DIR/issue-10291.rs:12:65
9    |
10 LL |       drop::<Box<for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
11    |  _________________________________________________________________^
12 LL | |         x //~ ERROR E0312
13 LL | |     }));
14    | |_____^
15 note: ...but the borrowed content is only valid for the lifetime 'x as defined on the function body at 11:9
16   --> $DIR/issue-10291.rs:11:9
17    |
18 LL | fn test<'x>(x: &'x isize) {
19    |         ^^
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0312`.