Skip to content

place "place projection" definition in glossary#2231

Open
tshepang wants to merge 2 commits intorust-lang:masterfrom
tshepang:place-definition-in-glossary
Open

place "place projection" definition in glossary#2231
tshepang wants to merge 2 commits intorust-lang:masterfrom
tshepang:place-definition-in-glossary

Conversation

@tshepang
Copy link
Copy Markdown
Member

The term is defined in 2 separate places, and the definitions do not match.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Apr 18, 2026
The term is defined in 2 separate places, and the definitions do not match.
@tshepang tshepang force-pushed the place-definition-in-glossary branch from ee20d57 to aecd061 Compare April 18, 2026 21:04
@ehuss
Copy link
Copy Markdown
Contributor

ehuss commented Apr 20, 2026

I'm not sure these are intended to be the same.

@RalfJung Is the definition of place projection intended to be the same for these two scenarios (closure capture and UB pointer arithmetic)?

@RalfJung
Copy link
Copy Markdown
Member

Yeah this changes the opsem page to suddenly include pointer deref's and that doesn't make sense in that context (since it is talking about pointer arithmetic, and a deref isn't pointer arithmetic).

@tshepang
Copy link
Copy Markdown
Member Author

tshepang commented May 2, 2026

since this is about pointer arithmetic, should field expression be removed from the more narrow definiton of place expression

@RalfJung
Copy link
Copy Markdown
Member

RalfJung commented May 2, 2026

We should probably reword the UB page to use a different term, since it only refers to a few specific place projections.

@tshepang
Copy link
Copy Markdown
Member Author

tshepang commented May 2, 2026

would this work

A tuple index expression or an array/slice index expression that violates the (safety) requirements of in-bounds pointer arithmetic.

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.

4 participants