blob: 7a096764e45fe63d6770cc95b968851db702d397 [file] [log] [blame]
// run-pass
#![allow(unused_variables)]
// Test implicit coercions from a fn item type to a fn pointer type.
// pretty-expanded FIXME #23616
fn foo(x: isize) -> isize { x * 2 }
fn bar(x: isize) -> isize { x * 4 }
type IntMap = fn(isize) -> isize;
fn eq<T>(x: T, y: T) { }
fn main() {
let f: IntMap = foo;
eq::<IntMap>(foo, bar);
}