Bug 20402 – use-this-other-module deprecation warnings with "use std;"
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-11-17T09:19:42Z
Last change time
2021-09-17T07:05:51Z
Assigned to
No Owner
Creator
mipri
Comments
Comment #0 by mipri — 2019-11-17T09:19:42Z
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
Comment #1 by mipri — 2021-09-17T07:05:51Z
the deprecation warnings are gone, now StopWatch is just unidentified.