Rollup merge of #132119 - compiler-errors:effects-old-solver, r=lcnr
Hack out effects support for old solver
Opening this for vibes ✨
Turns out that a basic, somewhat incomplete implementation of host effects is achievable in the old trait solver pretty easily. This should be sufficient for us to use in the standard library itself.
Regarding incompleteness, maybe we should always treat host predicates as ambiguous in intercrate mode (at least in the old solver) to avoid any worries about accidental impl overlap or something.
r? ```@lcnr``` cc ```@fee1-dead```
This commit is contained in:
commit
e97286e738
37 changed files with 302 additions and 192 deletions
|
@ -1623,12 +1623,6 @@ pub(crate) struct InvalidReceiverTy<'tcx> {
|
|||
pub receiver_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_effects_without_next_solver)]
|
||||
#[note]
|
||||
#[help]
|
||||
pub(crate) struct EffectsWithoutNextSolver;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(hir_analysis_cmse_inputs_stack_spill, code = E0798)]
|
||||
#[note]
|
||||
|
|
|
@ -153,12 +153,6 @@ 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue