Allow the !Unpin impl to be turned off in #[recursively_pinned].
#96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow the
!Unpinimpl to be turned off in#[recursively_pinned].I've tried to explain in the docs why this isn't the default behavior. But for generics especially, it might be that the benefits of doing
?Unpinoutweigh the relatively minor costs!At any rate, there doesn't seem to be a strong need to force
!Unpin. The main effect if you do this for a generic type is that some traits become unimplementable, but there's not a strong reason to force all types to be able to implement those traits. They exist primarily for ecosystem compatibility with C++, and there is not, AFAIK, a need to force them to always exist if possible. And anyway, we can't force them to exist: any!Unpintype can choose not to implement them, and there's no user-distinguishable difference between a trait that isn't implemented by choice or by force!At the end of the day, this is a place where we can experiment and see what happens.
Note: I chose
?Unpinsyntax because it seemed most apropos, but I am not sure it is technically correct! The main alternative might be something likeUnpin=autoor similar.