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