diff --git a/std/typecons.d b/std/typecons.d index 471c6f235bf..3fd09c59a67 100644 --- a/std/typecons.d +++ b/std/typecons.d @@ -2960,7 +2960,6 @@ Params: Gets the value if not null. If `this` is in the null state, and the optional parameter `fallback` was provided, it will be returned. Without `fallback`, calling `get` with a null state is invalid. -This function is also called for the implicit conversion to `T`. Params: fallback = the value to return in case the `Nullable` is null. @@ -2982,7 +2981,7 @@ Returns: } /// -deprecated +deprecated("Implicit conversion with `alias Nullable.get this` is deprecated. Please use `.get` explicitly.") @system unittest { import core.exception : AssertError; @@ -3000,7 +2999,7 @@ deprecated assert(i == 5); } - deprecated("Deprecated to rely on implicit Nullable.get. Please use .get explicitly instead.") + deprecated("Implicit conversion with `alias Nullable.get this` is deprecated. Please use `.get` explicitly.") @property ref inout(T) get_() inout @safe pure nothrow { enum message = "Called `get' on null Nullable!" ~ T.stringof ~ "."; @@ -3024,6 +3023,7 @@ deprecated /** Implicitly converts to `T`. `this` must not be in the null state. +This feature is deprecated. */ alias get_ this; } @@ -3080,7 +3080,7 @@ auto nullable(T)(T t) assertThrown!Throwable(a.get); } -deprecated("Deprecated to rely on implicit Nullable.get. Please use .get explicitly instead.") +deprecated("Implicit conversion with `alias Nullable.get this` is deprecated. Please use `.get` explicitly.") @system unittest { import std.exception : assertThrown;