https://issues.dlang.org/show_bug.cgi?id=20916
Mathias LANG <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from Mathias LANG <[email protected]> --- Example code: ``` import std.stdio; struct Foo { pure nothrow @nogc @safe: deprecated string toString() const { return "Hello"; } int value; } void main () { Foo f; writeln(f); } ``` Currently this prints: ``` std/format.d(3921): Deprecation: function foo.Foo.toString is deprecated std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated ``` We would like it to print something similar to how template instantiation failures are printed, that is: ``` std/format.d(4053): Deprecation: function foo.Foo.toString is deprecated std/format.d(4430): instantiated from here: formatObject!(LockingTextWriter, Foo, char) std/format.d(1875): instantiated from here: formatValueImpl!(LockingTextWriter, Foo, char) std/format.d(576): instantiated from here: formatValue!(LockingTextWriter, Foo, char) std/stdio.d(1565): instantiated from here: formattedWrite!(LockingTextWriter, char, Foo) std/stdio.d(3927): instantiated from here: write!(Foo, char) foo.d(15): instantiated from here: writeln!(Foo) ``` --
