|
|
Subscribe / Log in / New account

Underscores in Rust

Underscores in Rust

Posted Feb 11, 2025 14:22 UTC (Tue) by farnz (subscriber, #17727)
In reply to: Underscores in Rust by heftig
Parent article: Maintainer opinions on Rust-for-Linux

There's a lint to help with that - #![warn(let_underscore_drop)] will catch all the footgun cases where you've used let _ =. It won't stop you using it completely, just in the cases where there's a risk of changed behaviour due to the rules around drop timing.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds