Querify unused trait check. This code transitively loads information for all bodies, and from resolutions. As it does not return a value, it should be beneficial to have it as a query.
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.