ated: ptr::replace requires that the pointer argument is aligned and non-null This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.