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! {
1313 /// **Why is this bad?** Some methods are undesirable in certain contexts,
1414 /// and it's beneficial to lint for them as needed.
1515 ///
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.
2417 ///
2518 /// **Example:**
2619 ///
2720 /// An example clippy.toml configuration:
2821 /// ```toml
2922 /// # clippy.toml
30- /// disallowed-methods = ["alloc ::vec::Vec::leak", "std::time::Instant::now"]
23+ /// disallowed-methods = ["std ::vec::Vec::leak", "std::time::Instant::now"]
3124 /// ```
3225 ///
3326 /// ```rust,ignore
Original file line number Diff line number Diff line change @@ -13,14 +13,7 @@ declare_clippy_lint! {
1313 ///
1414 /// **Why is this bad?** Some types are undesirable in certain contexts.
1515 ///
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.
2417 ///
2518 /// N.B. There is no way to ban primitive types.
2619 ///
@@ -29,7 +22,7 @@ declare_clippy_lint! {
2922 /// An example clippy.toml configuration:
3023 /// ```toml
3124 /// # clippy.toml
32- /// disallowed-methods = ["alloc ::collections::btree::map ::BTreeMap"]
25+ /// disallowed-methods = ["std ::collections::BTreeMap"]
3326 /// ```
3427 ///
3528 /// ```rust,ignore
You can’t perform that action at this time.
0 commit comments