File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
compiler/rustc_next_trait_solver/src/solve Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1428,6 +1428,21 @@ where
14281428 & mut self ,
14291429 goal : Goal < I , TraitPredicate < I > > ,
14301430 ) -> Result < ( CanonicalResponse < I > , Option < TraitGoalProvenVia > ) , NoSolution > {
1431+ if goal
1432+ . param_env
1433+ . caller_bounds ( )
1434+ . iter ( )
1435+ . filter_map ( |c| c. as_trait_clause ( ) )
1436+ . filter_map ( |c| c. no_bound_vars ( ) )
1437+ . any ( |p| p == goal. predicate )
1438+ {
1439+ let candidate = self
1440+ . probe_trait_candidate ( CandidateSource :: ParamEnv ( ParamEnvSource :: NonGlobal ) )
1441+ . enter ( |ecx| ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes ) )
1442+ . unwrap ( ) ;
1443+ return Ok ( ( candidate. result , Some ( TraitGoalProvenVia :: ParamEnv ) ) ) ;
1444+ }
1445+
14311446 let candidates = self . assemble_and_evaluate_candidates ( goal, AssembleCandidatesFrom :: All ) ;
14321447 self . merge_trait_candidates ( candidates)
14331448 }
You can’t perform that action at this time.
0 commit comments