mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-26 04:17:21 +00:00
Add reason config example for disallowed_type
Co-authored-by: James Hinshelwood <james.hinshelwood@bigpayme.com>
This commit is contained in:
parent
72078faf91
commit
857a4073b8
1 changed files with 9 additions and 1 deletions
|
@ -21,7 +21,15 @@ declare_clippy_lint! {
|
||||||
/// An example clippy.toml configuration:
|
/// An example clippy.toml configuration:
|
||||||
/// ```toml
|
/// ```toml
|
||||||
/// # clippy.toml
|
/// # clippy.toml
|
||||||
/// disallowed-types = ["std::collections::BTreeMap"]
|
/// disallowed-types = [
|
||||||
|
/// # Can use a string as the path of the disallowed type.
|
||||||
|
/// "std::collections::BTreeMap",
|
||||||
|
/// # Can also use an inline table with a `path` key.
|
||||||
|
/// { path = "std::net::TcpListener" },
|
||||||
|
/// # When using an inline table, can add a `reason` for why the type
|
||||||
|
/// # is disallowed.
|
||||||
|
/// { path = "std::net::Ipv4Addr", reason = "no IPv4 allowed" },
|
||||||
|
/// ]
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```rust,ignore
|
/// ```rust,ignore
|
||||||
|
|
Loading…
Add table
Reference in a new issue