1/6

unsafe does not turn off the borrow checker. It unlocks exactly five abilities:

  1. dereference a raw pointer
  2. call an unsafe function
  3. access a static mut
  4. implement an unsafe trait
  5. access a union field

Everything else — ownership, borrowing, lifetimes, type checking — applies inside an unsafe block exactly as outside it.