From 0aa2725d81fed94bf4bd6d67433069c94a335151 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Wed, 15 May 2019 09:05:51 +0200 Subject: [PATCH] Allow building DUB with -preview=dip1000 --- .travis.yml | 4 ++-- source/dub/internal/vibecompat/core/file.d | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4b2fbd8ccc..daa793d67c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,8 @@ jobs: - d: gdc include: - stage: test - d: dmd-2.086.0 - env: [FRONTEND=2.086] + d: dmd-2.087.0 + env: [FRONTEND=2.087, DFLAGS=-preview=dip1000] - d: dmd-2.081.1 env: [FRONTEND=2.081] - d: dmd-2.080.1 diff --git a/source/dub/internal/vibecompat/core/file.d b/source/dub/internal/vibecompat/core/file.d index 26321d466e..fb8b95fe14 100644 --- a/source/dub/internal/vibecompat/core/file.d +++ b/source/dub/internal/vibecompat/core/file.d @@ -28,8 +28,8 @@ struct RangeFile { @safe: std.stdio.File file; - void put(in ubyte[] bytes) @trusted { file.rawWrite(bytes); } - void put(in char[] str) { put(cast(const(ubyte)[])str); } + void put(const scope ubyte[] bytes) @trusted { file.rawWrite(bytes); } + void put(const scope char[] str) { put(cast(const(ubyte)[])str); } void put(char ch) @trusted { put((&ch)[0 .. 1]); } void put(dchar ch) { char[4] chars; put(chars[0 .. encode(chars, ch)]); }