rust-clippy
rust-clippy copied to clipboard
Support generic arguments in `disallowed_types`
What it does
I want to ban Result<_, String> on my project, but current disallowed_types lint only accepts simple paths.
Advantage
The same advantages of disallowed_types but for more types.
Drawbacks
It will increase complexity of the implementation, probably.
Example
fn foo() -> Result<(), String>
Could be written as:
fn foo() -> Result<(), TypedErr>
Comparison with existing lints
It can make some lints such as result_unit_err redundant.
Additional Context
No response
@rustbot claim