File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
compiler/rustc_mir_build/src Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -132,21 +132,16 @@ impl<'tcx> TerminatorClassifier<'tcx> for CallRecursion<'tcx> {
132132 return false ;
133133 }
134134 let caller = body. source . def_id ( ) ;
135- let param_env = tcx . param_env ( caller ) ;
135+ let typing_env = body . typing_env ( tcx ) ;
136136
137137 let func_ty = func. ty ( body, tcx) ;
138138 if let ty:: FnDef ( callee, args) = * func_ty. kind ( ) {
139- let Ok ( normalized_args) =
140- tcx. try_normalize_erasing_regions ( ty:: TypingEnv :: from_param_env ( param_env) , args)
141- else {
139+ let Ok ( normalized_args) = tcx. try_normalize_erasing_regions ( typing_env, args) else {
142140 return false ;
143141 } ;
144- let ( callee, call_args) = if let Ok ( Some ( instance) ) = Instance :: try_resolve (
145- tcx,
146- ty:: TypingEnv :: from_param_env ( param_env) ,
147- callee,
148- normalized_args,
149- ) {
142+ let ( callee, call_args) = if let Ok ( Some ( instance) ) =
143+ Instance :: try_resolve ( tcx, typing_env, callee, normalized_args)
144+ {
150145 ( instance. def_id ( ) , instance. args )
151146 } else {
152147 ( callee, normalized_args)
You can’t perform that action at this time.
0 commit comments