blob: 6aed3dbd88e40d6ac612ff85c46b9500af92877a [file] [view]
---
title: InvalidUnsafeSliceData
layout: article
---
<!-- Copyright 2023 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. -->
<!-- Code generated by generrordocs.go; DO NOT EDIT. -->
```
InvalidUnsafeSliceData occurs when unsafe.SliceData is called with
an argument that is not of slice type. It also occurs if it is used
in a package compiled for a language version before go1.20.
Example:
import "unsafe"
var x int
var _ = unsafe.SliceData(x)
```