diff options
| author | dev <dev@example.com> | 2026-11-21 19:24:13 +0000 |
|---|---|---|
| committer | dev <dev@example.com> | 2026-11-21 19:24:13 +0000 |
| commit | db11b540b1b4c60926c175cb5cd043c7555b99f3 (patch) | |
| tree | 7b44a0a33951046b4b5efa435317cb2dbf5b9e45 /docs | |
| parent | 689b82bfe36660c18cbce66a3f05550c4d02dc12 (diff) | |
| download | aur-build-db11b540b1b4c60926c175cb5cd043c7555b99f3.tar.gz aur-build-db11b540b1b4c60926c175cb5cd043c7555b99f3.zip | |
tools,tests: count the pub(crate) items nothing outside their own file reaches
`pub(crate)` was the good state in the census by decree: `priv` was reported
and deliberately left out of the budget, on the grounds that a rising count of
crate-internal items is progress. That is true of `pub` -> `pub(crate)` and
false of the next step. A `pub(crate)` item that no file except the one that
declares it ever names is offering the whole crate a thing nothing reaches, and
nothing in the suite said so.
`overwide` counts them. Same shape as `deadonly`, on purpose: a per-module
number that may only shrink, an item allowed to stay only by name in
`over_visibility.allowlist`, and the compiler fact that forces it written
beside the name. `--list-overwide` names every one with its file:line, and
`tests/architecture.rs` mirrors the definition so the two implementations are
cross-checked against each other, the way the census already is.
Baseline, before any item is narrowed: 35 of 170 `pub(crate)` declarations are
over-wide. Eight of them are already argued — a `pub(crate)` field cannot carry
a private type, privacy does not reach up to a parent module or across to a
sibling one, and `pub(super)` is not a form this crate admits — which leaves 27
unargued, and 27 is what the budget now holds.
The count is a grep and a grep is a lead, not a verdict: the verdict is the
compiler's, and it has to be asked under both profiles, because the
`cfg(not(feature = "test-support"))` half of a feature-conditional declaration
is never compiled by `cargo check --all-targets`.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
