Closed
Description
It might be that this is intended since it seems that each function is treated as its own type (and by casting you can get the common function type that the trait is implemented for). I'd still argue it is confusing behavior so maybe the error message should be improved in that case?
(In this case we could do a blanked implemantion over one of the function trait but that does not work for my case, atleast not without #[old_impl_check])
trait Test { }
impl Test for fn () { }
fn tester<T: Test>(_: T) { }
fn void() { }
fn main() {
tester(void);//Test is not implemented for fn () {void}
tester(void as fn ());//Works
}