-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Incorrect documentation on read_and_drop #31599
Comments
Filling drop is a temporary "feature" of rust, and in the long run this function will not be needed once the in-struct drop flags are gone. In anticipation of this improvement, it would be best to not write any code that relies on read_and_drop. Edit: Well maybe that's exactly what to have in the docs.. |
I'm not using that function, I was merely browsing the docs and noticed the documentation was wrong. I would expect the documentation of functions to be correct even if they are unstable and scheduled for removal, unless the removal is scheduled for the immediate future. |
The documentation of the unstable function
core::ptr::read_and_drop
makes a reference toread_and_zero
, but this function does not exist (anymore?). Expressing the semantics ofread_and_drop
in terms of something that does not exist is unhelpful.The problem seems to be located here.
I imagine the fix would involve traveling back in time until before
read_and_zero
was removed and copying its documentation, after correcting for the differences between it and theread_and_drop
function.@steveklabnik
The text was updated successfully, but these errors were encountered: