2 // Check that coercions unify the expected return type of a polymorphic
3 // function call, instead of leaving the type variables as they were.
5 // pretty-expanded FIXME #23616
9 fn foo<T>(self, x: T) -> Option<T> { Some(x) }
13 let _: Option<fn()> = Some(main);
14 let _: Option<fn()> = Foo.foo(main);
16 // The same two cases, with implicit type variables made explicit.
17 let _: Option<fn()> = Some::<_>(main);
18 let _: Option<fn()> = Foo.foo::<_>(main);