Skip to content

Commit

Permalink
Supplemental fix for issue 13120 - remove accidentally accepted @nogc
Browse files Browse the repository at this point in the history
…attribute

`removechars()` and `squeeze()` are not @nogc, because they uses `dup` and `std.utf.encode`.
  • Loading branch information
9rnsr committed Sep 8, 2014
1 parent e0ecca7 commit 96abecd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/string.d
Expand Up @@ -3446,7 +3446,7 @@ size_t countchars(S, S1)(S s, in S1 pattern) @safe pure @nogc if (isSomeString!S
* Return string that is s with all characters removed that match pattern.
*/

S removechars(S)(S s, in S pattern) @safe pure @nogc if (isSomeString!S)
S removechars(S)(S s, in S pattern) @safe pure if (isSomeString!S)
{
Unqual!(typeof(s[0]))[] r;
bool changed = false;
Expand All @@ -3473,7 +3473,7 @@ S removechars(S)(S s, in S pattern) @safe pure @nogc if (isSomeString!S)
return s;
}

@safe pure @nogc unittest
@safe pure unittest
{
debug(string) printf("std.string.removechars.unittest\n");

Expand Down Expand Up @@ -3534,7 +3534,7 @@ S squeeze(S)(S s, in S pattern = null)
return changed ? ((r is null) ? s[0 .. lasti] : cast(S) r) : s;
}

@trusted pure @nogc unittest
@trusted pure unittest
{
debug(string) printf("std.string.squeeze.unittest\n");

Expand Down

0 comments on commit 96abecd

Please sign in to comment.