]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/mir_check_cast_closure.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / nll / mir_check_cast_closure.rs
1 // compile-flags: -Z borrowck=mir
2
3 #![allow(dead_code)]
4
5 fn bar<'a, 'b>() -> fn(&'a u32, &'b u32) -> &'a u32 {
6     let g: fn(_, _) -> _ = |_x, y| y;
7     g
8     //~^ ERROR lifetime may not live long enough
9 }
10
11 fn main() {}