Skip to content

Commit 7407c67

Browse files
committed
add NEWS for mutable struct singletons change (#25854)
also a small doc clarification [ci skip]
1 parent 9f8496c commit 7407c67

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ Language changes
6060
* The syntax `1.+2` is deprecated, since it is ambiguous: it could mean either
6161
`1 .+ 2` (the current meaning) or `1. + 2` ([#19089]).
6262

63+
* Mutable structs with no fields are no longer singletons; it is now possible to make
64+
multuple instances of them that can be distinguished by `===` ([#25854]).
65+
Zero-size immutable structs are still singletons.
66+
6367
* In string and character literals, backslash `\` may no longer
6468
precede unrecognized escape characters ([#22800]).
6569

doc/src/manual/types.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ to point to different objects.
387387
Where required, mutable composite objects can be declared with the keyword `mutable struct`, to be
388388
discussed in the next section.
389389

390-
Composite types with no fields are singletons; there can be only one instance of such types:
390+
Immutable composite types with no fields are singletons; there can be only one instance of such types:
391391

392392
```jldoctest
393393
julia> struct NoFields

0 commit comments

Comments
 (0)