Expand description
Convenient ways to shoot yourself in the foot.
Functions§
- grapple⚠
- Given any pointer, even an immutable one with a short lifetime, returns a
mutable pointer of unbounded
'staticlifetime to the same underlying address. - immortalize
- Given a statically-sized value, allocates new memory for it which will
never be freed and moves (or copies) the value to that memory, where it
will have an unbounded
'staticlifetime, and returns a mutable reference. This leaks memory. - summon⚠
- Allocates (but does not initialize) space for a value of type
Twhich will never be freed, so it can have a unbounded'staticlifetime. This leaks memory. - summon_
clones - Allocates space for a slice of
lenclones/copies ofvalue, which will never be freed, so they can have unbounded'staticlifetimes. This leaks memory. - summon_
many ⚠ - Allocates (but does not initialize) space for a slice of
lenvalues of typeTwhich will never be freed, so they can have unbounded'staticlifetimes. This leaks memory.