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:
commit
d6940fb43d
20 changed files with 51 additions and 57 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue