News for hackers. Stuff that matters.
Re:Systematically removing code by steveklabnik on Wednesday November 11, 2020 @10:47AM (#25059294)
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.

There are no comments on this comment yet.