@safe: static struct AType { ~this(){} } void main() { AType[5] array; } complains: reference to local variable 'array' assigned to non-scope parameter 'a' calling object._ArrayDtor!(CopyPreventer)._ArrayDtor As I understand it, running a destroyer when finalizing a static array should work just as well as finalizing a single local with an elaborate destructor.
Fixed by https://github.com/dlang/druntime/pull/3032