@@ -340,7 +340,6 @@ struct VnState<'body, 'tcx> {
340
340
tcx : TyCtxt < ' tcx > ,
341
341
ecx : InterpCx < ' tcx , DummyMachine > ,
342
342
local_decls : & ' body LocalDecls < ' tcx > ,
343
- is_coroutine : bool ,
344
343
/// Value stored in each local.
345
344
locals : IndexVec < Local , Option < VnIndex > > ,
346
345
/// Locals that are assigned that value.
@@ -376,7 +375,6 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
376
375
tcx,
377
376
ecx : InterpCx :: new ( tcx, DUMMY_SP , typing_env, DummyMachine ) ,
378
377
local_decls,
379
- is_coroutine : body. coroutine . is_some ( ) ,
380
378
locals : IndexVec :: from_elem ( None , local_decls) ,
381
379
rev_locals : IndexVec :: with_capacity ( num_values) ,
382
380
values : ValueSet :: new ( num_values) ,
@@ -516,11 +514,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
516
514
use Value :: * ;
517
515
let ty = self . ty ( value) ;
518
516
// Avoid computing layouts inside a coroutine, as that can cause cycles.
519
- let ty = if !self . is_coroutine || ty. is_scalar ( ) {
520
- self . ecx . layout_of ( ty) . ok ( ) ?
521
- } else {
522
- return None ;
523
- } ;
517
+ let ty = self . ecx . layout_of ( ty) . ok ( ) ?;
524
518
let op = match * self . get ( value) {
525
519
_ if ty. is_zst ( ) => ImmTy :: uninit ( ty) . into ( ) ,
526
520
0 commit comments