mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
92a2343356
fix: add aliasing rules for Box This is a new revised version for the PR [139857](https://github.com/rust-lang/rust/pull/139857), sorry for the delayed reply. I've rewritten the sentence to closely mirror the wording from `Vec::from_raw_parts`, which clearly states the transfer of ownership and its consequences. This should make the aliasing requirements much clearer. I opted not to include a note about `mem::forget` by default to keep the documentation focused on the primary contract, similar to `Vec`.