From 689b82bfe36660c18cbce66a3f05550c4d02dc12 Mon Sep 17 00:00:00 2001 From: aur-build Date: Sat, 21 Nov 2026 17:07:56 +0000 Subject: error,tools: a variant nothing constructed, and three tool constructs nothing read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Missing::Snapshot` was declared, rendered by the `Display` arm, and constructed by nothing: `From<&str> for Missing` routes a bare sentence to `Missing::Other`, and the test that mentions a snapshot asserts `Other(_)`. The variant and its formatting arm are gone. A variant scan that counted *mentions* could not see it, because the formatting arm is a mention; the scan now ignores a line that only renders the variant, and what it reports afterwards is `Error::Json` and `Error::Sqlite`, both of which the compiler proves live — deleting either breaks the hundred-odd `?` sites that reach them through `#[from]`. Three survivors in `tools/`, none of them caught by the audit that claimed the axis was empty, because that audit looked at module-level constants and function parameters and never at local bindings: - `test-surface.py` opened `render()` with `out = [...] if False else []`, a literal dead branch whose binding was then never read. Both gone. - `test-surface.py` computed a `collisions` set that nothing consulted; the rule it narrated had moved into `mentioned` as `sole_owner`. The set is deleted and the explanation now sits in the docstring of the function that applies it. - `release-surface-probe.py` built `decl_line` and used `decl_no` instead. `a, b = item.split(" as ", 1)` became `_, b = ..` for the same reason. The scans now cover locals and constant conditions as well, and report nothing: no unread binding, no `if False`, no unreachable statement after a terminator, no unused import, constant, parameter, or unread argparse option across the five tools. --- tools/release-surface-probe.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/release-surface-probe.py') diff --git a/tools/release-surface-probe.py b/tools/release-surface-probe.py index ad87e1d..34c598d 100644 --- a/tools/release-surface-probe.py +++ b/tools/release-surface-probe.py @@ -267,7 +267,6 @@ def main(): pat = re.compile(r"\b%s\b" % re.escape(d["name"])) if pat.search(tests_text): return True - decl_line = d["file"], d["where"].rsplit(":", 1)[1] for p, text in anywhere.items(): if p != d["file"]: if pat.search(text): -- cgit v1.2.3