rust/src/test/ui/nll/mir_check_cast_unsafe_fn.stderr

12 lines
372 B
Plaintext
Raw Normal View History

2018-08-07 15:48:50 -05:00
error: unsatisfied lifetime constraints
2018-09-15 12:30:29 -05:00
--> $DIR/mir_check_cast_unsafe_fn.rs:19:14
|
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-09-15 12:30:29 -05:00
LL | unsafe { g(input) }
| ^^^^^^^^ returning this value requires that `'a` must outlive `'static`
error: aborting due to previous error