Skip to content

Commit 524a22e

Browse files
committed
rebase
1 parent 4f3a73a commit 524a22e

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+3
-2
lines changed

compiler/rustc_trait_selection/src/traits/effects.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use rustc_hir as hir;
22
use rustc_infer::infer::{BoundRegionConversionTime, DefineOpaqueTypes, InferCtxt};
33
use rustc_infer::traits::{ImplSource, Obligation, PredicateObligation};
4+
use rustc_middle::span_bug;
45
use rustc_middle::ty::fast_reject::DeepRejectCtxt;
5-
use rustc_middle::{span_bug, ty};
6+
use rustc_middle::ty::{self, TypingMode};
67
use rustc_type_ir::solve::NoSolution;
78
use thin_vec::ThinVec;
89

@@ -19,7 +20,7 @@ pub fn evaluate_host_effect_obligation<'tcx>(
1920
selcx: &mut SelectionContext<'_, 'tcx>,
2021
obligation: &HostEffectObligation<'tcx>,
2122
) -> Result<ThinVec<PredicateObligation<'tcx>>, EvaluationFailure> {
22-
if selcx.infcx.intercrate {
23+
if matches!(selcx.infcx.typing_mode(obligation.param_env), TypingMode::Coherence) {
2324
span_bug!(
2425
obligation.cause.span,
2526
"should not select host obligation in old solver in intercrate mode"

0 commit comments

Comments
 (0)