Skip to content

Commit 7cb77f0

Browse files
NEWS and deprecation for Void => Nothing rename
1 parent 399bc2e commit 7cb77f0

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

NEWS.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ This section lists changes that do not have deprecation warnings.
309309
finalized as its second (rather than the reverse). For the majority of use cases
310310
deprecation warnings will be triggered. However, deprecation warnings will not trigger where
311311
(1) the callable argument is not a subtype of `Function`; or (2) both arguments are
312-
`Function`s or `Ptr{Void}`s ([#24605]).
312+
`Function`s or `Ptr{Cvoid}`s ([#24605]).
313313

314314
* The `kill` function now throws errors on user error (e.g. on permission
315315
errors), but returns successfully if the process had previously exited.
@@ -844,10 +844,13 @@ Deprecated or removed
844844

845845
* `Associative` has been deprecated in favor of `AbstractDict` ([#25012]).
846846

847-
* `Nullable{T}` has been deprecated and moved to the Nullables package ([#23642]).
848-
Use `Union{T, Void}` instead, or `Union{Some{T}, Void}` if `nothing` is a possible value
849-
(i.e. `Void <: T`). `isnull(x)` can be replaced with `x === nothing`
850-
and `unsafe_get`/`get` can be dropped or replaced with `coalesce`.
847+
* `Void` has been renamed back to `Nothing` with an alias `Cvoid` for use when calling C
848+
with a return type of `Cvoid` or a return or argument type of `Ptr{Cvoid}` ([#25162]).
849+
850+
* `Nullable{T}` has been deprecated and moved to the Nullables package ([#23642]). Use
851+
`Union{T, Nothing}` instead, or `Union{Some{T}, Nothing}` if `nothing` is a possible
852+
value (i.e. `Nothing <: T`). `isnull(x)` can be replaced with `x === nothing` and
853+
`unsafe_get`/`get` can be dropped or replaced with `coalesce`.
851854
`NullException` has been removed.
852855

853856
* `CartesianRange` has been renamed `CartesianIndices` ([#24715]).

base/deprecated.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,6 +3320,9 @@ info(io::IO, err::Exception; prefix="ERROR: ", kw...) =
33203320
info(err::Exception; prefix="ERROR: ", kw...) =
33213321
info(STDERR, err, prefix=prefix; kw...)
33223322

3323+
# issue #25082
3324+
@deprecate_binding Void Nothing
3325+
33233326
# #24844
33243327
@deprecate copy!(dest::AbstractSet, src) union!(dest, src)
33253328
@deprecate copy!(dest::AbstractDict, src) foldl(push!, dest, src)

0 commit comments

Comments
 (0)