Can we have as cast *T to unsafe fn

Previously: In Function pointers are inconsistent with other language features, which seemed to resonate with a few people, the idea was that we should accept that fn is another way of spelling this particular & and thus potentially add the lifetime parameter after it. And also that we could defer introduction of the pointee type until extern types are more fleshed out—and making the code section to which the function pointer refers an extern type, of which you can't always calculate the layout.

Note that it can only be treated as a 'simple' pointer cast on machines of von Neumann type and not on Harvard architectures.

2 Likes