Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dmd/cli.d
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ dmd -cov -unittest myprog.d
static immutable reverts = [
Feature("dip25", "noDIP25", "revert DIP25 changes https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP25.md"),
Feature("markdown", "markdown", "disable Markdown replacements in Ddoc"),
Feature("dip1000", "noVsafe", "revert DIP1000 changes https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000.md"),
];

/// Returns all available previews
Expand Down
1 change: 1 addition & 0 deletions src/dmd/globals.d
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ extern (C++) struct Param
* before becoming default.
*/
bool vsafe; // use enhanced @safe checking
bool noVsafe; // revert to pre-DIP1000 behavior
bool ehnogc; // use @nogc exception handling
bool dtorFields; // destruct fields of partially constructed objects
// https://issues.dlang.org/show_bug.cgi?id=14246
Expand Down
1 change: 1 addition & 0 deletions src/dmd/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ struct Param
bool fixAliasThis; // if the current scope has an alias this, check it before searching upper scopes
bool inclusiveInContracts; // 'in' contracts of overridden methods must be a superset of parent contract
bool vsafe; // use enhanced @safe checking
bool noVsafe; // revert to pre-DIP1000 behavior
bool ehnogc; // use @nogc exception handling
bool dtorFields; // destruct fields of partially constructed objects
// https://issues.dlang.org/show_bug.cgi?id=14246
Expand Down
14 changes: 14 additions & 0 deletions src/dmd/mars.d
Original file line number Diff line number Diff line change
Expand Up @@ -2579,6 +2579,20 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param
continue;
}
}

if (!params.vsafe && !params.noVsafe)
{
deprecation(
Loc.initial,
"-preview=dip1000 will become the default then deprecated.");
deprecationSupplemental(
Loc.initial,
"Please use -revert=dip1000 to maintain current behavior.");
deprecationSupplemental(
Loc.initial,
"https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000.md");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahem, this DIP is superseeded

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I guess the link should be this then?

}

return errors;
}

Expand Down