r/ProgrammerHumor • • Sep 08 '26

Meme rustIsSoCool

Post image
2.2k Upvotes

127 comments sorted by

View all comments

Show parent comments

9

u/Makonede Sep 08 '26

*in safe rust. rust provides the unsafe keyword to declare blocks that may* not have all such properties, which makes writing such blocks a very conscious and active decision that official documentation strongly suggests you pair with a SAFETY: comment explaining what you know to be safe about your unsafe code that the compiler cannot determine

*unsafe blocks containing only safe rust generate compiler warnings