In dmd 2.066alpha this compiles and runs: void main() pure nothrow { import std.conv: text; int x = 10; assert(text(x) == "10"); } While thios: void main() pure nothrow { import std.bigint: BigInt; import std.conv: text; BigInt x = 10; assert(text(x) == "10"); } temp.d(5,16): Error: pure function 'D main' cannot call impure function 'std.conv.text!(BigInt).text' temp.d(5,16): Error: 'std.conv.text!(BigInt).text' is not nothrow temp.d(1,6): Error: function 'D main' is nothrow yet may throw
Fixing #6007 may involve a solution which isn't strictly pure (global cache of powers of the base we're converting to.) This is the solution OpenJDK's biginteger class uses, whether or not we use a global cache or recompute the powers each time is a design issue for the person who decides to fix #6007. Anyways, I think we should not be so eager in adding pure to the conversion to string unless we have a "trusted pure" available.
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10058 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB