MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / assert_semantic_error

Function assert_semantic_error

tests/integration/ir_generation.rs:28–40  ·  view source on GitHub ↗
(source: &str, fragment: &str)

Source from the content-addressed store, hash-verified

26 }
27}
28
29fn has_instruction<F>(source: &str, pred: F) -> bool
30where
31 F: Fn(&IrInstruction) -> bool,
32{
33 let result = compile_ok(source);
34 result
35 .ir_program
36 .functions
37 .iter()
38 .flat_map(|f| f.blocks.iter())
39 .flat_map(|b| b.instructions.iter())
40 .any(pred)
41}
42
43fn count_instructions<F>(source: &str, pred: F) -> usize

Callers 1

Calls 2

set_write_artifactsMethod · 0.80
compileMethod · 0.45

Tested by 1