Rust: Run codegen

This commit is contained in:
Tom Hvitved
2026-01-13 10:22:16 +01:00
parent d6ec174e0c
commit 3eafca0550
19 changed files with 10 additions and 434 deletions

View File

@@ -1,13 +0,0 @@
// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
query predicate instances(MacroBlockExpr x) { toBeTested(x) and not x.isUnknown() }
query predicate getStatement(MacroBlockExpr x, int index, Stmt getStatement) {
toBeTested(x) and not x.isUnknown() and getStatement = x.getStatement(index)
}
query predicate getTailExpr(MacroBlockExpr x, Expr getTailExpr) {
toBeTested(x) and not x.isUnknown() and getTailExpr = x.getTailExpr()
}

View File

@@ -1,14 +0,0 @@
// generated by codegen, do not edit
fn test_macro_block_expr() -> () {
// A sequence of statements generated by a `MacroCall`. For example:
macro_rules! my_macro {
() => {
let mut x = 40;
x += 2;
x
};
}
my_macro!(); // this macro expands to a sequence of statements (and an expression)
}