Move some deprecations along.

This commit is contained in:
jmdavis 2014-10-26 19:31:08 -07:00
parent 621c762837
commit 76df657bb4
5 changed files with 2 additions and 117 deletions

View file

@ -156,28 +156,6 @@ struct Complex(T) if (isFloatingPoint!T)
sink("i");
}
/*
* Explicitly undocumented. It will be removed in October 2014.
* Please use $(XREF string,format) instead.
*/
deprecated("Please use std.string.format instead.")
string toString(scope void delegate(const(char)[]) sink,
string formatSpec = "%s")
const
{
if (sink == null)
{
import std.exception : assumeUnique;
char[] buf;
buf.reserve(100);
formattedWrite((const(char)[] s) { buf ~= s; }, formatSpec, this);
return assumeUnique(buf);
}
formattedWrite(sink, formatSpec, this);
return null;
}
@safe pure nothrow @nogc:
this(R : T)(Complex!R z)
@ -633,25 +611,6 @@ unittest
assert (z.re == 2.0 && z.im == 2.0);
}
deprecated unittest
{
// Convert to string.
// Using default format specifier
auto z1 = Complex!real(0.123456789, 0.123456789);
char[] s1;
z1.toString((const(char)[] c) { s1 ~= c; });
assert (s1 == "0.123457+0.123457i");
assert (s1 == z1.toString());
// Using custom format specifier
auto z2 = conj(z1);
char[] s2;
z2.toString((const(char)[] c) { s2 ~= c; }, "%.8e");
assert (s2 == "1.23456789e-01-1.23456789e-01i");
assert (s2 == z2.toString(null, "%.8e"));
}
/* Makes Complex!(Complex!T) fold to Complex!T.

View file

@ -3001,18 +3001,7 @@ auto dirEntries(string path, string pattern, SpanMode mode,
return filter!f(DirIterator(path, mode, followSymlink));
}
/++
$(RED Deprecated. It will be removed in July 2014.
Please use $(LREF DirEntry) constructor directly instead.)
Returns a DirEntry for the given file (or directory).
Params:
name = The file (or directory) to get a DirEntry for.
Throws:
$(D FileException) if the file does not exist.
+/
// Explicitly undocumented. It will be removed in July 2015.
deprecated("Please use DirEntry constructor directly instead.")
DirEntry dirEntry(in char[] name)
{

View file

@ -1,3 +1,3 @@
// Scheduled for removal in April 2014.
// Explicitly undocumented. It will be removed in April 2015.
deprecated("Please use std.string.format, std.conv.to or std.conv.parse instead")
module std.metastrings;

View file

@ -3341,55 +3341,6 @@ unittest
});
}
// Explicitly undocumented. It will be removed in July 2014.
deprecated("Please use std.string.format instead.") alias xformat = format;
deprecated unittest
{
debug(string) printf("std.string.xformat.unittest\n");
assertCTFEable!(
{
// assert(xformat(null) == "");
assert(xformat("foo") == "foo");
assert(xformat("foo%%") == "foo%");
assert(xformat("foo%s", 'C') == "fooC");
assert(xformat("%s foo", "bar") == "bar foo");
assert(xformat("%s foo %s", "bar", "abc") == "bar foo abc");
assert(xformat("foo %d", -123) == "foo -123");
assert(xformat("foo %d", 123) == "foo 123");
assertThrown!FormatException(xformat("foo %s"));
assertThrown!FormatException(xformat("foo %s", 123, 456));
});
}
// Explicitly undocumented. It will be removed in July 2014.
deprecated("Please use std.string.sformat instead.") alias xsformat = sformat;
deprecated unittest
{
debug(string) printf("std.string.xsformat.unittest\n");
assertCTFEable!(
{
char[10] buf;
assert(xsformat(buf[], "foo") == "foo");
assert(xsformat(buf[], "foo%%") == "foo%");
assert(xsformat(buf[], "foo%s", 'C') == "fooC");
assert(xsformat(buf[], "%s foo", "bar") == "bar foo");
assertThrown!RangeError(xsformat(buf[], "%s foo %s", "bar", "abc"));
assert(xsformat(buf[], "foo %d", -123) == "foo -123");
assert(xsformat(buf[], "foo %d", 123) == "foo 123");
assertThrown!FormatException(xsformat(buf[], "foo %s"));
assertThrown!FormatException(xsformat(buf[], "foo %s", 123, 456));
assert(xsformat(buf[], "%s %s %s", "c"c, "w"w, "d"d) == "c w d");
});
}
/***********************************************
* See if character c is in the pattern.

View file

@ -1279,20 +1279,6 @@ public:
return value;
}
//Explicitly undocumented. It will be removed in July 2014.
deprecated("Please use value_DWORD instead.")
uint value_DWORD_LITTLEENDIAN()
{
return value_DWORD;
}
//Explicitly undocumented. It will be removed in July 2014.
deprecated("Please use value_DWORD instead.")
uint value_DWORD_BIGENDIAN()
{
return value_DWORD;
}
/**
Obtains the value as a 64-bit unsigned integer, ordered correctly
according to the current architecture.