-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking issue for RFC 1857: Stabilize drop order #43034
Comments
Besides documentation, I think a couple of tests would be useful as well to prevent accidentally changing the order. |
@aturon In the RFC I mentioned updating the book, but upon second thought relying on a particular drop order seems to be a niche use case. Therefore it seems reasonable to me to omit it in the book and only mention it in the reference. Do you agree with that? |
The book should mention that the drop order is specified, but can refer the reader to the reference for elaboration. |
@steveklabnik @carols10cents I am trying to find a good place in the book to put tell that drop order is specified. I guess if we were to do this it would go in the chapter about drop. Unfortunately, the example uses a struct with only one field, so we cannot use the example to talk about drop order. Maybe we could add an extra field and then explain which field is dropped first? Then, we could link to the reference for more information. I am still not sure about mentioning drop order in the book, so I am also interested in your opinion regarding that. |
Yes, we should mention it; we already do in the lifetimes section, I believe. The |
The "panic during initialization drops elements in reverse order" is actually a part of the "temporary lifetimes" rules, which are described in https://github.com/nikomatsakis/rust-memory-model/issues/17. Do we want to document them? |
Add regression tests to ensure stable drop order Work towards rust-lang#43034 I think this is all we need to do on the testing front regarding RFC 1857
I believe there's nothing left to do here, so closing. |
RFC
For this RFC, what's needed is documentation. There's no behavioral change or feature-flag stabilization.
The text was updated successfully, but these errors were encountered: