Skip to content

Commit 98ecb3d

Browse files
authored
Merge pull request #3314 from ssbr/patch-1
Fix order of operations typo in RFC 2514
2 parents ff29887 + ef63d06 commit 98ecb3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/2514-union-initialization-and-drop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ and while writing to a union field is safe, taking a reference is not.
201201

202202
For this reason, `DerefMut` auto-deref is not applied when working on a union or
203203
its fields. However, note that manually dereferencing is still possible, so
204-
`*(u.f).0 = Vec::new()` is still a way to drop an uninitialized field! But this
204+
`(*u.f).0 = Vec::new()` is still a way to drop an uninitialized field! But this
205205
can never happen when no `*` is involved, and hopefully dereferencing an element
206206
of a union is a clear enough signal that the union better be initialized
207207
properly for this to make sense.

0 commit comments

Comments
 (0)