/
githubmirror
/
go
Обзор
Документация
Войти
/
githubmirror
/
go
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/fixedbugs/issue46525.go
14 строк
409 B
Matthew Dempsky
cmd/compile,go/types: restrict use of unsafe.{Add,Slice} to go1.17 or newer
04 июн 2021, 04:31
04 июн 2021, 04:31
962d5c9
Код
Авторство
О чём код?
// errorcheck -lang=go1.16 // Copyright 2021 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. package p import "unsafe" func main() { _ = unsafe.Add(unsafe.Pointer(nil), 0) // ERROR "unsafe.Add requires go1.17 or later" _ = unsafe.Slice(new(byte), 1) // ERROR "unsafe.Slice requires go1.17 or later" }