Migrate `rustc_hir_analysis` to session diagnostic [Part 4] Part 4: Finishing `check/mod.rs` file r? `@compiler-errors`