3 ms·
You've missed a critical point in the article: the structure does not have a pointer to something it has a member inline within its stack representation. Any g
by tatterdemalion 10y ago
You've missed a critical point in the article: the structure does not have a pointer to something it has a member inline within its stack representation.
Any garbage collector could (with some overhead) prevent invalid memory access when we're talking about an object with a pointer to another object. Rust is able to validate the correctness of pointers to offsets within the stack representation of an object.
(Rust also validates the correctness of references to heap allocated objects as well, of course!)