rust/tests/ui/nll/mir_check_cast_closure.rs

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

10 lines
185 B
Rust
Raw Normal View History

2017-11-30 09:43:32 -06:00
#![allow(dead_code)]
fn bar<'a, 'b>() -> fn(&'a u32, &'b u32) -> &'a u32 {
let g: fn(_, _) -> _ = |_x, y| y;
g
2018-12-11 15:49:40 -06:00
//~^ ERROR lifetime may not live long enough
2017-11-30 09:43:32 -06:00
}
fn main() {}