Static rustc_lint_defs::builtin::PRIVATE_BOUNDS
source · pub static PRIVATE_BOUNDS: &Lint
Expand description
The private_bounds
lint detects types in a secondary interface of an item,
that are more private than the item itself. Secondary interface of an item consists of
bounds on generic parameters and where clauses, including supertraits for trait items.
Example
ⓘ
#![deny(private_bounds)]
struct PrivTy;
pub struct S
where PrivTy:
{}
{{produces}}
Explanation
Having private types or traits in item bounds makes it less clear what interface the item actually provides.