Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit a584215

Browse files
committed
Update Ddoc for _d_arrayctor's new signature
Signed-off-by: Teodor Dutu <teodor.dutu@gmail.com>
1 parent 4161631 commit a584215

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/core/internal/array/construction.d

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,24 @@
99
*/
1010
module core.internal.array.construction;
1111

12+
import core.internal.traits : Unqual;
13+
1214
/**
1315
* Does array initialization (not assignment) from another array of the same element type.
1416
* Params:
15-
* to = what array to initialize
1617
* from = what data the array should be initialized with
1718
* Returns:
18-
* The constructed `to`
19+
* The crated and initialized array `to`
1920
* Bugs:
2021
* This function template was ported from a much older runtime hook that bypassed safety,
2122
* purity, and throwabilty checks. To prevent breaking existing code, this function template
2223
* is temporarily declared `@trusted` until the implementation can be brought up to modern D expectations.
2324
*/
2425
Tarr1 _d_arrayctor(Tarr1 : T1[], Tarr2 : T2[], T1, T2)(scope Tarr2 from) @trusted
26+
if (is(Unqual!T1 == Unqual!T2))
2527
{
2628
pragma(inline, false);
27-
import core.internal.traits : hasElaborateCopyConstructor, Unqual;
29+
import core.internal.traits : hasElaborateCopyConstructor;
2830
import core.lifetime : copyEmplace;
2931
import core.stdc.string : memcpy;
3032
import core.stdc.stdint : uintptr_t;
@@ -190,7 +192,6 @@ Tarr1 _d_arrayctor(Tarr1 : T1[], Tarr2 : T2[], T1, T2)(scope Tarr2 from) @truste
190192
void _d_arraysetctor(Tarr : T[], T)(scope Tarr p, scope ref T value) @trusted
191193
{
192194
pragma(inline, false);
193-
import core.internal.traits : Unqual;
194195
import core.lifetime : copyEmplace;
195196

196197
size_t i;

0 commit comments

Comments
 (0)