about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-05-02 19:42:50 +0200
committerGitHub <noreply@github.com>2024-05-02 19:42:50 +0200
commit7ed351a5083286afe1acf0681046b092e79fa91b (patch)
treeff4a24ee3a99cf9a258012aabae3b4efb12ea421
parent2b875f09274c97df5f4d34cac98ad48cf5ce7bbc (diff)
parent3ea32a746df732f864bb60cab44afe6b71ba799d (diff)
downloadrust-7ed351a5083286afe1acf0681046b092e79fa91b.tar.gz
rust-7ed351a5083286afe1acf0681046b092e79fa91b.zip
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?
-rw-r--r--src/intrinsic/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intrinsic/mod.rs b/src/intrinsic/mod.rs
index b7aec97ad8c..451e5258ebd 100644
--- a/src/intrinsic/mod.rs
+++ b/src/intrinsic/mod.rs
@@ -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,
@@ -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,