Cursed Rust

from blog binarycat, | ↗ original
Rust is a language with a lot of features. Sometimes those features have rough edges. Sometimes those rough edges are funny. Let's look at some. !--more-- Copy and Clone can diverge [derive(Debug)] struct OhNo(u32); impl Clone for OhNo { fn clone(&self) - Self { OhNo(self.0 + 1) } } impl Copy for OhNo { } fn main() { let...