3 ms·
It depends on exactly what you mean by "called." Rust will warn you if your function is: * Not marked public * Not called from somewhere in the call graph of
by steveklabnik 6y ago
It depends on exactly what you mean by "called." Rust will warn you if your function is:
* Not marked public
* Not called from somewhere in the call graph of a function that's marked public, or your main function.
This isn't just simply public though, to be clear. It's "externally callable," that is, it can see transitively if something is just locally public or not.
You also can't dynamically generate functions at runtime, or do things like method_missing, so this ends up being much more complete than a similar analysis in a language with those sorts of features.