File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,14 @@ declare_clippy_lint! {
13
13
/// **Why is this bad?** Some methods are undesirable in certain contexts,
14
14
/// and it's beneficial to lint for them as needed.
15
15
///
16
- /// **Known problems:** Currently, you must write each function as a
17
- /// fully-qualified path. This lint doesn't support aliases or reexported
18
- /// names; be aware that many types in `std` are actually reexports.
19
- ///
20
- /// For example, if you want to disallow `Duration::as_secs`, your clippy.toml
21
- /// configuration would look like
22
- /// `disallowed-methods = ["core::time::Duration::as_secs"]` and not
23
- /// `disallowed-methods = ["std::time::Duration::as_secs"]` as you might expect.
16
+ /// **Known problems:** None.
24
17
///
25
18
/// **Example:**
26
19
///
27
20
/// An example clippy.toml configuration:
28
21
/// ```toml
29
22
/// # clippy.toml
30
- /// disallowed-methods = ["alloc ::vec::Vec::leak", "std::time::Instant::now"]
23
+ /// disallowed-methods = ["std ::vec::Vec::leak", "std::time::Instant::now"]
31
24
/// ```
32
25
///
33
26
/// ```rust,ignore
Original file line number Diff line number Diff line change @@ -13,14 +13,7 @@ declare_clippy_lint! {
13
13
///
14
14
/// **Why is this bad?** Some types are undesirable in certain contexts.
15
15
///
16
- /// **Known problems:** The fully qualified path must be used. This lint
17
- /// doesn't support aliases or reexported names; be aware that many types
18
- /// in `std` are actually reexports.
19
- ///
20
- /// For example, if you want to disallow `BTreeMap`, your clippy.toml
21
- /// configuration would look like
22
- /// `disallowed-methods = ["alloc::collections::btree::map::BTreeMap"]` and not
23
- /// `disallowed-methods = ["std::collections::BTreeMap"]` as you might expect.
16
+ /// **Known problems:** None.
24
17
///
25
18
/// N.B. There is no way to ban primitive types.
26
19
///
@@ -29,7 +22,7 @@ declare_clippy_lint! {
29
22
/// An example clippy.toml configuration:
30
23
/// ```toml
31
24
/// # clippy.toml
32
- /// disallowed-methods = ["alloc ::collections::btree::map ::BTreeMap"]
25
+ /// disallowed-methods = ["std ::collections::BTreeMap"]
33
26
/// ```
34
27
///
35
28
/// ```rust,ignore
You can’t perform that action at this time.
0 commit comments