Annotate std/string.d to please dlang/dmd#12520

This commit is contained in:
nordlow 2021-05-17 12:28:06 +02:00 committed by The Dlang Bot
parent 88a4ebbc1f
commit 086ad984dd

View file

@ -148,13 +148,13 @@ version (StdUnittest)
private: private:
struct TestAliasedString struct TestAliasedString
{ {
string get() @safe @nogc pure nothrow { return _s; } string get() @safe @nogc pure nothrow return scope { return _s; }
alias get this; alias get this;
@disable this(this); @disable this(this);
string _s; string _s;
} }
bool testAliasedString(alias func, Args...)(string s, Args args) bool testAliasedString(alias func, Args...)(scope string s, scope Args args)
{ {
import std.algorithm.comparison : equal; import std.algorithm.comparison : equal;
auto a = func(TestAliasedString(s), args); auto a = func(TestAliasedString(s), args);
@ -6432,7 +6432,7 @@ if (isConvertibleToString!Range)
* See_Also: * See_Also:
* $(LREF soundexer) * $(LREF soundexer)
*/ */
char[] soundex(scope const(char)[] str, char[] buffer = null) char[] soundex(scope const(char)[] str, return scope char[] buffer = null)
@safe pure nothrow @safe pure nothrow
in in
{ {
@ -6937,7 +6937,7 @@ void main() {
* StringException if indentation is done with different sequences * StringException if indentation is done with different sequences
* of whitespace characters. * of whitespace characters.
*/ */
S[] outdent(S)(S[] lines) @safe pure S[] outdent(S)(return scope S[] lines) @safe pure
if (isSomeString!S) if (isSomeString!S)
{ {
import std.algorithm.searching : startsWith; import std.algorithm.searching : startsWith;