-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs prose say Sleep doesn't implement Unpin, but sidebar does #5901
Comments
The definition of the impl comes from pin project, and is conditional: impl<'__pin> Unpin for Sleep
where
__Origin<'__pin>: Unpin, It ends up meaning that Sleep is not Unpin. |
This is a rustdoc bug: rust-lang/rust#80481 We may want to mention in the documentation that rustdoc cannot display this correctly. |
It's a bit annoying, but we could fix this by not using pin-project-lite for |
I think it is ok to add pin-project's !Unpin equivalent to pin-project-lite and hide the Unpin implementation from the document. As I said previously, I do not favor making our code vulnerable to human error to avoid rustdoc issue. |
Yeah, I know. I also agree that it would be vastly preferable to make the macro support it directly. |
Since v1.1.0, Sleep has been documented as follows:
But the autogenerated sidebar says it does implement Unpin, since v1.0.1. I did find #3267 and #3278 and even #3278 (comment):
And yet Sleep is Unpin.I tested locally incorrectly and thought Sleep was actually Unpin, but it's just the autogenerated docs that are confusing.The text was updated successfully, but these errors were encountered: