Rust values vs places: the mental model that makes ownership click
Abhishekcur · x · 2026-09-04
- Separate two questions: what kind of expression is this, and how is the surrounding code using it?
- A value is an instance of a type (e.g. 42, a particular String); a place expression identifies storage that can contain a value; most other expressions are value expressions, plus a small assignee-expression category used left of assignment.
- When a place is used in a value context, Rust obtains the stored value: Copy types are copied, non-Copy types may be moved.
- A move transfers ownership but doesn't promise bytes physically change addresses — the compiler may copy a small representation, optimize it away, or use another equivalent implementation.
More from coding & agent
- IBM releases DRACO: dynamic rubrics give per-step credit assignment for verifier-free agent RL — ibm-research · 2026-09-04
- Spotify's Portal Cut Claude Code Token Usage by 90% With a Two-Mode Router — rseroter · 2026-09-04
- User edits cinematic Tesla Cybercab video entirely with Grok Build — elonmusk · 2026-09-04
- Agentic RAG: Should the Agent Reason About Where to Retrieve, Not How? — Arc_bong · 2026-09-04
- It Doesn't Matter How Good Your Models Are If Your Connectors Don't Work — shensi · 2026-09-04
- Tips for working with GPT-6 Astra: explicit autonomy prompts beat polite requests — daniel_mac8 · 2026-09-04