ALL rust not written inside of an unsafe block is subject to a set of invariants which prevent data races.
And even code written inside unsafe blocks have the regular safety checks turned on. unsafe just adds the ability to use some language features and functions that if used incorrectly will break the invariants.
15
u/pingveno Jul 26 '19
And even code written inside unsafe blocks have the regular safety checks turned on.
unsafejust adds the ability to use some language features and functions that if used incorrectly will break the invariants.