()
| 488 | fn address_of_emits_alloc_and_load() { |
| 489 | let source = r#"main: () -> i32 { |
| 490 | x: i32 = 42 |
| 491 | ptr: i32* = &x |
| 492 | val: i32 = @ptr |
| 493 | return val |
| 494 | }"#; |
| 495 | assert!(has_instruction(source, |i| matches!( |
| 496 | i, |
| 497 | IrInstruction::Alloc { .. } |
| 498 | ))); |
| 499 | assert!(has_instruction(source, |i| matches!( |
| 500 | i, |
| 501 | IrInstruction::Load { .. } |
| 502 | ))); |
| 503 | } |
| 504 | |
| 505 | #[test] |
nothing calls this directly
no test coverage detected