Skip to content

Commit 3844264

Browse files
committed
trait_sel: remove intercrate mode assertion
This causes a bunch of tests to fail and everything appears to work without it: - tests/ui/coherence/orphan-check-opaque-types-not-covering.rs - tests/ui/coherence/orphan-check-projections-covering.rs - tests/ui/coherence/orphan-check-projections-unsat-bounds.rs#classic - tests/ui/coherence/orphan-check-weak-aliases-not-covering.rs - tests/ui/coherence/orphan-check-weak-aliases-covering.rs#classic - tests/ui/specialization/issue-43037.rs#negative - tests/ui/specialization/issue-43037.rs#current - tests/ui/type-alias-impl-trait/coherence.rs#classic
1 parent c16f159 commit 3844264

File tree

1 file changed

+1
-9
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+1
-9
lines changed

compiler/rustc_trait_selection/src/traits/effects.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes};
33
use rustc_infer::traits::{
44
ImplDerivedHostCause, ImplSource, Obligation, ObligationCauseCode, PredicateObligation,
55
};
6-
use rustc_middle::span_bug;
76
use rustc_middle::ty::fast_reject::DeepRejectCtxt;
8-
use rustc_middle::ty::{self, TypeVisitableExt, TypingMode};
7+
use rustc_middle::ty::{self, TypeVisitableExt};
98
use rustc_type_ir::elaborate::elaborate;
109
use rustc_type_ir::solve::{NoSolution, SizedTraitKind};
1110
use thin_vec::{ThinVec, thin_vec};
@@ -24,13 +23,6 @@ pub fn evaluate_host_effect_obligation<'tcx>(
2423
selcx: &mut SelectionContext<'_, 'tcx>,
2524
obligation: &HostEffectObligation<'tcx>,
2625
) -> Result<ThinVec<PredicateObligation<'tcx>>, EvaluationFailure> {
27-
if matches!(selcx.infcx.typing_mode(), TypingMode::Coherence) {
28-
span_bug!(
29-
obligation.cause.span,
30-
"should not select host obligation in old solver in intercrate mode"
31-
);
32-
}
33-
3426
let ref obligation = selcx.infcx.resolve_vars_if_possible(obligation.clone());
3527

3628
// Force ambiguity for infer self ty.

0 commit comments

Comments
 (0)