Closed cschwan closed 8 months ago
This is fascinating[] to know (I never paid too much attention to unsafe
), but I wouldn't say it's unfortunate*.
As the RFC explains very well, unsafe to call and an unsafe block are strictly related, because the block it's exactly what allows that kind of call (and similar unsafe operations, of course).
[*]: my intrusive spell checker suggested that "really interesting" was a bit poor...
Implemented in commit 4d74a051800a405d1056cb4368b340783dfa60c2.
An
unsafe
function is automatically anunsafe
block, which is unfortunate because these are two different concepts: https://rust-lang.github.io/rfcs/2585-unsafe-block-in-unsafe-fn.html. Withunsafe_op_in_unsafe_fn
they can be disentangled.