pub static STRING_TYPE: BuiltinTypeDefExpand description
The built-in String type.
Layout: { ptr: u64, len: u64, cap: u64 } (24 bytes)
ptr: Pointer to heap-allocated byte buffer (or .rodata for literals)len: Current length in bytescap: Capacity of allocated buffer (0 for .rodata literals)
String is a move type (not Copy) because it owns heap-allocated memory.
The drop function checks cap > 0 before freeing, allowing .rodata
literals (with cap = 0) to be safely dropped without freeing.