2 Denies the configured types in clippy.toml.
4 Note: Even though this lint is warn-by-default, it will only trigger if
5 types are defined in the clippy.toml file.
8 Some types are undesirable in certain contexts.
11 An example clippy.toml configuration:
14 # Can use a string as the path of the disallowed type.
15 "std::collections::BTreeMap",
16 # Can also use an inline table with a `path` key.
17 { path = "std::net::TcpListener" },
18 # When using an inline table, can add a `reason` for why the type
20 { path = "std::net::Ipv4Addr", reason = "no IPv4 allowed" },
25 use std::collections::BTreeMap;
27 let x = std::collections::BTreeMap::new();
31 // A similar type that is allowed by the config
32 use std::collections::HashMap;