2018-12-11 15:49:40 -06:00
|
|
|
error: lifetime may not live long enough
|
2022-04-01 12:13:25 -05:00
|
|
|
--> $DIR/mir_check_cast_unsafe_fn.rs:7:14
|
2018-07-26 00:21:35 -05:00
|
|
|
|
|
|
|
|
LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {
|
2018-08-07 15:48:50 -05:00
|
|
|
| -- lifetime `'a` defined here
|
2018-07-26 00:21:35 -05:00
|
|
|
...
|
2018-09-15 12:30:29 -05:00
|
|
|
LL | unsafe { g(input) }
|
|
|
|
| ^^^^^^^^ returning this value requires that `'a` must outlive `'static`
|
2018-11-28 15:05:36 -06:00
|
|
|
|
2018-07-26 00:21:35 -05:00
|
|
|
error: aborting due to previous error
|
|
|
|
|