Skip to content

Commit 340c25a

Browse files
committed
Clarify claims about PhantomData<T>.
This wording was too strong. Fixes #27523
1 parent c980aba commit 340c25a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libcore/marker.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@ macro_rules! impls{
273273
/// even though it does not. This allows you to inform the compiler about certain safety properties
274274
/// of your code.
275275
///
276-
/// Though they both have scary names, `PhantomData<T>` and "phantom types" are unrelated. 👻👻👻
276+
/// # A ghastly note 👻👻👻
277+
///
278+
/// Though they both have scary names, `PhantomData<T>` and 'phantom types' are related, but not
279+
/// identical. Phantom types are a more general concept that don't require `PhantomData<T>` to
280+
/// implement, but `PhantomData<T>` is the most common way to implement them in a correct manner.
277281
///
278282
/// # Examples
279283
///

0 commit comments

Comments
 (0)