diff options
| author | Waffle Lapkin <waffle.lapkin@gmail.com> | 2024-05-02 17:49:23 +0200 |
|---|---|---|
| committer | Waffle Lapkin <waffle.lapkin@gmail.com> | 2024-05-02 17:49:23 +0200 |
| commit | 698d7a031eb65a9d47952f7ba3b13aa16fcbb11b (patch) | |
| tree | ea8cadc9b70bdb1e67afc69f40231016bf535768 /compiler/rustc_mir_transform/src | |
| parent | f92d49b7fe059e05eea43d7fc530aa96b8028fed (diff) | |
| download | rust-698d7a031eb65a9d47952f7ba3b13aa16fcbb11b.tar.gz rust-698d7a031eb65a9d47952f7ba3b13aa16fcbb11b.zip | |
Inline & delete `Ty::new_unit`, since it's just a field access
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/coroutine.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs index b745d97567d..3008016863e 100644 --- a/compiler/rustc_mir_transform/src/coroutine.rs +++ b/compiler/rustc_mir_transform/src/coroutine.rs @@ -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); |
