File tree 1 file changed +6
-8
lines changed
compiler/rustc_trait_selection/src/solve/assembly
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -306,9 +306,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
306
306
307
307
self . assemble_param_env_candidates ( goal, & mut candidates) ;
308
308
309
- self . assemble_coherence_unknowable_candidates ( goal, & mut candidates) ;
310
-
311
- self . discard_impls_shadowed_by_env ( goal, & mut candidates) ;
309
+ match self . solver_mode ( ) {
310
+ SolverMode :: Normal => self . discard_impls_shadowed_by_env ( goal, & mut candidates) ,
311
+ SolverMode :: Coherence => {
312
+ self . assemble_coherence_unknowable_candidates ( goal, & mut candidates)
313
+ }
314
+ }
312
315
313
316
candidates
314
317
}
@@ -795,11 +798,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
795
798
candidates : & mut Vec < Candidate < ' tcx > > ,
796
799
) {
797
800
let tcx = self . tcx ( ) ;
798
- match self . solver_mode ( ) {
799
- SolverMode :: Normal => return ,
800
- SolverMode :: Coherence => { }
801
- } ;
802
-
803
801
let result = self . probe_misc_candidate ( "coherence unknowable" ) . enter ( |ecx| {
804
802
let trait_ref = goal. predicate . trait_ref ( tcx) ;
805
803
#[ derive( Debug ) ]
You can’t perform that action at this time.
0 commit comments