mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Remove @safe from assumeUnique. @safe function doesn't allow casting of mutable object to immutable.
This commit is contained in:
parent
57d08c37e3
commit
2a37d92088
1 changed files with 2 additions and 2 deletions
|
@ -326,7 +326,7 @@ unittest
|
|||
*
|
||||
*/
|
||||
|
||||
immutable(T)[] assumeUnique(T)(ref T[] array) @safe pure nothrow
|
||||
immutable(T)[] assumeUnique(T)(ref T[] array) pure nothrow
|
||||
{
|
||||
auto result = cast(immutable(T)[]) array;
|
||||
array = null;
|
||||
|
@ -340,7 +340,7 @@ unittest
|
|||
assert(is(typeof(arr1) == immutable(int)[]) && arr == null);
|
||||
}
|
||||
|
||||
immutable(T[U]) assumeUnique(T, U)(ref T[U] array) @safe pure nothrow
|
||||
immutable(T[U]) assumeUnique(T, U)(ref T[U] array) pure nothrow
|
||||
{
|
||||
auto result = cast(immutable(T[U])) array;
|
||||
array = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue