]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0621-does-not-trigger-for-closures.stderr
Rollup merge of #97915 - tbu-:pr_os_string_fmt_write, r=joshtriplett
[rust.git] / src / test / ui / error-codes / E0621-does-not-trigger-for-closures.stderr
1 error: lifetime may not live long enough
2   --> $DIR/E0621-does-not-trigger-for-closures.rs:13:45
3    |
4 LL |     invoke(&x, |a, b| if a > b { a } else { b });
5    |                    --                       ^ returning this value requires that `'1` must outlive `'2`
6    |                    ||
7    |                    |return type of closure is &'2 i32
8    |                    has type `&'1 i32`
9
10 error: aborting due to previous error
11