pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorReported>