summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-06-30 11:24:47 +0000
committerbors <bors@rust-lang.org>2025-06-30 11:24:47 +0000
commitad3b7257615c28aaf8212a189ec032b8af75de51 (patch)
treec0486ad79f8ff9cc1eaba31013d66496bf3686c6 /compiler/rustc_codegen_gcc
parentf19142044f270760ce0ebc03b2c3a44217d8703d (diff)
parentd0bb9a73aa51322476a7efbfc9cd010f788932bb (diff)
downloadrust-ad3b7257615c28aaf8212a189ec032b8af75de51.tar.gz
rust-ad3b7257615c28aaf8212a189ec032b8af75de51.zip
Auto merge of #142839 - oli-obk:denullarification, r=RalfJung,celinval
Stop backends from needing to support nullary intrinsics

And then remove our infrastructure special casing them. Further improvements can now be done to them by avoiding the intermediate ConstValue step, but let's leave that to follow up work

r? `@RalfJung`
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs b/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs
index c3bd62e5897..6b6f71edaf8 100644
--- a/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs
+++ b/compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs
@@ -6,6 +6,7 @@
 )]
 #![no_core]
 #![allow(dead_code, internal_features, non_camel_case_types)]
+#![rustfmt::skip]
 
 extern crate mini_core;
 
@@ -197,10 +198,10 @@ fn main() {
         assert_eq!(intrinsics::align_of::<u16>() as u8, 2);
         assert_eq!(intrinsics::align_of_val(&a) as u8, intrinsics::align_of::<&str>() as u8);
 
-        assert!(!intrinsics::needs_drop::<u8>());
-        assert!(!intrinsics::needs_drop::<[u8]>());
-        assert!(intrinsics::needs_drop::<NoisyDrop>());
-        assert!(intrinsics::needs_drop::<NoisyDropUnsized>());
+        assert!(!const { intrinsics::needs_drop::<u8>() });
+        assert!(!const { intrinsics::needs_drop::<[u8]>() });
+        assert!(const { intrinsics::needs_drop::<NoisyDrop>() });
+        assert!(const { intrinsics::needs_drop::<NoisyDropUnsized>() });
 
         Unique {
             pointer: 0 as *const &str,