Skip to content

Commit 7ed351a

Browse files
authored
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?
2 parents 2b875f0 + 3ea32a7 commit 7ed351a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/intrinsic/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
12231223
tcx,
12241224
ty::Binder::dummy(tcx.mk_fn_sig(
12251225
iter::once(i8p),
1226-
Ty::new_unit(tcx),
1226+
tcx.types.unit,
12271227
false,
12281228
rustc_hir::Unsafety::Unsafe,
12291229
Abi::Rust,
@@ -1234,7 +1234,7 @@ fn get_rust_try_fn<'a, 'gcc, 'tcx>(
12341234
tcx,
12351235
ty::Binder::dummy(tcx.mk_fn_sig(
12361236
[i8p, i8p].iter().cloned(),
1237-
Ty::new_unit(tcx),
1237+
tcx.types.unit,
12381238
false,
12391239
rustc_hir::Unsafety::Unsafe,
12401240
Abi::Rust,

0 commit comments

Comments
 (0)