Querify unused trait check.

This commit is contained in:
Camille GILLOT 2022-01-30 17:14:54 +01:00
parent c4083faade
commit a4a5e5b4ae
4 changed files with 15 additions and 5 deletions

View file

@ -177,6 +177,7 @@ pub fn provide(providers: &mut Providers) {
collect::provide(providers);
coherence::provide(providers);
check::provide(providers);
check_unused::provide(providers);
variance::provide(providers);
outlives::provide(providers);
impl_wf_check::provide(providers);
@ -247,7 +248,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
}
});
check_unused::check_crate(tcx);
tcx.ensure().check_unused_traits(());
if let Some(reported) = tcx.sess.has_errors() { Err(reported) } else { Ok(()) }
}