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

Closed
griesemer opened this issue Nov 29, 2023 · 1 comment
Closed
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

Go version

go 1.22

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

n/a

What did you do?

n/a

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
@gopherbot
Copy link

Change https://go.dev/cl/551379 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
Reviewed-on: https://go-review.googlesource.com/c/go/+/551379
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants