From f66935f40d58e33c2882f5899186dce743bc91ad Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 15 Apr 2019 06:42:57 +0200 Subject: Build with -dip1000. Fix #85 --- source/tanya/algorithm/iteration.d | 6 +++--- source/tanya/container/array.d | 2 +- source/tanya/container/list.d | 4 ++-- source/tanya/range/adapter.d | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source') 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[]; } -- cgit v1.2.3