blob: a5a0a4995bf47f82286df2f815f6dae332ef292b [file] [log] [blame]
//@ run-pass
#![allow(unused_variables)]
// Test implicit coercions from a fn item type to a fn pointer type.
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);
}