Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention that “every address” ≠ “every pointer” #1761

Merged
merged 3 commits into from
Mar 21, 2025

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Mar 17, 2025

This adds a note in case people are tempted to interpret “usize ... can represent every memory address” as saying that pointer→usize→pointer roundtrips are definitely okay. Since the reference does not yet discuss provenance and that’s a much larger matter, I have merely linked to relevant existing documentation inside and outside the reference.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Mar 17, 2025
This adds a note in case people are tempted to interpret “`usize` ... can represent every memory address” as saying that pointer→usize→pointer roundtrips are definitely okay. Since the reference does not yet discuss provenance and that’s a much larger matter, I have merely linked to relevant existing documentation inside and outside the reference.
@traviscross
Copy link
Contributor

cc @rust-lang/opsem

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the link should go to the md file so it works on GH as well.

Co-authored-by: Ralf Jung <post@ralfj.de>
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue Mar 21, 2025
Merged via the queue into rust-lang:master with commit cc1d51c Mar 21, 2025
5 checks passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 24, 2025
Update books

## rust-lang/book

23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70
2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC

- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297)
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295)
- Ch. 01: Show how to work offline (rust-lang/book#4294)
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293)
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292)
- Anchors on listings (rust-lang/book#4271)
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288)
- Ch. 20: correct listing number (rust-lang/book#4287)
- Ch. 10.3: clarify language detail (rust-lang/book#4284)
- Ch. 17: minor typos and link reference (rust-lang/book#4286)
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282)
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281)
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165)
- Ch 10.1 minor clarifications (rust-lang/book#4256)
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232)
- Ferris: always show, even when it’s small (rust-lang/book#4280)
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279)
- Persist printing error, NOT ErrorKind (rust-lang/book#4259)
- Typo: "2" should be "2 seconds" (rust-lang/book#4263)
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270)
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261)
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273)
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272)

## rust-lang/reference

5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f
2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC

- Fix diagnostic attribute typo (rust-lang/reference#1767)
- Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761)
- Rework range pattern rules (rust-lang/reference#1756)
- Use warning block in behavior-considered-undefined (rust-lang/reference#1759)
- Add reference for asm-goto (rust-lang/reference#1693)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2025
Rollup merge of rust-lang#138894 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70
2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC

- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297)
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295)
- Ch. 01: Show how to work offline (rust-lang/book#4294)
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293)
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292)
- Anchors on listings (rust-lang/book#4271)
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288)
- Ch. 20: correct listing number (rust-lang/book#4287)
- Ch. 10.3: clarify language detail (rust-lang/book#4284)
- Ch. 17: minor typos and link reference (rust-lang/book#4286)
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282)
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281)
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165)
- Ch 10.1 minor clarifications (rust-lang/book#4256)
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232)
- Ferris: always show, even when it’s small (rust-lang/book#4280)
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279)
- Persist printing error, NOT ErrorKind (rust-lang/book#4259)
- Typo: "2" should be "2 seconds" (rust-lang/book#4263)
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270)
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261)
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273)
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272)

## rust-lang/reference

5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f
2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC

- Fix diagnostic attribute typo (rust-lang/reference#1767)
- Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761)
- Rework range pattern rules (rust-lang/reference#1756)
- Use warning block in behavior-considered-undefined (rust-lang/reference#1759)
- Add reference for asm-goto (rust-lang/reference#1693)
@kpreid kpreid deleted the patch-2 branch March 25, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants