-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Open
Labels
T-langRelevant to the language teamRelevant to the language team
Description
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&SomeLibCoreLangItemthere, without changingfn()itself
kornelski and edgarogh
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language teamRelevant to the language team