Showing with 2 additions and 1 deletion.
  1. +2 −1 std/utf.d
3 changes: 2 additions & 1 deletion std/utf.d
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,8 @@ private P toUTFzImpl(P, S)(S str) @safe pure
{
typeof(*P.init)[] retval = ['\0'];

return retval.ptr;
auto trustedPtr() @trusted { return retval.ptr; }
return trustedPtr();
}

alias C = Unqual!(ElementEncodingType!S);
Expand Down