X0020 deny-bans¶
Rule: The dependency graph holds no banned crate and no duplicate deny.toml refuses.
| Code | X0020 (stable, never reused) |
| Id | deny-bans |
| Category | deny |
| Source | cargo-deny (run as an executable) |
| Fix | by hand |
| Needs | cargo-deny installed |
Level per tier¶
| Tier | Level | Reason |
|---|---|---|
| small | off | |
| small-workspace | off | |
| medium | off | |
| big | deny |
banned crates (OpenSSL, a second runtime) and duplicate versions stay out of a big graph |
| ai | off | |
| embedded | off | |
| ui | off | |
| egui | off | |
| units-strict | off | |
| units-paranoid | off |
Why¶
deny.toml's [bans] names crates the project refuses (OpenSSL, a second async runtime) and how it treats a crate in two versions. Without a check the graph drifts back to them.
How to fix¶
Remove the crate from the graph (cargo tree -i NAME shows who pulls it in), or change [bans] with a reason (skip for a duplicate that cannot be avoided yet).
Configure¶
Allow one finding in the code with // spirit-level: allow(deny-bans) <reason> (waivers); the code works there too, as in [lints.X0020].