Rollup merge of #124624 - WaffleLapkin:old_unit, r=fmease
Use `tcx.types.unit` instead of `Ty::new_unit(tcx)` I don't think there is any need for the function, given that we can just access the `.types`, similarly to all other primitives?
This commit is contained in:
@@ -1260,7 +1260,7 @@ fn create_coroutine_drop_shim<'tcx>(
|
||||
}
|
||||
|
||||
// Replace the return variable
|
||||
body.local_decls[RETURN_PLACE] = LocalDecl::with_source_info(Ty::new_unit(tcx), source_info);
|
||||
body.local_decls[RETURN_PLACE] = LocalDecl::with_source_info(tcx.types.unit, source_info);
|
||||
|
||||
make_coroutine_state_argument_indirect(tcx, &mut body);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user