@@ -163,7 +163,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
163163 let fn_ty = self . monomorphize ( fn_ty) ;
164164 if let ty:: FnDef ( def_id, args) = * fn_ty. kind ( ) {
165165 let instance =
166- ty:: Instance :: try_resolve ( self . cx . tcx , self . typing_env , def_id, args)
166+ ty:: Instance :: try_resolve ( self . cx . tcx , self . typing_env , def_id, args. no_bound_vars ( ) . unwrap ( ) )
167167 . unwrap ( )
168168 . ok_or ( Error :: TooGeneric ) ?;
169169 self . check_fn_pointer_cast ( instance, span) ?;
@@ -252,7 +252,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
252252
253253 if let ty:: FnDef ( def_id, args) = * callee_ty. kind ( ) {
254254 let instance =
255- ty:: Instance :: try_resolve ( self . cx . tcx , self . typing_env , def_id, args)
255+ ty:: Instance :: try_resolve ( self . cx . tcx , self . typing_env , def_id, args. no_bound_vars ( ) . unwrap ( ) )
256256 . unwrap ( )
257257 . ok_or ( Error :: TooGeneric ) ?;
258258 self . cx . call_stack . borrow_mut ( ) . push ( UseSite {
@@ -290,7 +290,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
290290 self . cx . tcx ,
291291 self . typing_env ,
292292 def_id,
293- args,
293+ args. no_bound_vars ( ) . unwrap ( ) ,
294294 )
295295 . unwrap ( )
296296 . ok_or ( Error :: TooGeneric ) ?;
0 commit comments