Skip to content

Commit cdf3de4

Browse files
authored
Fix DIP1000 related deprecation warnings and errors in v2.100.0-rc.1 (#404)
1 parent f80fdf3 commit cdf3de4

File tree

17 files changed

+107
-107
lines changed

17 files changed

+107
-107
lines changed

source/mir/algorithm/iteration.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,7 +3871,7 @@ struct Uniq(alias pred, Range)
38713871
while (!_input.empty && pred(last, _input.back));
38723872
}
38733873

3874-
auto ref back() scope return @property
3874+
auto ref back() return scope @property
38753875
{
38763876
assert(!empty, "Attempting to fetch the back of an empty uniq.");
38773877
return _input.back;
@@ -3891,7 +3891,7 @@ struct Uniq(alias pred, Range)
38913891

38923892
static if (isForwardRange!Range)
38933893
{
3894-
@property typeof(this) save() scope return
3894+
@property typeof(this) save() return scope
38953895
{
38963896
return typeof(this)(_input.save);
38973897
}
@@ -4028,7 +4028,7 @@ struct Filter(alias pred, Range)
40284028
import std.range.primitives: isForwardRange;
40294029
static if (isForwardRange!Range)
40304030
{
4031-
@property typeof(this) save() scope return
4031+
@property typeof(this) save() return scope
40324032
{
40334033
return typeof(this)(_input.save);
40344034
}

source/mir/appender.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ struct ScopedBuffer(T, size_t bytes = 4096)
214214
}
215215

216216
///
217-
inout(T)[] data() inout @property @safe scope
217+
inout(T)[] data() inout @property @safe scope return
218218
{
219219
return _buffer.length ? _buffer[0 .. _currentLength] : _scopeBuffer[0 .. _currentLength];
220220
}

source/mir/bignum/low_level_view.d

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,15 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
414414
static if (endian == TargetEndian)
415415
///
416416
@trusted pure nothrow @nogc
417-
BigUIntView!V opCast(T : BigUIntView!V, V)() scope return
417+
BigUIntView!V opCast(T : BigUIntView!V, V)() return scope
418418
if (V.sizeof <= W.sizeof)
419419
{
420420
return typeof(return)(cast(V[])this.coefficients);
421421
}
422422

423423
///
424424
BigUIntView!(const W, endian) lightConst()()
425-
const @safe pure nothrow @nogc @property scope return
425+
const @safe pure nothrow @nogc @property return scope
426426
{
427427
return typeof(return)(coefficients);
428428
}
@@ -451,7 +451,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
451451

452452
/++
453453
+/
454-
ref inout(W) mostSignificant() inout @property scope return
454+
ref inout(W) mostSignificant() inout @property return scope
455455
{
456456
static if (endian == WordEndian.big)
457457
return coefficients[0];
@@ -461,7 +461,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
461461

462462
/++
463463
+/
464-
ref inout(W) leastSignificant() inout @property scope return
464+
ref inout(W) leastSignificant() inout @property return scope
465465
{
466466
static if (endian == WordEndian.little)
467467
return coefficients[0];
@@ -491,7 +491,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
491491

492492
/++
493493
+/
494-
BigUIntView topMostSignificantPart(size_t length) scope return
494+
BigUIntView topMostSignificantPart(size_t length) return scope
495495
{
496496
static if (endian == WordEndian.big)
497497
return BigUIntView(coefficients[0 .. length]);
@@ -501,7 +501,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
501501

502502
/++
503503
+/
504-
BigUIntView topLeastSignificantPart(size_t length) scope return
504+
BigUIntView topLeastSignificantPart(size_t length) return scope
505505
{
506506
static if (endian == WordEndian.little)
507507
return BigUIntView(coefficients[0 .. length]);
@@ -1128,7 +1128,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
11281128
/++
11291129
Returns: the same intger view with inversed sign
11301130
+/
1131-
BigIntView!(W, endian) opUnary(string op : "-")() scope return
1131+
BigIntView!(W, endian) opUnary(string op : "-")() return scope
11321132
{
11331133
return typeof(return)(this, true);
11341134
}
@@ -1160,7 +1160,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
11601160
Returns: a slice of coefficients starting from the least significant.
11611161
+/
11621162
auto leastSignificantFirst()
1163-
@safe pure nothrow @nogc @property scope return
1163+
@safe pure nothrow @nogc @property return scope
11641164
{
11651165
import mir.ndslice.slice: sliced;
11661166
static if (endian == WordEndian.little)
@@ -1176,7 +1176,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
11761176

11771177
///
11781178
auto leastSignificantFirst()
1179-
const @safe pure nothrow @nogc @property scope return
1179+
const @safe pure nothrow @nogc @property return scope
11801180
{
11811181
import mir.ndslice.slice: sliced;
11821182
static if (endian == WordEndian.little)
@@ -1194,7 +1194,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
11941194
Returns: a slice of coefficients starting from the most significant.
11951195
+/
11961196
auto mostSignificantFirst()
1197-
@safe pure nothrow @nogc @property scope return
1197+
@safe pure nothrow @nogc @property return scope
11981198
{
11991199
import mir.ndslice.slice: sliced;
12001200
static if (endian == WordEndian.big)
@@ -1210,7 +1210,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
12101210

12111211
///
12121212
auto mostSignificantFirst()
1213-
const @safe pure nothrow @nogc @property scope return
1213+
const @safe pure nothrow @nogc @property return scope
12141214
{
12151215
import mir.ndslice.slice: sliced;
12161216
static if (endian == WordEndian.big)
@@ -1227,7 +1227,7 @@ struct BigUIntView(W, WordEndian endian = TargetEndian)
12271227
/++
12281228
Strips most significant zero coefficients.
12291229
+/
1230-
BigUIntView normalized() scope return
1230+
BigUIntView normalized() return scope
12311231
{
12321232
auto number = this;
12331233
if (number.coefficients.length) do
@@ -1549,7 +1549,7 @@ struct BigIntView(W, WordEndian endian = TargetEndian)
15491549
bool sign;
15501550

15511551
///
1552-
inout(W)[] coefficients() inout @property scope return
1552+
inout(W)[] coefficients() inout @property return scope
15531553
{
15541554
return unsigned.coefficients;
15551555
}
@@ -1912,14 +1912,14 @@ struct BigIntView(W, WordEndian endian = TargetEndian)
19121912

19131913
static if (endian == TargetEndian)
19141914
///
1915-
BigIntView!V opCast(T : BigIntView!V, V)() scope return
1915+
BigIntView!V opCast(T : BigIntView!V, V)() return scope
19161916
if (V.sizeof <= W.sizeof)
19171917
{
19181918
return typeof(return)(this.unsigned.opCast!(BigUIntView!V), sign);
19191919
}
19201920

19211921
///
1922-
BigIntView!(const W, endian) lightConst()() scope return
1922+
BigIntView!(const W, endian) lightConst()() return scope
19231923
const @safe pure nothrow @nogc @property
19241924
{
19251925
return typeof(return)(unsigned.lightConst, sign);

source/mir/container/binaryheap.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public:
180180
Returns a _front of the heap, which is the largest element
181181
according to `less`.
182182
+/
183-
@property auto ref ElementType!Store front() scope return
183+
@property auto ref ElementType!Store front() return scope
184184
{
185185
assert(!empty, "Cannot call front on an empty heap.");
186186
return _store.front;

source/mir/interpolate/constant.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ extern(D):
130130
Constant lightConst()() const @property { return *cast(Constant*)&this; }
131131

132132
///
133-
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() scope return const @property
133+
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() return scope const @property
134134
if (dimension < N)
135135
{
136136
return _grid[dimension].lightConst.sliced(_data._lengths[dimension]);
137137
}
138138

139139
///
140-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
140+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
141141
if (dimension < N)
142142
{
143143
return _grid[dimension]._iterator[0 .. _data._lengths[dimension]];

source/mir/interpolate/generic.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ extern(D):
149149
Generic lightConst()() const @property { return *cast(Generic*)&this; }
150150

151151
///
152-
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() scope return const @property
152+
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() return scope const @property
153153
if (dimension == 0)
154154
{
155155
return _grid.lightConst.sliced(_data._lengths[0]);
156156
}
157157

158158
///
159-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
159+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
160160
if (dimension == 0)
161161
{
162162
return _grid._iterator[0 .. _data._lengths[0]];

source/mir/interpolate/linear.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ struct Linear(F, size_t N = 1, X = F)
236236
Linear lightConst()() const @property { return *cast(Linear*)&this; }
237237

238238
///
239-
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() scope return const @property
239+
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() return scope const @property
240240
if (dimension < N)
241241
{
242242
return _grid[dimension].lightConst.sliced(_data._lengths[dimension]);
243243
}
244244

245245
///
246-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
246+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
247247
if (dimension < N)
248248
{
249249
return _grid[dimension]._iterator[0 .. _data._lengths[dimension]];
@@ -478,7 +478,7 @@ struct MetaLinear(T, X)
478478
MetaLinear lightConst()() const @property { return *cast(MetaLinear*)&this; }
479479

480480
///
481-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
481+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
482482
if (dimension == 0)
483483
{
484484
return grid[];

source/mir/interpolate/polynomial.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ scope const:
161161
///
162162
ref const(Slice!(RCI!(immutable X))) grid() { return _grid; }
163163
///
164-
immutable(X)[] gridScopeView() scope return const @property @trusted { return _grid.lightScope.field; }
164+
immutable(X)[] gridScopeView() return scope const @property @trusted { return _grid.lightScope.field; }
165165
///
166166
ref const(RCArray!(immutable T)) inversedBarycentricWeights() { return _inversedBarycentricWeights; }
167167
///

source/mir/interpolate/spline.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -846,14 +846,14 @@ struct Spline(F, size_t N = 1, X = F)
846846
Spline lightImmutable() immutable @property { return *cast(Spline*)&this; }
847847

848848
///
849-
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() scope return const @property
849+
Slice!(RCI!(immutable X)) grid(size_t dimension = 0)() return scope const @property
850850
if (dimension < N)
851851
{
852852
return _grid[dimension].lightConst.sliced(_data._lengths[dimension]);
853853
}
854854

855855
///
856-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
856+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
857857
if (dimension < N)
858858
{
859859
return _grid[dimension]._iterator[0 .. _data._lengths[dimension]];
@@ -1668,7 +1668,7 @@ struct MetaSpline(T, X)
16681668
MetaLinear lightConst()() const @property { return *cast(MetaLinear*)&this; }
16691669

16701670
///
1671-
immutable(X)[] gridScopeView(size_t dimension = 0)() scope return const @property @trusted
1671+
immutable(X)[] gridScopeView(size_t dimension = 0)() return scope const @property @trusted
16721672
if (dimension == 0)
16731673
{
16741674
return splines[0].gridScopeView;

source/mir/ndslice/iterator.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,7 @@ struct FlattenedIterator(Iterator, size_t N, SliceKind kind)
19581958

19591959
static if (isMutable!(_slice.DeepElement) && !_slice.hasAccessByRef)
19601960
///
1961-
auto ref opIndexAssign(E)(scope ref E elem, size_t index) scope return
1961+
auto ref opIndexAssign(E)(scope ref E elem, size_t index) return scope
19621962
{
19631963
return _slice._iterator[getShift(index)] = elem;
19641964
}

0 commit comments

Comments
 (0)