Skip to content

Commit 964c58a

Browse files
committed
Ensure we always get a constant, even without mir opts
1 parent 8876cf7 commit 964c58a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/codegen/slice-init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub fn option_none_init() -> [Option<u8>; N] {
8686
// CHECK-NOT: switch
8787
// CHECK: icmp
8888
// CHECK-NOT: call void @llvm.memset.p0
89-
[None; N]
89+
[const { None }; N]
9090
}
9191

9292
// Use an opaque function to prevent rustc from removing useless drops.

0 commit comments

Comments
 (0)