Removed "scheduled for deprecation" pragmas.

The pragmas have not been as effective as we might have liked, since
they only work with templates and can't tell you where in your code you
need to make changes, and they seemed to have been more annoying to
programmers than helpful, so we're going to discontinue them. We'll
leave them in for stuff that's actually been deprecated until deprecated
has been improved enough to take a message, but we'll leave "scheduled
for deprecation" messages to the documentation and changelog.
This commit is contained in:
jmdavis 2011-10-23 23:11:17 -07:00
parent 364a349f07
commit 256976dddd
10 changed files with 65 additions and 133 deletions

View file

@ -501,15 +501,6 @@ T enforceEx(E, T)(T value, lazy string msg = "", string file = __FILE__, size_t
T enforceEx(E, T)(T value, lazy string msg = "") @safe pure
if (is(typeof(new E(msg))) && !is(typeof(new E(msg, __FILE__, __LINE__))))
{
import std.metastrings;
pragma(msg, Format!("Notice: As of Phobos 2.055, the version of enforceEx which " ~
"constructs its exception with new E(msg) instead of " ~
"new E(msg, file, line) has been scheduled for " ~
"deprecation in February 2012. Please update %s's " ~
"constructor so that it can be constructed with " ~
"new %s(msg, file, line).", E.stringof, E.stringof));
if (!value) throw new E(msg);
return value;
}