Underscores in Rust
Underscores in Rust
Posted Feb 11, 2025 15:59 UTC (Tue) by farnz (subscriber, #17727)In reply to: Underscores in Rust by adobriyan
Parent article: Maintainer opinions on Rust-for-Linux
It's very specifically a special case where you name a let binding _; you can't read it (_ isn't a real variable), and it drops anything bound to it immediately. _foo and foo behave in exactly the same way, however.
Posted Feb 11, 2025 20:42 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
Underscores in Rust