1
Fork 0

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:
Matthias Krüger 2024-05-02 19:42:50 +02:00 committed by GitHub
commit d6940fb43d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 51 additions and 57 deletions

View file

@ -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);