https://issues.dlang.org/show_bug.cgi?id=24724
Dennis <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Hardware|x86_64 |All OS|Linux |All --- Comment #6 from Dennis <[email protected]> --- (In reply to Nick Treleaven from comment #4) > In what scenario is allowing @trusted to have an unsafe interface useful? A > single example will suffice, please provide one (that can't be @system). The interface is not necessarily unsafe. The example you gave is trivial, but the return statement may be unreachable or guarded like so: ``` @trusted int* b(ref int r) { if (isInDataSegment(&r)) return &r; else return null; } ``` --
