[Issue 18110] most of phobos should be @safe-ly useable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 21 17:01:39 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18110

--- Comment #1 from Martin Nowak <code at dawg.eu> ---
std.stdio.File.byLine:

Should be @safe as the internally used buffer is GC allocated, thus unexpected
mutation of an escaped line is possible, but cannot cause a memory corruption.

@safe function 'foo' cannot call @system function 'std.stdio.File.byLine!(char,
char).byLine'
@safe function 'foo' cannot call @system destructor
'std.stdio.File.ByLine!(char, char).ByLine.~this'
----
std.stdio.File.byLineCopy:

obviously

@safe function 'foo' cannot call @system function
'std.stdio.File.byLineCopy!(char, immutable(char)).byLineCopy'
@safe function 'foo' cannot call @system destructor
'std.stdio.File.ByLineCopy!(immutable(char), char).ByLineCopy.~this'

--


More information about the Digitalmars-d-bugs mailing list