January 04, 2021
https://issues.dlang.org/show_bug.cgi?id=21523

          Issue ID: 21523
           Summary: Microsoft Windows std.stdio.File.lock(), tryLock(),
                    unlock(): do not allocate memory for error messages
                    when they are not needed
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody@puremagic.com
          Reporter: n8sh.secondary@hotmail.com

The non-Windows paths use `errnoEnforce` that lazily evaluates the messages. The Windows path uses a private function `wenforce` that evaluates its arguments eagerly.

--