3 ms·
The rust compiler refuses to compile code which doesn’t adhere to a strict set of rules guaranteeing memory safety. Unless you intentionally call an unsafe bloc
by qerti 3y ago
The rust compiler refuses to compile code which doesn’t adhere to a strict set of rules guaranteeing memory safety. Unless you intentionally call an unsafe block, misuse in this sense is impossible, not just difficult.
- db48x 3y agoBut other types of misuse are not. For example, a naive program might do many reads into a small buffer instead of one read into a large buffer.
- Yoric 3y agoJust stating the obvious: breaking memory safety is only one subset of all the possible misuse available in the space of manners of using an API, data structure, etc.