You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The nomicon page for PhantomData (src/phantom-data.md) contains the paragraph as follows:
However because 'a is unused within the struct's body, it's unbounded. Because of the troubles this has historically caused, unbounded lifetimes and types are forbidden in struct definitions. Therefore we must somehow refer to these types in the body. Correctly doing this is necessary to have correct variance and drop checking.
I think it would be nice to add in a few links to troubles(GitHub issues or forum discussions) that were caused by unbounded lifetimes and types inside struct definitions.
If anyone is aware of relevant GitHub issues, adding them to the document would be helpful for new Rust learners.
As a Rust learner-in-progress myself, I'm not yet aware of the history of troubles that unbounded lifetimes and types caused in Rust, but maybe I could also try to find some relevant links to be added.