summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dub.json3
-rw-r--r--encoding/dub.json3
-rw-r--r--meta/dub.json3
-rw-r--r--middle/dub.json3
-rw-r--r--os/dub.json3
-rw-r--r--os/tanya/os/error.d4
-rw-r--r--source/tanya/algorithm/iteration.d6
-rw-r--r--source/tanya/container/array.d2
-rw-r--r--source/tanya/container/list.d4
-rw-r--r--source/tanya/range/adapter.d4
-rw-r--r--sys/dub.json3
-rw-r--r--test/dub.json3
12 files changed, 24 insertions, 17 deletions
diff --git a/dub.json b/dub.json
index 8fcc299..f0186df 100644
--- a/dub.json
+++ b/dub.json
@@ -53,7 +53,6 @@
{
"name": "unittest",
"versions": ["TanyaPhobos"],
- "dflags": ["-dip25"],
"importPaths": [
"./source",
"./tests"
@@ -80,6 +79,8 @@
}
],
+ "dflags": ["-dip1000"],
+
"libs-windows": ["advapi32"],
"libs-windows-x86_mscoff": ["iphlpapi"],
"libs-windows-x86_64": ["iphlpapi"]
diff --git a/encoding/dub.json b/encoding/dub.json
index 00ef6de..441f29d 100644
--- a/encoding/dub.json
+++ b/encoding/dub.json
@@ -12,5 +12,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}
diff --git a/meta/dub.json b/meta/dub.json
index 663d2fd..beca5d5 100644
--- a/meta/dub.json
+++ b/meta/dub.json
@@ -8,5 +8,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}
diff --git a/middle/dub.json b/middle/dub.json
index eecf1d4..f490141 100644
--- a/middle/dub.json
+++ b/middle/dub.json
@@ -18,5 +18,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}
diff --git a/os/dub.json b/os/dub.json
index 647e24d..31537a1 100644
--- a/os/dub.json
+++ b/os/dub.json
@@ -12,5 +12,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}
diff --git a/os/tanya/os/error.d b/os/tanya/os/error.d
index 0fabfc2..c1b70c6 100644
--- a/os/tanya/os/error.d
+++ b/os/tanya/os/error.d
@@ -307,14 +307,14 @@ struct ErrorCode
*
* Returns: $(D_KEYWORD this).
*/
- ref ErrorCode opAssign(const ErrorNo that) @nogc nothrow pure @safe
+ ref ErrorCode opAssign(const ErrorNo that) return @nogc nothrow pure @safe
{
this.value_ = that;
return this;
}
/// ditto
- ref ErrorCode opAssign(const ErrorCode that) @nogc nothrow pure @safe
+ ref ErrorCode opAssign(const ErrorCode that) return @nogc nothrow pure @safe
{
this.value_ = that.value_;
return this;
diff --git a/source/tanya/algorithm/iteration.d b/source/tanya/algorithm/iteration.d
index 422edf2..f759e1d 100644
--- a/source/tanya/algorithm/iteration.d
+++ b/source/tanya/algorithm/iteration.d
@@ -39,7 +39,7 @@ private enum hasConstLength(T) = is(typeof(((const T* a) => (*a).length)(null))
private enum hasConstSave(T) = is(typeof(((const T* a) => (*a).save())(null)) : T);
private enum hasConstSlice(T) = is(typeof(((const T* a) => (*a)[0 .. $])(null)) : T);
-unittest
+@nogc nothrow pure @safe unittest
{
// Test the definitions.
static assert(hasInoutFront!string);
@@ -420,7 +420,7 @@ private struct Retro(Range)
@disable this();
- private this(Range source)
+ private this(Range source) @safe
{
this.source = source;
}
@@ -545,7 +545,7 @@ private struct Retro(Range)
*
* Returns: Bidirectional range with the elements order reversed.
*/
-auto retro(Range)(return Range range)
+auto retro(Range)(Range range)
if (isBidirectionalRange!Range)
{
// Special case: retro(retro(range)) is range
diff --git a/source/tanya/container/array.d b/source/tanya/container/array.d
index 704dc35..5b3f522 100644
--- a/source/tanya/container/array.d
+++ b/source/tanya/container/array.d
@@ -586,7 +586,7 @@ struct Array(T)
*
* Precondition: $(D_PARAM r) refers to a region of $(D_KEYWORD this).
*/
- Range remove(Range r)
+ Range remove(scope Range r)
in (r.container is &this)
in (r.begin >= this.data)
in (r.end <= end)
diff --git a/source/tanya/container/list.d b/source/tanya/container/list.d
index caa7bd0..c01b863 100644
--- a/source/tanya/container/list.d
+++ b/source/tanya/container/list.d
@@ -664,7 +664,7 @@ struct SList(T)
*
* Precondition: $(D_PARAM r) is extracted from this list.
*/
- Range remove(Range r)
+ Range remove(scope Range r)
in (checkRangeBelonging(r))
{
auto outOfScopeList = typeof(this)(allocator);
@@ -1907,7 +1907,7 @@ struct DList(T)
*
* Precondition: $(D_PARAM r) is extracted from this list.
*/
- Range remove(Range r)
+ Range remove(scope Range r)
in (checkRangeBelonging(r))
{
// Save references to the elements before and after the range.
diff --git a/source/tanya/range/adapter.d b/source/tanya/range/adapter.d
index c39f51c..8159005 100644
--- a/source/tanya/range/adapter.d
+++ b/source/tanya/range/adapter.d
@@ -23,7 +23,7 @@ private mixin template InserterCtor()
{
private Container* container;
- private this(ref Container container) @trusted
+ private this(return scope ref Container container) @trusted
{
this.container = &container;
}
@@ -163,7 +163,7 @@ if (isArray!Array)
{
private E[] data;
- private this(ref Array data) @trusted
+ private this(return scope ref Array data) @trusted
{
this.data = data[];
}
diff --git a/sys/dub.json b/sys/dub.json
index 9201582..3db3888 100644
--- a/sys/dub.json
+++ b/sys/dub.json
@@ -8,5 +8,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}
diff --git a/test/dub.json b/test/dub.json
index 292bd9d..e0fc8af 100644
--- a/test/dub.json
+++ b/test/dub.json
@@ -12,5 +12,6 @@
],
"importPaths": [
"."
- ]
+ ],
+ "dflags": ["-dip1000"]
}