rust-lang / nomicon

The Dark Arts of Advanced and Unsafe Rust Programming
https://doc.rust-lang.org/nomicon/
Apache License 2.0
1.79k stars 261 forks source link

Change code for `into_iter` on the `RawVec` section for consistency/soundness #302

Closed zachmatson closed 3 years ago

zachmatson commented 3 years ago

Just making this consistent with https://github.com/rust-lang/nomicon/blob/master/src/vec/vec-into-iter.md for the section about creating the IntoIter to avoid offsetting a dangling pointer.