https://issues.dlang.org/show_bug.cgi?id=14439
--- Comment #5 from Chris Wright <[email protected]> --- After taking a closer look, AAs already allow you to violate @safety: opEquals and postblit are not required to be @safe, and toHash is only required to be @safe it opEquals is present. This allows you to call @system code from @safe code without a @trusted intermediary. The `keys`, `values`, `byKey`, and `byValue` methods don't use opEquals or toHash but do use postblit. Making them @trusted would exacerbate the existing problem. In the implementation in rt/aaA.d, everything uses RTTI to access opEquals, toHash, and postblit. This obscures the difference, so those methods can't ever be @safe and it's invalid to make them @trusted. (Unless we start requiring opEquals, toHash, and postblit to be @safe.) The wrappers, being templates, can explicitly detect when the types involved can be used safely and mark themselves @trusted in that case. Beyond that huge problem, there are a number of minor things that aaA.d does that aren't @safe but can be made @trusted. Much of the implementation can be brought closer to @safe standards. --
