@@ -302,13 +302,53 @@ impl<'a, 'tcx> IsThirPolymorphic<'a, 'tcx> {
302302 }
303303
304304 match expr. kind {
305- thir:: ExprKind :: NamedConst { substs, .. } => substs. has_non_region_param ( ) ,
305+ thir:: ExprKind :: NamedConst { substs, .. }
306+ | thir:: ExprKind :: ConstBlock { substs, .. } => substs. has_non_region_param ( ) ,
306307 thir:: ExprKind :: ConstParam { .. } => true ,
307308 thir:: ExprKind :: Repeat { value, count } => {
308309 self . visit_expr ( & self . thir ( ) [ value] ) ;
309310 count. has_non_region_param ( )
310311 }
311- _ => false ,
312+ thir:: ExprKind :: Scope { .. }
313+ | thir:: ExprKind :: Box { .. }
314+ | thir:: ExprKind :: If { .. }
315+ | thir:: ExprKind :: Call { .. }
316+ | thir:: ExprKind :: Deref { .. }
317+ | thir:: ExprKind :: Binary { .. }
318+ | thir:: ExprKind :: LogicalOp { .. }
319+ | thir:: ExprKind :: Unary { .. }
320+ | thir:: ExprKind :: Cast { .. }
321+ | thir:: ExprKind :: Use { .. }
322+ | thir:: ExprKind :: NeverToAny { .. }
323+ | thir:: ExprKind :: Pointer { .. }
324+ | thir:: ExprKind :: Loop { .. }
325+ | thir:: ExprKind :: Let { .. }
326+ | thir:: ExprKind :: Match { .. }
327+ | thir:: ExprKind :: Block { .. }
328+ | thir:: ExprKind :: Assign { .. }
329+ | thir:: ExprKind :: AssignOp { .. }
330+ | thir:: ExprKind :: Field { .. }
331+ | thir:: ExprKind :: Index { .. }
332+ | thir:: ExprKind :: VarRef { .. }
333+ | thir:: ExprKind :: UpvarRef { .. }
334+ | thir:: ExprKind :: Borrow { .. }
335+ | thir:: ExprKind :: AddressOf { .. }
336+ | thir:: ExprKind :: Break { .. }
337+ | thir:: ExprKind :: Continue { .. }
338+ | thir:: ExprKind :: Return { .. }
339+ | thir:: ExprKind :: Array { .. }
340+ | thir:: ExprKind :: Tuple { .. }
341+ | thir:: ExprKind :: Adt ( _)
342+ | thir:: ExprKind :: PlaceTypeAscription { .. }
343+ | thir:: ExprKind :: ValueTypeAscription { .. }
344+ | thir:: ExprKind :: Closure ( _)
345+ | thir:: ExprKind :: Literal { .. }
346+ | thir:: ExprKind :: NonHirLiteral { .. }
347+ | thir:: ExprKind :: ZstLiteral { .. }
348+ | thir:: ExprKind :: StaticRef { .. }
349+ | thir:: ExprKind :: InlineAsm ( _)
350+ | thir:: ExprKind :: ThreadLocalRef ( _)
351+ | thir:: ExprKind :: Yield { .. } => false ,
312352 }
313353 }
314354 fn pat_is_poly ( & mut self , pat : & thir:: Pat < ' tcx > ) -> bool {
0 commit comments