Reinstate errors for unused variables and imports.
Merge pull request #3327 from metajack/cargo-profiles

Reinstate errors for unused variables and imports.