Introduce `HasField::project_inner` by jswrenn · Pull Request #2885 · google/zerocopy

This was referenced

Jan 14, 2026

gemini-code-assist[bot]

bot reviewed Jan 14, 2026

Base automatically changed from Gb943ae3571a06b4a5c727268ae1829579e6350dc to main

January 16, 2026 18:58

@jswrenn

gherrit-pr-id: G90165d85418ed6203ef3caaa77662dd3b313e030

@jswrenn jswrenn deleted the G90165d85418ed6203ef3caaa77662dd3b313e030 branch

January 16, 2026 20:35

github-merge-queue bot pushed a commit that referenced this pull request

Jan 17, 2026
Remove high-level `HasField::project_inner`, and rename
`HasField::project_raw` to `HasField::project`.

The new plan is for `pointer::cast::Project` and `HasField` to only have
`project` methods which project from `PtrInner<Src>` to `*mut Dst`, and
for callers who want `PtrInner -> PtrInner` or `Ptr -> Ptr` to use
inherent methods on `PtrInner` and `Ptr`. Compared to a default-impl'd
method on `HasField`, this reduces indirection and reduces pressure on
the optimizer.

Reverts #2884, #2885

gherrit-pr-id: G481927cb6e9ca76c1531c05465f608e1b2607a62