https://issues.dlang.org/show_bug.cgi?id=22680
--- Comment #6 from Stanislav Blinov <[email protected]> --- (In reply to Dennis from comment #5) > (In reply to Stanislav Blinov from comment #4) > > There would be unwanted side effects. On a struct, for example, marking a > > destructor scope would prevent you from returning instances of such struct. > > No, it only adds restrictions to the destructor's function body, not the > destructor's caller. Compile this with -dip1000: @safe: struct S { ~this() scope {} void* p; } S test() { S s; return s; // Error: scope variable `s` may not be returned } void main() { } --
