We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Drop
1 parent f85d006 commit d81ddc8Copy full SHA for d81ddc8
src/libs/maintaining-std.md
@@ -202,6 +202,7 @@ struct OptionCell<T> {
202
impl<T> Drop for OptionCell<T> {
203
fn drop(&mut self) {
204
if self.is_init {
205
+ // Safety: `value` is guaranteed to be fully initialized when `is_init` is true.
206
// Safety: The cell is being dropped, so it can't be accessed again.
207
drop(unsafe { self.value.read() });
208
}
0 commit comments