File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ // MIR for `main` after PreCodegen
2+
3+ fn main() -> () {
4+ let mut _0 : ();
5+ scope 1 {
6+ debug x => const {transmute(0x00000002) : (u32) is 1..=};
7+ scope 2 {
8+ debug y => const {transmute(0x00000000) : (u32) is 1..=};
9+ }
10+ }
11+
12+ bb0 : {
13+ return;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ #![ feature( pattern_types) ]
2+ #![ feature( pattern_type_macro) ]
3+
4+ use std:: pat:: pattern_type;
5+
6+ // EMIT_MIR pattern_types.main.PreCodegen.after.mir
7+ fn main ( ) {
8+ // CHECK: debug x => const {transmute(0x00000002): (u32) is 1..=}
9+ let x: pattern_type ! ( u32 is 1 ..) = unsafe { std:: mem:: transmute ( 2 ) } ;
10+ // CHECK: debug y => const {transmute(0x00000000): (u32) is 1..=}
11+ let y: pattern_type ! ( u32 is 1 ..) = unsafe { std:: mem:: transmute ( 0 ) } ;
12+ }
You can’t perform that action at this time.
0 commit comments