www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20402] New: use-this-other-module deprecation warnings with

https://issues.dlang.org/show_bug.cgi?id=20402

          Issue ID: 20402
           Summary: use-this-other-module deprecation warnings with "use
                    std;"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: mipri minimaltype.com

This complete program:

import std;

void main() {
    auto sw = StopWatch();
}

compiles with this output:

./x145.d(5): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use
std.datetime.stopwatch.StopWatch.
./x145.d(5): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use
std.datetime.stopwatch.StopWatch.
./x145.d(5): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use
std.datetime.stopwatch.StopWatch.
./x145.d(5): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use
std.datetime.stopwatch.StopWatch.

quick fix: add the following to package.d, before the huge public import:

public import std.datetime.stopwatch: StopWatch; // remove when StopWatch
deprecations are removed

--
Nov 17 2019