Closed
Description
The following code
fn id<'c, 'b>(f: &'c &'b Fn(&i32)) -> &'c &'b Fn(&'static i32) {
f
}
fn main() {
let f: &Fn(&i32) = &|x| {};
id(&f);
}
gives the following error on beta (1.24) and nightly (1.25 2018-01-17). It compiles successfully on stable.
Function return type does not match operand type of return inst!
ret { %"core::ops::function::Fn<(&i32), Output=()>.0"*, {}* }* %3, !dbg !36
{ %"core::ops::function::Fn<(&i32), Output=()>"*, {}* }*LLVM ERROR: Broken function found, compilation aborted!