File tree 1 file changed +3
-2
lines changed
compiler/rustc_trait_selection/src/traits
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
use rustc_hir as hir;
2
2
use rustc_infer:: infer:: { BoundRegionConversionTime , DefineOpaqueTypes , InferCtxt } ;
3
3
use rustc_infer:: traits:: { ImplSource , Obligation , PredicateObligation } ;
4
+ use rustc_middle:: span_bug;
4
5
use rustc_middle:: ty:: fast_reject:: DeepRejectCtxt ;
5
- use rustc_middle:: { span_bug , ty } ;
6
+ use rustc_middle:: ty :: { self , TypingMode } ;
6
7
use rustc_type_ir:: solve:: NoSolution ;
7
8
use thin_vec:: ThinVec ;
8
9
@@ -19,7 +20,7 @@ pub fn evaluate_host_effect_obligation<'tcx>(
19
20
selcx : & mut SelectionContext < ' _ , ' tcx > ,
20
21
obligation : & HostEffectObligation < ' tcx > ,
21
22
) -> Result < ThinVec < PredicateObligation < ' tcx > > , EvaluationFailure > {
22
- if selcx. infcx . intercrate {
23
+ if matches ! ( selcx. infcx. typing_mode ( obligation . param_env ) , TypingMode :: Coherence ) {
23
24
span_bug ! (
24
25
obligation. cause. span,
25
26
"should not select host obligation in old solver in intercrate mode"
You can’t perform that action at this time.
0 commit comments