Define partial-overlap semantics for bounded C-string copying
Motivation
Exact source/destination alias truncation was fixed in #854. With dst=src+1, the current forward copy of abc repeatedly observes its own writes, returns no-space and fills the available destination with a. Whether partial overlap is allowed is unspecified; this is not another report of the fixed exact-alias defect.
Starting point: std/mem/cstr.wave:67.
Validation
Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Executed bounded valid-memory partial-overlap fixture at O0/O2. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.
Scope
Decide whether partial overlap is rejected/preconditioned or gets memmove-like behavior, including NUL placement and truncation side effects. Keep the exact-alias fix intact.
Related: #854. These links do not claim those broader or completed scopes are unfinished.
Design discussion required
This issue records a proposal or an unresolved contract; it is not approval to choose new semantics. Please mention @LunaStev to discuss the design before starting implementation.
Completion criteria
- [ ] Cover dst=src, src+1 and src-1 with valid bounded storage.
- [ ] The documented success/truncation/output-change contract matches all permitted cases.
- [ ] No unsupported alias shape is silently advertised as safe.