1
Fork 0

Ensure we always get a constant, even without mir opts

This commit is contained in:
Oli Scherer 2025-01-21 08:25:48 +00:00
parent 8876cf7181
commit 964c58a7d9

View file

@ -86,7 +86,7 @@ pub fn option_none_init() -> [Option<u8>; N] {
// CHECK-NOT: switch
// CHECK: icmp
// CHECK-NOT: call void @llvm.memset.p0
[None; N]
[const { None }; N]
}
// Use an opaque function to prevent rustc from removing useless drops.