What it does
Blacklist Method Disallowed Method (see #5896)
What does this lint do?
Disallows certain methods, as defined in clippy.toml
Categories (optional)
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
What it does
Blacklist MethodDisallowed Method (see #5896)What does this lint do?
Disallows certain methods, as defined in
clippy.tomlCategories (optional)
Checks for method calls of specified methods
For example:
SomeStruct::bad_methodSomeTrait::bad_methodDrawbacks
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
results in a lint