diff options
| author | rodrimati1992 <rodrimatt1985@gmail.com> | 2021-01-31 14:20:04 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-31 14:20:04 -0300 |
| commit | 21c2343d3f95348b10b3b6ff73c3c237eea89c32 (patch) | |
| tree | a98f000028a3630b8f4effd92b826cfff645f06c | |
| parent | aa83e2aa0489c56c2256a0853ebfab442f57061e (diff) | |
| download | rust-21c2343d3f95348b10b3b6ff73c3c237eea89c32.tar.gz rust-21c2343d3f95348b10b3b6ff73c3c237eea89c32.zip | |
Update comment about leaking
| -rw-r--r-- | library/core/src/mem/maybe_uninit.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index 9452eb83da0..3760f5c4794 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -192,7 +192,7 @@ use crate::ptr; /// unsafe { addr_of_mut!((*ptr).name).write("Bob".to_string()); } /// /// // Initializing the `list` field -/// // If there was a panic here, then the `String` in the `name` field would be leaked. +/// // If there is a panic here, then the `String` in the `name` field leaks. /// unsafe { addr_of_mut!((*ptr).list).write(vec![0, 1, 2]); } /// /// // All the fields are initialized, so we call `assume_init` to get an initialized Foo. |
