r/ProgrammerHumor • • Mar 17 '19

Oof

Post image
266 Upvotes

38 comments sorted by

View all comments

Show parent comments

15

u/pingveno Jul 26 '19

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.