Make feature(effects) require -Znext-solver

This commit is contained in:
Deadbeef
2024-06-30 17:08:10 +00:00
parent 6c3485512f
commit 34ae56de35
6 changed files with 40 additions and 0 deletions

View File

@@ -151,6 +151,12 @@ pub fn provide(providers: &mut Providers) {
pub fn check_crate(tcx: TyCtxt<'_>) {
let _prof_timer = tcx.sess.timer("type_check_crate");
// FIXME(effects): remove once effects is implemented in old trait solver
// or if the next solver is stabilized.
if tcx.features().effects && !tcx.next_trait_solver_globally() {
tcx.dcx().emit_err(errors::EffectsWithoutNextSolver);
}
tcx.sess.time("coherence_checking", || {
tcx.hir().par_for_each_module(|module| {
let _ = tcx.ensure().check_mod_type_wf(module);