My confusion was why the compiler didn't catch this, it is suppose to spot this sort of thing right?
Now that I think about it, maybe it has to do with `unsafe` block so the compiler doesn't check it.
My next question would be why does it need `unsafe`?