blob: f7fd56181c7013648fb8112ca89cf5672689773b [file] [view]
---
title: TypeTooLarge
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. -->
```
TypeTooLarge occurs if unsafe.Sizeof or unsafe.Offsetof is
called with an expression whose type is too large.
Example:
import "unsafe"
type E [1 {{raw "<"}}{{raw "<"}} 31 - 1]int
var a [1 {{raw "<"}}{{raw "<"}} 31]E
var _ = unsafe.Sizeof(a)
Example:
import "unsafe"
type E [1 {{raw "<"}}{{raw "<"}} 31 - 1]int
var s struct {
_ [1 {{raw "<"}}{{raw "<"}} 31]E
x int
}
var _ = unsafe.Offsetof(s.x)
```