Any "surprises" in Rust to be aware of?

138 points gvcallen

When first learning Rust (from a C++ background) I was surprised that indexing into an array resulted in a bounds check every time (for the unoptimized case). Although this makes sense in the context of Rust, it was still a new idea.

Can you think of any other "surprising" nuances in the language that one should be aware of, paying specific attention to performance?