|
|
Subscribe / Log in / New account

Unused parameters in C are worse than in Rust

Unused parameters in C are worse than in Rust

Posted Feb 11, 2025 21:33 UTC (Tue) by mathstuf (subscriber, #69389)
In reply to: Unused parameters in C are worse than in Rust by farnz
Parent article: Maintainer opinions on Rust-for-Linux

I filed this issue[1] about the case of default implementations of trait methods which don't use all of their arguments. I don't want the underscore-leading name to show up in the docs for the trait, but I also don't want the diagnostic. `let _for_rustdoc = unused_arg;` works and documents *why* I am doing it, but I'd still like a better solution.

[1] https://github.com/rust-lang/rust/issues/91074


to post comments


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