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

12 lines
377 B
Plaintext
Raw Normal View History

2018-08-07 15:48:50 -05:00
error: unsatisfied lifetime constraints
2018-09-06 21:57:05 -05:00
--> $DIR/mir_check_cast_unsafe_fn.rs:18:32
|
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-06 21:57:05 -05:00
LL | let g: unsafe fn(_) -> _ = f;
| ^ cast requires that `'a` must outlive `'static`
error: aborting due to previous error