From 262c34477862edf25e70008c79797ca1dbe8bb76 Mon Sep 17 00:00:00 2001 From: dkorpel Date: Tue, 23 Nov 2021 19:16:33 +0100 Subject: [PATCH] Use `-preview=dip1000` instead of `-dip1000` --- posix.mak | 2 +- src/core/lifetime.d | 4 ++-- test/common.mak | 2 +- win32.mak | 4 ++-- win64.mak | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/posix.mak b/posix.mak index 3e0e2d6fb4..7b3a1e514a 100644 --- a/posix.mak +++ b/posix.mak @@ -76,7 +76,7 @@ ifeq (solaris,$(OS)) endif # Set DFLAGS -UDFLAGS:=-conf= -Isrc -Iimport -w -de -dip1000 -preview=fieldwise $(MODEL_FLAG) $(PIC) $(OPTIONAL_COVERAGE) -preview=dtorfields +UDFLAGS:=-conf= -Isrc -Iimport -w -de -preview=dip1000 -preview=fieldwise $(MODEL_FLAG) $(PIC) $(OPTIONAL_COVERAGE) -preview=dtorfields ifeq ($(BUILD),debug) UDFLAGS += -g -debug DFLAGS:=$(UDFLAGS) diff --git a/src/core/lifetime.d b/src/core/lifetime.d index bf2cdcfdf7..b3584a8f85 100644 --- a/src/core/lifetime.d +++ b/src/core/lifetime.d @@ -1921,7 +1921,7 @@ private void moveImpl(T)(scope ref T target, return scope ref T source) static if (is(T == struct)) { - // Unsafe when compiling without -dip1000 + // Unsafe when compiling without -preview=dip1000 if ((() @trusted => &source == &target)()) return; // Destroy target before overwriting it static if (hasElaborateDestructor!T) target.__xdtor(); @@ -2099,7 +2099,7 @@ private void moveEmplaceImpl(T)(scope ref T target, return scope ref T source) static if (is(T == struct)) { - // Unsafe when compiling without -dip1000 + // Unsafe when compiling without -preview=dip1000 assert((() @trusted => &source !is &target)(), "source and target must not be identical"); static if (hasElaborateAssign!T || !isAssignable!T) diff --git a/test/common.mak b/test/common.mak index b4ea48f4eb..6045c95396 100644 --- a/test/common.mak +++ b/test/common.mak @@ -18,7 +18,7 @@ ifneq (default,$(MODEL)) MODEL_FLAG:=-m$(MODEL) endif CFLAGS_BASE:= $(MODEL_FLAG) $(PIC) -Wall -DFLAGS:=$(MODEL_FLAG) $(PIC) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -dip1000 -L-lpthread -L-lm +DFLAGS:=$(MODEL_FLAG) $(PIC) -w -I../../src -I../../import -I$(SRC) -defaultlib= -debuglib= -preview=dip1000 -L-lpthread -L-lm # LINK_SHARED may be set by importing makefile DFLAGS+=$(if $(LINK_SHARED),-L$(DRUNTIMESO),-L$(DRUNTIME)) ifeq ($(BUILD),debug) diff --git a/win32.mak b/win32.mak index 17b090f419..1715bf5074 100644 --- a/win32.mak +++ b/win32.mak @@ -14,8 +14,8 @@ HOST_DMD=dmd DOCDIR=doc IMPDIR=import -DFLAGS=-m$(MODEL) -conf= -O -release -dip1000 -preview=fieldwise -preview=dtorfields -inline -w -Isrc -Iimport -UDFLAGS=-m$(MODEL) -conf= -O -release -dip1000 -preview=fieldwise -w -Isrc -Iimport +DFLAGS=-m$(MODEL) -conf= -O -release -preview=dip1000 -preview=fieldwise -preview=dtorfields -inline -w -Isrc -Iimport +UDFLAGS=-m$(MODEL) -conf= -O -release -preview=dip1000 -preview=fieldwise -w -Isrc -Iimport DDOCFLAGS=-conf= -c -w -o- -Isrc -Iimport -version=CoreDdoc UTFLAGS=-version=CoreUnittest -unittest -checkaction=context diff --git a/win64.mak b/win64.mak index 1b4a920855..505d0d93b7 100644 --- a/win64.mak +++ b/win64.mak @@ -30,8 +30,8 @@ IMPDIR=import MAKE=make HOST_DMD=dmd -DFLAGS=-m$(MODEL) -conf= -O -release -dip1000 -preview=fieldwise -preview=dtorfields -inline -w -Isrc -Iimport -UDFLAGS=-m$(MODEL) -conf= -O -release -dip1000 -preview=fieldwise -w -version=_MSC_VER_$(_MSC_VER) -Isrc -Iimport +DFLAGS=-m$(MODEL) -conf= -O -release -preview=dip1000 -preview=fieldwise -preview=dtorfields -inline -w -Isrc -Iimport +UDFLAGS=-m$(MODEL) -conf= -O -release -preview=dip1000 -preview=fieldwise -w -version=_MSC_VER_$(_MSC_VER) -Isrc -Iimport DDOCFLAGS=-conf= -c -w -o- -Isrc -Iimport -version=CoreDdoc UTFLAGS=-version=CoreUnittest -unittest -checkaction=context