diff options
| author | bors <bors@rust-lang.org> | 2025-06-30 11:24:47 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-30 11:24:47 +0000 |
| commit | ad3b7257615c28aaf8212a189ec032b8af75de51 (patch) | |
| tree | c0486ad79f8ff9cc1eaba31013d66496bf3686c6 /compiler/rustc_codegen_gcc | |
| parent | f19142044f270760ce0ebc03b2c3a44217d8703d (diff) | |
| parent | d0bb9a73aa51322476a7efbfc9cd010f788932bb (diff) | |
| download | rust-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.rs | 9 |
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, |
