From df9ff377807942b0cf3f88f48a33b3ade47bbb64 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 12 Jul 2023 07:12:09 -0700 Subject: [PATCH] Clarify what it means "to document" a transparent type. --- src/doc/src/reference/semver.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/src/reference/semver.md b/src/doc/src/reference/semver.md index be625d6532cb..17280190727c 100644 --- a/src/doc/src/reference/semver.md +++ b/src/doc/src/reference/semver.md @@ -265,7 +265,8 @@ In some cases, types with a `repr` attribute may not have an alignment, layout, In these cases, it may be safe to make changes to the types, though care should be exercised. For example, types with private fields that do not otherwise document their alignment, layout, or size guarantees cannot be relied upon by external crates since the public API does not fully define the alignment, layout, or size of the type. -A common example where a type with *private* fields is well-defined is a type with a single private field with a generic type, using `repr(transparent)`, and which is documented as being transparent to the generic type. +A common example where a type with *private* fields is well-defined is a type with a single private field with a generic type, using `repr(transparent)`, +and the prose of the documentation discusses that it is transparent to the generic type. For example, see [`UnsafeCell`]. [the default representation]: ../../reference/type-layout.html#the-default-representation