Rollup merge of #151838 - ionicmc-rs:patch-1, r=jhpratt
Fix typo for Maybe dangling docs Boxe's -> Box's
This commit is contained in:
commit
4b850fa94e
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ use crate::{mem, ptr};
|
|||
/// mem::forget(boxed); // <-- this is UB!
|
||||
/// ```
|
||||
///
|
||||
/// Even though the `Box`e's destructor is not run (and thus we don't have a double free bug), this
|
||||
/// Even though the `Box`'s destructor is not run (and thus we don't have a double free bug), this
|
||||
/// code is still UB. This is because when moving `boxed` into `forget`, its validity invariants
|
||||
/// are asserted, causing UB since the `Box` is dangling. The safety comment is as such wrong, as
|
||||
/// moving the `boxed` variable as part of the `forget` call *is* a use.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue