]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/mir_check_cast_unsafe_fn.stderr
Rollup merge of #83807 - sjakobi:77548-remove-ignore-annotations, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / mir_check_cast_unsafe_fn.stderr
1 error: lifetime may not live long enough
2   --> $DIR/mir_check_cast_unsafe_fn.rs:9:14
3    |
4 LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {
5    |        -- lifetime `'a` defined here
6 ...
7 LL |     unsafe { g(input) }
8    |              ^^^^^^^^ returning this value requires that `'a` must outlive `'static`
9    |
10    = help: consider replacing `'a` with `'static`
11
12 error: aborting due to previous error
13