]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #83579 - RalfJung:ptr-arithmetic, r=dtolnay
authorDylan DPC <dylan.dpc@gmail.com>
Tue, 30 Mar 2021 09:34:26 +0000 (11:34 +0200)
committerGitHub <noreply@github.com>
Tue, 30 Mar 2021 09:34:26 +0000 (11:34 +0200)
commit5b67543c981d13233b2f4f2004b7de8abf279d54
tree60bebcadc524586f9a0a2b598ee80da93ec2a390
parentad2a80e412768fd2c9a162a3b68e1489af446f2f
parent4f03f94863dda70ea42ce772b790a520f1490647
Rollup merge of #83579 - RalfJung:ptr-arithmetic, r=dtolnay

Improve pointer arithmetic docs

* Add slightly more detailed definition of "allocated object" to the module docs, and link it from everywhere.
* Clarify the "remains attached" wording a bit (at least I hope this is clearer).
* Remove the sentence about using integer arithmetic; this seems to confuse people even if it is technically correct.

As usual, the edit needs to be done in a dozen places to remain consistent, I hope I got them all.
library/core/src/ptr/mod.rs