With [unsafe_block_in_unsafe_fn](https://rust-lang.github.io/rfcs/2585-unsafe-block-in-unsafe-fn.html), we would need to have `unsafe` block in the `unsafe fn` we generate here.