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

spec: document unsafe.Slice/SliceOf when used with type parameter values #64452

griesemer opened this issue Nov 29, 2023 · 1 comment


Copy link

Go version

go 1.22

What operating system and processor architecture are you using (go env)?


What did you do?


What did you expect to see?

Documentation in the spec re: the subject as needed.
Follow-up on #64406.

What did you see instead?

Documentation unclear.

@griesemer griesemer added this to the Go1.22 milestone Nov 29, 2023
@griesemer griesemer self-assigned this Nov 29, 2023
Copy link

Change mentions this issue: doc: update unsafe.Pointer rule in spec

ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
The valid conversions consider the core types of operands, not just
their underlying type.

This also explains the valid arguments for unsafe.Slice which are
explained in terms of unsafe.Pointer conversions.

unsafe.SliceData simply refers to "slice argument" and we use
similar terminology elsewhere in the spec to denote values that
have a core type of slice (or any other type for that matter).
Leaving alone for now.

Fixes golang#64452.

Change-Id: I0eed3abbc0606f22358835e5d434f026fe0909c8
Auto-Submit: Robert Griesemer <>
Reviewed-by: Robert Griesemer <>
Reviewed-by: Matthew Dempsky <>
TryBot-Bypass: Robert Griesemer <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants