Don't use repr(C)#42
Conversation
|
this seems to set off some |
|
What is the reason why this uses a 0-length array to begin with, rather than I'm considering to ban arrays from being ignored in |
|
Never mind, @Jules-Bertholet found a wording in rust-lang/rust#157973 that will keep this crate working. However I am still curious why you are using a 0-lement array instead of |
|
It is a demonstration that a PhantomData-like can be built from primitives without using an existing PhantomData. |
|
Note that rust-lang/rust#157973 doesn't really answer all the issues here. That PR describes what types have trivial ABI on any specific target, but for deciding what to allow in |
|
Yeah, that's why rust-lang/rust#155984 is so complicated -- and the code explains basically none of that reasoning (especially not the high-level goals that the logic is trying to achieve) which is why I was so confused when trying to review it.^^
That is a cute trick, but IMO not a great argument for actually putting this in production. This will cause a whole bunch of extra work in rust-lang/rust#155984... |
Fixes #41.