Add debug calls `@oli-obk` requested this and other changes as a way of simplifying https://github.com/rust-lang/rust/pull/101345. This is just going to make the diff of https://github.com/rust-lang/rust/pull/101345 smaller. r? `@oli-obk` `@cjgillot`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.