1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! The library `bdi` is: the modules it holds, and how far into them a test
//! may reach.
//!
//! bdi and the tests under `tests/` are the only consumers of this library,
//! and a `pub` module is reachable by definition — so `pub mod` on every line
//! here is what switches `dead_code` off across the whole crate. These
//! modules are private instead, and the lint says so when nothing production
//! reaches an item.
//!
//! The tests reach further in than bdi does. `testing` opens the five they
//! name back up, and cargo enables it for exactly the builds that compile
//! tests, because the package dev-depends on itself. So `cargo build` sees
//! the narrow surface, `cargo test` the wide one, and one line here decides
//! both. `tui` takes no gate: no test names it, so it is private in every
//! build.