Rejecting the forbidden unsafe ops is done by const checking, not by unsafety checking
For more information about how rustc works, see the rustc dev guide.