-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools
Description
Location
https://doc.rust-lang.org/std/marker/struct.PhantomData.html#ownership-and-the-drop-check, via
rust/library/core/src/marker.rs
Line 728 in 21e6de7
| /// `T` in very rare circumstances. This in turn has effects on the Rust compiler's [drop check] |
Summary
#103413 updated the documentation for PhantomData to say
Currently, adding a field of type
PhantomData<T>indicates that your type owns data of typeTin very rare circumstances.
I don't understand. How rare must these circumstances be for me to use PhantomData? What should I do if my type always owns data of type T?
I guess this is not what was meant, but I am finding it hard to figure out what the intention was and propose an improvement.
Possibly just remove the phrase "in very rare circumstances"?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and tools