Don't warn on unused arguments in unimplemented functions #78136
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
(playground)
Currently emits a warning:
But
todo!()
clearly indicates that the argument is unused neither because it's intended to be ignored (in which case it'd be appropriate to rename it to_arg
), nor because the author forgot to use it — but simply because the relevant code to use it has not been written yet.Since
todo!()
itself does not trigger any warnings (meaning, rustc is fine with trying to compile code with parts that are explicitly not implemented yet), it doesn't seem appropriate to warn about unused variables that are "covered" bytodo!()
.The text was updated successfully, but these errors were encountered: