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

@@ -67,7 +67,6 @@ LifetimeParam/gen_lifetime_param.rs e3f9a417ae7a88a4d81d9cb747b361a3246d270d142f
LiteralExpr/gen_literal_expr.rs 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d 2db01ad390e5c0c63a957c043230a462cb4cc25715eea6ede15d43c55d35976d
LiteralPat/gen_literal_pat.rs a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3 a471b481b6989001817a3988696f445d9a4dea784e543c346536dacbee1e96f3
LoopExpr/gen_loop_expr.rs 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619 35deaf35e765db4ae3124a11284266d8f341d1ce7b700030efada0dda8878619
MacroBlockExpr/gen_macro_block_expr.rs 4284a6e6ad81827d8616a00fec7f5bc21104eed40d93e3acc2b933ee22cb8577 4284a6e6ad81827d8616a00fec7f5bc21104eed40d93e3acc2b933ee22cb8577
MacroCall/gen_macro_call.rs c30added613d9edb3cb1321ae46fc6a088a2f22d2cc979119466ec02f6e09ed6 c30added613d9edb3cb1321ae46fc6a088a2f22d2cc979119466ec02f6e09ed6
MacroDef/gen_macro_def.rs 6f895ecab8c13a73c28ce67fcee39baf7928745a80fb440811014f6d31b22378 6f895ecab8c13a73c28ce67fcee39baf7928745a80fb440811014f6d31b22378
MacroExpr/gen_macro_expr.rs 5e1748356f431eea343a2aad2798c22073151940ea2cda0f0cce78c3d96104f0 5e1748356f431eea343a2aad2798c22073151940ea2cda0f0cce78c3d96104f0

View File

@@ -69,7 +69,6 @@
/LiteralExpr/gen_literal_expr.rs linguist-generated
/LiteralPat/gen_literal_pat.rs linguist-generated
/LoopExpr/gen_loop_expr.rs linguist-generated
/MacroBlockExpr/gen_macro_block_expr.rs linguist-generated
/MacroCall/gen_macro_call.rs linguist-generated
/MacroDef/gen_macro_def.rs linguist-generated
/MacroExpr/gen_macro_expr.rs linguist-generated

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)
}