I agree that "changes the generated binary" and "displays information to the user" are separate use cases, but the compiler already does both. There's even a compiler error for unused imports and variables.
Doesn't seem far-fetched to ask for the compiler to warn on unused types/functions too.