A static function is defined but never used in its file

tx0/c:unused-static-functionstrictwarningsmell

What it finds

A static function can be called only from its own file, so one that the file never names is dead code.

Only source files count, not headers, and not inline functions or ones marked as possibly unused; the name must occur nowhere else in the code of the file, also not in macros or in branches of conditional directives that are not read.

From the rule's source, unused_static_function.rs.

Turn it on, off or suppress it

The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/c:unused-static-function" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/c:unused-static-function] reason="..."

tx0 explain tx0/c:unused-static-function shows the same in the terminal. Found a false positive? Report it.