File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
compiler/rustc_trait_selection/src/solve/assembly Expand file tree Collapse file tree 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> {
306306
307307 self . assemble_param_env_candidates ( goal, & mut candidates) ;
308308
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+ }
312315
313316 candidates
314317 }
@@ -795,11 +798,6 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
795798 candidates : & mut Vec < Candidate < ' tcx > > ,
796799 ) {
797800 let tcx = self . tcx ( ) ;
798- match self . solver_mode ( ) {
799- SolverMode :: Normal => return ,
800- SolverMode :: Coherence => { }
801- } ;
802-
803801 let result = self . probe_misc_candidate ( "coherence unknowable" ) . enter ( |ecx| {
804802 let trait_ref = goal. predicate . trait_ref ( tcx) ;
805803 #[ derive( Debug ) ]
You can’t perform that action at this time.
0 commit comments