Can I use needless_return in clippy.toml

I want to use needless_return in clippy.toml but cargo display "unknown field needless_return". Can I do it?

clippy.toml is not for turning lints on or off; it is only for lints that have additional configuration parameters. needless_return is not a configurable lint.

To disable the needless_return lint, use #![allow(clippy:needless_return)] in your Rust souce code, or add a [lints.clippy] section to your Cargo.toml:

[lints.clippy]
needless_return = "allow"
1 Like

Thank you mbrubeck. I understood