Closed
Description
What it does
Blacklist Method Disallowed Method (see #5896)
What does this lint do?
Disallows certain methods, as defined in clippy.toml
Categories (optional)
- Kind: Nursery
Checks for method calls of specified methods
For example:
SomeStruct::bad_method
SomeTrait::bad_method
Drawbacks
This might take some significant overhead to implement (regex or some manual string parsing), and the main purpose would probably be to patch in temporary lints, so it might not be super useful.
Example
# clippy.toml
disallowed-methods = ["Foo::bar", "Baz::bar"]
...
let f = Foo::default();
f.bar();
...
results in a lint