compiler: implement internal/abi.Escape

This commit is contained in:
Ayke van Laethem
2025-08-04 10:27:41 +02:00
committed by Ron Evans
parent 5c46efb4d1
commit 34efc3a381
3 changed files with 47 additions and 0 deletions
+7
View File
@@ -8,3 +8,10 @@ import "unsafe"
func NoEscape(p unsafe.Pointer) unsafe.Pointer {
return p
}
func Escape[T any](x T) T {
// This function is either implemented in the compiler, or left undefined
// for some variation of T. The body of this function should not be compiled
// as-is.
panic("internal/abi.Escape: unreachable (implemented in the compiler)")
}