Pre-RFC: Struct target feature

i'm not aware of unsafe construction already being in the language. the only thing i can find about it online is other IRLO threads Making struct construction unsafe, or warn in safe context, Type construction safety: unsafe struct / unsafe drop , or closed RFCs

the reason the parameter needs to be passed to the function is because its existence acts as a ZST proof that the features are available, which is why the compiler can safely apply the target feature to the function.

the target feature (as described in my post) has no effect on the struct, other than making its construction unsafe. its actual effect comes into play when that struct appears as the type of a parameter of a function, in which case the target features are automatically applied to the function.

so if you pass a type that isn't a simd marker, nothing happens. the function just doesn't get any target features automatically applied to it.