Skip to content

Commit

Permalink
Rollup merge of rust-lang#124624 - WaffleLapkin:old_unit, r=fmease
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
matthiaskrgr authored May 2, 2024
2 parents 2b875f0 + 3ea32a7 commit 7ed351a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intrinsic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
tcx,
ty::Binder::dummy(tcx.mk_fn_sig(
iter::once(i8p),
Ty::new_unit(tcx),
tcx.types.unit,
false,
rustc_hir::Unsafety::Unsafe,
Abi::Rust,
Expand All @@ -1234,7 +1234,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
tcx,
ty::Binder::dummy(tcx.mk_fn_sig(
[i8p, i8p].iter().cloned(),
Ty::new_unit(tcx),
tcx.types.unit,
false,
rustc_hir::Unsafety::Unsafe,
Abi::Rust,
Expand Down

0 comments on commit 7ed351a

Please sign in to comment.