Skip to content

Commit d186531

Browse files
author
Frank
committed
remove useless test, update disallowed_method description
1 parent f9da294 commit d186531

File tree

4 files changed

+3
-81
lines changed

4 files changed

+3
-81
lines changed

clippy_lints/src/disallowed_method.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ declare_clippy_lint! {
1818
///
1919
/// ```rust,ignore
2020
/// // example code where clippy issues a warning
21-
/// foo.bad_method(); // Foo is disallowed
21+
/// foo.bad_method(); // Foo::bad_method is disallowed in the configuration
2222
/// ```
2323
/// Use instead:
2424
/// ```rust,ignore
2525
/// // example code which does not raise clippy warning
26-
/// goodStruct.bad_method(); // not disallowed
26+
/// goodStruct.bad_method(); // GoodStruct::bad_method is not disallowed
2727
/// ```
2828
pub DISALLOWED_METHOD,
2929
nursery,

clippy_lints/src/utils/conf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ define_Conf! {
165165
/// Lint: WILDCARD_IMPORTS. Whether to allow certain wildcard imports (prelude, super in tests).
166166
(warn_on_all_wildcard_imports, "warn_on_all_wildcard_imports": bool, false),
167167
/// Lint: DISALLOWED_METHOD. The list of blacklisted methods to lint about. NB: `bar` is not here since it has legitimate uses
168-
(disallowed_methods, "disallowed_methods": Vec<String>, ["disallowed_method::Foo::bad_method", "disallowed_method::Baz::bad_method", "disallowed_method::Quux::bad_method"].iter().map(ToString::to_string).collect()),
168+
(disallowed_methods, "disallowed_methods": Vec<String>, Vec::<String>::new()),
169169
}
170170

171171
impl Default for Conf {

tests/ui/disallowed_method.rs

-56
This file was deleted.

tests/ui/disallowed_method.stderr

-22
This file was deleted.

0 commit comments

Comments
 (0)