_swap

func _swap<Element>(a: RawPtr, b: RawPtr) 'alloc -> Void

Exchanges two initialized Element slots without retaining or dropping either.

Both pointers must be live, aligned, and valid for the same complete element layout.

View Source
pub func _swap<Element>(a: RawPtr, b: RawPtr) 'alloc -> Void {
	#_ir(a, b) { swap Element $0 $1 }
}