@@ -216,7 +216,6 @@ struct VnState<'body, 'tcx> {
216
216
tcx : TyCtxt < ' tcx > ,
217
217
ecx : InterpCx < ' tcx , DummyMachine > ,
218
218
local_decls : & ' body LocalDecls < ' tcx > ,
219
- is_coroutine : bool ,
220
219
/// Value stored in each local.
221
220
locals : IndexVec < Local , Option < VnIndex > > ,
222
221
/// Locals that are assigned that value.
@@ -254,7 +253,6 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
254
253
tcx,
255
254
ecx : InterpCx :: new ( tcx, DUMMY_SP , typing_env, DummyMachine ) ,
256
255
local_decls,
257
- is_coroutine : body. coroutine . is_some ( ) ,
258
256
locals : IndexVec :: from_elem ( None , local_decls) ,
259
257
rev_locals : IndexVec :: with_capacity ( num_values) ,
260
258
values : FxIndexSet :: with_capacity_and_hasher ( num_values, Default :: default ( ) ) ,
@@ -383,11 +381,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
383
381
use Value :: * ;
384
382
let ty = self . ty ( value) ;
385
383
// Avoid computing layouts inside a coroutine, as that can cause cycles.
386
- let ty = if !self . is_coroutine || ty. is_scalar ( ) {
387
- self . ecx . layout_of ( ty) . ok ( ) ?
388
- } else {
389
- return None ;
390
- } ;
384
+ let ty = self . ecx . layout_of ( ty) . ok ( ) ?;
391
385
let op = match * self . get ( value) {
392
386
_ if ty. is_zst ( ) => ImmTy :: uninit ( ty) . into ( ) ,
393
387
0 commit comments