diff --git a/source/dub/internal/vibecompat/core/log.d b/source/dub/internal/vibecompat/core/log.d index c0b52f3..e48569e 100644 --- a/source/dub/internal/vibecompat/core/log.d +++ b/source/dub/internal/vibecompat/core/log.d @@ -66,15 +66,15 @@ txt.reserve(256); formattedWrite(txt, fmt, args); - auto threadid = cast(ulong)cast(void*)Thread.getThis(); - auto fiberid = cast(ulong)cast(void*)Fiber.getThis(); + auto threadid = () @trusted { return cast(ulong)cast(void*)Thread.getThis(); } (); + auto fiberid = () @trusted { return cast(ulong)cast(void*)Fiber.getThis(); } (); threadid ^= threadid >> 32; fiberid ^= fiberid >> 32; if (level >= s_minLevel) { File output; - if (level == LogLevel.info) output = stdout; - else output = stderr; + if (level == LogLevel.info) () @trusted { output = stdout; } (); + else () @trusted { output = stderr; } (); if (output.isOpen) { output.writeln(txt.data); output.flush();