]>
git.proxmox.com Git - rustc.git/blob - tests/mir-opt/building/custom/consts.rs
2 #![feature(custom_mir, core_intrinsics, inline_const)]
5 use core
::intrinsics
::mir
::*;
9 // EMIT_MIR consts.consts.built.after.mir
10 #[custom_mir(dialect = "built")]
11 fn consts
<const C
: u32>() {
14 let _b
= const { 5_i8 }
;
17 let _e
= consts
::<10>;
22 static S
: i32 = 0x05050505;
23 static mut T
: i32 = 0x0a0a0a0a;
24 // EMIT_MIR consts.statics.built.after.mir
25 #[custom_mir(dialect = "built")]
28 let _a
: &i32 = Static(S
);
29 let _b
: *mut i32 = StaticMut(T
);