Rust is a very consistent language. The Rust Core Team has worked hard to ensure that Rust does what you ask and doesn’t surprise you by performing additional tasks behind your back. Rust’s toolset—particularly Clippy and Rust’s safety guarantees—check your program for common mistakes and often suggest improvements. It’s common for Rust programmers to notice that writing their program in Rust takes a little longer, but when they run it, it works as expected.

The Rust language has a few quirks. Sometimes they creep in at the cracks between systems, and sometimes they’re a conscious design choice to avoid doing something worse. In this book, you’ll review a series of self-contained Rust programs that explore these quirks. Each program, ...

Get Rust Brain Teasers now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.