Commit bf6f8a4
committed
Auto merge of rust-lang#135009 - DiuDiu777:box-doc, r=jhpratt
Fix doc for missing Box allocator consistency
### Description:
This PR addresses missing document regarding consistency of `Box::from_raw` and `Box::from_raw_in`.
- [from_raw](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.from_raw): The document now misses the raw pointer passed to `Box::from_raw` must point to a block of memory allocated by the `Global Allocator` (specified in source code).
- [from_raw_in](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.from_raw_in): The safety conditions don't include the allocator consistency.
Besides, [Boxed Memory Layout](https://doc.rust-lang.org/nightly/std/boxed/index.html#memory-layout) doesn't explicitly cover the allocator consistency issue.
This change builds upon the improvements made in [PR rust-lang#134496](rust-lang#134496).1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
1048 | 1050 | | |
1049 | 1051 | | |
1050 | 1052 | | |
| |||
1148 | 1150 | | |
1149 | 1151 | | |
1150 | 1152 | | |
| 1153 | + | |
1151 | 1154 | | |
1152 | 1155 | | |
1153 | 1156 | | |
| |||
0 commit comments