5 ms·
unsafe{} means "hey compiler, you cannot verify but this is safe, but I have." This code should be safe to use, unless the human involved has messed something u
by steveklabnik 9y ago
unsafe{} means "hey compiler, you cannot verify but this is safe, but I have." This code should be safe to use, unless the human involved has messed something up, in which case, it's a bug.
It's more that the possibility for UB now exists, than it definitely does.
- alphaalpha101 9y agoI know what unsafe means. The issue is that this library's author presumably hasn't actually verified that it actually is safe.
- jononor 9y agoMaybe unsafe should be called assume_safe or presumably_safe or maybe_unsafe... People easily understand it wrong
- steveklabnik 9y agoWe considered many things, but in the end, nothing is perfect.