struct S {} void main() @safe { import std.typecons; auto s = S().refCounted; } Error: @safe function D main cannot call @system function std.typecons.refCounted!(S).refCounted Error: @safe function D main cannot call @system destructor std.typecons.RefCounted!(S, cast(RefCountedAutoInitialize)0).RefCounted.~this How do I do refCounted in @safe code?