rust/tests/ui/nll/mir_check_cast_unsafe_fn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
374 B
Plaintext
Raw Normal View History

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