unsafeptr.go 321 B

1234567891011121314
  1. // Copyright 2014 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package unsafeptr
  5. import "unsafe"
  6. func _() {
  7. var x unsafe.Pointer
  8. var y uintptr
  9. x = unsafe.Pointer(y) // ERROR "possible misuse of unsafe.Pointer"
  10. _ = x
  11. }