fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
781 B23 linesraw
1error[E0312]: lifetime of reference outlives lifetime of borrowed content...
2  --> $DIR/issue-10291.rs:3:9
3   |
4LL |         x
5   |         ^
6   |
7note: ...the reference is valid for the anonymous lifetime #2 defined on the body at 2:69...
8  --> $DIR/issue-10291.rs:2:69
9   |
10LL |       drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
11   |  _____________________________________________________________________^
12LL | |         x
13LL | |     }));
14   | |_____^
15note: ...but the borrowed content is only valid for the lifetime `'x` as defined on the function body at 1:9
16  --> $DIR/issue-10291.rs:1:9
17   |
18LL | fn test<'x>(x: &'x isize) {
19   |         ^^
20
21error: aborting due to previous error
22
23For more information about this error, try `rustc --explain E0312`.