Make phobos compile with pure-scope fix

This commit is contained in:
dkorpel 2021-12-23 18:46:58 +01:00
parent 0411974508
commit 0eb2fb7aaa
3 changed files with 5 additions and 5 deletions

View file

@ -2377,7 +2377,7 @@ Throws:
A $(LREF ConvException) If an overflow occurred during conversion or A $(LREF ConvException) If an overflow occurred during conversion or
if no character of the input was meaningfully converted. if no character of the input was meaningfully converted.
*/ */
auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref Source s) auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref scope Source s)
if (isSomeChar!(ElementType!Source) && if (isSomeChar!(ElementType!Source) &&
isIntegral!Target && !is(Target == enum)) isIntegral!Target && !is(Target == enum))
{ {
@ -2482,7 +2482,7 @@ if (isSomeChar!(ElementType!Source) &&
v = -v; v = -v;
static if (isNarrowString!Source) static if (isNarrowString!Source)
s = cast(Source) source; s = s[$-source.length..$];
static if (doCount) static if (doCount)
{ {

View file

@ -1168,7 +1168,7 @@ do
/// ditto /// ditto
dchar decode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)( dchar decode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)(
auto ref S str, ref size_t index) @trusted pure auto ref scope S str, ref size_t index) @trusted pure
if (isSomeString!S) if (isSomeString!S)
in in
{ {
@ -1274,7 +1274,7 @@ do
/// ditto /// ditto
dchar decodeFront(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)( dchar decodeFront(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)(
ref S str, out size_t numCodeUnits) @trusted pure ref scope S str, out size_t numCodeUnits) @trusted pure
if (isSomeString!S) if (isSomeString!S)
in in
{ {

View file

@ -433,7 +433,7 @@ enum DecodeMode
* writefln(decode("a > b")); // writes "a > b" * writefln(decode("a > b")); // writes "a > b"
* -------------- * --------------
*/ */
string decode(return scope string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure string decode(string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure
{ {
import std.algorithm.searching : startsWith; import std.algorithm.searching : startsWith;