D-Programming-Language/phobos — pull request #1337 by 9rnsr (2013-06-08 12:05:17+00:00)
Title: Potentially @safe & pure formatting

Determine and separate `@trusted` operations in `Appender`, `formattedWrite`/`formatValue`, `parse`, and `toImpl`.

This pull request is quite big, but we need to change them all *at once*. Because (excepting Appender) formattedWrite, parse and toImpl have dependencies between each other.

`nothrow`-ness is not currently supported, because:
- `std.format.formatValue` throws `FormatException` for invalid format specifiers.
- `std.conv.to` throws `ConvException` when conversion fails.

-----
Requires compiler fixes:

- [#2150](https://github.com/D-Programming-Language/dmd/pull/2150) [REG2.063] Issue 10299 - ICE with getting address of template
- [#2149](https://github.com/D-Programming-Language/dmd/pull/2149) Issue 10296 - Nested template function call and purity inference bug
- [#2145](https://github.com/D-Programming-Language/dmd/pull/2145) Issue 10289 - compiler should infer nothrow even if Error is thrown (merged)
- [#2143](https://github.com/D-Programming-Language/dmd/pull/2143) Issue 10288 - Direct lambda call and purity inference bug
- [#2142](https://github.com/D-Programming-Language/dmd/pull/2142) Issue 7848 - pure and nothrow ignored on unittest blocks (merged)
- [#2141](https://github.com/D-Programming-Language/dmd/pull/2141) Issue 8651 - Slice op Slice throws exceptions (not errors), and nothrow (merged)

Requires compiler fix:
- [#512](https://github.com/D-Programming-Language/druntime/pull/512) Change the Exception/Error constructors to @safe pure nothrow (merged)
- [#515](https://github.com/D-Programming-Language/druntime/pull/515) Change memcpy, memmove, and memset to pure (merged)