There's the idea that the fn(...) -> R types should be unsized types (like extern type) and function pointers should be proper pointers (e.g. &'a fn()). On its face this appears backwards incompatible in ways editions can't paper over, e.g. if we desugar fn() to &'static fn() in 2015 these two impls would suddenly start conflicting:
trait Foo {}
impl<'a, T: ?Sized> Foo for &'a T {}
impl Foo for fn() {}
@eddyb wants to try implementing it quickly and hackily it to see what breaks:
I think we can do this in type unification, and treat fn() like &SomeLibCoreLangItem there, without changing fn() itself
There's the idea that the
fn(...) -> Rtypes should be unsized types (likeextern type) and function pointers should be proper pointers (e.g.&'a fn()). On its face this appears backwards incompatible in ways editions can't paper over, e.g. if we desugarfn()to&'static fn()in 2015 these two impls would suddenly start conflicting:@eddyb wants to try implementing it quickly and hackily it to see what breaks: