]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/mir_check_cast_unsafe_fn.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / nll / mir_check_cast_unsafe_fn.stderr
1 error: lifetime may not live long enough
2   --> $DIR/mir_check_cast_unsafe_fn.rs:7: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 error: aborting due to previous error
11