about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
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
commitd6940fb43d7c81d1b4e8fd2e3f699f3b43f0cc1a (patch)
tree2023c261c6465bc512bead13c23cd20792797501 /compiler/rustc_codegen_gcc
parentfe62bc5ea5302155558b053fee3d9aa6ed6fcad8 (diff)
parent1c9a61d2111c93407018c99e15ddd78ea18a234e (diff)
downloadrust-d6940fb43d7c81d1b4e8fd2e3f699f3b43f0cc1a.tar.gz
rust-d6940fb43d7c81d1b4e8fd2e3f699f3b43f0cc1a.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?
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/src/intrinsic/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs
index b7aec97ad8c..451e5258ebd 100644
--- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs
+++ b/compiler/rustc_codegen_gcc/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,