View all comments
Based on discussion on #43467 and in @rust-lang/lang meetings, an opaque extern type type cannot support size_of_val or align_of_val. We believe that we should panic or abort in this case. We also believe that we should have a compile-time lint that detects this whenever possible, since at some level the compiler should know at compile time if code invokes size_of_val or align_of_val on an extern type.
I've opened this separate issue to document that decision, and will propose FCP on it to give time for final comments.
View all comments
Based on discussion on #43467 and in @rust-lang/lang meetings, an opaque
extern typetype cannot supportsize_of_valoralign_of_val. We believe that we should panic or abort in this case. We also believe that we should have a compile-time lint that detects this whenever possible, since at some level the compiler should know at compile time if code invokessize_of_valoralign_of_valon anextern type.I've opened this separate issue to document that decision, and will propose FCP on it to give time for final comments.