From 2a88086544d840973f5382d673aea1b559354f87 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Tue, 10 Sep 2024 21:51:13 +0200 Subject: [PATCH 01/22] Rust: AST: add docs with examples for qltest --- rust/extractor/src/translate.rs | 5 +- rust/ql/.generated.list | 248 ++++++---- rust/ql/.gitattributes | 78 ++- .../ql/lib/codeql/rust/elements/ArrayExpr.qll | 7 + .../codeql/rust/elements/AsyncBlockExpr.qll | 9 + .../ql/lib/codeql/rust/elements/AwaitExpr.qll | 9 + .../lib/codeql/rust/elements/BecomeExpr.qll | 11 + .../lib/codeql/rust/elements/BinaryOpExpr.qll | 10 + .../ql/lib/codeql/rust/elements/BlockExpr.qll | 14 + rust/ql/lib/codeql/rust/elements/BoxExpr.qll | 6 + .../ql/lib/codeql/rust/elements/BreakExpr.qll | 17 + rust/ql/lib/codeql/rust/elements/CallExpr.qll | 9 + rust/ql/lib/codeql/rust/elements/CastExpr.qll | 6 + .../lib/codeql/rust/elements/ClosureExpr.qll | 12 + .../ql/lib/codeql/rust/elements/ConstExpr.qll | 8 + .../lib/codeql/rust/elements/ContinueExpr.qll | 17 + .../codeql/rust/elements/ElementListExpr.qll | 7 + rust/ql/lib/codeql/rust/elements/ExprStmt.qll | 8 + .../ql/lib/codeql/rust/elements/FieldExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/IfExpr.qll | 15 + .../ql/lib/codeql/rust/elements/IndexExpr.qll | 7 + .../codeql/rust/elements/InlineAsmExpr.qll | 8 + rust/ql/lib/codeql/rust/elements/ItemStmt.qll | 9 + rust/ql/lib/codeql/rust/elements/LetExpr.qll | 8 + rust/ql/lib/codeql/rust/elements/LetStmt.qll | 12 + .../lib/codeql/rust/elements/LiteralExpr.qll | 12 + rust/ql/lib/codeql/rust/elements/LoopExpr.qll | 24 + rust/ql/lib/codeql/rust/elements/MatchArm.qll | 15 + .../ql/lib/codeql/rust/elements/MatchExpr.qll | 14 + .../codeql/rust/elements/MethodCallExpr.qll | 6 + .../lib/codeql/rust/elements/MissingExpr.qll | 7 + .../lib/codeql/rust/elements/OffsetOfExpr.qll | 6 + rust/ql/lib/codeql/rust/elements/PathExpr.qll | 9 + .../ql/lib/codeql/rust/elements/RangeExpr.qll | 11 + .../codeql/rust/elements/RecordLitExpr.qll | 9 + .../codeql/rust/elements/RecordLitField.qll | 6 + rust/ql/lib/codeql/rust/elements/RefExpr.qll | 9 + .../lib/codeql/rust/elements/RepeatExpr.qll | 5 + .../lib/codeql/rust/elements/ReturnExpr.qll | 13 + .../ql/lib/codeql/rust/elements/TupleExpr.qll | 7 + .../lib/codeql/rust/elements/UnaryOpExpr.qll | 8 + .../codeql/rust/elements/UnderscoreExpr.qll | 6 + .../codeql/rust/elements/UnsafeBlockExpr.qll | 9 + rust/ql/lib/codeql/rust/elements/YeetExpr.qll | 8 + .../ql/lib/codeql/rust/elements/YieldExpr.qll | 9 + .../lib/codeql/rust/generated/ArrayExpr.qll | 5 + .../codeql/rust/generated/AsyncBlockExpr.qll | 7 + .../lib/codeql/rust/generated/AwaitExpr.qll | 7 + .../lib/codeql/rust/generated/BecomeExpr.qll | 9 + .../codeql/rust/generated/BinaryOpExpr.qll | 8 + .../lib/codeql/rust/generated/BlockExpr.qll | 12 + rust/ql/lib/codeql/rust/generated/BoxExpr.qll | 4 + .../lib/codeql/rust/generated/BreakExpr.qll | 15 + .../ql/lib/codeql/rust/generated/CallExpr.qll | 7 + .../ql/lib/codeql/rust/generated/CastExpr.qll | 4 + .../lib/codeql/rust/generated/ClosureExpr.qll | 10 + .../lib/codeql/rust/generated/ConstExpr.qll | 6 + .../codeql/rust/generated/ContinueExpr.qll | 15 + .../codeql/rust/generated/ElementListExpr.qll | 5 + .../ql/lib/codeql/rust/generated/ExprStmt.qll | 6 + .../lib/codeql/rust/generated/FieldExpr.qll | 4 + rust/ql/lib/codeql/rust/generated/IfExpr.qll | 13 + .../lib/codeql/rust/generated/IndexExpr.qll | 5 + .../codeql/rust/generated/InlineAsmExpr.qll | 6 + .../ql/lib/codeql/rust/generated/ItemStmt.qll | 7 + rust/ql/lib/codeql/rust/generated/LetExpr.qll | 6 + rust/ql/lib/codeql/rust/generated/LetStmt.qll | 10 + .../lib/codeql/rust/generated/LiteralExpr.qll | 10 + .../ql/lib/codeql/rust/generated/LoopExpr.qll | 22 + .../ql/lib/codeql/rust/generated/MatchArm.qll | 13 + .../lib/codeql/rust/generated/MatchExpr.qll | 12 + .../codeql/rust/generated/MethodCallExpr.qll | 4 + .../lib/codeql/rust/generated/MissingExpr.qll | 5 + .../codeql/rust/generated/OffsetOfExpr.qll | 4 + .../ql/lib/codeql/rust/generated/PathExpr.qll | 7 + .../lib/codeql/rust/generated/RangeExpr.qll | 9 + rust/ql/lib/codeql/rust/generated/Raw.qll | 324 ++++++++++++ .../codeql/rust/generated/RecordLitExpr.qll | 7 + .../codeql/rust/generated/RecordLitField.qll | 4 + rust/ql/lib/codeql/rust/generated/RefExpr.qll | 7 + .../lib/codeql/rust/generated/RepeatExpr.qll | 3 + .../lib/codeql/rust/generated/ReturnExpr.qll | 11 + .../lib/codeql/rust/generated/TupleExpr.qll | 5 + .../lib/codeql/rust/generated/UnaryOpExpr.qll | 6 + .../codeql/rust/generated/UnderscoreExpr.qll | 4 + .../codeql/rust/generated/UnsafeBlockExpr.qll | 7 + .../ql/lib/codeql/rust/generated/YeetExpr.qll | 6 + .../lib/codeql/rust/generated/YieldExpr.qll | 7 + .../generated/.generated_tests.list | 40 ++ .../extractor-tests/generated/.gitattributes | 40 ++ .../AsyncBlockExpr/AsyncBlockExpr.expected | 1 + .../AsyncBlockExpr/AsyncBlockExpr.ql | 11 + .../AsyncBlockExpr_getStatement.expected | 1 + .../AsyncBlockExpr_getStatement.ql | 7 + .../AsyncBlockExpr_getTail.expected | 1 + .../AsyncBlockExpr/AsyncBlockExpr_getTail.ql | 7 + .../AsyncBlockExpr/gen_async_block_expr.rs | 9 + .../generated/AwaitExpr/AwaitExpr.expected | 1 + .../generated/AwaitExpr/AwaitExpr.ql | 10 + .../generated/AwaitExpr/gen_await_expr.rs | 9 + .../generated/BecomeExpr/BecomeExpr.expected | 1 + .../generated/BecomeExpr/BecomeExpr.ql | 10 + .../generated/BecomeExpr/gen_become_expr.rs | 10 + .../BinaryOpExpr/BinaryOpExpr.expected | 5 + .../generated/BinaryOpExpr/BinaryOpExpr.ql | 12 + .../BinaryOpExpr/BinaryOpExpr_getOp.expected | 5 + .../BinaryOpExpr/BinaryOpExpr_getOp.ql | 7 + .../BinaryOpExpr/gen_binary_op_expr.rs | 10 + .../generated/BlockExpr/BlockExpr.expected | 3 + .../generated/BlockExpr/BlockExpr.ql | 13 + .../BlockExpr/BlockExpr_getLabel.expected | 1 + .../generated/BlockExpr/BlockExpr_getLabel.ql | 7 + .../BlockExpr/BlockExpr_getStatement.expected | 3 + .../BlockExpr/BlockExpr_getStatement.ql | 7 + .../BlockExpr/BlockExpr_getTail.expected | 2 + .../generated/BlockExpr/BlockExpr_getTail.ql | 7 + .../generated/BlockExpr/gen_block_expr.rs | 12 + .../generated/BoxExpr/BoxExpr.expected | 1 + .../generated/BoxExpr/BoxExpr.ql | 10 + .../generated/BoxExpr/gen_box_expr.rs | 6 + .../generated/BreakExpr/BreakExpr.expected | 2 + .../generated/BreakExpr/BreakExpr.ql | 11 + .../BreakExpr/BreakExpr_getExpr.expected | 1 + .../generated/BreakExpr/BreakExpr_getExpr.ql | 7 + .../BreakExpr/BreakExpr_getLabel.expected | 1 + .../generated/BreakExpr/BreakExpr_getLabel.ql | 7 + .../generated/BreakExpr/gen_break_expr.rs | 15 + .../generated/CallExpr/CallExpr.expected | 4 + .../generated/CallExpr/CallExpr.ql | 13 + .../CallExpr/CallExpr_getArg.expected | 4 + .../generated/CallExpr/CallExpr_getArg.ql | 7 + .../generated/CallExpr/gen_call_expr.rs | 9 + .../generated/CastExpr/CastExpr.expected | 1 + .../generated/CastExpr/CastExpr.ql | 11 + .../generated/CastExpr/gen_cast_expr.rs | 6 + .../ClosureExpr/ClosureExpr.expected | 5 + .../generated/ClosureExpr/ClosureExpr.ql | 17 + .../ClosureExpr/ClosureExpr_getArg.expected | 6 + .../ClosureExpr/ClosureExpr_getArg.ql | 7 + .../ClosureExpr_getArgType.expected | 2 + .../ClosureExpr/ClosureExpr_getArgType.ql | 7 + .../ClosureExpr_getRetType.expected | 1 + .../ClosureExpr/ClosureExpr_getRetType.ql | 7 + .../generated/ClosureExpr/gen_closure_expr.rs | 12 + .../generated/ConstExpr/ConstExpr.expected | 1 + .../generated/ConstExpr/ConstExpr.ql | 10 + .../generated/ConstExpr/gen_const_expr.rs | 8 + .../ContinueExpr/ContinueExpr.expected | 2 + .../generated/ContinueExpr/ContinueExpr.ql | 10 + .../ContinueExpr_getLabel.expected | 1 + .../ContinueExpr/ContinueExpr_getLabel.ql | 7 + .../ContinueExpr/gen_continue_expr.rs | 15 + .../ElementListExpr/ElementListExpr.expected | 2 + .../ElementListExpr/ElementListExpr.ql | 11 + .../ElementListExpr_getElement.expected | 10 + .../ElementListExpr_getElement.ql | 7 + .../ElementListExpr/gen_element_list_expr.rs | 7 + .../generated/Expr/MISSING_SOURCE.txt | 4 - .../generated/ExprStmt/ExprStmt.expected | 2 + .../generated/ExprStmt/ExprStmt.ql | 11 + .../generated/ExprStmt/gen_expr_stmt.rs | 8 + .../generated/FieldExpr/FieldExpr.expected | 1 + .../generated/FieldExpr/FieldExpr.ql | 11 + .../generated/FieldExpr/gen_field_expr.rs | 6 + .../generated/IfExpr/IfExpr.expected | 2 + .../generated/IfExpr/IfExpr.ql | 12 + .../generated/IfExpr/IfExpr_getElse.expected | 1 + .../generated/IfExpr/IfExpr_getElse.ql | 7 + .../generated/IfExpr/gen_if_expr.rs | 13 + .../generated/IndexExpr/IndexExpr.expected | 2 + .../generated/IndexExpr/IndexExpr.ql | 12 + .../generated/IndexExpr/gen_index_expr.rs | 7 + .../InlineAsmExpr/InlineAsmExpr.expected | 1 + .../generated/InlineAsmExpr/InlineAsmExpr.ql | 10 + .../InlineAsmExpr/gen_inline_asm_expr.rs | 8 + .../generated/LetExpr/LetExpr.expected | 1 + .../generated/LetExpr/LetExpr.ql | 11 + .../generated/LetExpr/gen_let_expr.rs | 8 + .../generated/LetStmt/LetStmt.expected | 6 + .../generated/LetStmt/LetStmt.ql | 14 + .../LetStmt/LetStmt_getElse.expected | 1 + .../generated/LetStmt/LetStmt_getElse.ql | 7 + .../LetStmt/LetStmt_getInitializer.expected | 4 + .../LetStmt/LetStmt_getInitializer.ql | 7 + .../LetStmt/LetStmt_getTypeRef.expected | 2 + .../generated/LetStmt/LetStmt_getTypeRef.ql | 7 + .../generated/LetStmt/gen_let_stmt.rs | 13 + .../LiteralExpr/LiteralExpr.expected | 8 + .../generated/LiteralExpr/LiteralExpr.ql | 7 + .../generated/LiteralExpr/gen_literal_expr.rs | 13 + .../generated/LoopExpr/LoopExpr.expected | 3 + .../generated/LoopExpr/LoopExpr.ql | 11 + .../LoopExpr/LoopExpr_getLabel.expected | 1 + .../generated/LoopExpr/LoopExpr_getLabel.ql | 7 + .../generated/LoopExpr/gen_loop_expr.rs | 20 + .../generated/MatchArm/MatchArm.expected | 4 + .../generated/MatchArm/MatchArm.ql | 12 + .../MatchArm/MatchArm_getGuard.expected | 1 + .../generated/MatchArm/MatchArm_getGuard.ql | 7 + .../generated/MatchArm/gen_match_arm.rs | 13 + .../generated/MatchExpr/MatchExpr.expected | 1 + .../generated/MatchExpr/MatchExpr.ql | 11 + .../MatchExpr/MatchExpr_getBranch.expected | 2 + .../MatchExpr/MatchExpr_getBranch.ql | 7 + .../generated/MatchExpr/gen_match_expr.rs | 13 + .../MethodCallExpr/MethodCallExpr.expected | 2 + .../MethodCallExpr/MethodCallExpr.ql | 16 + .../MethodCallExpr_getArg.expected | 2 + .../MethodCallExpr/MethodCallExpr_getArg.ql | 7 + .../MethodCallExpr_getGenericArgs.expected | 1 + .../MethodCallExpr_getGenericArgs.ql | 7 + .../MethodCallExpr/gen_method_call_expr.rs | 7 + .../MissingExpr/MissingExpr.expected | 1 + .../generated/MissingExpr/MissingExpr.ql | 7 + .../generated/MissingExpr/gen_missing_expr.rs | 7 + .../OffsetOfExpr/OffsetOfExpr.expected | 1 + .../generated/OffsetOfExpr/OffsetOfExpr.ql | 11 + .../OffsetOfExpr_getField.expected | 1 + .../OffsetOfExpr/OffsetOfExpr_getField.ql | 7 + .../OffsetOfExpr/gen_offset_of_expr.rs | 6 + .../generated/PathExpr/PathExpr.expected | 4 + .../generated/PathExpr/PathExpr.ql | 10 + .../generated/PathExpr/gen_path_expr.rs | 9 + .../generated/RangeExpr/RangeExpr.expected | 6 + .../generated/RangeExpr/RangeExpr.ql | 12 + .../RangeExpr/RangeExpr_getLhs.expected | 3 + .../generated/RangeExpr/RangeExpr_getLhs.ql | 7 + .../RangeExpr/RangeExpr_getRhs.expected | 4 + .../generated/RangeExpr/RangeExpr_getRhs.ql | 7 + .../generated/RangeExpr/gen_range_expr.rs | 11 + .../RecordLitExpr/RecordLitExpr.expected | 4 + .../generated/RecordLitExpr/RecordLitExpr.ql | 17 + .../RecordLitExpr_getField.expected | 5 + .../RecordLitExpr/RecordLitExpr_getField.ql | 7 + .../RecordLitExpr_getPath.expected | 4 + .../RecordLitExpr/RecordLitExpr_getPath.ql | 7 + .../RecordLitExpr_getSpread.expected | 1 + .../RecordLitExpr/RecordLitExpr_getSpread.ql | 7 + .../RecordLitExpr/gen_record_lit_expr.rs | 9 + .../RecordLitField/MISSING_SOURCE.txt | 4 - .../RecordLitField/RecordLitField.expected | 2 + .../RecordLitField/RecordLitField.ql | 11 + .../RecordLitField/gen_record_lit_field.rs | 6 + .../generated/RefExpr/RefExpr.expected | 4 + .../generated/RefExpr/RefExpr.ql | 12 + .../generated/RefExpr/gen_ref_expr.rs | 9 + .../generated/RepeatExpr/RepeatExpr.expected | 1 + .../generated/RepeatExpr/RepeatExpr.ql | 11 + .../generated/RepeatExpr/gen_repeat_expr.rs | 6 + .../generated/ReturnExpr/ReturnExpr.expected | 2 + .../generated/ReturnExpr/ReturnExpr.ql | 10 + .../ReturnExpr/ReturnExpr_getExpr.expected | 1 + .../ReturnExpr/ReturnExpr_getExpr.ql | 7 + .../generated/ReturnExpr/gen_return_expr.rs | 9 + .../generated/Stmt/MISSING_SOURCE.txt | 4 - .../generated/TupleExpr/TupleExpr.expected | 2 + .../generated/TupleExpr/TupleExpr.ql | 11 + .../TupleExpr/TupleExpr_getExpr.expected | 4 + .../generated/TupleExpr/TupleExpr_getExpr.ql | 7 + .../generated/TupleExpr/gen_tuple_expr.rs | 7 + .../UnaryOpExpr/UnaryOpExpr.expected | 3 + .../generated/UnaryOpExpr/UnaryOpExpr.ql | 11 + .../UnaryOpExpr/gen_unary_op_expr.rs | 8 + .../UnderscoreExpr/UnderscoreExpr.expected | 1 + .../UnderscoreExpr/UnderscoreExpr.ql | 7 + .../UnderscoreExpr/gen_underscore_expr.rs | 6 + .../UnsafeBlockExpr/UnsafeBlockExpr.expected | 1 + .../UnsafeBlockExpr/UnsafeBlockExpr.ql | 11 + .../UnsafeBlockExpr_getStatement.expected | 1 + .../UnsafeBlockExpr_getStatement.ql | 7 + .../UnsafeBlockExpr_getTail.expected | 1 + .../UnsafeBlockExpr_getTail.ql | 7 + .../UnsafeBlockExpr/gen_unsafe_block_expr.rs | 9 + .../generated/YeetExpr/YeetExpr.expected | 1 + .../generated/YeetExpr/YeetExpr.ql | 10 + .../YeetExpr/YeetExpr_getExpr.expected | 1 + .../generated/YeetExpr/YeetExpr_getExpr.ql | 7 + .../generated/YeetExpr/gen_yeet_expr.rs | 8 + .../generated/YieldExpr/YieldExpr.expected | 1 + .../generated/YieldExpr/YieldExpr.ql | 10 + .../YieldExpr/YieldExpr_getExpr.expected | 1 + .../generated/YieldExpr/YieldExpr_getExpr.ql | 7 + .../generated/YieldExpr/gen_yield_expr.rs | 9 + rust/schema.py | 468 +++++++++++++++++- 284 files changed, 3074 insertions(+), 119 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql create mode 100644 rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql create mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql create mode 100644 rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql create mode 100644 rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected create mode 100644 rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql create mode 100644 rust/ql/test/extractor-tests/generated/ElementListExpr/gen_element_list_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql create mode 100644 rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql create mode 100644 rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql create mode 100644 rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql create mode 100644 rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql create mode 100644 rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/RepeatExpr/gen_repeat_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs delete mode 100644 rust/ql/test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql create mode 100644 rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql create mode 100644 rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 315cfc399109..0cfc1cc7a047 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -387,7 +387,10 @@ impl CrateTranslator<'_> { } } fn emit_type_ref(&mut self, _type_ref: &TypeRef) -> trap::Label { - self.emit_unimplemented(None) + self.trap.emit(generated::TypeRef { + id: TrapId::Star, + location: None, + }) } fn emit_match_arm( &mut self, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 5c21f4e90510..7c16ab5e2064 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,114 +1,114 @@ -lib/codeql/rust/elements/ArrayExpr.qll aa558ac94bb7c45145e4788ed1a92e2873c5f57f1a0c7b7faf341f40027cf455 874da62a3d6467af7ae11045229135f8f5229cff33f3edae5b01a5b9afe86dd7 +lib/codeql/rust/elements/ArrayExpr.qll 822b7dea414d3948f15ee89a014d9ab5ab857db59d8eba7ade8ceed3b453bba4 fb0fc738da8142e8226d99db5ccc1006458bf50f1a95699cbd3012d0917db196 lib/codeql/rust/elements/AstNode.qll 2069047c779514867c12d845dcdf889db6f27fa6a9e484966a3c28a77973b7d4 e214616c81418b0018c0d36896ac2ec7273634e3213bc8257d8b172f396c00ee -lib/codeql/rust/elements/AsyncBlockExpr.qll ce6484a28403bc36e261ae6931b02a15db6fc54cc0c1bfc441e33d7284f6c74a e5b3c00f74543a6ceeaef053aaa1f00006026b8242efbeb7e1e9633e68cc4844 +lib/codeql/rust/elements/AsyncBlockExpr.qll 7cc9709af8c5f844fd6bf6d4cf49e245d19a0ab6d73ef69e84888a4a9b8e47ce 2f9ede385321df47d2e4ac1297d07be987ff53a576a8dded9a615ad83fba6de3 lib/codeql/rust/elements/AsyncBlockExprConstructor.qll 2d7d22caca1984e850d723f9ddd581530734bf4c31c545ea598bc27144a32f1b bf2ff9edff95db8400017b7583d6881581c431755c70e0068a495787993010f9 -lib/codeql/rust/elements/AwaitExpr.qll 310cf2cf155bc472caed76f596d7f789e9fa19c24d73dc0235d601ff9f32de40 d4b53d79a12d4378eebe2211b37b0f819177620b86a3eabfbec4096adfd200c4 +lib/codeql/rust/elements/AwaitExpr.qll da0f5928cfee39223c48b74b1921d18c39cc4f8ce7c2189342fb6e8e79c76985 e72e2cf142058fa93143acf9dc4c420572a234b4d4f11155567a7184e9152257 lib/codeql/rust/elements/AwaitExprConstructor.qll af0dfdf36b300d412a7b8668f68e6594fe3338216cdf1aa420c9a58608aa86f5 cfa115902ccf070e34ee451bc2f89295c97e8418501359a8cdc646d16c4cc7cd -lib/codeql/rust/elements/BecomeExpr.qll 91e08545258ff3bed8b63cb0e719f71f04cf21af758688cdb39d4be56d104db7 ba381c94e998c2fa275ab84f1e785cfb6af5ab40ad690e6b429eb72897837ac4 +lib/codeql/rust/elements/BecomeExpr.qll cf7d219b639e8e93f6a44bb14be14740b17bdb789f7299863560b2b5d4bfc7f7 26511c65fbdbb9352b6628a813e3f00be8495f2a34abdfae5a5ece8dd59cb04f lib/codeql/rust/elements/BecomeExprConstructor.qll 0c206e657417066415850672a804a69e5fccc605c309bb8755737ae01e332f18 e70bd0c411ffc23c37b22a459455c95ff75a72fa2d179f751bff99866eeef2bc -lib/codeql/rust/elements/BinaryOpExpr.qll d85404c249175283d7ac7daada3951f47b19ef56b08749906c8bd3895959db9f 9e1d35061bab3517c716e3d0fe42654568e16b6577d6d26861b87576839a33be +lib/codeql/rust/elements/BinaryOpExpr.qll 8bd02bff68a9a611ed82b2d380bbd8e541f9cfaef570cb33ab33ba9da7169172 2e51a9f16c4c91d2aef717ddb4c3080eab1a9c8720dbe44f83bf668668e4e772 lib/codeql/rust/elements/BinaryOpExprConstructor.qll efa89c084def020961641772f4829fc54bf718817831d4752b9bf403ce0e61dd d7937326ba08410fc3ba37e44b76530804f492177ef5e62dd416094e1e2f9bd6 lib/codeql/rust/elements/BindPat.qll f0209f781d8a14ab7fbb4b4d6a654469aecb0ff1a8ff4810f18a90f3b171e1c3 9734b7907855e46eeded6c3f59912a16212f7e8639fba35c740bb04462240287 lib/codeql/rust/elements/BindPatConstructor.qll 2bbcc296bcdcd945313d83294b90d327c51c9f1e96f92d37dd10bf0c32dfaf6a 612b4fc651f32129155727e866796edee8fff939614c6fd0b7baa1392930a38c -lib/codeql/rust/elements/BlockExpr.qll cd7a978d3ad15156467ee213d65ef0dcc806af43888d1de4635e875b2d76f5fb b0286039d03f2f554ab5c31b902386357e19127d35f70211b1373d591053ed8f +lib/codeql/rust/elements/BlockExpr.qll b699906fba2dee34699e110b8759419079a5ce3dc1fab207001c9c9b612dac5e 429016df600e3905bd235d0e707c50ecdbf12b3ceddedcbf48944ea76e60f915 lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e8c704f6ce26503ddbd65c6f5282 d2e05a51d3840caf4de4cca6cdab9551f396df317c8ad1da661205aa822646cc lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 -lib/codeql/rust/elements/BoxExpr.qll 02e6f063c8e2aa01b12eb3223783e8d88330f4faadd71fef253b5dd39af8b556 bda6357d99430b524de82be0da444cc180dde9ba1f3e08c1bd4c53143789fcf0 +lib/codeql/rust/elements/BoxExpr.qll f4727005f1b07d0d2f2230379778929351ad9fda986754b48980e8b166cd68a9 adae835238f824a48ad700310c3fce70bc9a890538cf361b4ed5b3d213fcc67a lib/codeql/rust/elements/BoxExprConstructor.qll e30e71b88978b5d0f156152acaf7eaebe26232b7a5a562cf22f1bb9659ae5deb 3ca41494c5101ef73877737420fbc468483ac7ef215d11b431dac2dd6a08ecc5 lib/codeql/rust/elements/BoxPat.qll 1df08d5443c63e21d40d25023da58da50bd6cf6e156b9f5dbd6d41a3193faee9 9837752be4d4a1c3f16d6438bd361c596b6b983d9ae4e486083651e8f4e090ff lib/codeql/rust/elements/BoxPatConstructor.qll 20f79f18beb8b7eeec63b1e30302d9f2e514354a7b1ae077f240db3cda4ecc4c f41ca3fdafc70c6b972598a3af3434bf60687bc2f0252dd11ddd09ec874fe63c -lib/codeql/rust/elements/BreakExpr.qll b760b1f9ba612aa29c917a25d75143e90bbdb607d12ea4a49067ab44595292c1 ee0bf075f2b237c1513cdd03dd35666d4c9158dbf1216a30c5aec05db9e6d317 +lib/codeql/rust/elements/BreakExpr.qll 526da383194cfc0600ba623182ef8e984b44da76609d335b209067b9381e2e18 6d7b6e970b69f093be5015e847512830937e79a2460a6c49d286cd5c8ebd350d lib/codeql/rust/elements/BreakExprConstructor.qll 48b71a034b7b6b0ecda47c72379696c6d4ebb9eadcd6403f9c001945855c5365 fbbccb6d1718393ad6ff3a2bd473dd51691c871db9181cb1e041b318f91d27a7 -lib/codeql/rust/elements/CallExpr.qll 7b76acfa945d7cc04bab4012fc8476f8e4f9970b7051ea02fe5b12ec57927897 57ebf163cd6db203f5dd05d629f68bc4e39666ebc4d1252ba1e09b88ffbe60ef +lib/codeql/rust/elements/CallExpr.qll 68f43b25fc38d3df4909e9b1a44ace18a143db480d1d4c30c98a724ecddd8d94 199356b943f73828efa9b116ceb3549daa7743678122451bb306c4e26abaf184 lib/codeql/rust/elements/CallExprConstructor.qll 9a7e9e780ff6604ddf0b9e5f27bfa43b720bb341673c7740148561c666ccd066 945804ba7c1dbfb9f221810be9d2fc3dbee3ce89dd9d08b3f3e719d31701ed98 -lib/codeql/rust/elements/CastExpr.qll cdd74a040d6b1aa44f6e2bdb2991e642f013848f32a17588291317a7abf38961 06f3228ac826fc452d75505345707b912426f05db78380a72f0ba586fa00c282 +lib/codeql/rust/elements/CastExpr.qll cafc39afc4103781b475906a0e178175b32374a04915b59d84b753d3c1e71544 1cd95a62b3e3983827a7622326110071a839595d1e6a76723f8072ac6cf32f02 lib/codeql/rust/elements/CastExprConstructor.qll cab6e9a9872006cc811620bda522fafde23fc4edb5151af06a5a0938747dbdfb 6d972faff70166c4b07392a0bc90c6d72c9466b58b55e7651ef6c3d06cf72873 -lib/codeql/rust/elements/ClosureExpr.qll 2a8b0a94e37b8406acee038ae0737604174b3062f3c12ecea27a3104ded3b2bb 904eed60004ad20c0d03965f91e1d2227cccf3b13ce29341c79d545aabe492f0 +lib/codeql/rust/elements/ClosureExpr.qll cde112e1e1fcd5677cffa3469e376ff2b69ff6f55d907152b4afba4d92d06c55 f9180e4e0905ba233f64717719ee653ee5dfd2dad9f87a81b63b513ce5e73bc3 lib/codeql/rust/elements/ClosureExprConstructor.qll 238dceb78082a5566276640d4aa31484041700852c0751130d139a69ac8bde46 7aae22930def4d438d742255731cc59b78a95b73a0b1d6334ae9965e083e03bc lib/codeql/rust/elements/ConstBlockPat.qll af7f5f1a8de38266a12e92dee4a5ef5279baccf542cf2c52d982ed075d3bec27 1208223d97230a90d9377164b61454dcc6ca0f46a408e4a5ab2a82340bc92eb3 lib/codeql/rust/elements/ConstBlockPatConstructor.qll 04aa8b4f218ce87157f0d6b10c9c04660c34c90af1f121b1432402de2e5114cd 34e2fecbe91ea9ac1626bc27121a7d5abe99855e3f49bdca12a1969b42ac0ba5 -lib/codeql/rust/elements/ConstExpr.qll df129a4a1f65c07076e15097571ffd12b91a63d3ded97bb3173b50a7f1279bb4 dd3b7a5230baf5d1a062d49324eeb6ee5a76f156944ec149da8bf46c982107b8 +lib/codeql/rust/elements/ConstExpr.qll 70a7c9db14efaf290a77401eb04c439b24ed77c21496cee53b89d92d350daeaf e3f98ac4dde94a4dc8d6df51ba4ecd4acc492d9de569ac3eee9dd3bc258bd03d lib/codeql/rust/elements/ConstExprConstructor.qll b4c96adc2878047c36d7ceaba2346ef66a2269b5260a56c3d7ff6e3a332bad75 ce15bbfd1448e47d3039e912363efa607cc2c29d44b8248ac91c307af7b57016 -lib/codeql/rust/elements/ContinueExpr.qll 46635ab257d8cc8ab3ba4b6786df7a2ff4d2e6360578bebde8bec1d6ae90b8c7 a0c60fb018ced67e1d6eed1c493b2c6d729636f1325b556ed5bcbcff072cd8d7 +lib/codeql/rust/elements/ContinueExpr.qll 6d123e17b40c8512e8abb63657ea6ab4cf3fa2485f503b6d750ec00dd5bb170e 5778fd7bd6ad44b6276b36a85f438c303b11bc6e995ed1cc92b9d51536725710 lib/codeql/rust/elements/ContinueExprConstructor.qll adc5c5b4fda5dc5102cdace41c32a6c94fe07a2e2555ced6ee62a2d2551b90a2 9dc5045b0d91a3a28cc1c0d59c6fd40620257a6c18ea8480792183c4d802fd8a lib/codeql/rust/elements/DbFile.qll 056d363e1ba5ec08cacb2e90b8a7a3b47f52ded5dc2289edd4e85921fc50f37e 18e6926f77265a3a6319ca2f3bf3d529d17d46cebdd2ef6753357fdc53c22c70 lib/codeql/rust/elements/DbFileConstructor.qll ea93dc49b23b1c6d800ab9d0b9cacfa9dc661bfdb04b9e6efcad2bdb050fb0ab f7a891b1786604eee57a784733555b677e2580770d51d18073b59e7ca65df1d4 lib/codeql/rust/elements/DbLocation.qll 1f694594e8e4ab65a8781cd443ad4f864447ca88e2cb65504aee5a779393c84d 003ec72275406eb8f5ddd6ccc2b258fb7c906d4bb2c0ef1ba235f291624321ca lib/codeql/rust/elements/DbLocationConstructor.qll 8848abace985818a5d3a6eddfc4cb200795970146d282b037b4f22ae6230b894 44dba880e17bb1072fa12451ccaae4830fd04dcc61f7403d35510309fde6906e lib/codeql/rust/elements/Declaration.qll d4ec5c83728f1837243caf2f27d06fd05ecdd2ca440112accff99bfd37b45e5f c1cd9b297be8b69207e75d24b29949b9f71c78406ee0ffd38d0b0810288d6140 -lib/codeql/rust/elements/ElementListExpr.qll ec535846c4f449a3e58bb3b8dc583960ef3b42a10836ad13a6c3091f625ab463 3797f92086ecab90406b7493953d78af27b0b5c68199e2f37abc15f3d1cf88ed +lib/codeql/rust/elements/ElementListExpr.qll 64356a9bf66f0f316da659fe8046828445804dcf5ae6b19e52232aaea8744885 0822b1430e5c811e74e092cd19001dca783e8d26df140c5366cce61692eaeb2c lib/codeql/rust/elements/ElementListExprConstructor.qll 12b06597e0700cd0eac70e42cbdc1a2d410e0ffcd05c21a213812a488b5b236b 7adb2e442f1bc362c44824aaba0ab4a7fb4a4bc550a3c96f963dc03bed582d39 lib/codeql/rust/elements/Expr.qll a0c2cb3ff9628e5dd1a7900d2413390faa433dcef114bdc85279a3a2bf2fc4d8 a0e8e5693ead91b62da5531e070e11a2105ee49046cb69e63b8747eeafc27651 -lib/codeql/rust/elements/ExprStmt.qll afe41d6d05ed9d94b3c8529dad743bdf3e2a0e68bed84a80da4dd6df0257451d c1f0c7c1a3c62baffb7d3bb69cc4bc828e6fbbbabe8f87342ec67d8744fcbe7e +lib/codeql/rust/elements/ExprStmt.qll b88016cb0b3b53fd8c6feb98e4a17b72a65824efb9aac798c67a6e1be0cbec77 e5bdef5ba3c94495900494b1f3c61c167748945372e3de061b8a4e3f7edce430 lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c339c7a90d9de527f97fc7d36df2bb921ba 5333db932a2edb791ec3c8f2c215f4c74e825a362f45ee901949d81e328bc7fd -lib/codeql/rust/elements/FieldExpr.qll 1e3d84c3eeeeefa1837b5359f7289c0f03122848b6f95fdb362cfd947304e107 28a6f8201b435b87705afcb8088d017fa699f60be3aefe03dd56f978ac7954d7 +lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c857cc703fca03d34f1f478b57ee8051590 1e5555910c643235e34b73f9844e894e51f357c3f7aba8165c47caa147336c53 lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c -lib/codeql/rust/elements/IfExpr.qll d5461ea0370765b9dd0c5aae298e53c9b3d84bacc783991fb9dceee44c87e8fb 90c5f959144c767bc8f10b322489264b076c33f19af0d19e97a08d083f76913b +lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f -lib/codeql/rust/elements/IndexExpr.qll 0729277577ffe82d6dbc8fd275a70de59a3926aafea730e622ecbbca7b84e313 c9bc5616664e072fbaef2b89d4047f5f7e28d002cca2fa17333f29db80adb284 +lib/codeql/rust/elements/IndexExpr.qll 924fe6732ffefca376d099255e2eb6682cabd6cb4267dc997fcf85aa5478a3a6 09e65b09cfdb928d134d3aad17acc07602a0bcbca098d775028bcb7624f16b11 lib/codeql/rust/elements/IndexExprConstructor.qll 37e70c773123d775b6281514a2727e133e02fa87e774076f857a676697a1f2ba da2ed2819a13ab7c526b74c1c375ab2fce63ed17f61d5b29e4212343d6b77d06 -lib/codeql/rust/elements/InlineAsmExpr.qll 5883542b068a11c22917bd46e44eda2f5e4a9de67f5346acfaa2334f73ee63ad 9a8823c91daff1337aa60cbd6bf3b6e96ad1e8603dfe79dcf404636de2693a5f +lib/codeql/rust/elements/InlineAsmExpr.qll e462d3d71b25124216acfa3f037b675c57bbce1ae98513fe52330a05152463a7 8789d586fe30368b037ff16835a9b36c8da8a1efac1bd7cfd3e048ef115b6cf0 lib/codeql/rust/elements/InlineAsmExprConstructor.qll 5a3eb5162805366dcc2aea00714c1a0880c31b614b73b69f1638ff4f088cdb11 89c54b68b0246fe5d86f119c1892149746d7fe22d6ef8b625c9ab64398d19d26 -lib/codeql/rust/elements/ItemStmt.qll 70fc3f9df9794dc78199dfd81b8136701d4ca0c9b3c6e88ecec42f75fbc41f32 df122241e3868b1c376e2d2501328ad47020a0837826f165c7e54640bc018156 +lib/codeql/rust/elements/ItemStmt.qll 7482437f4acc6a213a65cd1615be2f909cc4bfa354894df665c8f5e17622d325 aab0311fe7a189bf8221f51c3f46fccd785887d53e664b230abd94f5a89dfd44 lib/codeql/rust/elements/ItemStmtConstructor.qll cd27051f73ab2897b1f7a725313f97d36507fc9f5e0dd7b2ad8bd1caaf8c42ad 67596c97386fbe6cb9e5e6abc45b674158f411d927297345cb25359587380bcd lib/codeql/rust/elements/Label.qll f48209b24876d581e95120bc548c44033b6552a7875eea73ce44aa57b675eeb3 d17163f3adc9f94a462269f565153aa2822533d03487e521d9c5d5e72afaa1ac lib/codeql/rust/elements/LabelConstructor.qll 0625a149cb34b9f603b76efd76e679bb63808d47f9fa529959784347d8e7d447 2115bc7de878af444777f96247bc0a775161f3766e38c3c4d363c2f59b2144da -lib/codeql/rust/elements/LetExpr.qll 986598132db0cbc861adc641e633a54b7651ff5f3bc52b5e2f4e84733b774fb5 e61ed80a6732fb344498c8eedf3b787546eaa38f203265e9a3195e93d3534a19 +lib/codeql/rust/elements/LetExpr.qll 49a9ba97471d04d52bee73f9b5651bec09fae40c5779db59d84b69a3e04c0a4f 682c504fb507855c96833677225c4ddafc20dee75f8203e0dc110aeac89fa2f7 lib/codeql/rust/elements/LetExprConstructor.qll 8904b25d70fd0e6f3db74d2e09bb3e3fee407282ee45030fdaeac31b6111db70 36dcc877f6c1810228d593d914cffa7b04ecf0afe13c4c122aca72f33d03f566 -lib/codeql/rust/elements/LetStmt.qll f9e28ca0123e2a6e1f6115821282440397cf2647577b4bfc4d00cbb4312d8eea c65442707090461035160ce830c4c0a85d1fe626f03026c13ebc4be06ec96905 +lib/codeql/rust/elements/LetStmt.qll 542dacce4a4991f0250b45a6c3b28829117e6e5692320494819244a155d05e8d b3e50baeb3534a4352d6bf898ace88e250d84aa05ba0c0debdae5c18c446f3c7 lib/codeql/rust/elements/LetStmtConstructor.qll 5882f0e4379d07e8281a955c9eed7dd907b610750887de3dd6451cd1c8d104d4 68b0890d8a493dcca74190904b00f05b0e58aacfe5a2aa63e5ead1ba366d3c38 lib/codeql/rust/elements/LitPat.qll 539b414883b0b86ff446fa81254f2c71f467e5ea0bda21dc3bd66cf3abf95b13 d54eeb618cfb8f0c4a48ce5ab1922fca2622f4a0c703760aa344028172f37642 lib/codeql/rust/elements/LitPatConstructor.qll 1a1c5f711b04bfc9b8b9a197564cc8acfeeaff1a9c8b30d57657747d84138fce 19cfa7386fd1f4ad8ba1ffe8b14bc547b9884dc98e731b6935afd11ceac6b5fe -lib/codeql/rust/elements/LiteralExpr.qll c5abad970feff4cb2719cc4774aedcfbc494a68fe15e13c36eeb2516d26a88cb fdb399d9a6162be54c3cbdd83654b9736faee9b15aa111f1bbd6f333d332c87a +lib/codeql/rust/elements/LiteralExpr.qll 031edbbd52d2107a3a7149a4dde306f5fcce9a32b7f4c5f7398b013c06ef37fe 7c18930dc7514f5fbe0a4248242430ee06f403b4e301c4e594355fc5b2fc8941 lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 -lib/codeql/rust/elements/LoopExpr.qll 6596e1d8ef1e9479785871321021930244dfb7736111801aeacd08446f4d2238 5895e4a5d4187fcd852528f0cea99fa378d60d279c7896b221eca8e65109fb96 +lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 lib/codeql/rust/elements/LoopExprConstructor.qll 635348fe22fb47c7e59bed02a8ed6420be5a9ce92a7d9bf4475465ee170c917b 2bcfe70247c55659b3a3e09562da52fc645cc3166748f268c5a38b35fca24233 -lib/codeql/rust/elements/MatchArm.qll f91def96700dd8521c11aef100f494d2d44777186e771b306ec9579b01c882af 021b298096cd88d3de81c2c012102e5b5ce5159d6dbca2bbd32b266593df335d +lib/codeql/rust/elements/MatchArm.qll 33c3d1d149b654f64ec8930aad77605d82ac542412e55084cb2fa914bffc5258 433221b39bd6365a868a5d9fa2d0b5f112561bd691fda98d7d2cec36c25be292 lib/codeql/rust/elements/MatchArmConstructor.qll 49d134823a445a1ee995ebf5637fd0d736b9ab7f2b141026712f231ec4ed3389 f16e8adc8375e6a7334589d5732dcbe10f5ada9de7a12c549c55be3f028ec628 -lib/codeql/rust/elements/MatchExpr.qll 87eea89af08e7b9e4dc958aae0d35035fa8cee5fa7108f59cd0d3050dc70eb29 ceb061ce32c20c9aa12e6376474ea1ce1b8bb9c9b0e58b67abeb4bb666a18676 +lib/codeql/rust/elements/MatchExpr.qll 201ce069a53c70065ececa7005d9b03db34e78b0ff29c22b6f84349097f04f38 94fd75c60941d970aa637d9f3b4477ff6d04793966ffccd306bc25e1b84654f9 lib/codeql/rust/elements/MatchExprConstructor.qll 74df937d7d8bfbfb02bdbf095595eb3f2129ed4c0854bae6d73b5b38d4fc902d 5c388c02f02462d843945111b72de12bce33c7c332d55993d903aeb250213407 -lib/codeql/rust/elements/MethodCallExpr.qll 2dd115a2e5ac298d9a81cab2718b7abdbe52825938ea88115913c82a0f2f7751 9733c353b9e6703ef812eb8b6395db49d6d656460c575dbd75d67fa96784a33c +lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a629230991513326585c99dab7be1f3 ed05c7f40fb6d1c97fa0a3a631db1913b8e6abb5c2b3513d0e81a82a2e5f7f95 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e -lib/codeql/rust/elements/MissingExpr.qll 2158f064d027975e3faba6a858b8e469c324544ae0923319b149fd5ec6548448 500ef109ceb36f5da72040fc733c7e98f94920f51d53d90fff3d86f85da0aad3 +lib/codeql/rust/elements/MissingExpr.qll 30b04d6a7b67acbce40dc1ffb95edb833578fd50ac7165213913b6c83d3181a8 444fb33c01ef6a311539f5b8a3159034aeabbf0284d192139e64c3e66ef0a18a lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 lib/codeql/rust/elements/MissingPat.qll eacee2eaede4adb8452a41c14c95c310d0731c2c60fdb818b3e94e34f418aed4 9f81567e8e9c02be0994764a082a2135a6bec952456c2413295f2b0a16e5eb5d lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 lib/codeql/rust/elements/Module.qll d8995b361cc672f86a314bd53bd3e4d1ddb26b6afde62eb7c380923810785af0 3c10180c812d89a8116ac6e32cbd4d7ac2f549c8a76d327ed75c764b09251d52 lib/codeql/rust/elements/ModuleConstructor.qll 109ed8c1b5c61cc1d3e8613aa8bb8c168dc1943c93b5b622fa79665751b78318 601526c7f56578883d261d14653fdad08329f80fea71de14a5ac5ce671a8d436 -lib/codeql/rust/elements/OffsetOfExpr.qll 1076421d48a639191b52ca36701e760ea20a6ed1c8ff8f0cf1607f557b9f9a58 9cadc919b51ef5b223ce2c827005acf879309c9cdb971e8479477f0646e7c70b +lib/codeql/rust/elements/OffsetOfExpr.qll e7490d4db7cb4dd1c711ce57934970da8c9cc61af913a62b6963667313dcb0c5 c9043c5e68483b3d4da03ab191dc56e0150ff23af361a227fe91062e10ad66b2 lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57a0235ee01bb50e1fbaa6e5601e0e232c1977d 6e3b7c20a17fe4c45d503ba32264aea8f6dfdc69ccd95905a5bfb1e8b0cc91d0 lib/codeql/rust/elements/OrPat.qll 9b5cf68d55c57c262a5d630852ff2e842f0caa3aca2a0b4491d601340917db63 c965eb43675b135f3ce11c1e8762af0b764c6d4c262f002f8b9a512ae59e8a03 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 lib/codeql/rust/elements/Pat.qll 197aa86d5f317669e38230a20460b271c1d82e830b84150dac65afb67059fa2a ed3e8c74e42ffd5df14dd88711d79660982170a42f9a605704a274298dbbfc41 -lib/codeql/rust/elements/PathExpr.qll 15d12b039c117e78fde972b098e22ce247e5a6df4f52685173241d76f6c18368 8e8222767d49c022b6a69ae8902e86a5be9ac3803301c6c9b409f265546da520 +lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8cbc93779b80e494561af706 c6da0b2e8ace1c30a7cd468406353a457440aafacf8e31c32618fd9781c69113 lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 lib/codeql/rust/elements/PathPat.qll a49036bca0f3f023917fec3547876759987a34747e16b9a15ebb99c82ca9234c b4f77e6e29300f02cb845ab79d4a64edb654a398fe3d6c1a2306423e1c0a237b lib/codeql/rust/elements/PathPatConstructor.qll 476a38723c63bbfa2565946725c90f1224ac2c5283fde79bf14dcefce6f500ca e9e9b000cac44851772bd9ca519edc89e8518e89a0930df21af14a69f5b0e864 -lib/codeql/rust/elements/RangeExpr.qll 05a56b149adf83006243335be90c23eca71e981aea33c2d81dc8ad5cdef757bd 602bc5ec0ab5e7eaf9f1debbb80d2861d53b6de5d10011b50fa71208a6491cd2 +lib/codeql/rust/elements/RangeExpr.qll 42bf1320c3060b6d225e7ece9bef54f3d823704a6aedea6d8af594a0fa676134 03a84ac76225e2a6172f6240af21478ad3f978b03a1b9e3fceba39fd0bcacba1 lib/codeql/rust/elements/RangeExprConstructor.qll a04153bf88dd71c3f516418bdb7377ded9db21c07f7ee6dd245ed8b44719d8f3 2d578f8dbc49da98694676d6a59bb9d58c6d2a200ffc893ffa90dca77878e38a lib/codeql/rust/elements/RangePat.qll 02f3e4647932553481c4d8b1e2d2da3551662a17d75f26f2fb7e9d77ef1d579d e2546bc74035d03c92aa7beab2abca73a587049c95710eb9b59f916363df1552 lib/codeql/rust/elements/RangePatConstructor.qll c391431118ed6ce16f7b7126c5d43e61f07b98fab7b8bc48e9dfe22f7e21ed19 bbafe1c9595b0b004f7b27999a14df27d0710d5b058e7ab14dddd2fae058fc31 lib/codeql/rust/elements/RecordFieldPat.qll e3f69b2c59d50807393928ef9be0b51af016f209cbae68cfde0fdf02b287f353 b24e256f850d1f0bbacea74c4879fee8bcedf47f65db091d7858302355751fa3 lib/codeql/rust/elements/RecordFieldPatConstructor.qll 36859753aa70086c540a1700495fe6c414521553877bfdd56800f586eb577743 1b31233a5e6da0bf88aaf40c52fa08cfbca5b44088cd3f91957ce8c96f4aeaea -lib/codeql/rust/elements/RecordLitExpr.qll f5c0377f0a1805d824052acbcaad393ba10b0f994a5ea6b6f60b5eec2c417c21 e61bb3750d19dad5c4e59dd0bb3a65430879f58909b735f7c28f378cd2217221 +lib/codeql/rust/elements/RecordLitExpr.qll 5dd804785e2bef9decee1aa1b4512dad799ba6b8e70c3fbe65a9a7bca029ed87 875a6b37072010496974a36b535e8ac656928b504b9b9488b31f81108a25102e lib/codeql/rust/elements/RecordLitExprConstructor.qll 7b676a8e0fd9ba5a932988e613fe3dda8b6b0430feed8791ef5585fd9cd81767 f7811928dd8269138d75f0a6dd1c60f70d18806227bd2caaa5cd4cc1341e9286 -lib/codeql/rust/elements/RecordLitField.qll 27bbc256f61f4428578155da47b1a1b3eef43fb5d4d98f168c66fa85337bde24 880aa885f2ba3d1866c6023360a206dc5095385adb908e953ce792beae90b2ca +lib/codeql/rust/elements/RecordLitField.qll 09cabffa00afa3a1e7798b735828b613b2c6bbc03c27c1b3229c0b4ee43ba3be b1ec3a53f7370b2702d042b78d829bffd35b738365e93b289f0f30313ed9222a lib/codeql/rust/elements/RecordLitFieldConstructor.qll 0f83c9dc00937d90ee0d64d157458145078f5f3c87c9c0484600fdcc830ab207 e2852d5bc4f0174d94b90a2ee34fae1e6c4b24d5d8ccb58a51c520b12adf8512 lib/codeql/rust/elements/RecordPat.qll 50f4a2401dc579f3900188043d412ccdd6c57c1da6636c105221cfe243307d32 7812f0e10ce1a8e70c8c45d0c87e52539f6b29469157463456d06c566e86c2dd lib/codeql/rust/elements/RecordPatConstructor.qll 93c794efa5050b86c458470224de7f3206c1a004b46ef374780f080a8e9a4ce0 157800f342de96095e118dbcfa20f8e65cc79ccae712e8e37bff1ba92a227fda -lib/codeql/rust/elements/RefExpr.qll ed47e1a834f2af93197ceda685a368465f7eea59704c2b7df3ef59326e53c0e1 5676825b036eb4cb560238d86c8d1fac48a4e59d91110da0dc75eacd542bcc8e +lib/codeql/rust/elements/RefExpr.qll 4c3176d24c52d61dc220d0ebf0c277126975a7e4189094c5f36e0d386bbd95e3 dd143ae809b9c3cd1ca20e8ccf2ed2fa79f0b75d3ce3d92de5e88dad68bf7fed lib/codeql/rust/elements/RefExprConstructor.qll 4a2b9dd4ec2638a5ccfca268ba377980aab3179b27177e34e44e0e9dc6653b36 752f6f298369b8c0f59d49ca9e729c20aceb3559df68be416c7bbf65f578489d lib/codeql/rust/elements/RefPat.qll 00b2c32e09a02b336d516b7812aa7ffe6202bd1dcdf4ec2060a74ee7a4b1c5c3 90a4b3da60aec10b5d56f6364d0a022c1d7db5fe8cbb65a78f55651d23f9abe7 lib/codeql/rust/elements/RefPatConstructor.qll 98497e0ef76bec0390a23aede2fc6f80050ad2d00bb60f1d473362111a53d4dd e4fde4e3e88c33daee90ab6d90ef2e38b36faedcfe1b6d6304f4eed92980b5b1 -lib/codeql/rust/elements/RepeatExpr.qll 24ae3d83a83fc40bcdc6ba5c397a31da388c9137308cecce7da6fc8ac622031a c8114ad0ca7197aa791ae76d1d42b53ebd6f6b98378a779c59727d4e4ec5dbf6 +lib/codeql/rust/elements/RepeatExpr.qll 376199e9efc3b20efd8c26a020c5e7b7f19bf9490ab9698673ae842cb4ff6721 7dcbfbf8029811657e07850a1fadfe70025881e70f474fc49378b215e65d6d43 lib/codeql/rust/elements/RepeatExprConstructor.qll 7e141ed538f1dd5debd83de045eadc74ef032acc8a64ee2e8ac760da60ede525 d20206b72b14d03f8a41571948210619ad7d7dc438ba04ae45d929776a11915d -lib/codeql/rust/elements/ReturnExpr.qll b36dc07c367af16c5df6276b10e36d85dbaa500092c555679463f8db817bf6a4 4f95cc9d88bbb8403e35b270897a1ee9ddb4c8bef393b06d7a014d914ca5fdec +lib/codeql/rust/elements/ReturnExpr.qll eaec617f85ae874a9e49a55b819bd47e672ba030f3f785ead54829a8479db195 1bb27640c8b29e099e39eb70fb095bf1dfdb7ff278f884dd71e3488a11e63dd6 lib/codeql/rust/elements/ReturnExprConstructor.qll 825501a55f7b5556ded49fc3c43d45b7d8325e3a1790a2af738a46df33b569a7 ef06e95f1919952e537027861660a4d7c79b832fdbe802bfa5bdc29ba0192f31 lib/codeql/rust/elements/SlicePat.qll 3e88657bd488dcb1ce2fa6f4bf72a9f76c7bfbf64b695070efa0ad89a6af407b ad60e3d0eee368c21c46acb439b599d8867c82193c7279777fea10f3205bd272 lib/codeql/rust/elements/SlicePatConstructor.qll b2885e663932f68ffecf87b4532f533e9177beddd715765474f454a9804afc8b ade153522a4773eb769f4f4d96fa07add34089f131b41a74534b28fbfd2bbb60 lib/codeql/rust/elements/Stmt.qll bbe8414d75bdcfda90f47b853a04fc618f4d0b6d6cd3b662bb15d3a9e5cc7bda 714c6f8eba9882363bf1594f48c75d1a885f6e93adadbdecbbd8169ce08f7b98 -lib/codeql/rust/elements/TupleExpr.qll efcdda11afbbeeb237a9b7f84a5a59ca3a98b541bc660b58a41f1b1cdea56efb f416c57e7190e91bb36d4235ae017cdfa8e68f69b38c55c6e7a71eaff35e5bd3 +lib/codeql/rust/elements/TupleExpr.qll 6536c9c062c971d943629dd38d5e7e284526eb31e6cd0306fd290232e8d1d86c 6dac287bb0f85d0c5463ba6038b91d22a980626492085350025bff9774a87673 lib/codeql/rust/elements/TupleExprConstructor.qll e7cfe2da7457339e99263030e74715e5ca44828d74ea3f462b90a7e72c1e9302 b45006d9cc7664a5a659e7c74f415142e2397dc33fb1875ac3a6cf5ca39e709e lib/codeql/rust/elements/TuplePat.qll 17bad5b6a0be8e9b61addbd9a17bb387709147e8d2fb8a93ca9255a8a11bb822 7e84df64d0baf1b5329d47f4977fa5e8471fc323b2eeca8e942df93a48e04cbf lib/codeql/rust/elements/TuplePatConstructor.qll 505c4f440b47da576acd7e3fc69d6b49e8287f981a21e79919ded374200f2578 b295526303bcae982ddd8c6b544288c0b8b8d62984d6986319e7f17baeb7a19b @@ -116,108 +116,180 @@ lib/codeql/rust/elements/TupleStructPat.qll 50b7d89498dbe6737d97325037156c7689fd lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb lib/codeql/rust/elements/TypeRef.qll 223844544eab3e07b6edda805c6344fa8b486aeea7bbe62e4b98e235ce2008d8 7517748b0e7a57c925168f5ce7a31ecc1b59f7521a2095578f599b8d9045a4e5 lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 -lib/codeql/rust/elements/UnaryOpExpr.qll 32e637510c03653cc28cb9a25a2873e9bf346aeb63ad2d7a571bfcbda45c59ce 044b22dd35491f9eafc6488fff5bc929aed12e2f36ac55883925c876978bf7cf +lib/codeql/rust/elements/UnaryOpExpr.qll 9948297ab5799279738499586e4fd4457e7770db8f33461d0d1c3641498a268e c637101ddfd1770ed0e47a452b2fc4d210ea6f61f36ea968c23a8cd3032c4884 lib/codeql/rust/elements/UnaryOpExprConstructor.qll 43db7afbd3535b7edc801d99d772233a734f4ed31eeee2ca74e7ab26cae33e87 7345f8d4cb958ee2fa83d3634285f12829bdd1cbac2697236d6fae062313ab6d -lib/codeql/rust/elements/UnderscoreExpr.qll cd49049149e268524412a17394daaef696ddca63f1f452b369172b9643e94d82 228568c12efc7c055f2ff7cc08c2d0ae150f6356f77ccea98b7f8be3d6bb4806 +lib/codeql/rust/elements/UnderscoreExpr.qll bf4c0bf76fa15b041f7ecbd492a499088bef2024b49dbdfa57232e84e72c3067 462380bac5f772c1986146d32b70deabc9f03581675f6e79f7b7f747acfb0bd5 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af0acb89883c5bc9b26d8d8d61718 9d869f83e73915bbeb5af27ea30b69f20c344cd7d7f253cb7dab74de20baa0a6 lib/codeql/rust/elements/UnimplementedConstructor.qll ee024d4944aebe619ee3ea0ce4f84da0f4fca706baed250c8a65464a8d77979a f95966e3a63cbf2b466241f55bb47c23125645fad206ebd758236465afa4f97d -lib/codeql/rust/elements/UnsafeBlockExpr.qll d708ee1e3e238fc0bc51b045d8364a1f0fd174570c1e6416242f79655d1c1e38 8f67954791bbe9e127ddd4ada533ba97f5cfac9894a979410366b6747fdd4519 +lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 lib/codeql/rust/elements/WildPat.qll 9791bcd2b36516da82a81c10655fe6b4ef0f788d548cc99cb88578dd9c1278f0 03c192da4f92db637001854f904f5f0ea7406b74c02c1ce26cd375d9cfb26108 lib/codeql/rust/elements/WildPatConstructor.qll 538cde83119510e0b3fc9728127cbf980d17f7f4a9371b4572de26329ab08341 66b96aee3862d5c314a2fbcc6930258f755189c4359394b432e8edb13a9d0eaf -lib/codeql/rust/elements/YeetExpr.qll 04a1f4f7b2bb697e30ab284720ed30c0c8e1377cacf787383518da1e882f3bd6 277a751f38830e92deb0abcde9cbd124bffc84b7d5a1bacb4f1844c6ebceb2ba +lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d11a926ce452588501731bb 848736c361d420945fbf670d6c126d258d095f7f8509ac1cbc949f5ba280f851 lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 -lib/codeql/rust/elements/YieldExpr.qll b0f238ba2e4b83b449b44224d766b6cf6b15523a413467f608f4a711d34edc01 355fcafe43915d69a07725ec3707e66abfefc6157bd7dc1c1fd846a965c6580d +lib/codeql/rust/elements/YieldExpr.qll 72682ae19d37abd6ec26569ae8f575979ebba1e0d373898211a9af4fad4979a1 ef0193011ee5f94cebbac5c007d652568f560685a213bf8be96cd0c0983a3880 lib/codeql/rust/elements/YieldExprConstructor.qll ff46ba17cc24abfcb0e310c7458d0539b704e7a771ad00853bd3a1844e4e6f82 1c13662ef01c88f1cf057d099eb46524036133e51a0e36ddf947f727ac6046bb lib/codeql/rust/elements.qll c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 -lib/codeql/rust/generated/ArrayExpr.qll b9778720acf4080c065897ba1471be185c0c35f3ea01c15594c0a3ee4029b231 cbc8c9dbcb805063c4b893e21ed0bf00312490a0c92ee126d49dbfff6978fa99 +lib/codeql/rust/generated/ArrayExpr.qll 3fd7465da22e1eb810ae28ffab7b14e9ccceaab0082aa665f14b73d4221128b8 6e9edb5846656aad90283406a496aaae485d38854075a4443817b5098b72b427 lib/codeql/rust/generated/AstNode.qll 0598fac7859906f4103124270dfb2fbdb838387b1c45000bf50a4b62c797ec41 f47c84878c7c9676109e358073bddab92a1dbeb4d977d236ecc1eae44d81c894 -lib/codeql/rust/generated/AsyncBlockExpr.qll 1e9d3bcd5d5703bf61748f2746d3f9a4e2a12080268b29a2685b762d13c30555 1e9d3bcd5d5703bf61748f2746d3f9a4e2a12080268b29a2685b762d13c30555 -lib/codeql/rust/generated/AwaitExpr.qll 4b5fccfee29fe28dc85df19b4e6677bf565dacba92a0984bb7ca444650852970 0c0be7ea53e41c7708aa84b93d037fa9df2f72e5a676d78e217ca006f21b548f -lib/codeql/rust/generated/BecomeExpr.qll a4cde707b7372dd4c48f9b4a450b6ea710085f323878fc17c58f92cf7d50fef9 44f0fa714080eaf6dfe9fecc422b1aa161375b73eb5536ef8bb40b793d8f48ab -lib/codeql/rust/generated/BinaryOpExpr.qll fe0a286df10f5eaaaba60c74dfc5ef2c17736f24aadb718271e8a17eae736ba1 1f13e04bd6089b956db807e5e0ab974382ef7b5a7271f290a7ae5f75a857a30c +lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 +lib/codeql/rust/generated/AwaitExpr.qll 5a6d94ba4083e00dd971f41be7f32693812cdd7f8efb9dc7ef0fc18296ed560c 7af5433b8e945932a453eededcdc931a62d85d1505c0b4e417291c694ac6cc5b +lib/codeql/rust/generated/BecomeExpr.qll 62daf23501554f0b786adbee8e1d430323c6dac79afb8fdbc28d19dc10bdb3bc b17eac6c775fc38bca90a65caffe1294678aeab92d456fb9b9f555e1ac59a0b7 +lib/codeql/rust/generated/BinaryOpExpr.qll 54902ee8922ebecc3e6c03d5cf31f90a8c305601889b93177f413142c61d451f 56a56b576ac8ec7aed8778b411f7e670b40789fb63a2234d7144b21b5a9dff61 lib/codeql/rust/generated/BindPat.qll 15d3a33c5f56f7659a331f72735f00930fddd6066659e54c5c19d5e7eb8ef078 bc0a916622b2c426b71760caf15b8e005eed276e06e04d04cc5f19f4c31c34f6 -lib/codeql/rust/generated/BlockExpr.qll baf05a376d4c65505d3aa52eb893e1d8d02a8ef8b16bb40d4a59ee10c7d97b5f 789eccc236d0b4d3adf3dcde699a5f3097d333514455776f74b9184aa14fddb0 +lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 -lib/codeql/rust/generated/BoxExpr.qll 880f550a9a6c861efc6310a72830a50bbfdb11982e99f11b5d3f4c6d1fbe826d 380f021014738c86e5745b3320e65a8147ceb30511aa51526a7fab4278a1ecdc +lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 lib/codeql/rust/generated/BoxPat.qll b69ba2bc341a1bf4c613279e45fb97a530619d4148d5ccc4f05436a316db29eb bf52730243bd1836d5890c745232aba50544c2046d00e80e7d22eebcd104f821 -lib/codeql/rust/generated/BreakExpr.qll d68990513e0b2c0021cccebcdc7dc9ecc1d5b5c7dd0df7014686d6ed8a909940 36875ae186581f10485c1c846c9f6d2bffea3b18375b7f05c2927ba23f08b6ef -lib/codeql/rust/generated/CallExpr.qll 3e29dc45480e3be1989c364bad0ff94deb322cff20e87a3378fc1a7e11237d61 3873462b8811c3e3ef92700045ed05f55869d320ac74eb72111776d3353095f2 -lib/codeql/rust/generated/CastExpr.qll 6ed07afb453706874d7ae7c4bb09ed35ffdd11e7aeb4cbef4d84dad11a203d0f 741d1c0ff092dc9273b0d588aea6b30f7e2c1c5b9d08f2c4722fe26c2cab33ab -lib/codeql/rust/generated/ClosureExpr.qll f0c7ce7aecc9da9663cbda3e285be73b23464f8baa6b966fb5aebb0bd0f0aca6 685d74b6a94052fc45aff83b7c525a83f9dfcc02c1bf7e7f7a0aed51ce2de945 +lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 +lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 +lib/codeql/rust/generated/CastExpr.qll 0264db34cb111644de4d37569791a2c27665f3a7373c26adfdc1d68ab0a6fcc6 3a757ea06c6e0c715d88bf1eeb579998a0ecc5560fcf3b4066bbd86803ffa100 +lib/codeql/rust/generated/ClosureExpr.qll 43d9ff09c156f1ce000c77bcf5ecc02c8fb569c0ca7f042a1aae9d311e18b13e 07e1461269e1f07144468ef7b64b927f29053fa6de71afef334732c33a797f33 lib/codeql/rust/generated/ConstBlockPat.qll d0818fe4cee066f1e6d3439c82122942ae62941e69da686b7d5c399e820c395c 2fae5a2f0457bb7106d52ac7457afb597d7ac9658b8dcff8e76294f5fe34019a -lib/codeql/rust/generated/ConstExpr.qll dd851fb049429fe965569beb75957a6a596137b333a6cd7cd588d1c4d40412c4 824825bc46a393827d5df5ae30f622ef2a053ea1f5e338c3b957625a8542cfa5 -lib/codeql/rust/generated/ContinueExpr.qll 436847767d2f68f95d011df0eb8a175924c029ac747daf620a203596479b20b3 e362f28dde0bf3e6ff3b234e81a44bc5026b4c9ed38b8b7872954cca9565eece +lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 +lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f lib/codeql/rust/generated/DbFile.qll 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a lib/codeql/rust/generated/DbLocation.qll 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 lib/codeql/rust/generated/Declaration.qll bbf5ba3792797a829b0032c41fa99d22c26e4277d655099912cdbafb80f0c8cd c4666a71099b21ad5cd83ef6f991ba18f9bef03b3ffbcedfa10aec081d6501d5 lib/codeql/rust/generated/Element.qll 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 -lib/codeql/rust/generated/ElementListExpr.qll 3f7e9c1f7249f7283406d2e59b00af750b6dea93b284d7f25af66fe4b3345fea d340242d6072e274fbafd6ff2a5455bf53b3b77ed91539e91563d67cf2ed48f0 +lib/codeql/rust/generated/ElementListExpr.qll fd3a6fb638a38382a356b807acbbcb0bffb70fe75b827e7b46195b060a4b53d0 24da1239e70a7d95531784260af6867c62dca271246ae2c740d03231c329371d lib/codeql/rust/generated/Expr.qll 32cdd43d17e8b2fb7c73ec723eba89704d1e853e29d304db5eea3979fcdd2e0b 0b8382b0659afa1bd1d13d0cd492d7fbdc0fd7a5162fa658ca2973bc15ee6534 -lib/codeql/rust/generated/ExprStmt.qll f35543fe1481f768eb8abe3fd0d36e2dedf00f0d1adbc31562e6280ef291d0b6 0663097b4b539c5f35dab9b26ab55baee879c7ef543810581347a8951aee46d9 -lib/codeql/rust/generated/FieldExpr.qll 25dd7f15ee3fe1b0de4371cab9df83d3713c1612501e5496c9a15df8d093a755 3c75b0136d1849f6de1bbd14bda4285c52d51c8a6427984c7e5302c05d706e99 +lib/codeql/rust/generated/ExprStmt.qll 40fd3659761005fe0de2a09e58d35b3b28203f8f354ef5f687e6064862eb73d2 c4bcefa928d8a82f6b9d26a6e4f42912114bd24a90ee5dcc24e7ec1a4c11dbcb +lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 lib/codeql/rust/generated/Function.qll 84a00eb88479efdfe70fe51c3b5cb27ae64a54b48dcca1f2e02f68691b7d907a cde5b965ab27e811f0d24eb4f12bca90c3e8aec3a4c1d9b8bd0023745dfab105 -lib/codeql/rust/generated/IfExpr.qll 7d8e5bd93bb8eda6d5d6551431b0389a2ec5893bd8c13276205d6677856c8341 935bf1be8f790a52e71a6a28456f2f1a5c5cbe6e64bf20fa8602980560899835 -lib/codeql/rust/generated/IndexExpr.qll d44004268aa2e7d79e29133eb593d748beef1d4612318ef469220b3c2252a057 86892c04c59936d33f0cfd5272a04a6ef726f477c2e8f4ef27dae7240af9c804 -lib/codeql/rust/generated/InlineAsmExpr.qll 246c4f255d963f20c8e71fdbd16b4555cb6243820da1d399543205010368ccaa 1ebe22203305195259963bfb90f9928a4255cae993067f6a6fcfbc62069e1b1a -lib/codeql/rust/generated/ItemStmt.qll b4d2a06fdd00ea90eed2742bacf0a5781b8ad69e24df794ec075d7305220afaa b4d2a06fdd00ea90eed2742bacf0a5781b8ad69e24df794ec075d7305220afaa +lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 +lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 +lib/codeql/rust/generated/InlineAsmExpr.qll 0fbc121595d55df71a9190200ee8d7244851c517181d907d07236a8c338f1ebe b41cad499ebcc6aae4326ac5ae596210997fde99b6107feee35d6c9f764f0f5a +lib/codeql/rust/generated/ItemStmt.qll 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 lib/codeql/rust/generated/Label.qll 7de504ea71f2847e305ab5ea3b30403cb0aafbaa0eb4cff3956a2931da6c024b 61e3c6a74b573aadcccefe0d4abe5d8e2542b1e5116c95f4e595b36efa3a86dc -lib/codeql/rust/generated/LetExpr.qll 896efc732db1ddc8be7281408dfeaf6f04f29d25ee1240738246e0cb31dfc2aa 14d5add4367164f4aa994cd2ae006e8b5918265dade20b41f363daf9537c6d7b -lib/codeql/rust/generated/LetStmt.qll 1f8fda11b71689fb1a1b9b25a2ce046c56f36f26cddb354805bd395a03e4db3d 80ad6ea6afb1891a02db434cfefdb95b0fb7d766af6246ff27129dc15cb48ace +lib/codeql/rust/generated/LetExpr.qll 377099647451717af698677ca7119436982354d4e038a2097bffe8f34ac5686e 6bd51c497bcf2a684c1e6a2515e67228b0146b47a65e8d922cab54faf48b0d73 +lib/codeql/rust/generated/LetStmt.qll 39b49089d68052147935f226bea75a49fdddb42ff1bb2e700ee7b698db5ffe92 1078a1b9e20ae83a44dc0c12617ed53d79896d5cbe353a900accd78ba46dc960 lib/codeql/rust/generated/LitPat.qll 92c3c0f32ab9d5b08e246231e5465fe18536dee99351f73e158048bb007baf8a 6736a7824e5bdb0cc16de1231bdb5169d2f48251d5917bf2c31a36422b0bf2fd -lib/codeql/rust/generated/LiteralExpr.qll 9202e11f56a2c5e99fb98ed784c7ca043c1f5d80680b48ba4ea340dd689ebe55 9202e11f56a2c5e99fb98ed784c7ca043c1f5d80680b48ba4ea340dd689ebe55 +lib/codeql/rust/generated/LiteralExpr.qll 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c -lib/codeql/rust/generated/LoopExpr.qll e9304e282a97984e147b92ec7061c98fde238a8691e945e4cb775ccf34c27b0c 65b859e44e83bddb710d4ce9e5ab1346b98eaaa46509671776b75c9e8f1c1667 -lib/codeql/rust/generated/MatchArm.qll 5ad0dc254b6d58ccd856e4235b68ca0226a898c33f1f6b6fe7b48266a01ca627 f519af39f45e820eb3a70cefb0e4dfb541c3cf17952c00c6dd7e59f854a629bd -lib/codeql/rust/generated/MatchExpr.qll f8b422699337324c91ec9c55024630efe114ca617f4f088a18d180df132d5754 13169bde872f533f55aa196d7150761857c593a4657ab34051346dde14e736c7 -lib/codeql/rust/generated/MethodCallExpr.qll 499fa4c78bafbb8f3a6af645c26f1645c9a634976d409493d26d82dddd4b42a3 2dd18cb4868e96e38383c4ae3f8777637422e90b2363bb533f0e9e1c2692dc6e -lib/codeql/rust/generated/MissingExpr.qll 90b164567620c88b8e258fa229633365400abeafa4f4b0fcd1c856efc2f9b206 90b164567620c88b8e258fa229633365400abeafa4f4b0fcd1c856efc2f9b206 +lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c +lib/codeql/rust/generated/MatchArm.qll b70dd1934b7190e68cd6f9b2642f6fc67cba7ae13abd19d42f799a77e048d20e 9d544a6e09e9bdc84f0348b7b716e1dfab3bb98063f95938e83fe4264ee6c436 +lib/codeql/rust/generated/MatchExpr.qll d3984b540d7c8e8fda2d99437445f110c789d0c889eca1bd4a38b941884b487d df78f882f75cf443e1a5b21d899559e24e047d5a368dca22b453d8f976d259ef +lib/codeql/rust/generated/MethodCallExpr.qll b94d96216c0203b27eb04c64500487ce284fdcf2158b9b636621fc2d2c93f377 91d00774e94600ba82ae5103b85e1e377b0baef866c7de87c34f806cc4c3bbac +lib/codeql/rust/generated/MissingExpr.qll 9ab4844a2d719d29a95a69d1a6f9477ded0db508f83f3e4f2101847d0486c300 f0706af7d600a4ed1dc253c9e1220e863a58cfb9334f853877b80dffadb35a3a lib/codeql/rust/generated/MissingPat.qll 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 lib/codeql/rust/generated/Module.qll 2a931a4f2cdb2fee00ed83af045ea63d36b7dbd708e58c30445b5610feaae333 cd62add5c31a509f965aa294f44a1607ec7c62e3a9e3fe9ee063b3c814f4eb62 -lib/codeql/rust/generated/OffsetOfExpr.qll 58dfd632efcb48de7fe6ffbcb2192fcf95bfabdb407a751133f63a0e32ae7489 21ebb1b3d66849fc21c04083cfa751eb56c55809cd52664020bd61ccfbe5ea68 +lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 lib/codeql/rust/generated/OrPat.qll f8fe5c7b83a08dabcc530484a696274930040ea13501ae20f1426faeec67bcf0 f3adb3148890531b698570a48740335983a5e81977ba4ac651778f940f184398 lib/codeql/rust/generated/ParentChild.qll 956f55ac17d66926c59f76d391b75c30767d236b145d6ae402f4308fa22a7d01 dd3cabb5b4a9ba42be60345f445cde18b0d7be934aeb94d7312eeef122e148d2 lib/codeql/rust/generated/Pat.qll fe1c72856442dbab5655eff93f86c2cbce8d69d9fa1f99a0f9203061ea1112a4 d85d86e8b6c48df733589d186f610b1cd9086629180701e017774bddc62402c7 -lib/codeql/rust/generated/PathExpr.qll 3664ed2ad08097e4446b0fdad148118c754f8203541ae588d967ba9d79b6bf21 0d987d2358fe9b42e57585e7ae906de80e9f4ccf7c20e1d9bb7624ffbad96941 +lib/codeql/rust/generated/PathExpr.qll ef6665a46332e5c1bc3495f9e7028b0e56b83e99eda692965ca0cd8fc8931cb2 475c1a5374a37b959b09780dac3d62773bdf9fed7fb73ac325cb087e8ee39022 lib/codeql/rust/generated/PathPat.qll acc4dda795bae97626a8d0041538f3ba1f0b591c743fed381cf198a8b04653cb c3deee1b3bb9bd37ae3ed4761d8ee2f498384fe5e1f5e31c0f9b99dfd864a0d5 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 -lib/codeql/rust/generated/RangeExpr.qll f499d8c1f260d6262a55c1f3640aaee832ed8c9aac922cb2e05fefbca4509053 a01563640bc23fbce9d33da756bc209fd16155dc76a7fed4ba325979723f48a5 +lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 6ec95f6cb9c4bd93b38990bb1e3b89b526624305ac6ee7b94e6fb0a2f3db28fc 0e193f3816a7587d5103dba421bc2bf22b869522353d4e3f43d49a792eac6cf4 -lib/codeql/rust/generated/Raw.qll 48d1e7d642bd2a7605dbafe3929c558560054a4e4e3e4b36925a8bfafb7536b9 3b881e64127e9b41fee7e091de725f5cd1cb1263e4a52c02adb1fb339fe36c3d +lib/codeql/rust/generated/Raw.qll 21a30c32dbc900f488d2768658bdabafbeb0bfb520c5cd2f14835d0e081c678c 1a490ffa8d8702cfa529c28e0ea4b55dcd0a3070023c4cdd669661d65a9ea8c8 lib/codeql/rust/generated/RecordFieldPat.qll 26bed2285d849b9b7ac52d86131eacb40df912db350e423e81fb98c393c08a69 05ed735aecee90901a1bdfae05d9f85d7f6581616eca3a9262fdef6673222f9b -lib/codeql/rust/generated/RecordLitExpr.qll 1d3264446ff57e8b169f1ad6da150b2d457d6b60eda0ff63e2353eb8ef9e9113 f523dd5ce7f4bac0aafab7b27c6cfe766c72a9ee0c92d7a263347e67edf096df -lib/codeql/rust/generated/RecordLitField.qll bc704b56a986f3a399dc9c3dc2b61cca0d40cd389c694b9fe13374780835ffcc ab6b05a87f240a97cc2a8c15bb84a1338ad33ce367619125a8514e8815fd050e +lib/codeql/rust/generated/RecordLitExpr.qll 442772626175d46dcd8e68b84d6a26b869affcc6cb1e88d880d31e7a705c772f 77976fea76b5741c1aff3e8a48eeb07987c3332ab9f52ef0c32caae75ad4f1c9 +lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 lib/codeql/rust/generated/RecordPat.qll 5fd26e95dd23b07a847bd28c95a4206df62f7cc22c8d7b3bafa10e902e917d15 e264a96c2af4e2f64a394a119329b8b376d4b23ec6a3fc6d123c5631845bc4ef -lib/codeql/rust/generated/RefExpr.qll bb37b8bff64b0cf1f18de297487455692311b2006c45161f25969e131359c60f bfbc2b67b2b2ec66f3539e4972a947946b29e0ba527042593060eaf6b21e28ad +lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 lib/codeql/rust/generated/RefPat.qll 3525331e8ba25a8612324e860423a39ddb29e8eb50a9f2bf62e49bf182d64b6d 804efbd32869f92e5515d34852fed6416288f99b0aab95b5be5cb5bdd1eea806 -lib/codeql/rust/generated/RepeatExpr.qll 43aff00e966e4550179d756489e4cbc30618d66c93c13530c45b031b9513b915 b91691445e6f7de67d61c787f41b36a383cf36da1a216c18767ac1d2ce5db34c -lib/codeql/rust/generated/ReturnExpr.qll 6160f3a14ff1cbd6a297edae015769f90e8e31201639828d8a9d0d6e38c1ef99 b8c8a12f78281e558d230c6959236780758e9645fe22aca697b948535c20f9be +lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb6f88638826dc37a712c05afaa c2cea180b7c068a3483cbda73168effe762ab2aa56bb8c590c8a15b6e54961ce +lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll b4de6692eebf1205940e04da963adc20a07b15923c3c3a7a512a24e3bd8342c9 ee9b919983807f39d97cfe8ca66b76bdbfde76db02db5c93268ce22cbddf4213 lib/codeql/rust/generated/Stmt.qll 55688c8f42f6e7fd1b871e572d75fac60d0543e38c4be4638abbb00187651d3d f978006a8453137f989249e849a7c935a090da3a9b0116145da80068760e12fd lib/codeql/rust/generated/Synth.qll 03ecd0d7e89aca555d2393bbea8de1cde0476e28fb9f198ed3355a74f1b5c1c8 11855cc446c2d8a77503795a7c395e86ff149ea10d773a6e50e54b08dd438642 lib/codeql/rust/generated/SynthConstructors.qll 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b -lib/codeql/rust/generated/TupleExpr.qll 13e4dbc1afcabf388c793145cd399789f4014662f2eed1d49cbe96eeb8355413 bfa0708885c120bad24e29deb29641c69a5e5361654f3a144ead9543bfbd7197 +lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e lib/codeql/rust/generated/TuplePat.qll 23911b2ac7ee2279df8ef40a6e447437ef0ed62518504b17874a7652bf5e3f4b fc4f6f7ea40754290de194ac55939f08549bd637104baf8dc84ca3938bcbd1f1 lib/codeql/rust/generated/TupleStructPat.qll fff004cce780501eac94fe4b146619a84e02c85cae12ffeba5a4058e8c9738ea 738659f8208aa65d1d8cf601e0d92a90a890d6cbaec51cf04c81fc75a827e30b lib/codeql/rust/generated/TypeRef.qll 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 -lib/codeql/rust/generated/UnaryOpExpr.qll fd55d4bc9cd1a49d1f38f02fef16771f29bb5fb2512abd18341d56665859d18c f271ef5036410c018f48d6f15b17cb9beaf4111a42fc638ac4ed3db974a5f870 -lib/codeql/rust/generated/UnderscoreExpr.qll cd7f615e41562b80d89e413c1c808048da7746fd445f0eb6ad8c5d9996b44d5d cd7f615e41562b80d89e413c1c808048da7746fd445f0eb6ad8c5d9996b44d5d +lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 +lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f lib/codeql/rust/generated/Unimplemented.qll 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf -lib/codeql/rust/generated/UnsafeBlockExpr.qll 8464597373ea46f6391394f02c4ceb93ffe8441b434e6e71907b0a3369f72d8e 8464597373ea46f6391394f02c4ceb93ffe8441b434e6e71907b0a3369f72d8e +lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 lib/codeql/rust/generated/WildPat.qll 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 -lib/codeql/rust/generated/YeetExpr.qll 2b37cf55ec26958cf226885e99d81c8bbc6ece69fbe92d9fcc8884ee0bc4aad4 e371531507311ea8a9fbaac74442fe9994ae85f0acdb79cc870e5318af52aba9 -lib/codeql/rust/generated/YieldExpr.qll 70ca98e14b24f12a3cbfe690417543fdce45b162f241834e2f7f58543aa11bda 40fe1281107317a7d80c7141229eed9c6904805dff615dfd0141ede2457e2c57 -test/extractor-tests/generated/Expr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +lib/codeql/rust/generated/YeetExpr.qll 0e673204c592b6025570098b14e0378a0e0c68d13be9217ce1543f2781667d42 6546ce98d42717d4e6932e1add628591e488d063ef2a79bf093b831645342e21 +lib/codeql/rust/generated/YieldExpr.qll 8f28a069a4a97d17a10b92200766f57ef0d372b88dd650f909167c7b3d643cc7 a0d8578c4f69e042788b7e1a8c066663541f1782589ea7521741d0b801ca0661 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql fae7f09b653698aa78626a268711bbd8336c9d6572ab9fe85967a8bec69e33f5 91dd5893cefeb9fd45dea49962dfee5a373be790f5ab3569f79d9ffa05613033 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql de0941b5e2fad01300b77ac6db85ec37bd85b7d508b01e2b8a332c1ab9f6e787 7f9bdd81447cbc5a63b09c41a7d0edc15f826f7e672c518dc6fca08ae0107639 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql 75f59d680d0f559dfc586306af2748c59c15789514a4ebca9f908ccc1fd63674 1a9f952485846fb93fc0afeabeb07845fa5c026520a0542302f971cb6b4d8e3e +test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql bd2a401989b0f452b448fadd8d456dac9c46ca5ffe3775e5ac46e755782a4f20 c1922cdd6995a9c63eb841abf09f575bc78ec0be222062034b89ff63649a875e +test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 5661cb0d7b2285af31207232de2b685e851e4d70224cb16045bc0221c107de43 1fd41642343791d9b69e0c633ea3318c0a855f51f50062cb58225820a7540d50 +test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql 555112b0180f20ccf917bf83e4b04ab104b194a46fb072ebc0eb3b99c2b3b406 7c085b42741159fb9fcc2debf6f127e9b1a85901068697dc3794085ae732736e +test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql 176bcb2058a63081f2baca1b03b4a0264eede1606ad9396da915963fc00ca425 e4246975686c75b791041ea3f8b4dd428b0f6424d5833ab563acc23da1c77356 +test/extractor-tests/generated/BlockExpr/BlockExpr.ql fd1bc52af4bad96423cb86b1eed02595e139e533f48533299e32b7b45360b47f 021b58c6e6cad40cc0707d0a78fd8c4ddbc529422d3bb9ac62c490b2abc1bb00 +test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b02c87bba8bdbeffab05632133a17d36b355624d7521083cc6c0b02f88b2ba46 91141e01393ec04f4bb1f86373f5f25c837b13865ab540419050e6c547cc2690 +test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql 4de30a1e3c9de174688b8f9af57f72dfa6d9a2e3b3ab1b972ee69342ebd7ecad a6948240014d27fa9af7f56859cff2f8f7b44097f0bc47fbbb91b5be35e11d91 +test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql 6df26e837dc4f8ecf6dda674dfc89b2dce25da5dc3301beba461c5c1e1776201 b4e205949d06fa355997f5a399ce1f7c381023e38be4db4ecbcec676d8ebec69 +test/extractor-tests/generated/BoxExpr/BoxExpr.ql d74e58c16466ae5c08716eb027cb562ed50a96965fcaee3d0ebb64f1c9086c7b 9b01b9343cfa07e76de9ed781a5c03532fc740c8f794147d71815c98dfbcc076 +test/extractor-tests/generated/BreakExpr/BreakExpr.ql 2897243d4fe6e0975f7621cff7a44609f6f0d015e77bff9c73a0dca32e3e7b44 6a072aa7f6ab27d6f6e887e7fe86213668c1bacce6cddfa2b1e65afcc13abce7 +test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql dd9b5ac06b3677eea02bc3204e3b23f212f29c418343a052befd903e622ffc32 f66a646c7efcb326ff70961df623761d342af4134677245e413cb9fc603334ab +test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql e338d2582b191d4ae1640504262d5a0d5ed23ddf850b5adfffb679a057f55e5e f57e618dac8c79d70e520d1508e70032662db8e4fc43b319365e195efcbdc847 +test/extractor-tests/generated/CallExpr/CallExpr.ql 2b91a02ad6f2ba6e200b2797dabda4dbcea08c7c2836d0a1be4bf47a7e7d786c 6830905e8993836f258c84b557f0f044dd5ebb32dad8d74089a903ca0d820eb5 +test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 0c7e6eb1bab788050c51ae36b954925c48618c5d6fb3129522eada6d911288be 251ae5a7119a2cfe427650c38e7df5d3c0a1711aa7a2ced21f5022798a5088d0 +test/extractor-tests/generated/CastExpr/CastExpr.ql 40308d07046e6cdbe8d4494c41334c7191b377c589cac97776da6377fe0a4c34 47716185cbe23a7bbb6d5e69d737aafd1cad66024ba6600766cf9b7871546db6 +test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 75fd05fb47e90426745d6c8ffff35cbcba3fb0792317155d0a139b7a4b87dd14 865a776a3312ef5e93a9a857a6ad7d66233e58547c4fa3ce924dbb320a324e2c +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql 48fb8656a350ba16cc3cd291692b542dca137587ee971999c439700c74e6dcba 5ff21525959142237ee1a32c9feacf331083fb40502df6ddf78dfb8d93caed66 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql 34f8b8fc82e0c798f3cddc7ad1bb80a361c95da9d8a768fb787d6ffc3be1c755 9c14ee19cf74f516d201b8be72fe3496e425cfd42db223fb537cc92515e2b021 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql 43fb702201d21b8f716df8e128f1b7995604f5829b832a163672ab465c2fbde8 fc28c03768a514260ce0feae6d7c347508c4800054b184cb3f9004bbaca33fd6 +test/extractor-tests/generated/ConstExpr/ConstExpr.ql 644c34489fd7deb3790f9de131d958cd96102d5c09eb3b07bbf5462b3e90d253 025192a0bd742c16baf8b627f3b8216442a74c6497b752dd1207f572743a0f5a +test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 259d98acb2d237ac630a7f92a26256f1af92372a3ef5b5feaf022b9b42a6a726 bed3e1332d65736194fa758e4a91433785e9da2ddc31d56c29ad27a7df392802 +test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql 0fa15905b4c06382ab6bde50d28804d7b0af4f53229e69fc8038a77f190f7b24 2fb577cb92456371f5f056fed5a07998914a27f560d41da43fc3b94827436cac +test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql 22ba315472cfc2ea9cbe6759a0e2a3250b696cca823a992539545690bb4db2bd e968c8fe3592f17a2b84ea6ae2607d860c93fdfc49537940cbbe71f52e59f09d +test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql 0a327e668c653a31d98f64290db768f68383d103cce4354076a226df708fe982 50231f088f3d81abd66be0ab1bf7159f47f8705cec977677b15738897dba5342 +test/extractor-tests/generated/ExprStmt/ExprStmt.ql 037695af057183ef9e35569c9255625cb17b10590632aad4f9a917ab036a9b9e 8ded0651563b0447b3040303ad9e0b1bc9e2873ad5485ae4c6447f5893c77402 +test/extractor-tests/generated/FieldExpr/FieldExpr.ql 6d85c8b85905baf66ae1f6ed716e42530d814f86261d98eddceab861939227e5 5765fb0376978a9006e2dc175bb224c5c944f19ddf628a2b933b1bebf81015a2 test/extractor-tests/generated/File/File.ql dec43be882fad904fab0c6447ca93633d801cb08ff8bec309befde7d2b9e5dda 74e1f1d698558c35fa03935cc34f4c8145d376b56d7657b18aeb338f5ca752cf test/extractor-tests/generated/Function/Function.ql c49434420dbb6fc3d9e6294161dcd3d3b306fae5ba5c85b610e534b8b15ef74c fe02208b673b74eebed92b5cbb3a8a06c31c0681eb28f3e596515663f14fa9e2 +test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e336308af6908cf12387fe8bbaa3c8c5360bd 28b5580a4e628286023b5d0de549d087f0a4224ecbb02bc7b3197d8f404b5066 +test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 +test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 +test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql 34af9ef48d7d8d6dbcb063170e2a818d2c288ea964df3173248866f790e12fc4 594784fda228525bcd2e17a9b9a07634346866d43d2b4ae262ba7a786c698932 +test/extractor-tests/generated/LetExpr/LetExpr.ql b311fb10d3a65cf682ced02aa4c9b589a84cb92adc653fbe630d471d88ca5f8a 3d93cc0cda8a6f34090d3000fee4a14e31fcf0fdc4d201a8d414e27cb8b9e4f4 +test/extractor-tests/generated/LetStmt/LetStmt.ql 401f46acb7db90d6b51d6377e9257341fb2e45599ccd38e3e1afe7ce347536ee 47315699ae0f539dabdc040e238c27463790c710aa78fa589954cd800d35911d +test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql 88bd37786d0a738d2cb0c861a2411236d9dce09b98ff050b5f03b0888ed2f521 622d96d1e99fd174c284b7a3f05eddf30faf667cddff2eb942e01128488b398d +test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6e9a36a2a226ea0df1f01886bbd4e14997eb91f5b9422e37ce4985fd15a80622 ffbc3d9278e10aa78304cbc8876d96fe678a1d2f52ad170f651f842d1787156b +test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql 845088548371993a0926e56d8493c72d2ca9b4b901f93bbf4f3b305897e59395 3586f8acbf01230fa919c2303b4f8c07b5cef30855902776967d60b4d34ad90f +test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql 9fb9c6336d1e3a657d988ffb53a43ce66b8403e46bea05d73d546ae774a647bc 708e2878eca3e9661e8b0d54180b4a6f512d9233178e9ad5683a1f72fa9656aa +test/extractor-tests/generated/LoopExpr/LoopExpr.ql 58dabe29df959b265fa568cdde1b589d65ca8649c8aae0f30079565c1106ad72 929fd3c5c4f01f47f926c49f1a519d415063ff23d5e1fb2f2e8f72bb5aa7fdd6 +test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 1febfb8cff9b4f7ba1a658a2832238d2355f0f609778af33a3877e977aaf1805 6b9c008b041beb1c0a7e249b7f4a1bd5cea0885f82543a8909a23a7068f1f837 +test/extractor-tests/generated/MatchArm/MatchArm.ql bf1ff34940f8682e69450bc3429b0e071ae2e31b94699cd7579dddf6126f821b 83329681067983788ac712fd72299719e4cd1ce85cea613e373751e6bed05f42 +test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql 2e99e932536c510e846a51bab4f4e153b1731131f144c813cfadb122d619864e 312c619de2aec0753e4fa66e0500fa67a9982989420a48dd16e75b5a04f01b9f +test/extractor-tests/generated/MatchExpr/MatchExpr.ql c2bf8277536a02691229a1866fb565b2bd2b3ee651cb1d38e1581db19239e0b9 901d909dc00b9f86815f5794d2639dc7367dfd04030d2404fc1e49e9c5948b81 +test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql a66b46c591bf9ce084e74a8b9cd7a0af5ab5e12e166b59cff0a1cc73a97278c3 58f20c67202abed5a9d659008333f3807663f85367db898dffe01bd2ba9c9b03 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql d09a8c2c0d277bfe4770822e79fdf94a2bc80e7b8bcd47361396a5a467aaa193 b6e9710ab5f6f2865c40cc155952e8833955f2c4c2cc5694f1008ffaa4d67bd5 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 4d975396405739dbb05a4019add804b92d97b12c8ead6107603540ed2b3fefdb c66bcda4342519fe2179e2cdd67ff6ddc7b3e8a475432b611f6de20578eb2f6d +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql 2226b4759bee9091d88a7d72be5d8f8ad43f17b07fdd1a1f64ae3da5aa6aa333 ee9e06838b879ce90b00d9289eea32fbda9c02e0074d306a2f1f5991956c7deb +test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd91389f8282863613edda3fb804b917cce0675a8bb76 f2e600f8fb723f8f1bde4b0b0ef41f59b4e652882b5c788e8f6767822d5574e4 test/extractor-tests/generated/Module/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa4c8e4e79bffd8b7a797bc70a68054ab51950dbebf4f0 dd92801d8909d83be1f824a2dfc599551c11b63ad1e96593e22d3b43464d7cf1 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 test/extractor-tests/generated/Pat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/PathExpr/PathExpr.ql aa8c36042688ad96a268b066b38fcaac3befa6490cc3510c15f824fce63e8949 71de233de72dd87c7c9129617d03f9fbc9bb9460ea896002cbb881f84451835d +test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 +test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql 063ee8f6146110b97f4ee8944a5f37f0dd7cd5be049f13546d42a888a973d826 1184cc1fe937a01e9d12577478750be1497d4f99231486ae6d75104e7304eeb2 +test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212f65c522387f726b2b9b3f204708a2a764e238aec8d89f 8b3095fdd9c6900eef656d4e9e18f5f4866b285634cc725e73246976af20450c test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e -test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e -test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql d31550e195d6642736668ee2a0b0c370546dbd8d8ba77c7a0d266b4acb5253c7 8ff659dcbc2985dcfc04246ad16294701db1c012a37d6743e1befe5746c25def +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql 112614052020c4c775f77e3773ad83b6747bbf30a4d0fea70642f570e2879896 969642f51f1d106f096fcc77002bba057054180c3115ebd8ffd8a69fd0d8f24d +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql d01bae55f1e11a8527e8514262e6b16ec72fad9d294c33296a6c1cc750d910c1 ff680b4716a360b7b91a8d83ba8fdfa570f61369a25b17bcaf9b42a3987257df +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql 52cb0c020da2e5cf42ab94a9a2379c1ab5f7f6e2ce3763cb1d17e4173841b997 ed8fc6fc13d0f2be9c9c2f0d38ae1dc05824d44e1f1a72844b21f948d3f330c7 +test/extractor-tests/generated/RecordLitField/RecordLitField.ql d27c55513ab2ee8ac62d05f3552476ad5d8c05eb2e09f7cd37f8c4821aab4979 6545caed544f2898706d2cd20854cd15caf2198326c38f69814d50e69954a089 +test/extractor-tests/generated/RefExpr/RefExpr.ql e859cd59dbaa5aa5555aa13d4a75b7bfe2dbdb2d5c50675f3753adaaaabdedc2 d330ee941e9932054c32d0be5a52f38f285e4dc529821759ea38633f8ddbd517 +test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql a883874b6db9c084123b795ddc4b972f41da554a07d41b7d42242a4b4156ccc8 4aef5ebe3124ea3e13851df3e65d430b64740a3fda2fa4be4c6a3634e9f00fc1 +test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 65397add1001e1593a303e3cec51e74aa4830a63e899b458a4247d017a84942d 34f138d22c9fa9195acd0c91a230dcf74dc5373db2315db0414aba710217720b +test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql bea07d8461c84e87bd642ca3af79aeff53f3ca3b79a6cd73ff8c514bcf213655 3cb63fb46da4d1c305694fd7a004016ab7c5ec96372279ce58cdb5c2e7a1dcc1 +test/extractor-tests/generated/TupleExpr/TupleExpr.ql a14037288887ffd865289c4082e8438384344e3eeee9eed3bd4e36297670d94f b96191f6b65049e48899e72ac8e5b120ab3c6028bfa26df0e9c8aadd943c1023 +test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql bce5ec6f86043699d913abe258754c198cb1a562d0f1baa79c5d41e11377f622 8880feac2a89ded4e729b023fd8ef59350f44c30889e248c2e4db476544ec544 test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql 3e530c5beba93710b686d0bdaa6edfa58e13357be48bbf038c3a47c280d0bf08 0b0003cbebf44d0d2e3bcc1b318e0a4e90638dfcf3679ef6924a8461e81feabb +test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 54cc3f7e6e9b9ac58922842dcd1960250e8bbb7ede5a63134ae622abc447be1e 1d5558d4ec9e4a1a510f37206772af3bf41015a99f1e9b83cc530db496dc2a5f +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql a743dbb15736b809e30769e1ea136afc9f0226885139150d6d1a5d353b6cb6fb 09849f178208406742007009da7f9b359b814477190d9d95370b94378e60be17 +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql 4409e1c39b7729dc393a0d60f9d6aa0dfeed294a090285442de85ce746095eb5 572d88a9c879905519d9a63d5937949771f9c163ee2ea8ba4eabe0f16c28ca67 +test/extractor-tests/generated/YeetExpr/YeetExpr.ql c5919f7f2f42b7dc08b0fefc553bb602a772925c226c943e2c96158adaea7797 a5bfdf225d9f9653f5aae00f30744d03f7d1045ddb4469f23e57194b3b1a2f8e +test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql 4ab79339d3f0a2a0334f66a7513ae5d27bcd608fdaf557da71757896e20f81b7 6d7b9da72a325b83539da4f353df2a0d4fcd11493773547ac89031525e7cd1fa +test/extractor-tests/generated/YieldExpr/YieldExpr.ql 3bf0ed6b4ec11dbe8b6af6cb0c51813c193e17bd9df0a23cdb1bf39cecddd915 0ff0219d5356bd9cb62df995577909898b4b28e0ecd860339361731e4f64e703 +test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql 944d36a39b4955638c5ae4972110ea84304691d34f39dccfe3ee3964033f383b 62c9be460d299afd0e994f412148ac37585d011efaceb9221be22ebc97943bc0 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 048e925f2742..4873570bad4f 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -214,12 +214,84 @@ /lib/codeql/rust/generated/WildPat.qll linguist-generated /lib/codeql/rust/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/generated/YieldExpr.qll linguist-generated -/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/BoxExpr/BoxExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated +/test/extractor-tests/generated/ConstExpr/ConstExpr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql linguist-generated +/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql linguist-generated +/test/extractor-tests/generated/ExprStmt/ExprStmt.ql linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated +/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql linguist-generated +/test/extractor-tests/generated/MissingExpr/MissingExpr.ql linguist-generated /test/extractor-tests/generated/Module/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated /test/extractor-tests/generated/Pat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql linguist-generated /test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql linguist-generated +/test/extractor-tests/generated/RecordLitField/RecordLitField.ql linguist-generated +/test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated +/test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql linguist-generated +/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll b/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll index b0328ef9382b..6ac6a1e2f01f 100644 --- a/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ArrayExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.ArrayExpr +/** + * An array expression. For example: + * ``` + * [1, 2, 3]; + * [1; 10]; + * ``` + */ class ArrayExpr extends Generated::ArrayExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll b/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll index e024eec6e920..c07aaa28f5d4 100644 --- a/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.AsyncBlockExpr +/** + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` + */ class AsyncBlockExpr extends Generated::AsyncBlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll index 420be7dc8408..47a3773b555c 100644 --- a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.AwaitExpr +/** + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` + */ class AwaitExpr extends Generated::AwaitExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll index 6893087ec0e4..6af07fe750cc 100644 --- a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll @@ -5,4 +5,15 @@ private import codeql.rust.generated.BecomeExpr +/** + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` + */ class BecomeExpr extends Generated::BecomeExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll index e5de5d9aa453..e0e61e46a29a 100644 --- a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll @@ -5,4 +5,14 @@ private import codeql.rust.generated.BinaryOpExpr +/** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ class BinaryOpExpr extends Generated::BinaryOpExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll index 0ba5e1a2eb8d..f8f93be4f5c2 100644 --- a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll @@ -5,4 +5,18 @@ private import codeql.rust.generated.BlockExpr +/** + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` + */ class BlockExpr extends Generated::BlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BoxExpr.qll b/rust/ql/lib/codeql/rust/elements/BoxExpr.qll index 1525f7796f58..f61555a0e03f 100644 --- a/rust/ql/lib/codeql/rust/elements/BoxExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BoxExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.BoxExpr +/** + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` + */ class BoxExpr extends Generated::BoxExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll index cd98d7003a05..c8b23f6685d2 100644 --- a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll @@ -5,4 +5,21 @@ private import codeql.rust.generated.BreakExpr +/** + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + */ class BreakExpr extends Generated::BreakExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/CallExpr.qll index ee14b172e50c..ef1b34fd7038 100644 --- a/rust/ql/lib/codeql/rust/elements/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CallExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.CallExpr +/** + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` + */ class CallExpr extends Generated::CallExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/CastExpr.qll b/rust/ql/lib/codeql/rust/elements/CastExpr.qll index 3b7b41955cd8..3dcafca58965 100644 --- a/rust/ql/lib/codeql/rust/elements/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CastExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.CastExpr +/** + * A cast expression. For example: + * ``` + * value as u64; + * ``` + */ class CastExpr extends Generated::CastExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll b/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll index 661d98ce1b27..863897ac6419 100644 --- a/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ClosureExpr.qll @@ -5,4 +5,16 @@ private import codeql.rust.generated.ClosureExpr +/** + * A closure expression. For example: + * ``` + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` + */ class ClosureExpr extends Generated::ClosureExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ConstExpr.qll b/rust/ql/lib/codeql/rust/elements/ConstExpr.qll index 375e7dcc7fda..1e76306bea02 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.ConstExpr +/** + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` + */ class ConstExpr extends Generated::ConstExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll index f23879671e33..c5674d62b193 100644 --- a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll @@ -5,4 +5,21 @@ private import codeql.rust.generated.ContinueExpr +/** + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ class ContinueExpr extends Generated::ContinueExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ElementListExpr.qll b/rust/ql/lib/codeql/rust/elements/ElementListExpr.qll index 7513353fce3d..e9437b2e6a1a 100644 --- a/rust/ql/lib/codeql/rust/elements/ElementListExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ElementListExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.ElementListExpr +/** + * An element list expression. For example: + * ``` + * [1, 2, 3, 4, 5]; + * [1, 2, 3, 4, 5][0] = 6; + * ``` + */ class ElementListExpr extends Generated::ElementListExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ExprStmt.qll b/rust/ql/lib/codeql/rust/elements/ExprStmt.qll index 0ec9cdbc813d..e3239ef2e8be 100644 --- a/rust/ql/lib/codeql/rust/elements/ExprStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/ExprStmt.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.ExprStmt +/** + * An expression statement. For example: + * ``` + * start(); + * finish() + * use std::env; + * ``` + */ class ExprStmt extends Generated::ExprStmt { } diff --git a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll index 656bd807afdb..a70cb61105e7 100644 --- a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.FieldExpr +/** + * A field access expression. For example: + * ``` + * x.foo + * ``` + */ class FieldExpr extends Generated::FieldExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/IfExpr.qll b/rust/ql/lib/codeql/rust/elements/IfExpr.qll index c1500f592c07..ca5886e65673 100644 --- a/rust/ql/lib/codeql/rust/elements/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IfExpr.qll @@ -5,4 +5,19 @@ private import codeql.rust.generated.IfExpr +/** + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` + */ class IfExpr extends Generated::IfExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll index fde06bd4d916..d67dfeda33b9 100644 --- a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.IndexExpr +/** + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` + */ class IndexExpr extends Generated::IndexExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll b/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll index b89e49e3af36..70fccfc59ed9 100644 --- a/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.InlineAsmExpr +/** + * An inline assembly expression. For example: + * ``` + * unsafe { + * builtin # asm(_); + * } + * ``` + */ class InlineAsmExpr extends Generated::InlineAsmExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ItemStmt.qll b/rust/ql/lib/codeql/rust/elements/ItemStmt.qll index de2a1b22f758..1e4d1f45e7d0 100644 --- a/rust/ql/lib/codeql/rust/elements/ItemStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/ItemStmt.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.ItemStmt +/** + * An item statement. For example: + * ``` + * fn print_hello() { + * println!("Hello, world!"); + * } + * print_hello(); + * ``` + */ class ItemStmt extends Generated::ItemStmt { } diff --git a/rust/ql/lib/codeql/rust/elements/LetExpr.qll b/rust/ql/lib/codeql/rust/elements/LetExpr.qll index 78862471d1bc..27979b514540 100644 --- a/rust/ql/lib/codeql/rust/elements/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LetExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.LetExpr +/** + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ class LetExpr extends Generated::LetExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/LetStmt.qll b/rust/ql/lib/codeql/rust/elements/LetStmt.qll index f01b81ceb305..10a58875d496 100644 --- a/rust/ql/lib/codeql/rust/elements/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/elements/LetStmt.qll @@ -5,4 +5,16 @@ private import codeql.rust.generated.LetStmt +/** + * A let statement. For example: + * ``` + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + */ class LetStmt extends Generated::LetStmt { } diff --git a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll index d6f928693580..bf892ed395cf 100644 --- a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll @@ -5,4 +5,16 @@ private import codeql.rust.generated.LiteralExpr +/** + * A literal expression. For example: + * ``` + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + */ class LiteralExpr extends Generated::LiteralExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll index 6f08d6648a21..fdc49e1e85e6 100644 --- a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll @@ -5,4 +5,28 @@ private import codeql.rust.generated.LoopExpr +/** + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ class LoopExpr extends Generated::LoopExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/MatchArm.qll index 914d70d35583..1d2c565264e8 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArm.qll @@ -5,4 +5,19 @@ private import codeql.rust.generated.MatchArm +/** + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ class MatchArm extends Generated::MatchArm { } diff --git a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll index fcb352bc2b44..175946568e34 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll @@ -5,4 +5,18 @@ private import codeql.rust.generated.MatchExpr +/** + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ class MatchExpr extends Generated::MatchExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll index 855035925c3b..0a7bdc6b8567 100644 --- a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.MethodCallExpr +/** + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); + */ class MethodCallExpr extends Generated::MethodCallExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll index 3ee2f3a6e4e8..4a9b9806abeb 100644 --- a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.MissingExpr +/** + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` + */ class MissingExpr extends Generated::MissingExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll index 88097b2c34a6..cac4448162ef 100644 --- a/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/OffsetOfExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.OffsetOfExpr +/** + * An `offset_of` expression. For example: + * ``` + * builtin # offset_of(Struct, field); + * ``` + */ class OffsetOfExpr extends Generated::OffsetOfExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/PathExpr.qll b/rust/ql/lib/codeql/rust/elements/PathExpr.qll index 237ca6b71f1f..cab08ea0014a 100644 --- a/rust/ql/lib/codeql/rust/elements/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PathExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.PathExpr +/** + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` + */ class PathExpr extends Generated::PathExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll index 67cd4b107217..106922a0602b 100644 --- a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll @@ -5,4 +5,15 @@ private import codeql.rust.generated.RangeExpr +/** + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ class RangeExpr extends Generated::RangeExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll index 87653911e1d0..bda6fae41216 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RecordLitExpr +/** + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` + */ class RecordLitExpr extends Generated::RecordLitExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll b/rust/ql/lib/codeql/rust/elements/RecordLitField.qll index 1a30e1a1e91a..b432ba6fd852 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordLitField.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.RecordLitField +/** + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` + */ class RecordLitField extends Generated::RecordLitField { } diff --git a/rust/ql/lib/codeql/rust/elements/RefExpr.qll b/rust/ql/lib/codeql/rust/elements/RefExpr.qll index 3916a8ad3bc9..b4a1a44f7100 100644 --- a/rust/ql/lib/codeql/rust/elements/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RefExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RefExpr +/** + * A reference expression. For example: + * ``` + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` + */ class RefExpr extends Generated::RefExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RepeatExpr.qll b/rust/ql/lib/codeql/rust/elements/RepeatExpr.qll index 0f84446136b2..e5216581efc7 100644 --- a/rust/ql/lib/codeql/rust/elements/RepeatExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RepeatExpr.qll @@ -5,4 +5,9 @@ private import codeql.rust.generated.RepeatExpr +/** + * A repeat expression. For example: + * ``` + * [1; 10]; + */ class RepeatExpr extends Generated::RepeatExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll index c8a26c595cd9..384e83f31366 100644 --- a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll @@ -5,4 +5,17 @@ private import codeql.rust.generated.ReturnExpr +/** + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` + */ class ReturnExpr extends Generated::ReturnExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/TupleExpr.qll b/rust/ql/lib/codeql/rust/elements/TupleExpr.qll index b769d9532f65..0ef129aa7655 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.TupleExpr +/** + * A tuple expression. For example: + * ``` + * (1, "one"); + * (2, "two")[0] = 3; + * ``` + */ class TupleExpr extends Generated::TupleExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll index b0b3608b0c78..57350920fb16 100644 --- a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.UnaryOpExpr +/** + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + */ class UnaryOpExpr extends Generated::UnaryOpExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll b/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll index 420d50244077..4b5d09500d1a 100644 --- a/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnderscoreExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.UnderscoreExpr +/** + * An underscore expression. For example: + * ``` + * _ = 42; + * ``` + */ class UnderscoreExpr extends Generated::UnderscoreExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll b/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll index 514cfeb0c97e..513192521905 100644 --- a/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.UnsafeBlockExpr +/** + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` + */ class UnsafeBlockExpr extends Generated::UnsafeBlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll index 8cab74bd9535..6e891621e477 100644 --- a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.YeetExpr +/** + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ class YeetExpr extends Generated::YeetExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll index f9aed8f7e1c1..e92218e1a2fe 100644 --- a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.YieldExpr +/** + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ class YieldExpr extends Generated::YieldExpr { } diff --git a/rust/ql/lib/codeql/rust/generated/ArrayExpr.qll b/rust/ql/lib/codeql/rust/generated/ArrayExpr.qll index 50ec9dd97cad..ab9803e70595 100644 --- a/rust/ql/lib/codeql/rust/generated/ArrayExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ArrayExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An array expression. For example: + * ``` + * [1, 2, 3]; + * [1; 10]; + * ``` * INTERNAL: Do not reference the `Generated::ArrayExpr` class directly. * Use the subclass `ArrayExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll b/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll index 17b7d1b630d6..3d011e059ac9 100644 --- a/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.BlockExprBase */ module Generated { /** + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` * INTERNAL: Do not reference the `Generated::AsyncBlockExpr` class directly. * Use the subclass `AsyncBlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll b/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll index 4c982b7c249e..2e80995a7b9c 100644 --- a/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::AwaitExpr` class directly. * Use the subclass `AwaitExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll b/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll index 5af91bbd3ff3..d021d1046809 100644 --- a/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll @@ -14,6 +14,15 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` * INTERNAL: Do not reference the `Generated::BecomeExpr` class directly. * Use the subclass `BecomeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll index 3f790dfec9a9..eeef87aa292c 100644 --- a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll @@ -14,6 +14,14 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` * INTERNAL: Do not reference the `Generated::BinaryOpExpr` class directly. * Use the subclass `BinaryOpExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BlockExpr.qll b/rust/ql/lib/codeql/rust/generated/BlockExpr.qll index 52ca4526377d..d1fbf92c3ab4 100644 --- a/rust/ql/lib/codeql/rust/generated/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BlockExpr.qll @@ -15,6 +15,18 @@ import codeql.rust.elements.Label */ module Generated { /** + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::BlockExpr` class directly. * Use the subclass `BlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BoxExpr.qll b/rust/ql/lib/codeql/rust/generated/BoxExpr.qll index 4a367bc7b2f7..4a59828330c9 100644 --- a/rust/ql/lib/codeql/rust/generated/BoxExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BoxExpr.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` * INTERNAL: Do not reference the `Generated::BoxExpr` class directly. * Use the subclass `BoxExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BreakExpr.qll b/rust/ql/lib/codeql/rust/generated/BreakExpr.qll index 9e4d90b4973e..2fbd3280280d 100644 --- a/rust/ql/lib/codeql/rust/generated/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BreakExpr.qll @@ -15,6 +15,21 @@ import codeql.rust.elements.Label */ module Generated { /** + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::BreakExpr` class directly. * Use the subclass `BreakExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/CallExpr.qll b/rust/ql/lib/codeql/rust/generated/CallExpr.qll index 0ca5f2b604d5..6152049b6785 100644 --- a/rust/ql/lib/codeql/rust/generated/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CallExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` * INTERNAL: Do not reference the `Generated::CallExpr` class directly. * Use the subclass `CallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/CastExpr.qll b/rust/ql/lib/codeql/rust/generated/CastExpr.qll index f9b717f9114c..e546735ea711 100644 --- a/rust/ql/lib/codeql/rust/generated/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CastExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A cast expression. For example: + * ``` + * value as u64; + * ``` * INTERNAL: Do not reference the `Generated::CastExpr` class directly. * Use the subclass `CastExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll index 2c1b31af0264..822fbdcc6772 100644 --- a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll @@ -16,6 +16,16 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A closure expression. For example: + * ``` + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` * INTERNAL: Do not reference the `Generated::ClosureExpr` class directly. * Use the subclass `ClosureExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ConstExpr.qll b/rust/ql/lib/codeql/rust/generated/ConstExpr.qll index 1c11dba419c1..d237ec3d9d59 100644 --- a/rust/ql/lib/codeql/rust/generated/ConstExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ConstExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` * INTERNAL: Do not reference the `Generated::ConstExpr` class directly. * Use the subclass `ConstExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll b/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll index b03aed387ae9..d11925dfb3a1 100644 --- a/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll @@ -15,6 +15,21 @@ import codeql.rust.elements.Label */ module Generated { /** + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` * INTERNAL: Do not reference the `Generated::ContinueExpr` class directly. * Use the subclass `ContinueExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ElementListExpr.qll b/rust/ql/lib/codeql/rust/generated/ElementListExpr.qll index ae6ac160ef09..8fcd4c626224 100644 --- a/rust/ql/lib/codeql/rust/generated/ElementListExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ElementListExpr.qll @@ -15,6 +15,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An element list expression. For example: + * ``` + * [1, 2, 3, 4, 5]; + * [1, 2, 3, 4, 5][0] = 6; + * ``` * INTERNAL: Do not reference the `Generated::ElementListExpr` class directly. * Use the subclass `ElementListExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ExprStmt.qll b/rust/ql/lib/codeql/rust/generated/ExprStmt.qll index 08d3dfc5a863..4f6bc664240b 100644 --- a/rust/ql/lib/codeql/rust/generated/ExprStmt.qll +++ b/rust/ql/lib/codeql/rust/generated/ExprStmt.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.Stmt */ module Generated { /** + * An expression statement. For example: + * ``` + * start(); + * finish() + * use std::env; + * ``` * INTERNAL: Do not reference the `Generated::ExprStmt` class directly. * Use the subclass `ExprStmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/FieldExpr.qll b/rust/ql/lib/codeql/rust/generated/FieldExpr.qll index 82688dbf44b4..fc282ca4a493 100644 --- a/rust/ql/lib/codeql/rust/generated/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/FieldExpr.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A field access expression. For example: + * ``` + * x.foo + * ``` * INTERNAL: Do not reference the `Generated::FieldExpr` class directly. * Use the subclass `FieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/IfExpr.qll b/rust/ql/lib/codeql/rust/generated/IfExpr.qll index 4b90ac9b50ac..728ad847fb06 100644 --- a/rust/ql/lib/codeql/rust/generated/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/IfExpr.qll @@ -14,6 +14,19 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` * INTERNAL: Do not reference the `Generated::IfExpr` class directly. * Use the subclass `IfExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/IndexExpr.qll b/rust/ql/lib/codeql/rust/generated/IndexExpr.qll index fd6021f30145..a9a762be1bd0 100644 --- a/rust/ql/lib/codeql/rust/generated/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/IndexExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` * INTERNAL: Do not reference the `Generated::IndexExpr` class directly. * Use the subclass `IndexExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll b/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll index 4478cfee53b5..254c735d942d 100644 --- a/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An inline assembly expression. For example: + * ``` + * unsafe { + * builtin # asm(_); + * } + * ``` * INTERNAL: Do not reference the `Generated::InlineAsmExpr` class directly. * Use the subclass `InlineAsmExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ItemStmt.qll b/rust/ql/lib/codeql/rust/generated/ItemStmt.qll index 2be48967c7cb..d33d0aeeafeb 100644 --- a/rust/ql/lib/codeql/rust/generated/ItemStmt.qll +++ b/rust/ql/lib/codeql/rust/generated/ItemStmt.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Stmt */ module Generated { /** + * An item statement. For example: + * ``` + * fn print_hello() { + * println!("Hello, world!"); + * } + * print_hello(); + * ``` * INTERNAL: Do not reference the `Generated::ItemStmt` class directly. * Use the subclass `ItemStmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LetExpr.qll b/rust/ql/lib/codeql/rust/generated/LetExpr.qll index a4dccae48760..3608012f30e0 100644 --- a/rust/ql/lib/codeql/rust/generated/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/LetExpr.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` * INTERNAL: Do not reference the `Generated::LetExpr` class directly. * Use the subclass `LetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LetStmt.qll b/rust/ql/lib/codeql/rust/generated/LetStmt.qll index 8f52f441dfc7..47898811660c 100644 --- a/rust/ql/lib/codeql/rust/generated/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/generated/LetStmt.qll @@ -17,6 +17,16 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A let statement. For example: + * ``` + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; * INTERNAL: Do not reference the `Generated::LetStmt` class directly. * Use the subclass `LetStmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll b/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll index c54501545923..7c9ee19e3217 100644 --- a/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll @@ -14,6 +14,16 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A literal expression. For example: + * ``` + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; * INTERNAL: Do not reference the `Generated::LiteralExpr` class directly. * Use the subclass `LiteralExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LoopExpr.qll b/rust/ql/lib/codeql/rust/generated/LoopExpr.qll index c4479efdb1af..0f2d6ef94f73 100644 --- a/rust/ql/lib/codeql/rust/generated/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/LoopExpr.qll @@ -15,6 +15,28 @@ import codeql.rust.elements.Label */ module Generated { /** + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::LoopExpr` class directly. * Use the subclass `LoopExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MatchArm.qll b/rust/ql/lib/codeql/rust/generated/MatchArm.qll index cec99d17c321..d57bec537fa2 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchArm.qll @@ -16,6 +16,19 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::MatchArm` class directly. * Use the subclass `MatchArm`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll index 87569d02ba02..2163751f20a6 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll @@ -15,6 +15,18 @@ import codeql.rust.elements.MatchArm */ module Generated { /** + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::MatchExpr` class directly. * Use the subclass `MatchExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll index 18eacc9dc202..fb3c2e5d21b3 100644 --- a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); * INTERNAL: Do not reference the `Generated::MethodCallExpr` class directly. * Use the subclass `MethodCallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll index 250c639fbeb8..2b2641f52db3 100644 --- a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` * INTERNAL: Do not reference the `Generated::MissingExpr` class directly. * Use the subclass `MissingExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll index c481a52cff4a..109a63775e66 100644 --- a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * An `offset_of` expression. For example: + * ``` + * builtin # offset_of(Struct, field); + * ``` * INTERNAL: Do not reference the `Generated::OffsetOfExpr` class directly. * Use the subclass `OffsetOfExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/PathExpr.qll b/rust/ql/lib/codeql/rust/generated/PathExpr.qll index 7a164820a73d..08130ecd5c8d 100644 --- a/rust/ql/lib/codeql/rust/generated/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/PathExpr.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` * INTERNAL: Do not reference the `Generated::PathExpr` class directly. * Use the subclass `PathExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RangeExpr.qll b/rust/ql/lib/codeql/rust/generated/RangeExpr.qll index d1d783e22880..5b038040f94e 100644 --- a/rust/ql/lib/codeql/rust/generated/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RangeExpr.qll @@ -14,6 +14,15 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` * INTERNAL: Do not reference the `Generated::RangeExpr` class directly. * Use the subclass `RangeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index 28531dfe4a0b..b216c9919257 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -103,6 +103,19 @@ module Raw { /** * INTERNAL: Do not use. + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` */ class MatchArm extends @match_arm, AstNode { override string toString() { result = "MatchArm" } @@ -147,6 +160,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` */ class RecordLitField extends @record_lit_field, AstNode { override string toString() { result = "RecordLitField" } @@ -183,11 +200,23 @@ module Raw { /** * INTERNAL: Do not use. + * An array expression. For example: + * ``` + * [1, 2, 3]; + * [1; 10]; + * ``` */ class ArrayExpr extends @array_expr, Expr { } /** * INTERNAL: Do not use. + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` */ class AwaitExpr extends @await_expr, Expr { override string toString() { result = "AwaitExpr" } @@ -200,6 +229,15 @@ module Raw { /** * INTERNAL: Do not use. + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` */ class BecomeExpr extends @become_expr, Expr { override string toString() { result = "BecomeExpr" } @@ -212,6 +250,14 @@ module Raw { /** * INTERNAL: Do not use. + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` */ class BinaryOpExpr extends @binary_op_expr, Expr { override string toString() { result = "BinaryOpExpr" } @@ -266,6 +312,10 @@ module Raw { /** * INTERNAL: Do not use. + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` */ class BoxExpr extends @box_expr, Expr { override string toString() { result = "BoxExpr" } @@ -290,6 +340,21 @@ module Raw { /** * INTERNAL: Do not use. + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` */ class BreakExpr extends @break_expr, Expr { override string toString() { result = "BreakExpr" } @@ -307,6 +372,13 @@ module Raw { /** * INTERNAL: Do not use. + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` */ class CallExpr extends @call_expr, Expr { override string toString() { result = "CallExpr" } @@ -329,6 +401,10 @@ module Raw { /** * INTERNAL: Do not use. + * A cast expression. For example: + * ``` + * value as u64; + * ``` */ class CastExpr extends @cast_expr, Expr { override string toString() { result = "CastExpr" } @@ -346,6 +422,16 @@ module Raw { /** * INTERNAL: Do not use. + * A closure expression. For example: + * ``` + * |x| x + 1; + * move |x: i32| -> i32 { x + 1 }; + * async |x: i32, y| x + y; + * #[coroutine] + * |x| yield x; + * #[coroutine] + * static |x| yield x; + * ``` */ class ClosureExpr extends @closure_expr, Expr { override string toString() { result = "ClosureExpr" } @@ -395,6 +481,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` */ class ConstExpr extends @const_expr, Expr { override string toString() { result = "ConstExpr" } @@ -407,6 +499,21 @@ module Raw { /** * INTERNAL: Do not use. + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` */ class ContinueExpr extends @continue_expr, Expr { override string toString() { result = "ContinueExpr" } @@ -419,6 +526,12 @@ module Raw { /** * INTERNAL: Do not use. + * An expression statement. For example: + * ``` + * start(); + * finish() + * use std::env; + * ``` */ class ExprStmt extends @expr_stmt, Stmt { override string toString() { result = "ExprStmt" } @@ -436,6 +549,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field access expression. For example: + * ``` + * x.foo + * ``` */ class FieldExpr extends @field_expr, Expr { override string toString() { result = "FieldExpr" } @@ -480,6 +597,19 @@ module Raw { /** * INTERNAL: Do not use. + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` */ class IfExpr extends @if_expr, Expr { override string toString() { result = "IfExpr" } @@ -502,6 +632,11 @@ module Raw { /** * INTERNAL: Do not use. + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` */ class IndexExpr extends @index_expr, Expr { override string toString() { result = "IndexExpr" } @@ -524,6 +659,12 @@ module Raw { /** * INTERNAL: Do not use. + * An inline assembly expression. For example: + * ``` + * unsafe { + * builtin # asm(_); + * } + * ``` */ class InlineAsmExpr extends @inline_asm_expr, Expr { override string toString() { result = "InlineAsmExpr" } @@ -536,6 +677,13 @@ module Raw { /** * INTERNAL: Do not use. + * An item statement. For example: + * ``` + * fn print_hello() { + * println!("Hello, world!"); + * } + * print_hello(); + * ``` */ class ItemStmt extends @item_stmt, Stmt { override string toString() { result = "ItemStmt" } @@ -543,6 +691,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` */ class LetExpr extends @let_expr, Expr { override string toString() { result = "LetExpr" } @@ -560,6 +714,16 @@ module Raw { /** * INTERNAL: Do not use. + * A let statement. For example: + * ``` + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; */ class LetStmt extends @let_stmt, Stmt { override string toString() { result = "LetStmt" } @@ -599,6 +763,16 @@ module Raw { /** * INTERNAL: Do not use. + * A literal expression. For example: + * ``` + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; */ class LiteralExpr extends @literal_expr, Expr { override string toString() { result = "LiteralExpr" } @@ -606,6 +780,28 @@ module Raw { /** * INTERNAL: Do not use. + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` */ class LoopExpr extends @loop_expr, Expr { override string toString() { result = "LoopExpr" } @@ -623,6 +819,18 @@ module Raw { /** * INTERNAL: Do not use. + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` */ class MatchExpr extends @match_expr, Expr { override string toString() { result = "MatchExpr" } @@ -640,6 +848,10 @@ module Raw { /** * INTERNAL: Do not use. + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); */ class MethodCallExpr extends @method_call_expr, Expr { override string toString() { result = "MethodCallExpr" } @@ -667,6 +879,11 @@ module Raw { /** * INTERNAL: Do not use. + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` */ class MissingExpr extends @missing_expr, Expr { override string toString() { result = "MissingExpr" } @@ -693,6 +910,10 @@ module Raw { /** * INTERNAL: Do not use. + * An `offset_of` expression. For example: + * ``` + * builtin # offset_of(Struct, field); + * ``` */ class OffsetOfExpr extends @offset_of_expr, Expr { override string toString() { result = "OffsetOfExpr" } @@ -722,6 +943,13 @@ module Raw { /** * INTERNAL: Do not use. + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` */ class PathExpr extends @path_expr, Expr { override string toString() { result = "PathExpr" } @@ -746,6 +974,15 @@ module Raw { /** * INTERNAL: Do not use. + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` */ class RangeExpr extends @range_expr, Expr { override string toString() { result = "RangeExpr" } @@ -785,6 +1022,13 @@ module Raw { /** * INTERNAL: Do not use. + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` */ class RecordLitExpr extends @record_lit_expr, Expr { override string toString() { result = "RecordLitExpr" } @@ -839,6 +1083,13 @@ module Raw { /** * INTERNAL: Do not use. + * A reference expression. For example: + * ``` + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` */ class RefExpr extends @ref_expr, Expr { override string toString() { result = "RefExpr" } @@ -878,6 +1129,17 @@ module Raw { /** * INTERNAL: Do not use. + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` */ class ReturnExpr extends @return_expr, Expr { override string toString() { result = "ReturnExpr" } @@ -912,6 +1174,11 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple expression. For example: + * ``` + * (1, "one"); + * (2, "two")[0] = 3; + * ``` */ class TupleExpr extends @tuple_expr, Expr { override string toString() { result = "TupleExpr" } @@ -968,6 +1235,12 @@ module Raw { /** * INTERNAL: Do not use. + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` */ class UnaryOpExpr extends @unary_op_expr, Expr { override string toString() { result = "UnaryOpExpr" } @@ -985,6 +1258,10 @@ module Raw { /** * INTERNAL: Do not use. + * An underscore expression. For example: + * ``` + * _ = 42; + * ``` */ class UnderscoreExpr extends @underscore_expr, Expr { override string toString() { result = "UnderscoreExpr" } @@ -999,6 +1276,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` */ class YeetExpr extends @yeet_expr, Expr { override string toString() { result = "YeetExpr" } @@ -1011,6 +1294,13 @@ module Raw { /** * INTERNAL: Do not use. + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` */ class YieldExpr extends @yield_expr, Expr { override string toString() { result = "YieldExpr" } @@ -1023,6 +1313,13 @@ module Raw { /** * INTERNAL: Do not use. + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` */ class AsyncBlockExpr extends @async_block_expr, BlockExprBase { override string toString() { result = "AsyncBlockExpr" } @@ -1030,6 +1327,18 @@ module Raw { /** * INTERNAL: Do not use. + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` */ class BlockExpr extends @block_expr, BlockExprBase { override string toString() { result = "BlockExpr" } @@ -1042,6 +1351,11 @@ module Raw { /** * INTERNAL: Do not use. + * An element list expression. For example: + * ``` + * [1, 2, 3, 4, 5]; + * [1, 2, 3, 4, 5][0] = 6; + * ``` */ class ElementListExpr extends @element_list_expr, ArrayExpr { override string toString() { result = "ElementListExpr" } @@ -1059,6 +1373,9 @@ module Raw { /** * INTERNAL: Do not use. + * A repeat expression. For example: + * ``` + * [1; 10]; */ class RepeatExpr extends @repeat_expr, ArrayExpr { override string toString() { result = "RepeatExpr" } @@ -1076,6 +1393,13 @@ module Raw { /** * INTERNAL: Do not use. + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` */ class UnsafeBlockExpr extends @unsafe_block_expr, BlockExprBase { override string toString() { result = "UnsafeBlockExpr" } diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll index 71318e79a6f3..373dd1808953 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` * INTERNAL: Do not reference the `Generated::RecordLitExpr` class directly. * Use the subclass `RecordLitExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll b/rust/ql/lib/codeql/rust/generated/RecordLitField.qll index 55a488e2ff6d..af1188ba8d1e 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordLitField.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` * INTERNAL: Do not reference the `Generated::RecordLitField` class directly. * Use the subclass `RecordLitField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RefExpr.qll b/rust/ql/lib/codeql/rust/generated/RefExpr.qll index 6fce583db98e..43886e0ad410 100644 --- a/rust/ql/lib/codeql/rust/generated/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RefExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A reference expression. For example: + * ``` + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` * INTERNAL: Do not reference the `Generated::RefExpr` class directly. * Use the subclass `RefExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RepeatExpr.qll b/rust/ql/lib/codeql/rust/generated/RepeatExpr.qll index 17df2bb4db1a..fab7491ceeda 100644 --- a/rust/ql/lib/codeql/rust/generated/RepeatExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RepeatExpr.qll @@ -15,6 +15,9 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A repeat expression. For example: + * ``` + * [1; 10]; * INTERNAL: Do not reference the `Generated::RepeatExpr` class directly. * Use the subclass `RepeatExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll b/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll index 1d9ee4be7ac6..9bb35923999d 100644 --- a/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll @@ -14,6 +14,17 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` * INTERNAL: Do not reference the `Generated::ReturnExpr` class directly. * Use the subclass `ReturnExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/TupleExpr.qll b/rust/ql/lib/codeql/rust/generated/TupleExpr.qll index 730550be4569..7bab8f23450d 100644 --- a/rust/ql/lib/codeql/rust/generated/TupleExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/TupleExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A tuple expression. For example: + * ``` + * (1, "one"); + * (2, "two")[0] = 3; + * ``` * INTERNAL: Do not reference the `Generated::TupleExpr` class directly. * Use the subclass `TupleExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll index 283b8f8eae1f..1849af2d4112 100644 --- a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` * INTERNAL: Do not reference the `Generated::UnaryOpExpr` class directly. * Use the subclass `UnaryOpExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnderscoreExpr.qll b/rust/ql/lib/codeql/rust/generated/UnderscoreExpr.qll index 5ba5bd771557..d4f352318025 100644 --- a/rust/ql/lib/codeql/rust/generated/UnderscoreExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/UnderscoreExpr.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An underscore expression. For example: + * ``` + * _ = 42; + * ``` * INTERNAL: Do not reference the `Generated::UnderscoreExpr` class directly. * Use the subclass `UnderscoreExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll b/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll index e53ce046fa66..0cdfee165cad 100644 --- a/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.BlockExprBase */ module Generated { /** + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` * INTERNAL: Do not reference the `Generated::UnsafeBlockExpr` class directly. * Use the subclass `UnsafeBlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/YeetExpr.qll b/rust/ql/lib/codeql/rust/generated/YeetExpr.qll index 3599779650d2..483af5adcb3b 100644 --- a/rust/ql/lib/codeql/rust/generated/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/YeetExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` * INTERNAL: Do not reference the `Generated::YeetExpr` class directly. * Use the subclass `YeetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/YieldExpr.qll b/rust/ql/lib/codeql/rust/generated/YieldExpr.qll index 6abe7de7fba6..9e5023bc55fd 100644 --- a/rust/ql/lib/codeql/rust/generated/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/YieldExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` * INTERNAL: Do not reference the `Generated::YieldExpr` class directly. * Use the subclass `YieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index aca5873c8207..4bf6637d9043 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -1 +1,41 @@ +AsyncBlockExpr/gen_async_block_expr.rs 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 +AwaitExpr/gen_await_expr.rs 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b +BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c +BinaryOpExpr/gen_binary_op_expr.rs a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 +BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 +BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 +BreakExpr/gen_break_expr.rs 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 +CallExpr/gen_call_expr.rs 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 +CastExpr/gen_cast_expr.rs 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 +ClosureExpr/gen_closure_expr.rs de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 +ConstExpr/gen_const_expr.rs 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b +ContinueExpr/gen_continue_expr.rs cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 +ElementListExpr/gen_element_list_expr.rs 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 +ExprStmt/gen_expr_stmt.rs eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 +FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 Function/gen_function.rs 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 +IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b +IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 +InlineAsmExpr/gen_inline_asm_expr.rs b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a +LetExpr/gen_let_expr.rs 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d +LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb +LiteralExpr/gen_literal_expr.rs 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a +LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 +MatchArm/gen_match_arm.rs 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 +MatchExpr/gen_match_expr.rs 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 +MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 +MissingExpr/gen_missing_expr.rs 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 +OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 +PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d +RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 +RecordLitExpr/gen_record_lit_expr.rs da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a +RecordLitField/gen_record_lit_field.rs 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a +RefExpr/gen_ref_expr.rs b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 +RepeatExpr/gen_repeat_expr.rs 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 +ReturnExpr/gen_return_expr.rs ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 +TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 +UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 +UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a +UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 +YeetExpr/gen_yeet_expr.rs 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 +YieldExpr/gen_yield_expr.rs 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 2ca6c1370538..3ab977bedf36 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -1,3 +1,43 @@ /.generated_tests.list linguist-generated /.gitattributes linguist-generated +/AsyncBlockExpr/gen_async_block_expr.rs linguist-generated +/AwaitExpr/gen_await_expr.rs linguist-generated +/BecomeExpr/gen_become_expr.rs linguist-generated +/BinaryOpExpr/gen_binary_op_expr.rs linguist-generated +/BlockExpr/gen_block_expr.rs linguist-generated +/BoxExpr/gen_box_expr.rs linguist-generated +/BreakExpr/gen_break_expr.rs linguist-generated +/CallExpr/gen_call_expr.rs linguist-generated +/CastExpr/gen_cast_expr.rs linguist-generated +/ClosureExpr/gen_closure_expr.rs linguist-generated +/ConstExpr/gen_const_expr.rs linguist-generated +/ContinueExpr/gen_continue_expr.rs linguist-generated +/ElementListExpr/gen_element_list_expr.rs linguist-generated +/ExprStmt/gen_expr_stmt.rs linguist-generated +/FieldExpr/gen_field_expr.rs linguist-generated /Function/gen_function.rs linguist-generated +/IfExpr/gen_if_expr.rs linguist-generated +/IndexExpr/gen_index_expr.rs linguist-generated +/InlineAsmExpr/gen_inline_asm_expr.rs linguist-generated +/LetExpr/gen_let_expr.rs linguist-generated +/LetStmt/gen_let_stmt.rs linguist-generated +/LiteralExpr/gen_literal_expr.rs linguist-generated +/LoopExpr/gen_loop_expr.rs linguist-generated +/MatchArm/gen_match_arm.rs linguist-generated +/MatchExpr/gen_match_expr.rs linguist-generated +/MethodCallExpr/gen_method_call_expr.rs linguist-generated +/MissingExpr/gen_missing_expr.rs linguist-generated +/OffsetOfExpr/gen_offset_of_expr.rs linguist-generated +/PathExpr/gen_path_expr.rs linguist-generated +/RangeExpr/gen_range_expr.rs linguist-generated +/RecordLitExpr/gen_record_lit_expr.rs linguist-generated +/RecordLitField/gen_record_lit_field.rs linguist-generated +/RefExpr/gen_ref_expr.rs linguist-generated +/RepeatExpr/gen_repeat_expr.rs linguist-generated +/ReturnExpr/gen_return_expr.rs linguist-generated +/TupleExpr/gen_tuple_expr.rs linguist-generated +/UnaryOpExpr/gen_unary_op_expr.rs linguist-generated +/UnderscoreExpr/gen_underscore_expr.rs linguist-generated +/UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated +/YeetExpr/gen_yeet_expr.rs linguist-generated +/YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected new file mode 100644 index 000000000000..1cd82381fb4f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql new file mode 100644 index 000000000000..132be12a64f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x, int getNumberOfStatements, string hasTail +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + if x.hasTail() then hasTail = "yes" else hasTail = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected new file mode 100644 index 000000000000..d9c3f9a68979 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | 0 | gen_async_block_expr.rs:6:12:6:12 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql new file mode 100644 index 000000000000..84e5c344a6f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected new file mode 100644 index 000000000000..66ead87e3122 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | gen_async_block_expr.rs:7:8:7:8 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql new file mode 100644 index 000000000000..574c7fa72034 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs new file mode 100644 index 000000000000..fec15de4176e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_async_block_expr() -> i32 { + // An async block expression. For example: + async { + let x = 42; + x + }.await +} diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected new file mode 100644 index 000000000000..df585132030c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected @@ -0,0 +1 @@ +| gen_await_expr.rs:6:17:6:27 | AwaitExpr | getExpr: | gen_await_expr.rs:6:17:6:21 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql new file mode 100644 index 000000000000..30400ffc9bc0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AwaitExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs new file mode 100644 index 000000000000..7534fbc19a5d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_await_expr() -> () { + // An `await` expression. For example: + async { + let x = foo().await; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected new file mode 100644 index 000000000000..f067a46ca8d7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected @@ -0,0 +1 @@ +| gen_become_expr.rs:8:10:8:36 | BecomeExpr | getExpr: | gen_become_expr.rs:8:17:8:36 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql new file mode 100644 index 000000000000..25eb0809f2cf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BecomeExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs new file mode 100644 index 000000000000..dd35255f4788 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen + +// A `become` expression. For example: +fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } + } ``` diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected new file mode 100644 index 000000000000..1b6b562af537 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected @@ -0,0 +1,5 @@ +| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql new file mode 100644 index 000000000000..e74d8022c0af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BinaryOpExpr x, Expr getLhs, Expr getRhs, string hasOp +where + toBeTested(x) and + not x.isUnknown() and + getLhs = x.getLhs() and + getRhs = x.getRhs() and + if x.hasOp() then hasOp = "yes" else hasOp = "no" +select x, "getLhs:", getLhs, "getRhs:", getRhs, "hasOp:", hasOp diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected new file mode 100644 index 000000000000..8b155e5641a7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected @@ -0,0 +1,5 @@ +| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | + | +| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | && | +| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | <= | +| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | = | +| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql new file mode 100644 index 000000000000..834e678ec82d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BinaryOpExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getOp() diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs new file mode 100644 index 000000000000..8612377ff217 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen + +fn test_binary_op_expr() -> () { + // A binary operation expression. For example: + x + y; + x && y; + x <= y; + x = y; + x += y; +} diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected new file mode 100644 index 000000000000..348f98b730ba --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | hasLabel: | no | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | no | hasLabel: | no | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql new file mode 100644 index 000000000000..d0c3e4e3e6db --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int getNumberOfStatements, string hasTail, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + (if x.hasTail() then hasTail = "yes" else hasTail = "no") and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail, "hasLabel:", + hasLabel diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected new file mode 100644 index 000000000000..3a935228e051 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql new file mode 100644 index 000000000000..dcc97bc9a485 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected new file mode 100644 index 000000000000..66dc93e503df --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | 0 | gen_block_expr.rs:5:5:7:5 | ExprStmt | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | 0 | gen_block_expr.rs:6:13:6:13 | LetStmt | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | 0 | gen_block_expr.rs:9:13:9:13 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql new file mode 100644 index 000000000000..22c05e398d0a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected new file mode 100644 index 000000000000..2a3d8031821c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected @@ -0,0 +1,2 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | gen_block_expr.rs:8:5:11:5 | BlockExpr | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:10:9:10:9 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql new file mode 100644 index 000000000000..f86117be4b9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs new file mode 100644 index 000000000000..9ccff26f1aae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs @@ -0,0 +1,12 @@ +// generated by codegen + +fn test_block_expr() -> () { + // A block expression. For example: + { + let x = 42; + } + 'label: { + let x = 42; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected new file mode 100644 index 000000000000..b3324e400f5d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected @@ -0,0 +1 @@ +| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql new file mode 100644 index 000000000000..e24ec8ce6031 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BoxExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs b/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs new file mode 100644 index 000000000000..9ea4053ecf4b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_box_expr() -> () { + // A box expression. For example: + let x = #[rustc_box] Box::new(42); +} diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected new file mode 100644 index 000000000000..c7b451c235fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected @@ -0,0 +1,2 @@ +| gen_break_expr.rs:7:13:7:17 | BreakExpr | hasExpr: | no | hasLabel: | no | +| gen_break_expr.rs:12:13:12:27 | BreakExpr | hasExpr: | yes | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql new file mode 100644 index 000000000000..10d6cec5b611 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x, string hasExpr, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "hasExpr:", hasExpr, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected new file mode 100644 index 000000000000..16dfc8124590 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql new file mode 100644 index 000000000000..f83545cb7ce5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected new file mode 100644 index 000000000000..e8918129a36e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:10:13:10:19 | Label | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql new file mode 100644 index 000000000000..6211ec52591a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs new file mode 100644 index 000000000000..4d2ec0573e32 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen + +fn test_break_expr() -> () { + // A break expression. For example: + loop { + if not_ready() { + break; + } + } + let x = 'label: loop { + if done() { + break 'label 42; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected new file mode 100644 index 000000000000..111ff8392d21 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | getCallee: | gen_call_expr.rs:5:5:5:7 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:6:5:6:23 | CallExpr | getCallee: | gen_call_expr.rs:6:5:6:19 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:7:5:7:14 | CallExpr | getCallee: | gen_call_expr.rs:7:5:7:10 | IndexExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:8:5:8:10 | CallExpr | getCallee: | gen_call_expr.rs:8:5:8:7 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql new file mode 100644 index 000000000000..2d2c45c75b06 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CallExpr x, Expr getCallee, int getNumberOfArgs, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getCallee = x.getCallee() and + getNumberOfArgs = x.getNumberOfArgs() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getCallee:", getCallee, "getNumberOfArgs:", getNumberOfArgs, "isAssigneeExpr:", + isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected new file mode 100644 index 000000000000..6ff1a242993c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | LiteralExpr | +| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | LiteralExpr | +| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | LiteralExpr | +| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql new file mode 100644 index 000000000000..8f7ead93761e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs new file mode 100644 index 000000000000..4d6c737e95cb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_call_expr() -> () { + // A function call expression. For example: + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; +} diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected new file mode 100644 index 000000000000..13f055c32ad6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getTypeRef: | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql new file mode 100644 index 000000000000..463f70948038 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CastExpr x, Expr getExpr, TypeRef getTypeRef +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getTypeRef = x.getTypeRef() +select x, "getExpr:", getExpr, "getTypeRef:", getTypeRef diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs new file mode 100644 index 000000000000..11230130d065 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_cast_expr() -> () { + // A cast expression. For example: + value as u64; +} diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected new file mode 100644 index 000000000000..78723fcf14bb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -0,0 +1,5 @@ +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:5:9:5:13 | BinaryOpExpr | getClosureKind: | Closure | isMove: | no | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | yes | getBody: | gen_closure_expr.rs:6:26:6:34 | BlockExpr | getClosureKind: | Closure | isMove: | yes | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfArgs: | 2 | hasRetType: | no | getBody: | gen_closure_expr.rs:7:23:7:27 | BinaryOpExpr | getClosureKind: | Async | isMove: | no | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:9:9:9:15 | YieldExpr | getClosureKind: | Coroutine(Movable) | isMove: | no | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:11:17:11:23 | YieldExpr | getClosureKind: | Coroutine(Static) | isMove: | no | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql new file mode 100644 index 000000000000..b56eda1978ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from + ClosureExpr x, int getNumberOfArgs, string hasRetType, Expr getBody, string getClosureKind, + string isMove +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArgs = x.getNumberOfArgs() and + (if x.hasRetType() then hasRetType = "yes" else hasRetType = "no") and + getBody = x.getBody() and + getClosureKind = x.getClosureKind() and + if x.isMove() then isMove = "yes" else isMove = "no" +select x, "getNumberOfArgs:", getNumberOfArgs, "hasRetType:", hasRetType, "getBody:", getBody, + "getClosureKind:", getClosureKind, "isMove:", isMove diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected new file mode 100644 index 000000000000..22ad041237d0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected @@ -0,0 +1,6 @@ +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | 0 | gen_closure_expr.rs:5:6:5:6 | BindPat | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | gen_closure_expr.rs:6:11:6:11 | BindPat | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | gen_closure_expr.rs:7:12:7:12 | BindPat | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 1 | gen_closure_expr.rs:7:20:7:20 | BindPat | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | 0 | gen_closure_expr.rs:9:6:9:6 | BindPat | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | 0 | gen_closure_expr.rs:11:14:11:14 | BindPat | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql new file mode 100644 index 000000000000..eca1b3a1f3da --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ClosureExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected new file mode 100644 index 000000000000..dd1f87a74c10 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected @@ -0,0 +1,2 @@ +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql new file mode 100644 index 000000000000..c2fd9a3022bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ClosureExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArgType(index) diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected new file mode 100644 index 000000000000..6decd91ca765 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected @@ -0,0 +1 @@ +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql new file mode 100644 index 000000000000..b428052d169e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRetType() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs b/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs new file mode 100644 index 000000000000..41e67e6bd87c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/gen_closure_expr.rs @@ -0,0 +1,12 @@ +// generated by codegen + +fn test_closure_expr() -> () { + // A closure expression. For example: + |x| x + 1; + move |x: i32| -> i32 { x + 1 }; + async |x: i32, y| x + y; + #[coroutine] + |x| yield x; + #[coroutine] + static |x| yield x; +} diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected new file mode 100644 index 000000000000..b36d974f7734 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected @@ -0,0 +1 @@ +| gen_const_expr.rs:5:8:5:97 | ConstExpr | getExpr: | gen_const_expr.rs:5:8:5:97 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql new file mode 100644 index 000000000000..700a5c704022 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ConstExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs b/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs new file mode 100644 index 000000000000..c9e3e3550906 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_const_expr() -> bool { + // A `const` block expression. For example: + if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + return false; + } +} diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected new file mode 100644 index 000000000000..5bc5e5fc6667 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected @@ -0,0 +1,2 @@ +| gen_continue_expr.rs:7:13:7:20 | ContinueExpr | hasLabel: | no | +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql new file mode 100644 index 000000000000..399b8783da20 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ContinueExpr x, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected new file mode 100644 index 000000000000..8688627b27ee --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | gen_continue_expr.rs:10:5:10:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql new file mode 100644 index 000000000000..b9944aa07303 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ContinueExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs new file mode 100644 index 000000000000..e818d65270b3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen + +fn test_continue_expr() -> () { + // A continue expression. For example: + loop { + if not_ready() { + continue; + } + } + 'label: loop { + if not_ready() { + continue 'label; + } + } +} diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.expected b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.expected new file mode 100644 index 000000000000..8d6bdea67755 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.expected @@ -0,0 +1,2 @@ +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | getNumberOfElements: | 5 | isAssigneeExpr: | no | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | getNumberOfElements: | 5 | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql new file mode 100644 index 000000000000..9d8254f5ca51 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ElementListExpr x, int getNumberOfElements, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfElements = x.getNumberOfElements() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getNumberOfElements:", getNumberOfElements, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected new file mode 100644 index 000000000000..8bed9878b6e9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected @@ -0,0 +1,10 @@ +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 0 | gen_element_list_expr.rs:5:6:5:6 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 1 | gen_element_list_expr.rs:5:9:5:9 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 2 | gen_element_list_expr.rs:5:12:5:12 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 3 | gen_element_list_expr.rs:5:15:5:15 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 4 | gen_element_list_expr.rs:5:18:5:18 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 0 | gen_element_list_expr.rs:6:6:6:6 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 1 | gen_element_list_expr.rs:6:9:6:9 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 2 | gen_element_list_expr.rs:6:12:6:12 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 3 | gen_element_list_expr.rs:6:15:6:15 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 4 | gen_element_list_expr.rs:6:18:6:18 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql new file mode 100644 index 000000000000..7d38ce31602b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ElementListExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getElement(index) diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/gen_element_list_expr.rs b/rust/ql/test/extractor-tests/generated/ElementListExpr/gen_element_list_expr.rs new file mode 100644 index 000000000000..7a8400b446ce --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/gen_element_list_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_element_list_expr() -> () { + // An element list expression. For example: + [1, 2, 3, 4, 5]; + [1, 2, 3, 4, 5][0] = 6; +} diff --git a/rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected new file mode 100644 index 000000000000..38497d3afabf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.expected @@ -0,0 +1,2 @@ +| gen_expr_stmt.rs:5:5:5:11 | ExprStmt | getExpr: | gen_expr_stmt.rs:5:5:5:11 | CallExpr | hasSemicolon: | yes | +| gen_expr_stmt.rs:6:5:6:12 | ExprStmt | getExpr: | gen_expr_stmt.rs:6:5:6:12 | CallExpr | hasSemicolon: | no | diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql new file mode 100644 index 000000000000..ff299ff6e5ab --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/ExprStmt.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ExprStmt x, Expr getExpr, string hasSemicolon +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + if x.hasSemicolon() then hasSemicolon = "yes" else hasSemicolon = "no" +select x, "getExpr:", getExpr, "hasSemicolon:", hasSemicolon diff --git a/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs b/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs new file mode 100644 index 000000000000..fefe06876995 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ExprStmt/gen_expr_stmt.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_expr_stmt() -> () { + // An expression statement. For example: + start(); + finish() + use std::env; +} diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected new file mode 100644 index 000000000000..0ac28f7f13f8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | FieldExpr | getExpr: | gen_field_expr.rs:5:5:5:5 | PathExpr | getName: | foo | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql new file mode 100644 index 000000000000..5cc4bc15dafd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from FieldExpr x, Expr getExpr, string getName +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getName = x.getName() +select x, "getExpr:", getExpr, "getName:", getName diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs new file mode 100644 index 000000000000..d5f02eb26512 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_field_expr() -> () { + // A field access expression. For example: + x.foo +} diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected new file mode 100644 index 000000000000..fc99c3eae67c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinaryOpExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | +| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinaryOpExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql new file mode 100644 index 000000000000..a684dcd54341 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IfExpr x, Expr getCondition, Expr getThen, string hasElse +where + toBeTested(x) and + not x.isUnknown() and + getCondition = x.getCondition() and + getThen = x.getThen() and + if x.hasElse() then hasElse = "yes" else hasElse = "no" +select x, "getCondition:", getCondition, "getThen:", getThen, "hasElse:", hasElse diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected new file mode 100644 index 000000000000..a857dbe2099a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected @@ -0,0 +1 @@ +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:10:12:12:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql new file mode 100644 index 000000000000..8e6209a248c1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getElse() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs new file mode 100644 index 000000000000..6ef2659892bc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_if_expr() -> () { + // An `if` expression. For example: + if x == 42 { + println!("that's the answer"); + } + let y = if x > 0 { + 1 + } else { + 0 + } +} diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected new file mode 100644 index 000000000000..edbf139dfc35 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | LiteralExpr | isAssigneeExpr: | no | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | LiteralExpr | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql new file mode 100644 index 000000000000..e03488ac6d08 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IndexExpr x, Expr getBase, Expr getIndex, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getBase = x.getBase() and + getIndex = x.getIndex() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getBase:", getBase, "getIndex:", getIndex, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs new file mode 100644 index 000000000000..117577d368e3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_index_expr() -> () { + // An index expression. For example: + list[42]; + list[42] = 1; +} diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected new file mode 100644 index 000000000000..8a90a7f5c7e9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected @@ -0,0 +1 @@ +| gen_inline_asm_expr.rs:6:9:6:24 | InlineAsmExpr | getExpr: | gen_inline_asm_expr.rs:6:23:6:23 | UnderscoreExpr | diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql new file mode 100644 index 000000000000..fd5eae62d581 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from InlineAsmExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs new file mode 100644 index 000000000000..0c791225af7e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_inline_asm_expr() -> () { + // An inline assembly expression. For example: + unsafe { + builtin # asm(_); + } +} diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected new file mode 100644 index 000000000000..41d358886f42 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | LetExpr | getPat: | gen_let_expr.rs:5:12:5:18 | TupleStructPat | getExpr: | gen_let_expr.rs:5:22:5:31 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql new file mode 100644 index 000000000000..bcb2e1112678 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetExpr x, Pat getPat, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + getExpr = x.getExpr() +select x, "getPat:", getPat, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs new file mode 100644 index 000000000000..1a8bab21c4fe --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_let_expr(maybe_some: Option) -> () { + // A `let` expression. For example: + if let Some(x) = maybe_some { + println!("{}", x); + } +} diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected new file mode 100644 index 000000000000..432aa15362c0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected @@ -0,0 +1,6 @@ +| gen_let_stmt.rs:5:9:5:9 | LetStmt | getPat: | gen_let_stmt.rs:5:9:5:9 | BindPat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | getPat: | gen_let_stmt.rs:6:9:6:9 | BindPat | hasTypeRef: | yes | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:7:9:7:9 | LetStmt | getPat: | gen_let_stmt.rs:7:9:7:9 | BindPat | hasTypeRef: | yes | hasInitializer: | no | hasElse: | no | +| gen_let_stmt.rs:8:9:8:9 | LetStmt | getPat: | gen_let_stmt.rs:8:9:8:9 | BindPat | hasTypeRef: | no | hasInitializer: | no | hasElse: | no | +| gen_let_stmt.rs:9:9:9:14 | LetStmt | getPat: | gen_let_stmt.rs:9:9:9:14 | TuplePat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:10:9:10:15 | LetStmt | getPat: | gen_let_stmt.rs:10:9:10:15 | TupleStructPat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql new file mode 100644 index 000000000000..694e733e7696 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql @@ -0,0 +1,14 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetStmt x, Pat getPat, string hasTypeRef, string hasInitializer, string hasElse +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + (if x.hasTypeRef() then hasTypeRef = "yes" else hasTypeRef = "no") and + (if x.hasInitializer() then hasInitializer = "yes" else hasInitializer = "no") and + if x.hasElse() then hasElse = "yes" else hasElse = "no" +select x, "getPat:", getPat, "hasTypeRef:", hasTypeRef, "hasInitializer:", hasInitializer, + "hasElse:", hasElse diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.expected new file mode 100644 index 000000000000..2d6e500d14a6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.expected @@ -0,0 +1 @@ +| gen_let_stmt.rs:10:9:10:15 | LetStmt | gen_let_stmt.rs:10:45:12:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql new file mode 100644 index 000000000000..66ac961a635d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getElse() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected new file mode 100644 index 000000000000..59bffddf5453 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected @@ -0,0 +1,4 @@ +| gen_let_stmt.rs:5:9:5:9 | LetStmt | gen_let_stmt.rs:5:13:5:14 | LiteralExpr | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | gen_let_stmt.rs:6:18:6:19 | LiteralExpr | +| gen_let_stmt.rs:9:9:9:14 | LetStmt | gen_let_stmt.rs:9:18:9:23 | TupleExpr | +| gen_let_stmt.rs:10:9:10:15 | LetStmt | gen_let_stmt.rs:10:19:10:38 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql new file mode 100644 index 000000000000..4578c2c87680 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getInitializer() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected new file mode 100644 index 000000000000..7a67697cb653 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected @@ -0,0 +1,2 @@ +| gen_let_stmt.rs:6:9:6:9 | LetStmt | file://:0:0:0:0 | TypeRef | +| gen_let_stmt.rs:7:9:7:9 | LetStmt | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql new file mode 100644 index 000000000000..8cd487029a12 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetStmt x +where toBeTested(x) and not x.isUnknown() +select x, x.getTypeRef() diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs b/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs new file mode 100644 index 000000000000..307386b8aef4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/gen_let_stmt.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_let_stmt() -> () { + // A let statement. For example: + let x = 42; + let x: i32 = 42; + let x: i32; + let x; + let (x, y) = (1, 2); + let Some(x) = std::env::var("FOO") else { + return; + }; +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected new file mode 100644 index 000000000000..4ea6107f6a81 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected @@ -0,0 +1,8 @@ +| gen_literal_expr.rs:5:5:5:6 | LiteralExpr | +| gen_literal_expr.rs:6:5:6:8 | LiteralExpr | +| gen_literal_expr.rs:7:5:7:19 | LiteralExpr | +| gen_literal_expr.rs:8:5:8:20 | LiteralExpr | +| gen_literal_expr.rs:9:5:9:7 | LiteralExpr | +| gen_literal_expr.rs:10:5:10:8 | LiteralExpr | +| gen_literal_expr.rs:11:5:11:20 | LiteralExpr | +| gen_literal_expr.rs:12:5:12:8 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql new file mode 100644 index 000000000000..48c2e1d6f00f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LiteralExpr x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs new file mode 100644 index 000000000000..13e1590e8e54 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_literal_expr() -> () { + // A literal expression. For example: + 42; + 42.0; + "Hello, world!"; + b"Hello, world!"; + 'x'; + b'x'; + r"Hello, world!"; + true; +} diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected new file mode 100644 index 000000000000..82e50bf474f4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected @@ -0,0 +1,3 @@ +| gen_loop_expr.rs:5:5:7:5 | LoopExpr | getBody: | gen_loop_expr.rs:5:10:7:5 | BlockExpr | hasLabel: | no | +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | getBody: | gen_loop_expr.rs:8:18:11:5 | BlockExpr | hasLabel: | yes | +| gen_loop_expr.rs:13:5:19:5 | LoopExpr | getBody: | gen_loop_expr.rs:13:10:19:5 | BlockExpr | hasLabel: | no | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql new file mode 100644 index 000000000000..aa62fe0be91e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LoopExpr x, Expr getBody, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + getBody = x.getBody() and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "getBody:", getBody, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected new file mode 100644 index 000000000000..98a657f09832 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | gen_loop_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql new file mode 100644 index 000000000000..67d1fd3e07bd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LoopExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs new file mode 100644 index 000000000000..699cbe243164 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs @@ -0,0 +1,20 @@ +// generated by codegen + +fn test_loop_expr() -> () { + // A loop expression. For example: + loop { + println!("Hello, world (again)!"); + }; + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected new file mode 100644 index 000000000000..dea4efb1cc4f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -0,0 +1,4 @@ +| gen_match_arm.rs:6:9:6:15 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:15 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:20:6:20 | PathExpr | +| gen_match_arm.rs:7:9:7:12 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:12 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:17:7:17 | LiteralExpr | +| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinaryOpExpr | +| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql new file mode 100644 index 000000000000..6f65a88f202c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchArm x, Pat getPat, string hasGuard, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + (if x.hasGuard() then hasGuard = "yes" else hasGuard = "no") and + getExpr = x.getExpr() +select x, "getPat:", getPat, "hasGuard:", hasGuard, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected new file mode 100644 index 000000000000..891432f91e0e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected @@ -0,0 +1 @@ +| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinaryOpExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql new file mode 100644 index 000000000000..345a08a7c6a5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchArm x +where toBeTested(x) and not x.isUnknown() +select x, x.getGuard() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs new file mode 100644 index 000000000000..b4c8732b8e4c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_match_arm(x: i32) -> i32 { + // A match arm. For example: + match x { + Some(y) => y, + None => 0, + } + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } +} diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected new file mode 100644 index 000000000000..c0ac41bbd503 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected @@ -0,0 +1 @@ +| gen_match_expr.rs:5:5:8:5 | MatchExpr | getExpr: | gen_match_expr.rs:5:11:5:11 | PathExpr | getNumberOfBranches: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql new file mode 100644 index 000000000000..3b59363841f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchExpr x, Expr getExpr, int getNumberOfBranches +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getNumberOfBranches = x.getNumberOfBranches() +select x, "getExpr:", getExpr, "getNumberOfBranches:", getNumberOfBranches diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected new file mode 100644 index 000000000000..6142eaa9099c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected @@ -0,0 +1,2 @@ +| gen_match_expr.rs:5:5:8:5 | MatchExpr | 0 | gen_match_expr.rs:6:9:6:15 | MatchArm | +| gen_match_expr.rs:5:5:8:5 | MatchExpr | 1 | gen_match_expr.rs:7:9:7:12 | MatchArm | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql new file mode 100644 index 000000000000..42f235a3a6e5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getBranch(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs new file mode 100644 index 000000000000..3a6080e83cbc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_match_expr(x: i32) -> i32 { + // A match expression. For example: + match x { + Some(y) => y, + None => 0, + } + // match x { + // Some(y) if y != 0 => 1 / y, + // _ => 0, + // } +} diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected new file mode 100644 index 000000000000..d28ebe1c53ed --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | getReceiver: | gen_method_call_expr.rs:5:5:5:5 | PathExpr | getMethodName: | foo | getNumberOfArgs: | 1 | hasGenericArgs: | no | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | getReceiver: | gen_method_call_expr.rs:6:5:6:5 | PathExpr | getMethodName: | foo | getNumberOfArgs: | 1 | hasGenericArgs: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql new file mode 100644 index 000000000000..70b43f0707c2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -0,0 +1,16 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from + MethodCallExpr x, Expr getReceiver, string getMethodName, int getNumberOfArgs, + string hasGenericArgs +where + toBeTested(x) and + not x.isUnknown() and + getReceiver = x.getReceiver() and + getMethodName = x.getMethodName() and + getNumberOfArgs = x.getNumberOfArgs() and + if x.hasGenericArgs() then hasGenericArgs = "yes" else hasGenericArgs = "no" +select x, "getReceiver:", getReceiver, "getMethodName:", getMethodName, "getNumberOfArgs:", + getNumberOfArgs, "hasGenericArgs:", hasGenericArgs diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected new file mode 100644 index 000000000000..601b344cd0fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | LiteralExpr | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql new file mode 100644 index 000000000000..9ddca0971908 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected new file mode 100644 index 000000000000..e1dbf7481846 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected @@ -0,0 +1 @@ +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql new file mode 100644 index 000000000000..a1e4ef6c2098 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericArgs() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs new file mode 100644 index 000000000000..d4c2d5bc1352 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_method_call_expr() -> () { + // A method call expression. For example: + x.foo(42); + x.foo::(42); +} diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected new file mode 100644 index 000000000000..bd096b3f4880 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected @@ -0,0 +1 @@ +| gen_missing_expr.rs:6:13:6:33 | MissingExpr | diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql new file mode 100644 index 000000000000..eb4a28543c74 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MissingExpr x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs new file mode 100644 index 000000000000..e4fd065c3645 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_missing_expr() -> () { + // A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + // + let x = non_existing_macro!(); +} diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected new file mode 100644 index 000000000000..e28c61da351d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getContainer: | file://:0:0:0:0 | TypeRef | getNumberOfFields: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql new file mode 100644 index 000000000000..7eed7c6530b2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x, TypeRef getContainer, int getNumberOfFields +where + toBeTested(x) and + not x.isUnknown() and + getContainer = x.getContainer() and + getNumberOfFields = x.getNumberOfFields() +select x, "getContainer:", getContainer, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected new file mode 100644 index 000000000000..5aac2799dab6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | 0 | field | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql new file mode 100644 index 000000000000..d38d99bbd742 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs new file mode 100644 index 000000000000..497aebeb2ad7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/gen_offset_of_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_offset_of_expr() -> () { + // An `offset_of` expression. For example: + builtin # offset_of(Struct, field); +} diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected new file mode 100644 index 000000000000..90b110d363eb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | PathExpr | getPath: | gen_path_expr.rs:5:13:5:20 | Unimplemented | +| gen_path_expr.rs:6:13:6:20 | PathExpr | getPath: | gen_path_expr.rs:6:13:6:20 | Unimplemented | +| gen_path_expr.rs:7:13:7:20 | PathExpr | getPath: | gen_path_expr.rs:7:13:7:20 | Unimplemented | +| gen_path_expr.rs:8:13:8:32 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:32 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql new file mode 100644 index 000000000000..b7936833509b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from PathExpr x, Unimplemented getPath +where + toBeTested(x) and + not x.isUnknown() and + getPath = x.getPath() +select x, "getPath:", getPath diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs new file mode 100644 index 000000000000..0c1e4b4a7d16 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_path_expr() -> () { + // A path expression. For example: + let x = variable; + let x = foo::bar; + let y = ::foo; + let z = ::foo; +} diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected new file mode 100644 index 000000000000..12e7e47c757e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected @@ -0,0 +1,6 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | hasLhs: | yes | hasRhs: | yes | isInclusive: | yes | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | hasLhs: | yes | hasRhs: | yes | isInclusive: | no | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | hasLhs: | yes | hasRhs: | no | isInclusive: | no | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | hasLhs: | no | hasRhs: | yes | isInclusive: | no | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | hasLhs: | no | hasRhs: | yes | isInclusive: | yes | +| gen_range_expr.rs:10:13:10:14 | RangeExpr | hasLhs: | no | hasRhs: | no | isInclusive: | no | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql new file mode 100644 index 000000000000..94d158792ded --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x, string hasLhs, string hasRhs, string isInclusive +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasLhs() then hasLhs = "yes" else hasLhs = "no") and + (if x.hasRhs() then hasRhs = "yes" else hasRhs = "no") and + if x.isInclusive() then isInclusive = "yes" else isInclusive = "no" +select x, "hasLhs:", hasLhs, "hasRhs:", hasRhs, "isInclusive:", isInclusive diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected new file mode 100644 index 000000000000..f88c18b39c2d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected @@ -0,0 +1,3 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | LiteralExpr | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql new file mode 100644 index 000000000000..9b184651733f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLhs() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected new file mode 100644 index 000000000000..f596145bfc9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected @@ -0,0 +1,4 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | LiteralExpr | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | LiteralExpr | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql new file mode 100644 index 000000000000..ead566af537b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRhs() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs new file mode 100644 index 000000000000..b27f504d81c7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs @@ -0,0 +1,11 @@ +// generated by codegen + +fn test_range_expr() -> () { + // A range expression. For example: + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected new file mode 100644 index 000000000000..aaa310b00d1e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected @@ -0,0 +1,4 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | no | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 1 | hasSpread: | yes | hasEllipsis: | yes | isAssigneeExpr: | no | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | yes | +| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 0 | hasSpread: | no | hasEllipsis: | yes | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql new file mode 100644 index 000000000000..a8e24a4fa915 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from + RecordLitExpr x, string hasPath, int getNumberOfFields, string hasSpread, string hasEllipsis, + string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + getNumberOfFields = x.getNumberOfFields() and + (if x.hasSpread() then hasSpread = "yes" else hasSpread = "no") and + (if x.hasEllipsis() then hasEllipsis = "yes" else hasEllipsis = "no") and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "hasPath:", hasPath, "getNumberOfFields:", getNumberOfFields, "hasSpread:", hasSpread, + "hasEllipsis:", hasEllipsis, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected new file mode 100644 index 000000000000..2ee172341bbd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected @@ -0,0 +1,5 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 0 | gen_record_lit_expr.rs:5:26:5:26 | RecordLitField | +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 1 | gen_record_lit_expr.rs:5:32:5:32 | RecordLitField | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | 0 | gen_record_lit_expr.rs:6:27:6:27 | RecordLitField | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 0 | gen_record_lit_expr.rs:7:14:7:14 | RecordLitField | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 1 | gen_record_lit_expr.rs:7:20:7:20 | RecordLitField | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql new file mode 100644 index 000000000000..46a88b039891 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected new file mode 100644 index 000000000000..febf7f1e78b4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | gen_record_lit_expr.rs:5:17:5:34 | Unimplemented | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:18:6:38 | Unimplemented | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | gen_record_lit_expr.rs:7:5:7:22 | Unimplemented | +| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | gen_record_lit_expr.rs:8:5:8:14 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql new file mode 100644 index 000000000000..eb97f36fe3ff --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected new file mode 100644 index 000000000000..5b1ccb6b3da9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected @@ -0,0 +1 @@ +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:32:6:36 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql new file mode 100644 index 000000000000..2b798749d107 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getSpread() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs b/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs new file mode 100644 index 000000000000..51f77e53c8a7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_record_lit_expr() -> () { + // A record literal expression. For example: + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected new file mode 100644 index 000000000000..81acaffde034 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected @@ -0,0 +1,2 @@ +| gen_record_lit_field.rs:5:14:5:14 | RecordLitField | getName: | a | getExpr: | gen_record_lit_field.rs:5:14:5:14 | LiteralExpr | +| gen_record_lit_field.rs:5:20:5:20 | RecordLitField | getName: | b | getExpr: | gen_record_lit_field.rs:5:20:5:20 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql new file mode 100644 index 000000000000..bba23ee59646 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitField x, string getName, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getName = x.getName() and + getExpr = x.getExpr() +select x, "getName:", getName, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs b/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs new file mode 100644 index 000000000000..ecef8089af09 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_record_lit_field() -> () { + // A field in a record literal. For example `a: 1` in: + Foo { a: 1, b: 2 }; +} diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected new file mode 100644 index 000000000000..b2b75ae61e14 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected @@ -0,0 +1,4 @@ +| gen_ref_expr.rs:5:25:5:28 | RefExpr | getExpr: | gen_ref_expr.rs:5:26:5:28 | PathExpr | isRaw: | no | isMut: | no | +| gen_ref_expr.rs:6:23:6:30 | RefExpr | getExpr: | gen_ref_expr.rs:6:28:6:30 | PathExpr | isRaw: | no | isMut: | yes | +| gen_ref_expr.rs:7:35:7:48 | RefExpr | getExpr: | gen_ref_expr.rs:7:46:7:48 | PathExpr | isRaw: | yes | isMut: | no | +| gen_ref_expr.rs:8:33:8:44 | RefExpr | getExpr: | gen_ref_expr.rs:8:42:8:44 | PathExpr | isRaw: | yes | isMut: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql new file mode 100644 index 000000000000..e69683486ddb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RefExpr x, Expr getExpr, string isRaw, string isMut +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + (if x.isRaw() then isRaw = "yes" else isRaw = "no") and + if x.isMut() then isMut = "yes" else isMut = "no" +select x, "getExpr:", getExpr, "isRaw:", isRaw, "isMut:", isMut diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs new file mode 100644 index 000000000000..551b957cc65c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_ref_expr() -> () { + // A reference expression. For example: + let ref_const = &foo; + let ref_mut = &mut foo; + let raw_const: &mut i32 = &raw const foo; + let raw_mut: &mut i32 = &raw mut foo; +} diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected new file mode 100644 index 000000000000..370729af71d0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected @@ -0,0 +1 @@ +| gen_repeat_expr.rs:5:5:5:11 | RepeatExpr | getInitializer: | gen_repeat_expr.rs:5:6:5:6 | LiteralExpr | getRepeat: | gen_repeat_expr.rs:5:9:5:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql new file mode 100644 index 000000000000..aa1534fae462 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RepeatExpr x, Expr getInitializer, Expr getRepeat +where + toBeTested(x) and + not x.isUnknown() and + getInitializer = x.getInitializer() and + getRepeat = x.getRepeat() +select x, "getInitializer:", getInitializer, "getRepeat:", getRepeat diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/gen_repeat_expr.rs b/rust/ql/test/extractor-tests/generated/RepeatExpr/gen_repeat_expr.rs new file mode 100644 index 000000000000..822902f60d1f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/gen_repeat_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_repeat_expr() -> () { + // A repeat expression. For example: + [1; 10]; +} diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected new file mode 100644 index 000000000000..d715c0cb6641 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected @@ -0,0 +1,2 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | hasExpr: | yes | +| gen_return_expr.rs:8:5:8:10 | ReturnExpr | hasExpr: | no | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql new file mode 100644 index 000000000000..fab38b3b8ad5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ReturnExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected new file mode 100644 index 000000000000..4247069ccc25 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql new file mode 100644 index 000000000000..f93fa9c35231 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ReturnExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs new file mode 100644 index 000000000000..8e72e8324f87 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +// A return expression. For example: +fn some_value() -> i32 { + return 42; +} +fn no_value() -> () { + return; +} diff --git a/rust/ql/test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected new file mode 100644 index 000000000000..9522fe8750df --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected @@ -0,0 +1,2 @@ +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | getNumberOfExprs: | 2 | isAssigneeExpr: | no | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | getNumberOfExprs: | 2 | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql new file mode 100644 index 000000000000..4f353568b7f1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleExpr x, int getNumberOfExprs, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfExprs = x.getNumberOfExprs() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getNumberOfExprs:", getNumberOfExprs, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected new file mode 100644 index 000000000000..936d2a39bb27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected @@ -0,0 +1,4 @@ +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | LiteralExpr | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql new file mode 100644 index 000000000000..00c8d589921e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getExpr(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs b/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs new file mode 100644 index 000000000000..8cab6455b73c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/gen_tuple_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_tuple_expr() -> () { + // A tuple expression. For example: + (1, "one"); + (2, "two")[0] = 3; +} diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected new file mode 100644 index 000000000000..b332f6493404 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected @@ -0,0 +1,3 @@ +| gen_unary_op_expr.rs:5:13:5:15 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:5:14:5:15 | LiteralExpr | getOp: | - | +| gen_unary_op_expr.rs:6:13:6:17 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:6:14:6:17 | LiteralExpr | getOp: | ! | +| gen_unary_op_expr.rs:7:13:7:16 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:7:14:7:16 | PathExpr | getOp: | * | diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql new file mode 100644 index 000000000000..be6a0b6ebe9a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnaryOpExpr x, Expr getExpr, string getOp +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getOp = x.getOp() +select x, "getExpr:", getExpr, "getOp:", getOp diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs new file mode 100644 index 000000000000..7a185c3b6448 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_unary_op_expr() -> () { + // A unary operation expression. For example: + let x = -42 + let y = !true + let z = *ptr +} diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected new file mode 100644 index 000000000000..b81aa1f81b08 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected @@ -0,0 +1 @@ +| gen_underscore_expr.rs:5:5:5:5 | UnderscoreExpr | diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql new file mode 100644 index 000000000000..e65e78cc81fc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnderscoreExpr x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs new file mode 100644 index 000000000000..51b480e84bec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/gen_underscore_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_underscore_expr() -> () { + // An underscore expression. For example: + _ = 42; +} diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected new file mode 100644 index 000000000000..2fb952294e6e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql new file mode 100644 index 000000000000..fe7906db5fa3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x, int getNumberOfStatements, string hasTail +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + if x.hasTail() then hasTail = "yes" else hasTail = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected new file mode 100644 index 000000000000..a9c91832300c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | 0 | gen_unsafe_block_expr.rs:6:13:6:13 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql new file mode 100644 index 000000000000..e813310cd46a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected new file mode 100644 index 000000000000..c0d12ae28a5b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | gen_unsafe_block_expr.rs:7:9:7:54 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql new file mode 100644 index 000000000000..cce5b9284fcf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs new file mode 100644 index 000000000000..6adf2190cdfa --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_unsafe_block_expr() -> () { + // An unsafe block expression. For example: + let layout = unsafe { + let x = 42; + Layout::from_size_align_unchecked(size, align) + }; +} diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected new file mode 100644 index 000000000000..bda4e84abfd9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql new file mode 100644 index 000000000000..0f99cbc0c3f1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YeetExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected new file mode 100644 index 000000000000..074c6fbff74c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql new file mode 100644 index 000000000000..526ac38ba1da --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YeetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs new file mode 100644 index 000000000000..877710805c31 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_yeet_expr() -> () { + // A `yeet` expression. For example: + if x < size { + do yeet "index out of bounds"; + } +} diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected new file mode 100644 index 000000000000..e897a88bb240 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql new file mode 100644 index 000000000000..18fd38bac9c6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YieldExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected new file mode 100644 index 000000000000..87b88ef24196 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql new file mode 100644 index 000000000000..8bba6eb87e95 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs new file mode 100644 index 000000000000..b6d951f7adf4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_yield_expr() -> () { + // A `yield` expression. For example: + let one = #[coroutine] + || { + yield 1; + }; +} diff --git a/rust/schema.py b/rust/schema.py index 1a5a19b2e0b8..bb824d945c0f 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -76,7 +76,6 @@ class Module(Declaration): declarations: list[Declaration] | child -@qltest.collapse_hierarchy class Expr(AstNode): pass @@ -91,7 +90,6 @@ class Label(AstNode): name: string -@qltest.collapse_hierarchy class Stmt(AstNode): pass @@ -119,15 +117,31 @@ class Function(Declaration): body: Expr | child -# Missing, +@rust.doc_test_signature("() -> ()") class MissingExpr(Expr): + """ + A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + + ``` + let x = non_existing_macro!(); + ``` + """ pass # Path(Path), - +@rust.doc_test_signature("() -> ()") class PathExpr(Expr): + """ + A path expression. For example: + ``` + let x = variable; + let x = foo::bar; + let y = ::foo; + let z = ::foo; + ``` + """ path: Unimplemented | child # If { @@ -137,7 +151,23 @@ class PathExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class IfExpr(Expr): + """ + An `if` expression. For example: + ``` + if x == 42 { + println!("that's the answer"); + } + ``` + ``` + let y = if x > 0 { + 1 + } else { + 0 + } + ``` + """ condition: Expr | child then: Expr | child else_: optional[Expr] | child @@ -148,7 +178,16 @@ class IfExpr(Expr): # }, +@rust.doc_test_signature("(maybe_some: Option) -> ()") class LetExpr(Expr): + """ + A `let` expression. For example: + ``` + if let Some(x) = maybe_some { + println!("{}", x); + } + ``` + """ pat: Pat | child expr: Expr | child @@ -165,7 +204,22 @@ class BlockExprBase(Expr): tail: optional[Expr] | child +@rust.doc_test_signature("() -> ()") class BlockExpr(BlockExprBase): + """ + A block expression. For example: + ``` + { + let x = 42; + } + ``` + ``` + 'label: { + let x = 42; + x + } + ``` + """ label: optional[Label] | child # Async { @@ -175,13 +229,30 @@ class BlockExpr(BlockExprBase): # }, +@rust.doc_test_signature("() -> i32") class AsyncBlockExpr(BlockExprBase): + """ + An async block expression. For example: + ``` + async { + let x = 42; + x + }.await + ``` + """ pass -# Const(ConstBlockId), - +@rust.doc_test_signature("() -> bool") class ConstExpr(Expr): + """ + A `const` block expression. For example: + ``` + if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + return false; + } + ``` + """ expr: Expr | child # // FIXME: Fold this into Block with an unsafe flag? @@ -192,7 +263,17 @@ class ConstExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class UnsafeBlockExpr(BlockExprBase): + """ + An unsafe block expression. For example: + ``` + let layout = unsafe { + let x = 42; + Layout::from_size_align_unchecked(size, align) + }; + ``` + """ pass # Loop { @@ -201,7 +282,32 @@ class UnsafeBlockExpr(BlockExprBase): # }, +@rust.doc_test_signature("() -> ()") class LoopExpr(Expr): + """ + A loop expression. For example: + ``` + loop { + println!("Hello, world (again)!"); + }; + ``` + ``` + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + ``` + ``` + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; + ``` + """ body: Expr | child label: optional[Label] | child @@ -212,7 +318,17 @@ class LoopExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class CallExpr(Expr): + """ + A function call expression. For example: + ``` + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; + ``` + """ callee: Expr | child args: list[Expr] | child is_assignee_expr: predicate @@ -225,7 +341,14 @@ class CallExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class MethodCallExpr(Expr): + """ + A method call expression. For example: + ``` + x.foo(42); + x.foo::(42); + """ receiver: Expr | child method_name: string args: list[Expr] | child @@ -238,8 +361,23 @@ class MethodCallExpr(Expr): # } -@qltest.skip +@rust.doc_test_signature("(x: i32) -> i32") class MatchArm(AstNode): + """ + A match arm. For example: + ``` + match x { + Some(y) => y, + None => 0, + } + ``` + ``` + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } + ``` + """ pat: Pat | child guard: optional[Expr] | child expr: Expr | child @@ -249,7 +387,22 @@ class MatchArm(AstNode): # }, +@rust.doc_test_signature("(x: i32) -> i32") class MatchExpr(Expr): + """ + A match expression. For example: + ``` + match x { + Some(y) => y, + None => 0, + } + ``` + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } + ``` + """ expr: Expr | child branches: list[MatchArm] | child @@ -258,7 +411,25 @@ class MatchExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class ContinueExpr(Expr): + """ + A continue expression. For example: + ``` + loop { + if not_ready() { + continue; + } + } + ``` + ``` + 'label: loop { + if not_ready() { + continue 'label; + } + } + ``` + """ label: optional[Label] | child # Break { @@ -267,7 +438,25 @@ class ContinueExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class BreakExpr(Expr): + """ + A break expression. For example: + ``` + loop { + if not_ready() { + break; + } + } + ``` + ``` + let x = 'label: loop { + if done() { + break 'label 42; + } + }; + ``` + """ expr: optional[Expr] | child label: optional[Label] | child @@ -277,6 +466,19 @@ class BreakExpr(Expr): # }, class ReturnExpr(Expr): + """ + A return expression. For example: + ``` + fn some_value() -> i32 { + return 42; + } + ``` + ``` + fn no_value() -> () { + return; + } + ``` + """ expr: optional[Expr] | child # Become { # expr: ExprId, @@ -284,13 +486,34 @@ class ReturnExpr(Expr): class BecomeExpr(Expr): + """ + A `become` expression. For example: + ``` + fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } + } ``` + """ expr: Expr | child # Yield { # expr: Option, # }, +@rust.doc_test_signature("() -> ()") class YieldExpr(Expr): + """ + A `yield` expression. For example: + ``` + let one = #[coroutine] + || { + yield 1; + }; + ``` + """ expr: optional[Expr] | child # Yeet { @@ -298,7 +521,16 @@ class YieldExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class YeetExpr(Expr): + """ + A `yeet` expression. For example: + ``` + if x < size { + do yeet "index out of bounds"; + } + ``` + """ expr: optional[Expr] | child # RecordLit { # path: Option>, @@ -309,17 +541,29 @@ class YeetExpr(Expr): # }, -class RecordFieldPat(AstNode): - name: string - pat: Pat | child - - +@rust.doc_test_signature("() -> ()") class RecordLitField(AstNode): + """ + A field in a record literal. For example `a: 1` in: + ``` + Foo { a: 1, b: 2 }; + ``` + """ name: string expr: Expr | child +@rust.doc_test_signature("() -> ()") class RecordLitExpr(Expr): + """ + A record literal expression. For example: + ``` + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; + ``` + """ path: optional[Unimplemented] | child fields: list[RecordLitField] | child spread: optional[Expr] | child @@ -331,8 +575,14 @@ class RecordLitExpr(Expr): # expr: ExprId, # name: Name, # }, - +@rust.doc_test_signature("() -> ()") class FieldExpr(Expr): + """ + A field access expression. For example: + ``` + x.foo + ``` + """ expr: Expr | child name: string @@ -341,7 +591,17 @@ class FieldExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class AwaitExpr(Expr): + """ + An `await` expression. For example: + ``` + async { + let x = foo().await; + x + } + ``` + """ expr: Expr | child # Cast { @@ -350,7 +610,14 @@ class AwaitExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class CastExpr(Expr): + """ + A cast expression. For example: + ``` + value as u64; + ``` + """ expr: Expr | child type_ref: TypeRef | child # Ref { @@ -360,7 +627,17 @@ class CastExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class RefExpr(Expr): + """ + A reference expression. For example: + ``` + let ref_const = &foo; + let ref_mut = &mut foo; + let raw_const: &mut i32 = &raw const foo; + let raw_mut: &mut i32 = &raw mut foo; + ``` + """ expr: Expr | child is_raw: predicate is_mut: predicate @@ -369,7 +646,14 @@ class RefExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class BoxExpr(Expr): + """ + A box expression. For example: + ``` + let x = #[rustc_box] Box::new(42); + ``` + """ expr: Expr | child # UnaryOp { # expr: ExprId, @@ -377,7 +661,16 @@ class BoxExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class UnaryOpExpr(Expr): + """ + A unary operation expression. For example: + ``` + let x = -42 + let y = !true + let z = *ptr + ``` + """ expr: Expr | child op: string @@ -387,9 +680,18 @@ class UnaryOpExpr(Expr): # rhs: ExprId, # op: Option, # }, - - +@rust.doc_test_signature("() -> ()") class BinaryOpExpr(Expr): + """ + A binary operation expression. For example: + ``` + x + y; + x && y; + x <= y; + x = y; + x += y; + ``` + """ lhs: Expr | child rhs: Expr | child op: optional[string] @@ -402,7 +704,19 @@ class BinaryOpExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class RangeExpr(Expr): + """ + A range expression. For example: + ``` + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; + ``` + """ lhs: optional[Expr] | child rhs: optional[Expr] | child is_inclusive: predicate @@ -414,7 +728,15 @@ class RangeExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class IndexExpr(Expr): + """ + An index expression. For example: + ``` + list[42]; + list[42] = 1; + ``` + """ base: Expr | child index: Expr | child is_assignee_expr: predicate @@ -429,7 +751,20 @@ class IndexExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class ClosureExpr(Expr): + """ + A closure expression. For example: + ``` + |x| x + 1; + move |x: i32| -> i32 { x + 1 }; + async |x: i32, y| x + y; + #[coroutine] + |x| yield x; + #[coroutine] + static |x| yield x; + ``` + """ args: list[Pat] | child arg_types: list[optional[TypeRef]] | child ret_type: optional[TypeRef] | child @@ -442,7 +777,15 @@ class ClosureExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class TupleExpr(Expr): + """ + A tuple expression. For example: + ``` + (1, "one"); + (2, "two")[0] = 3; + ``` + """ exprs: list[Expr] | child is_assignee_expr: predicate @@ -450,42 +793,99 @@ class TupleExpr(Expr): class ArrayExpr(Expr): + """ + An array expression. For example: + ``` + [1, 2, 3]; + [1; 10]; + ``` + """ pass # Literal(Literal), # ElementList { elements: Box<[ExprId]>, is_assignee_expr: bool }, +@rust.doc_test_signature("() -> ()") class ElementListExpr(ArrayExpr): + """ + An element list expression. For example: + ``` + [1, 2, 3, 4, 5]; + [1, 2, 3, 4, 5][0] = 6; + ``` + """ elements: list[Expr] | child is_assignee_expr: predicate # Repeat { initializer: ExprId, repeat: ExprId }, +@rust.doc_test_signature("() -> ()") class RepeatExpr(ArrayExpr): + """ + A repeat expression. For example: + ``` + [1; 10]; + """ initializer: Expr | child repeat: Expr | child +@rust.doc_test_signature("() -> ()") class LiteralExpr(Expr): + """ + A literal expression. For example: + ``` + 42; + 42.0; + "Hello, world!"; + b"Hello, world!"; + 'x'; + b'x'; + r"Hello, world!"; + true; + """ pass # Underscore, +@rust.doc_test_signature("() -> ()") class UnderscoreExpr(Expr): + """ + An underscore expression. For example: + ``` + _ = 42; + ``` + """ pass # OffsetOf(OffsetOf), +@rust.doc_test_signature("() -> ()") class OffsetOfExpr(Expr): + """ + An `offset_of` expression. For example: + ``` + builtin # offset_of(Struct, field); + ``` + """ container: TypeRef | child fields: list[string] # InlineAsm(InlineAsm), +@rust.doc_test_signature("() -> ()") class InlineAsmExpr(Expr): + """ + An inline assembly expression. For example: + ``` + unsafe { + builtin # asm(_); + } + ``` + """ expr: Expr | child @@ -496,7 +896,21 @@ class InlineAsmExpr(Expr): # else_branch: Option, # }, +@rust.doc_test_signature("() -> ()") class LetStmt(Stmt): + """ + A let statement. For example: + ``` + let x = 42; + let x: i32 = 42; + let x: i32; + let x; + let (x, y) = (1, 2); + let Some(x) = std::env::var("FOO") else { + return; + }; + + """ pat: Pat | child type_ref: optional[TypeRef] | child initializer: optional[Expr] | child @@ -507,7 +921,16 @@ class LetStmt(Stmt): # }, +@rust.doc_test_signature("() -> ()") class ExprStmt(Stmt): + """ + An expression statement. For example: + ``` + start(); + finish() + use std::env; + ``` + """ expr: Expr | child has_semicolon: predicate @@ -516,7 +939,18 @@ class ExprStmt(Stmt): # Item, +# At the HIR-level, we don't have items, only some markers without location indicating where they used to be. +@qltest.skip class ItemStmt(Stmt): + """ + An item statement. For example: + ``` + fn print_hello() { + println!("Hello, world!"); + } + print_hello(); + ``` + """ pass # Missing, @@ -543,6 +977,10 @@ class OrPat(Pat): args: list[Pat] | child +class RecordFieldPat(AstNode): + name: string + pat: Pat | child + # Record { path: Option>, args: Box<[RecordFieldPat]>, ellipsis: bool }, From 292c6b61594b7310a2558977b737b421f555ec1a Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 12 Sep 2024 17:55:14 +0200 Subject: [PATCH 02/22] Clear out unused comments --- rust/schema.py | 200 +------------------------------------------------ 1 file changed, 2 insertions(+), 198 deletions(-) diff --git a/rust/schema.py b/rust/schema.py index bb824d945c0f..9b51f571b560 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -72,7 +72,7 @@ class Declaration(AstNode): class Module(Declaration): - # TODO name + declarations: list[Declaration] | child @@ -96,7 +96,7 @@ class Stmt(AstNode): @qltest.collapse_hierarchy class TypeRef(AstNode): - # TODO + pass @@ -129,8 +129,6 @@ class MissingExpr(Expr): pass -# Path(Path), - @rust.doc_test_signature("() -> ()") class PathExpr(Expr): """ @@ -144,12 +142,6 @@ class PathExpr(Expr): """ path: Unimplemented | child -# If { -# condition: ExprId, -# then_branch: ExprId, -# else_branch: Option, -# }, - @rust.doc_test_signature("() -> ()") class IfExpr(Expr): @@ -172,11 +164,6 @@ class IfExpr(Expr): then: Expr | child else_: optional[Expr] | child -# Let { -# pat: PatId, -# expr: ExprId, -# }, - @rust.doc_test_signature("(maybe_some: Option) -> ()") class LetExpr(Expr): @@ -191,13 +178,6 @@ class LetExpr(Expr): pat: Pat | child expr: Expr | child -# Block { -# id: Option, -# statements: Box<[Stmt]>, -# tail: Option, -# label: Option, -# }, - class BlockExprBase(Expr): statements: list[Stmt] | child @@ -222,12 +202,6 @@ class BlockExpr(BlockExprBase): """ label: optional[Label] | child -# Async { -# id: Option, -# statements: Box<[Stmt]>, -# tail: Option, -# }, - @rust.doc_test_signature("() -> i32") class AsyncBlockExpr(BlockExprBase): @@ -255,13 +229,6 @@ class ConstExpr(Expr): """ expr: Expr | child -# // FIXME: Fold this into Block with an unsafe flag? -# Unsafe { -# id: Option, -# statements: Box<[Stmt]>, -# tail: Option, -# }, - @rust.doc_test_signature("() -> ()") class UnsafeBlockExpr(BlockExprBase): @@ -276,11 +243,6 @@ class UnsafeBlockExpr(BlockExprBase): """ pass -# Loop { -# body: ExprId, -# label: Option, -# }, - @rust.doc_test_signature("() -> ()") class LoopExpr(Expr): @@ -311,12 +273,6 @@ class LoopExpr(Expr): body: Expr | child label: optional[Label] | child -# Call { -# callee: ExprId, -# args: Box<[ExprId]>, -# is_assignee_expr: bool, -# }, - @rust.doc_test_signature("() -> ()") class CallExpr(Expr): @@ -333,13 +289,6 @@ class CallExpr(Expr): args: list[Expr] | child is_assignee_expr: predicate -# MethodCall { -# receiver: ExprId, -# method_name: Name, -# args: Box<[ExprId]>, -# generic_args: Option>, -# }, - @rust.doc_test_signature("() -> ()") class MethodCallExpr(Expr): @@ -354,12 +303,6 @@ class MethodCallExpr(Expr): args: list[Expr] | child generic_args: optional[Unimplemented] | child -# pub struct MatchArm { -# pub pat: PatId, -# pub guard: Option, -# pub expr: ExprId, -# } - @rust.doc_test_signature("(x: i32) -> i32") class MatchArm(AstNode): @@ -381,10 +324,6 @@ class MatchArm(AstNode): pat: Pat | child guard: optional[Expr] | child expr: Expr | child -# Match { -# expr: ExprId, -# arms: Box<[MatchArm]>, -# }, @rust.doc_test_signature("(x: i32) -> i32") @@ -406,10 +345,6 @@ class MatchExpr(Expr): expr: Expr | child branches: list[MatchArm] | child -# Continue { -# label: Option, -# }, - @rust.doc_test_signature("() -> ()") class ContinueExpr(Expr): @@ -432,11 +367,6 @@ class ContinueExpr(Expr): """ label: optional[Label] | child -# Break { -# expr: Option, -# label: Option, -# }, - @rust.doc_test_signature("() -> ()") class BreakExpr(Expr): @@ -461,10 +391,6 @@ class BreakExpr(Expr): label: optional[Label] | child -# Return { -# expr: Option, -# }, - class ReturnExpr(Expr): """ A return expression. For example: @@ -480,9 +406,6 @@ class ReturnExpr(Expr): ``` """ expr: optional[Expr] | child -# Become { -# expr: ExprId, -# }, class BecomeExpr(Expr): @@ -498,9 +421,6 @@ class BecomeExpr(Expr): } ``` """ expr: Expr | child -# Yield { -# expr: Option, -# }, @rust.doc_test_signature("() -> ()") @@ -516,10 +436,6 @@ class YieldExpr(Expr): """ expr: optional[Expr] | child -# Yeet { -# expr: Option, -# }, - @rust.doc_test_signature("() -> ()") class YeetExpr(Expr): @@ -532,13 +448,6 @@ class YeetExpr(Expr): ``` """ expr: optional[Expr] | child -# RecordLit { -# path: Option>, -# fields: Box<[RecordLitField]>, -# spread: Option, -# ellipsis: bool, -# is_assignee_expr: bool, -# }, @rust.doc_test_signature("() -> ()") @@ -571,10 +480,6 @@ class RecordLitExpr(Expr): is_assignee_expr: predicate -# Field { -# expr: ExprId, -# name: Name, -# }, @rust.doc_test_signature("() -> ()") class FieldExpr(Expr): """ @@ -586,10 +491,6 @@ class FieldExpr(Expr): expr: Expr | child name: string -# Await { -# expr: ExprId, -# }, - @rust.doc_test_signature("() -> ()") class AwaitExpr(Expr): @@ -604,11 +505,6 @@ class AwaitExpr(Expr): """ expr: Expr | child -# Cast { -# expr: ExprId, -# type_ref: Interned, -# }, - @rust.doc_test_signature("() -> ()") class CastExpr(Expr): @@ -620,11 +516,6 @@ class CastExpr(Expr): """ expr: Expr | child type_ref: TypeRef | child -# Ref { -# expr: ExprId, -# rawness: Rawness, -# mutability: Mutability, -# }, @rust.doc_test_signature("() -> ()") @@ -641,9 +532,6 @@ class RefExpr(Expr): expr: Expr | child is_raw: predicate is_mut: predicate -# Box { -# expr: ExprId, -# }, @rust.doc_test_signature("() -> ()") @@ -655,10 +543,6 @@ class BoxExpr(Expr): ``` """ expr: Expr | child -# UnaryOp { -# expr: ExprId, -# op: UnaryOp, -# }, @rust.doc_test_signature("() -> ()") @@ -675,11 +559,6 @@ class UnaryOpExpr(Expr): op: string -# BinaryOp { -# lhs: ExprId, -# rhs: ExprId, -# op: Option, -# }, @rust.doc_test_signature("() -> ()") class BinaryOpExpr(Expr): """ @@ -697,13 +576,6 @@ class BinaryOpExpr(Expr): op: optional[string] -# Range { -# lhs: Option, -# rhs: Option, -# range_type: RangeOp, -# }, - - @rust.doc_test_signature("() -> ()") class RangeExpr(Expr): """ @@ -721,12 +593,6 @@ class RangeExpr(Expr): rhs: optional[Expr] | child is_inclusive: predicate -# Index { -# base: ExprId, -# index: ExprId, -# is_assignee_expr: bool, -# }, - @rust.doc_test_signature("() -> ()") class IndexExpr(Expr): @@ -741,15 +607,6 @@ class IndexExpr(Expr): index: Expr | child is_assignee_expr: predicate -# Closure { -# args: Box<[PatId]>, -# arg_types: Box<[Option>]>, -# ret_type: Option>, -# body: ExprId, -# closure_kind: ClosureKind, -# capture_by: CaptureBy, -# }, - @rust.doc_test_signature("() -> ()") class ClosureExpr(Expr): @@ -771,10 +628,6 @@ class ClosureExpr(Expr): body: Expr | child closure_kind: string is_move: predicate -# Tuple { -# exprs: Box<[ExprId]>, -# is_assignee_expr: bool, -# }, @rust.doc_test_signature("() -> ()") @@ -789,8 +642,6 @@ class TupleExpr(Expr): exprs: list[Expr] | child is_assignee_expr: predicate -# Array(Array), - class ArrayExpr(Expr): """ @@ -801,9 +652,6 @@ class ArrayExpr(Expr): ``` """ pass -# Literal(Literal), - -# ElementList { elements: Box<[ExprId]>, is_assignee_expr: bool }, @rust.doc_test_signature("() -> ()") @@ -818,8 +666,6 @@ class ElementListExpr(ArrayExpr): elements: list[Expr] | child is_assignee_expr: predicate -# Repeat { initializer: ExprId, repeat: ExprId }, - @rust.doc_test_signature("() -> ()") class RepeatExpr(ArrayExpr): @@ -847,7 +693,6 @@ class LiteralExpr(Expr): true; """ pass -# Underscore, @rust.doc_test_signature("() -> ()") @@ -859,7 +704,6 @@ class UnderscoreExpr(Expr): ``` """ pass -# OffsetOf(OffsetOf), @rust.doc_test_signature("() -> ()") @@ -873,8 +717,6 @@ class OffsetOfExpr(Expr): container: TypeRef | child fields: list[string] -# InlineAsm(InlineAsm), - @rust.doc_test_signature("() -> ()") class InlineAsmExpr(Expr): @@ -889,13 +731,6 @@ class InlineAsmExpr(Expr): expr: Expr | child -# Let { -# pat: PatId, -# type_ref: Option>, -# initializer: Option, -# else_branch: Option, -# }, - @rust.doc_test_signature("() -> ()") class LetStmt(Stmt): """ @@ -915,10 +750,6 @@ class LetStmt(Stmt): type_ref: optional[TypeRef] | child initializer: optional[Expr] | child else_: optional[Expr] | child -# Expr { -# expr: ExprId, -# has_semi: bool, -# }, @rust.doc_test_signature("() -> ()") @@ -934,10 +765,6 @@ class ExprStmt(Stmt): expr: Expr | child has_semicolon: predicate -# // At the moment, we only use this to figure out if a return expression -# // is really the last statement of a block. See #16566 -# Item, - # At the HIR-level, we don't have items, only some markers without location indicating where they used to be. @qltest.skip @@ -953,25 +780,19 @@ class ItemStmt(Stmt): """ pass - # Missing, - class MissingPat(Pat): pass - # Wild, class WildPat(Pat): pass - # Tuple { args: Box<[PatId]>, ellipsis: Option }, class TuplePat(Pat): args: list[Pat] | child ellipsis_index: optional[int] - # Or(Box<[PatId]>), - class OrPat(Pat): args: list[Pat] | child @@ -981,67 +802,50 @@ class RecordFieldPat(AstNode): name: string pat: Pat | child -# Record { path: Option>, args: Box<[RecordFieldPat]>, ellipsis: bool }, - class RecordPat(Pat): path: optional[Unimplemented] | child args: list[RecordFieldPat] | child has_ellipsis: predicate - # Range { start: Option>, end: Option> }, - class RangePat(Pat): start: optional[Pat] | child end: optional[Pat] | child - # Slice { prefix: Box<[PatId]>, slice: Option, suffix: Box<[PatId]> }, class SlicePat(Pat): prefix: list[Pat] | child slice: optional[Pat] | child suffix: list[Pat] | child - # Path(Box), class PathPat(Pat): path: Unimplemented | child - # Lit(ExprId), - class LitPat(Pat): expr: Expr | child - # Bind { id: BindingId, subpat: Option }, - class BindPat(Pat): binding_id: string subpat: optional[Pat] | child - # TupleStruct { path: Option>, args: Box<[PatId]>, ellipsis: Option }, - class TupleStructPat(Pat): path: optional[Unimplemented] | child args: list[Pat] | child ellipsis_index: optional[int] - # Ref { pat: PatId, mutability: Mutability }, - class RefPat(Pat): pat: Pat | child is_mut: predicate - # Box { inner: PatId }, - class BoxPat(Pat): inner: Pat | child - # ConstBlock(ExprId), class ConstBlockPat(Pat): From 69761a2942a54971184d21e357b81ce535235fed Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 12 Sep 2024 19:38:42 +0200 Subject: [PATCH 03/22] Rust: AST: add docs with examples for qltest --- rust/ql/.generated.list | 110 ++++++----- rust/ql/.gitattributes | 32 +++- rust/ql/lib/codeql/rust/elements/BindPat.qll | 15 ++ rust/ql/lib/codeql/rust/elements/BoxPat.qll | 9 + .../codeql/rust/elements/ConstBlockPat.qll | 9 + rust/ql/lib/codeql/rust/elements/Expr.qll | 3 + rust/ql/lib/codeql/rust/elements/Label.qll | 9 + rust/ql/lib/codeql/rust/elements/LitPat.qll | 9 + .../lib/codeql/rust/elements/MissingPat.qll | 9 + rust/ql/lib/codeql/rust/elements/OrPat.qll | 8 + rust/ql/lib/codeql/rust/elements/Pat.qll | 3 + rust/ql/lib/codeql/rust/elements/PathPat.qll | 9 + rust/ql/lib/codeql/rust/elements/RangePat.qll | 10 + .../codeql/rust/elements/RecordFieldPat.qll | 6 + .../ql/lib/codeql/rust/elements/RecordPat.qll | 9 + rust/ql/lib/codeql/rust/elements/RefPat.qll | 9 + rust/ql/lib/codeql/rust/elements/SlicePat.qll | 9 + rust/ql/lib/codeql/rust/elements/Stmt.qll | 3 + rust/ql/lib/codeql/rust/elements/TuplePat.qll | 7 + .../codeql/rust/elements/TupleStructPat.qll | 10 + rust/ql/lib/codeql/rust/elements/WildPat.qll | 6 + rust/ql/lib/codeql/rust/generated/BindPat.qll | 13 ++ rust/ql/lib/codeql/rust/generated/BoxPat.qll | 7 + .../codeql/rust/generated/ConstBlockPat.qll | 7 + rust/ql/lib/codeql/rust/generated/Expr.qll | 1 + rust/ql/lib/codeql/rust/generated/Label.qll | 7 + rust/ql/lib/codeql/rust/generated/LitPat.qll | 7 + .../lib/codeql/rust/generated/MissingPat.qll | 7 + rust/ql/lib/codeql/rust/generated/OrPat.qll | 6 + rust/ql/lib/codeql/rust/generated/Pat.qll | 1 + rust/ql/lib/codeql/rust/generated/PathPat.qll | 7 + .../ql/lib/codeql/rust/generated/RangePat.qll | 8 + rust/ql/lib/codeql/rust/generated/Raw.qll | 114 ++++++++++++ .../codeql/rust/generated/RecordFieldPat.qll | 4 + .../lib/codeql/rust/generated/RecordPat.qll | 7 + rust/ql/lib/codeql/rust/generated/RefPat.qll | 7 + .../ql/lib/codeql/rust/generated/SlicePat.qll | 7 + rust/ql/lib/codeql/rust/generated/Stmt.qll | 1 + .../ql/lib/codeql/rust/generated/TuplePat.qll | 5 + .../codeql/rust/generated/TupleStructPat.qll | 8 + rust/ql/lib/codeql/rust/generated/WildPat.qll | 4 + .../generated/.generated_tests.list | 16 ++ .../extractor-tests/generated/.gitattributes | 16 ++ .../generated/BindPat/BindPat.expected | 2 + .../generated/BindPat/BindPat.ql | 11 ++ .../BindPat/BindPat_getSubpat.expected | 1 + .../generated/BindPat/BindPat_getSubpat.ql | 7 + .../generated/BindPat/gen_bind_pat.rs | 13 ++ .../generated/BoxPat/BoxPat.expected | 2 + .../generated/BoxPat/BoxPat.ql | 10 + .../generated/BoxPat/gen_box_pat.rs | 9 + .../ConstBlockPat/ConstBlockPat.expected | 1 + .../generated/ConstBlockPat/ConstBlockPat.ql | 10 + .../ConstBlockPat/gen_const_block_pat.rs | 9 + .../generated/Label/Label.expected | 2 + .../extractor-tests/generated/Label/Label.ql | 10 + .../generated/Label/gen_label.rs | 9 + .../generated/LitPat/LitPat.expected | 1 + .../generated/LitPat/LitPat.ql | 10 + .../generated/LitPat/gen_lit_pat.rs | 9 + .../generated/MissingPat/MissingPat.expected | 1 + .../generated/MissingPat/MissingPat.ql | 7 + .../generated/MissingPat/gen_missing_pat.rs | 9 + .../generated/OrPat/OrPat.expected | 1 + .../extractor-tests/generated/OrPat/OrPat.ql | 10 + .../generated/OrPat/OrPat_getArg.expected | 2 + .../generated/OrPat/OrPat_getArg.ql | 7 + .../generated/OrPat/gen_or_pat.rs | 8 + .../generated/Pat/BindPat.expected | 2 + .../generated/Pat/BindPat_getSubpat.expected | 1 + .../generated/Pat/MISSING_SOURCE.txt | 4 - .../generated/PathPat/PathPat.expected | 1 + .../generated/PathPat/PathPat.ql | 10 + .../generated/PathPat/gen_path_pat.rs | 9 + .../generated/RangePat/RangePat.expected | 3 + .../generated/RangePat/RangePat.ql | 11 ++ .../RangePat/RangePat_getEnd.expected | 2 + .../generated/RangePat/RangePat_getEnd.ql | 7 + .../RangePat/RangePat_getStart.expected | 2 + .../generated/RangePat/RangePat_getStart.ql | 7 + .../generated/RangePat/gen_range_pat.rs | 10 + .../generated/RecordFieldPat/BoxPat.expected | 2 + .../RecordFieldPat/MISSING_SOURCE.txt | 4 - .../RecordFieldPat/RecordFieldPat.expected | 2 + .../RecordFieldPat/RecordFieldPat.ql | 11 ++ .../RecordFieldPat/gen_record_field_pat.rs | 6 + .../generated/RecordPat/RecordPat.expected | 2 + .../generated/RecordPat/RecordPat.ql | 12 ++ .../RecordPat/RecordPat_getArg.expected | 2 + .../generated/RecordPat/RecordPat_getArg.ql | 7 + .../RecordPat/RecordPat_getPath.expected | 2 + .../generated/RecordPat/RecordPat_getPath.ql | 7 + .../generated/RecordPat/gen_record_pat.rs | 9 + .../generated/RefPat/RefPat.expected | 2 + .../generated/RefPat/RefPat.ql | 11 ++ .../generated/RefPat/gen_ref_pat.rs | 9 + .../generated/SlicePat/SlicePat.expected | 3 + .../generated/SlicePat/SlicePat.ql | 13 ++ .../SlicePat/SlicePat_getPrefix.expected | 9 + .../generated/SlicePat/SlicePat_getPrefix.ql | 7 + .../SlicePat/SlicePat_getSlice.expected | 2 + .../generated/SlicePat/SlicePat_getSlice.ql | 7 + .../SlicePat/SlicePat_getSuffix.expected | 2 + .../generated/SlicePat/SlicePat_getSuffix.ql | 7 + .../generated/SlicePat/gen_slice_pat.rs | 10 + .../generated/TuplePat/TuplePat.expected | 2 + .../generated/TuplePat/TuplePat.ql | 11 ++ .../TuplePat/TuplePat_getArg.expected | 5 + .../generated/TuplePat/TuplePat_getArg.ql | 7 + .../TuplePat_getEllipsisIndex.expected | 1 + .../TuplePat/TuplePat_getEllipsisIndex.ql | 7 + .../generated/TuplePat/gen_tuple_pat.rs | 7 + .../TupleStructPat/TupleStructPat.expected | 3 + .../TupleStructPat/TupleStructPat.ql | 13 ++ .../TupleStructPat_getArg.expected | 5 + .../TupleStructPat/TupleStructPat_getArg.ql | 7 + .../TupleStructPat_getEllipsisIndex.expected | 2 + .../TupleStructPat_getEllipsisIndex.ql | 7 + .../TupleStructPat_getPath.expected | 3 + .../TupleStructPat/TupleStructPat_getPath.ql | 7 + .../TupleStructPat/gen_tuple_struct_pat.rs | 10 + .../generated/WildPat/WildPat.expected | 1 + .../generated/WildPat/WildPat.ql | 7 + .../generated/WildPat/gen_wild_pat.rs | 6 + rust/schema.py | 173 +++++++++++++++++- 125 files changed, 1162 insertions(+), 54 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected create mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql create mode 100644 rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label.expected create mode 100644 rust/ql/test/extractor-tests/generated/Label/Label.ql create mode 100644 rust/ql/test/extractor-tests/generated/Label/gen_label.rs create mode 100644 rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/Pat/BindPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/Pat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql create mode 100644 rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql create mode 100644 rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.expected create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql create mode 100644 rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql create mode 100644 rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs create mode 100644 rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql create mode 100644 rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 7c16ab5e2064..9c4af259e0b0 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -8,14 +8,14 @@ lib/codeql/rust/elements/BecomeExpr.qll cf7d219b639e8e93f6a44bb14be14740b17bdb78 lib/codeql/rust/elements/BecomeExprConstructor.qll 0c206e657417066415850672a804a69e5fccc605c309bb8755737ae01e332f18 e70bd0c411ffc23c37b22a459455c95ff75a72fa2d179f751bff99866eeef2bc lib/codeql/rust/elements/BinaryOpExpr.qll 8bd02bff68a9a611ed82b2d380bbd8e541f9cfaef570cb33ab33ba9da7169172 2e51a9f16c4c91d2aef717ddb4c3080eab1a9c8720dbe44f83bf668668e4e772 lib/codeql/rust/elements/BinaryOpExprConstructor.qll efa89c084def020961641772f4829fc54bf718817831d4752b9bf403ce0e61dd d7937326ba08410fc3ba37e44b76530804f492177ef5e62dd416094e1e2f9bd6 -lib/codeql/rust/elements/BindPat.qll f0209f781d8a14ab7fbb4b4d6a654469aecb0ff1a8ff4810f18a90f3b171e1c3 9734b7907855e46eeded6c3f59912a16212f7e8639fba35c740bb04462240287 +lib/codeql/rust/elements/BindPat.qll 712176af2ff0eb8aa2bc97fdd792576fafd349b7e33d04347cb5b4c6392e8c81 d44ae771c75a090f83890ee2e1fcc4816d8fe685ba2981a9e7cfe28118b0ae4b lib/codeql/rust/elements/BindPatConstructor.qll 2bbcc296bcdcd945313d83294b90d327c51c9f1e96f92d37dd10bf0c32dfaf6a 612b4fc651f32129155727e866796edee8fff939614c6fd0b7baa1392930a38c lib/codeql/rust/elements/BlockExpr.qll b699906fba2dee34699e110b8759419079a5ce3dc1fab207001c9c9b612dac5e 429016df600e3905bd235d0e707c50ecdbf12b3ceddedcbf48944ea76e60f915 lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e8c704f6ce26503ddbd65c6f5282 d2e05a51d3840caf4de4cca6cdab9551f396df317c8ad1da661205aa822646cc lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 lib/codeql/rust/elements/BoxExpr.qll f4727005f1b07d0d2f2230379778929351ad9fda986754b48980e8b166cd68a9 adae835238f824a48ad700310c3fce70bc9a890538cf361b4ed5b3d213fcc67a lib/codeql/rust/elements/BoxExprConstructor.qll e30e71b88978b5d0f156152acaf7eaebe26232b7a5a562cf22f1bb9659ae5deb 3ca41494c5101ef73877737420fbc468483ac7ef215d11b431dac2dd6a08ecc5 -lib/codeql/rust/elements/BoxPat.qll 1df08d5443c63e21d40d25023da58da50bd6cf6e156b9f5dbd6d41a3193faee9 9837752be4d4a1c3f16d6438bd361c596b6b983d9ae4e486083651e8f4e090ff +lib/codeql/rust/elements/BoxPat.qll 37dd3362eee8ff330de6c5b27364878031500ec75150746b1e88fa16f76b44f6 a58fcecf1772f918ade434dd58ced3b68a16ee144fb0da2d4a41010cbf976dfb lib/codeql/rust/elements/BoxPatConstructor.qll 20f79f18beb8b7eeec63b1e30302d9f2e514354a7b1ae077f240db3cda4ecc4c f41ca3fdafc70c6b972598a3af3434bf60687bc2f0252dd11ddd09ec874fe63c lib/codeql/rust/elements/BreakExpr.qll 526da383194cfc0600ba623182ef8e984b44da76609d335b209067b9381e2e18 6d7b6e970b69f093be5015e847512830937e79a2460a6c49d286cd5c8ebd350d lib/codeql/rust/elements/BreakExprConstructor.qll 48b71a034b7b6b0ecda47c72379696c6d4ebb9eadcd6403f9c001945855c5365 fbbccb6d1718393ad6ff3a2bd473dd51691c871db9181cb1e041b318f91d27a7 @@ -25,7 +25,7 @@ lib/codeql/rust/elements/CastExpr.qll cafc39afc4103781b475906a0e178175b32374a049 lib/codeql/rust/elements/CastExprConstructor.qll cab6e9a9872006cc811620bda522fafde23fc4edb5151af06a5a0938747dbdfb 6d972faff70166c4b07392a0bc90c6d72c9466b58b55e7651ef6c3d06cf72873 lib/codeql/rust/elements/ClosureExpr.qll cde112e1e1fcd5677cffa3469e376ff2b69ff6f55d907152b4afba4d92d06c55 f9180e4e0905ba233f64717719ee653ee5dfd2dad9f87a81b63b513ce5e73bc3 lib/codeql/rust/elements/ClosureExprConstructor.qll 238dceb78082a5566276640d4aa31484041700852c0751130d139a69ac8bde46 7aae22930def4d438d742255731cc59b78a95b73a0b1d6334ae9965e083e03bc -lib/codeql/rust/elements/ConstBlockPat.qll af7f5f1a8de38266a12e92dee4a5ef5279baccf542cf2c52d982ed075d3bec27 1208223d97230a90d9377164b61454dcc6ca0f46a408e4a5ab2a82340bc92eb3 +lib/codeql/rust/elements/ConstBlockPat.qll 2ed7b82917c0da34cfb53b37177e7c56b51011716c50bf0eea35e1a33dcddc58 24d2c3888adb404717e4263b36b48d531ec8d0a6d09b4dd577cdd4933b6c2dea lib/codeql/rust/elements/ConstBlockPatConstructor.qll 04aa8b4f218ce87157f0d6b10c9c04660c34c90af1f121b1432402de2e5114cd 34e2fecbe91ea9ac1626bc27121a7d5abe99855e3f49bdca12a1969b42ac0ba5 lib/codeql/rust/elements/ConstExpr.qll 70a7c9db14efaf290a77401eb04c439b24ed77c21496cee53b89d92d350daeaf e3f98ac4dde94a4dc8d6df51ba4ecd4acc492d9de569ac3eee9dd3bc258bd03d lib/codeql/rust/elements/ConstExprConstructor.qll b4c96adc2878047c36d7ceaba2346ef66a2269b5260a56c3d7ff6e3a332bad75 ce15bbfd1448e47d3039e912363efa607cc2c29d44b8248ac91c307af7b57016 @@ -38,7 +38,7 @@ lib/codeql/rust/elements/DbLocationConstructor.qll 8848abace985818a5d3a6eddfc4cb lib/codeql/rust/elements/Declaration.qll d4ec5c83728f1837243caf2f27d06fd05ecdd2ca440112accff99bfd37b45e5f c1cd9b297be8b69207e75d24b29949b9f71c78406ee0ffd38d0b0810288d6140 lib/codeql/rust/elements/ElementListExpr.qll 64356a9bf66f0f316da659fe8046828445804dcf5ae6b19e52232aaea8744885 0822b1430e5c811e74e092cd19001dca783e8d26df140c5366cce61692eaeb2c lib/codeql/rust/elements/ElementListExprConstructor.qll 12b06597e0700cd0eac70e42cbdc1a2d410e0ffcd05c21a213812a488b5b236b 7adb2e442f1bc362c44824aaba0ab4a7fb4a4bc550a3c96f963dc03bed582d39 -lib/codeql/rust/elements/Expr.qll a0c2cb3ff9628e5dd1a7900d2413390faa433dcef114bdc85279a3a2bf2fc4d8 a0e8e5693ead91b62da5531e070e11a2105ee49046cb69e63b8747eeafc27651 +lib/codeql/rust/elements/Expr.qll e1932febe46ca4f1b2d0caa1f1e8b14e84904fc1b1b663a54511d8ab34d40a59 d820fbd85b938121f33da27827979dd6fd83a8331315581af5922ace13807a47 lib/codeql/rust/elements/ExprStmt.qll b88016cb0b3b53fd8c6feb98e4a17b72a65824efb9aac798c67a6e1be0cbec77 e5bdef5ba3c94495900494b1f3c61c167748945372e3de061b8a4e3f7edce430 lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c339c7a90d9de527f97fc7d36df2bb921ba 5333db932a2edb791ec3c8f2c215f4c74e825a362f45ee901949d81e328bc7fd lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b @@ -52,13 +52,13 @@ lib/codeql/rust/elements/InlineAsmExpr.qll e462d3d71b25124216acfa3f037b675c57bbc lib/codeql/rust/elements/InlineAsmExprConstructor.qll 5a3eb5162805366dcc2aea00714c1a0880c31b614b73b69f1638ff4f088cdb11 89c54b68b0246fe5d86f119c1892149746d7fe22d6ef8b625c9ab64398d19d26 lib/codeql/rust/elements/ItemStmt.qll 7482437f4acc6a213a65cd1615be2f909cc4bfa354894df665c8f5e17622d325 aab0311fe7a189bf8221f51c3f46fccd785887d53e664b230abd94f5a89dfd44 lib/codeql/rust/elements/ItemStmtConstructor.qll cd27051f73ab2897b1f7a725313f97d36507fc9f5e0dd7b2ad8bd1caaf8c42ad 67596c97386fbe6cb9e5e6abc45b674158f411d927297345cb25359587380bcd -lib/codeql/rust/elements/Label.qll f48209b24876d581e95120bc548c44033b6552a7875eea73ce44aa57b675eeb3 d17163f3adc9f94a462269f565153aa2822533d03487e521d9c5d5e72afaa1ac +lib/codeql/rust/elements/Label.qll bcd453a21ecba694ea3e42316f0c2b6a213d885bf2cb5ad80fb14d64a1d4952f dbde62a6567c79b137c78210bf04609b2c259ada9a8bf8c1e35e44438c61b983 lib/codeql/rust/elements/LabelConstructor.qll 0625a149cb34b9f603b76efd76e679bb63808d47f9fa529959784347d8e7d447 2115bc7de878af444777f96247bc0a775161f3766e38c3c4d363c2f59b2144da lib/codeql/rust/elements/LetExpr.qll 49a9ba97471d04d52bee73f9b5651bec09fae40c5779db59d84b69a3e04c0a4f 682c504fb507855c96833677225c4ddafc20dee75f8203e0dc110aeac89fa2f7 lib/codeql/rust/elements/LetExprConstructor.qll 8904b25d70fd0e6f3db74d2e09bb3e3fee407282ee45030fdaeac31b6111db70 36dcc877f6c1810228d593d914cffa7b04ecf0afe13c4c122aca72f33d03f566 lib/codeql/rust/elements/LetStmt.qll 542dacce4a4991f0250b45a6c3b28829117e6e5692320494819244a155d05e8d b3e50baeb3534a4352d6bf898ace88e250d84aa05ba0c0debdae5c18c446f3c7 lib/codeql/rust/elements/LetStmtConstructor.qll 5882f0e4379d07e8281a955c9eed7dd907b610750887de3dd6451cd1c8d104d4 68b0890d8a493dcca74190904b00f05b0e58aacfe5a2aa63e5ead1ba366d3c38 -lib/codeql/rust/elements/LitPat.qll 539b414883b0b86ff446fa81254f2c71f467e5ea0bda21dc3bd66cf3abf95b13 d54eeb618cfb8f0c4a48ce5ab1922fca2622f4a0c703760aa344028172f37642 +lib/codeql/rust/elements/LitPat.qll 1a95fc2a1dc6e871f861c984433f341b0e8a1b1c38823fe05b0f5a4aad59f007 693317895b39b9ce0791e3b2cdf46f36fc5f4429f4340658e913973bfb6e9964 lib/codeql/rust/elements/LitPatConstructor.qll 1a1c5f711b04bfc9b8b9a197564cc8acfeeaff1a9c8b30d57657747d84138fce 19cfa7386fd1f4ad8ba1ffe8b14bc547b9884dc98e731b6935afd11ceac6b5fe lib/codeql/rust/elements/LiteralExpr.qll 031edbbd52d2107a3a7149a4dde306f5fcce9a32b7f4c5f7398b013c06ef37fe 7c18930dc7514f5fbe0a4248242430ee06f403b4e301c4e594355fc5b2fc8941 lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 @@ -72,47 +72,47 @@ lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a62 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e lib/codeql/rust/elements/MissingExpr.qll 30b04d6a7b67acbce40dc1ffb95edb833578fd50ac7165213913b6c83d3181a8 444fb33c01ef6a311539f5b8a3159034aeabbf0284d192139e64c3e66ef0a18a lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 -lib/codeql/rust/elements/MissingPat.qll eacee2eaede4adb8452a41c14c95c310d0731c2c60fdb818b3e94e34f418aed4 9f81567e8e9c02be0994764a082a2135a6bec952456c2413295f2b0a16e5eb5d +lib/codeql/rust/elements/MissingPat.qll 74a84a04d0aaabb3353419bba2225e6ca3f02ada55e00d28e6cceb37cefce43a c8ee5e6c411e0955ca0a775c8b09b894e2914fe24f9d16df1f0e6d186d15ebd2 lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 lib/codeql/rust/elements/Module.qll d8995b361cc672f86a314bd53bd3e4d1ddb26b6afde62eb7c380923810785af0 3c10180c812d89a8116ac6e32cbd4d7ac2f549c8a76d327ed75c764b09251d52 lib/codeql/rust/elements/ModuleConstructor.qll 109ed8c1b5c61cc1d3e8613aa8bb8c168dc1943c93b5b622fa79665751b78318 601526c7f56578883d261d14653fdad08329f80fea71de14a5ac5ce671a8d436 lib/codeql/rust/elements/OffsetOfExpr.qll e7490d4db7cb4dd1c711ce57934970da8c9cc61af913a62b6963667313dcb0c5 c9043c5e68483b3d4da03ab191dc56e0150ff23af361a227fe91062e10ad66b2 lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57a0235ee01bb50e1fbaa6e5601e0e232c1977d 6e3b7c20a17fe4c45d503ba32264aea8f6dfdc69ccd95905a5bfb1e8b0cc91d0 -lib/codeql/rust/elements/OrPat.qll 9b5cf68d55c57c262a5d630852ff2e842f0caa3aca2a0b4491d601340917db63 c965eb43675b135f3ce11c1e8762af0b764c6d4c262f002f8b9a512ae59e8a03 +lib/codeql/rust/elements/OrPat.qll 448ebaddc1b42fbb90e3240d990cb841d4775d9129350e8f5195904798efb27c ffb6121a0b4f0e661e1653c396d565053b9f89eb358bbaa1c218c31eac3b8221 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 -lib/codeql/rust/elements/Pat.qll 197aa86d5f317669e38230a20460b271c1d82e830b84150dac65afb67059fa2a ed3e8c74e42ffd5df14dd88711d79660982170a42f9a605704a274298dbbfc41 +lib/codeql/rust/elements/Pat.qll 79ac8430cc9047cf89fcf80cdb527166bd72e979d03e051fa2d60fa2f64f2294 914362a06ad0cac1e1777874bf4425fcc805021197f635ddd87b96d9e5c221d9 lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8cbc93779b80e494561af706 c6da0b2e8ace1c30a7cd468406353a457440aafacf8e31c32618fd9781c69113 lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 -lib/codeql/rust/elements/PathPat.qll a49036bca0f3f023917fec3547876759987a34747e16b9a15ebb99c82ca9234c b4f77e6e29300f02cb845ab79d4a64edb654a398fe3d6c1a2306423e1c0a237b +lib/codeql/rust/elements/PathPat.qll 748a43d1c25c4fd20eaf78f381e4680207557bb696a28d74a9eaa1887bc966c1 186c947b0bbed3111c9bdc564c3ce39432c1a3bbdbb15ebb503629625ffe1dea lib/codeql/rust/elements/PathPatConstructor.qll 476a38723c63bbfa2565946725c90f1224ac2c5283fde79bf14dcefce6f500ca e9e9b000cac44851772bd9ca519edc89e8518e89a0930df21af14a69f5b0e864 lib/codeql/rust/elements/RangeExpr.qll 42bf1320c3060b6d225e7ece9bef54f3d823704a6aedea6d8af594a0fa676134 03a84ac76225e2a6172f6240af21478ad3f978b03a1b9e3fceba39fd0bcacba1 lib/codeql/rust/elements/RangeExprConstructor.qll a04153bf88dd71c3f516418bdb7377ded9db21c07f7ee6dd245ed8b44719d8f3 2d578f8dbc49da98694676d6a59bb9d58c6d2a200ffc893ffa90dca77878e38a -lib/codeql/rust/elements/RangePat.qll 02f3e4647932553481c4d8b1e2d2da3551662a17d75f26f2fb7e9d77ef1d579d e2546bc74035d03c92aa7beab2abca73a587049c95710eb9b59f916363df1552 +lib/codeql/rust/elements/RangePat.qll 7df30b22d972c48151c9a0428245b9d33cbe3ed61a8767ef3cf1a82dcb949a85 33fe10d12a8d9abd4128fb6af4a61badf3204c538a1bb583f20a30df4ee42b42 lib/codeql/rust/elements/RangePatConstructor.qll c391431118ed6ce16f7b7126c5d43e61f07b98fab7b8bc48e9dfe22f7e21ed19 bbafe1c9595b0b004f7b27999a14df27d0710d5b058e7ab14dddd2fae058fc31 -lib/codeql/rust/elements/RecordFieldPat.qll e3f69b2c59d50807393928ef9be0b51af016f209cbae68cfde0fdf02b287f353 b24e256f850d1f0bbacea74c4879fee8bcedf47f65db091d7858302355751fa3 +lib/codeql/rust/elements/RecordFieldPat.qll 3bbdde1d7fcaaddeea674a7812216d3e25bc9cd7252ab190bfaf0d43f53dfc60 a1eac9ca2819871d361e751f3a180b5f785441310b182340637252975f2b631a lib/codeql/rust/elements/RecordFieldPatConstructor.qll 36859753aa70086c540a1700495fe6c414521553877bfdd56800f586eb577743 1b31233a5e6da0bf88aaf40c52fa08cfbca5b44088cd3f91957ce8c96f4aeaea lib/codeql/rust/elements/RecordLitExpr.qll 5dd804785e2bef9decee1aa1b4512dad799ba6b8e70c3fbe65a9a7bca029ed87 875a6b37072010496974a36b535e8ac656928b504b9b9488b31f81108a25102e lib/codeql/rust/elements/RecordLitExprConstructor.qll 7b676a8e0fd9ba5a932988e613fe3dda8b6b0430feed8791ef5585fd9cd81767 f7811928dd8269138d75f0a6dd1c60f70d18806227bd2caaa5cd4cc1341e9286 lib/codeql/rust/elements/RecordLitField.qll 09cabffa00afa3a1e7798b735828b613b2c6bbc03c27c1b3229c0b4ee43ba3be b1ec3a53f7370b2702d042b78d829bffd35b738365e93b289f0f30313ed9222a lib/codeql/rust/elements/RecordLitFieldConstructor.qll 0f83c9dc00937d90ee0d64d157458145078f5f3c87c9c0484600fdcc830ab207 e2852d5bc4f0174d94b90a2ee34fae1e6c4b24d5d8ccb58a51c520b12adf8512 -lib/codeql/rust/elements/RecordPat.qll 50f4a2401dc579f3900188043d412ccdd6c57c1da6636c105221cfe243307d32 7812f0e10ce1a8e70c8c45d0c87e52539f6b29469157463456d06c566e86c2dd +lib/codeql/rust/elements/RecordPat.qll fb02784f6f7b1e1cfa5e2f493dd3e9b084fba5755d237f80296bfab734b4744a 619b6fb3b14d154b3bb17d2937b01d0c4b2c56544bccb8400dfc3c2b848cee18 lib/codeql/rust/elements/RecordPatConstructor.qll 93c794efa5050b86c458470224de7f3206c1a004b46ef374780f080a8e9a4ce0 157800f342de96095e118dbcfa20f8e65cc79ccae712e8e37bff1ba92a227fda lib/codeql/rust/elements/RefExpr.qll 4c3176d24c52d61dc220d0ebf0c277126975a7e4189094c5f36e0d386bbd95e3 dd143ae809b9c3cd1ca20e8ccf2ed2fa79f0b75d3ce3d92de5e88dad68bf7fed lib/codeql/rust/elements/RefExprConstructor.qll 4a2b9dd4ec2638a5ccfca268ba377980aab3179b27177e34e44e0e9dc6653b36 752f6f298369b8c0f59d49ca9e729c20aceb3559df68be416c7bbf65f578489d -lib/codeql/rust/elements/RefPat.qll 00b2c32e09a02b336d516b7812aa7ffe6202bd1dcdf4ec2060a74ee7a4b1c5c3 90a4b3da60aec10b5d56f6364d0a022c1d7db5fe8cbb65a78f55651d23f9abe7 +lib/codeql/rust/elements/RefPat.qll a273a13acefaaf366a6c9092f5a60e37bf8467e6d245384fad97a79f682cca9a 19199e218fb18920c5338e748106c53d13dd72b6b49681768b3781c93e277b46 lib/codeql/rust/elements/RefPatConstructor.qll 98497e0ef76bec0390a23aede2fc6f80050ad2d00bb60f1d473362111a53d4dd e4fde4e3e88c33daee90ab6d90ef2e38b36faedcfe1b6d6304f4eed92980b5b1 lib/codeql/rust/elements/RepeatExpr.qll 376199e9efc3b20efd8c26a020c5e7b7f19bf9490ab9698673ae842cb4ff6721 7dcbfbf8029811657e07850a1fadfe70025881e70f474fc49378b215e65d6d43 lib/codeql/rust/elements/RepeatExprConstructor.qll 7e141ed538f1dd5debd83de045eadc74ef032acc8a64ee2e8ac760da60ede525 d20206b72b14d03f8a41571948210619ad7d7dc438ba04ae45d929776a11915d lib/codeql/rust/elements/ReturnExpr.qll eaec617f85ae874a9e49a55b819bd47e672ba030f3f785ead54829a8479db195 1bb27640c8b29e099e39eb70fb095bf1dfdb7ff278f884dd71e3488a11e63dd6 lib/codeql/rust/elements/ReturnExprConstructor.qll 825501a55f7b5556ded49fc3c43d45b7d8325e3a1790a2af738a46df33b569a7 ef06e95f1919952e537027861660a4d7c79b832fdbe802bfa5bdc29ba0192f31 -lib/codeql/rust/elements/SlicePat.qll 3e88657bd488dcb1ce2fa6f4bf72a9f76c7bfbf64b695070efa0ad89a6af407b ad60e3d0eee368c21c46acb439b599d8867c82193c7279777fea10f3205bd272 +lib/codeql/rust/elements/SlicePat.qll 06b0fce357a5a03c4b0ae3f420f816ff9fe08e4db5ef49151f8c46702d50509e 25b00eb84a39e93b27c14c04b552fae2784674aa28927788cd57c6d52763a054 lib/codeql/rust/elements/SlicePatConstructor.qll b2885e663932f68ffecf87b4532f533e9177beddd715765474f454a9804afc8b ade153522a4773eb769f4f4d96fa07add34089f131b41a74534b28fbfd2bbb60 -lib/codeql/rust/elements/Stmt.qll bbe8414d75bdcfda90f47b853a04fc618f4d0b6d6cd3b662bb15d3a9e5cc7bda 714c6f8eba9882363bf1594f48c75d1a885f6e93adadbdecbbd8169ce08f7b98 +lib/codeql/rust/elements/Stmt.qll 89857f73ebd72919f2781f0ccd08c6c12fd545e6290366d739d189f41de75fbb 8d3616e460028b8ce51e4688eedfd1f8cea6ab4a1b0312a110eada4f224d12ec lib/codeql/rust/elements/TupleExpr.qll 6536c9c062c971d943629dd38d5e7e284526eb31e6cd0306fd290232e8d1d86c 6dac287bb0f85d0c5463ba6038b91d22a980626492085350025bff9774a87673 lib/codeql/rust/elements/TupleExprConstructor.qll e7cfe2da7457339e99263030e74715e5ca44828d74ea3f462b90a7e72c1e9302 b45006d9cc7664a5a659e7c74f415142e2397dc33fb1875ac3a6cf5ca39e709e -lib/codeql/rust/elements/TuplePat.qll 17bad5b6a0be8e9b61addbd9a17bb387709147e8d2fb8a93ca9255a8a11bb822 7e84df64d0baf1b5329d47f4977fa5e8471fc323b2eeca8e942df93a48e04cbf +lib/codeql/rust/elements/TuplePat.qll d9161426edabc199d206a3a1c2994bbda9430d7418968b8fd0a8aabc9b29c4fb a25ccb4c1b77fcf9d00c02c0673f9ccce03d4d3512f8a2b8307ac21c8c41ffc7 lib/codeql/rust/elements/TuplePatConstructor.qll 505c4f440b47da576acd7e3fc69d6b49e8287f981a21e79919ded374200f2578 b295526303bcae982ddd8c6b544288c0b8b8d62984d6986319e7f17baeb7a19b -lib/codeql/rust/elements/TupleStructPat.qll 50b7d89498dbe6737d97325037156c7689fd8d7e776d66fef9551f173fa3f2d6 f42edcf42be877424ecf2f11c90166a90f485249b24d73ed302294299d6a9bcd +lib/codeql/rust/elements/TupleStructPat.qll ed443440791cf0868183c5e5304a855058ce78c1b3735507b5c35f269604022b f02c9481ea471b198eec0909d01bd3db03830bd98f10bcc3a2ca4f37b1466b79 lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb lib/codeql/rust/elements/TypeRef.qll 223844544eab3e07b6edda805c6344fa8b486aeea7bbe62e4b98e235ce2008d8 7517748b0e7a57c925168f5ce7a31ecc1b59f7521a2095578f599b8d9045a4e5 lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 @@ -124,7 +124,7 @@ lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af lib/codeql/rust/elements/UnimplementedConstructor.qll ee024d4944aebe619ee3ea0ce4f84da0f4fca706baed250c8a65464a8d77979a f95966e3a63cbf2b466241f55bb47c23125645fad206ebd758236465afa4f97d lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 -lib/codeql/rust/elements/WildPat.qll 9791bcd2b36516da82a81c10655fe6b4ef0f788d548cc99cb88578dd9c1278f0 03c192da4f92db637001854f904f5f0ea7406b74c02c1ce26cd375d9cfb26108 +lib/codeql/rust/elements/WildPat.qll dda006b9e762a6f655842c2888bdd33c188c391adac2f2e79437ab1d4969388c 99cbb5c5d64f0bf7a20ce6f0d85bcaa065503505d42dcfd342fbce5a4704ac4e lib/codeql/rust/elements/WildPatConstructor.qll 538cde83119510e0b3fc9728127cbf980d17f7f4a9371b4572de26329ab08341 66b96aee3862d5c314a2fbcc6930258f755189c4359394b432e8edb13a9d0eaf lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d11a926ce452588501731bb 848736c361d420945fbf670d6c126d258d095f7f8509ac1cbc949f5ba280f851 lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 @@ -137,16 +137,16 @@ lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6d lib/codeql/rust/generated/AwaitExpr.qll 5a6d94ba4083e00dd971f41be7f32693812cdd7f8efb9dc7ef0fc18296ed560c 7af5433b8e945932a453eededcdc931a62d85d1505c0b4e417291c694ac6cc5b lib/codeql/rust/generated/BecomeExpr.qll 62daf23501554f0b786adbee8e1d430323c6dac79afb8fdbc28d19dc10bdb3bc b17eac6c775fc38bca90a65caffe1294678aeab92d456fb9b9f555e1ac59a0b7 lib/codeql/rust/generated/BinaryOpExpr.qll 54902ee8922ebecc3e6c03d5cf31f90a8c305601889b93177f413142c61d451f 56a56b576ac8ec7aed8778b411f7e670b40789fb63a2234d7144b21b5a9dff61 -lib/codeql/rust/generated/BindPat.qll 15d3a33c5f56f7659a331f72735f00930fddd6066659e54c5c19d5e7eb8ef078 bc0a916622b2c426b71760caf15b8e005eed276e06e04d04cc5f19f4c31c34f6 +lib/codeql/rust/generated/BindPat.qll 8ad576c6dd5d16103bcda7f7e08c19d088190b27b43e61223010bf79eaeaafb1 98ef91d831f66d3df84add160df863adefe4b3ae54c8f8d06091af4392c1011b lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 -lib/codeql/rust/generated/BoxPat.qll b69ba2bc341a1bf4c613279e45fb97a530619d4148d5ccc4f05436a316db29eb bf52730243bd1836d5890c745232aba50544c2046d00e80e7d22eebcd104f821 +lib/codeql/rust/generated/BoxPat.qll 8a856d3bc45313bb67b3411fe500c4fa508f7d80abcacb8bbe0a497624282b0a 2e0c7e16f437792c3de5d66dee5562dd7955a22a3e835d723915cc296d3264ea lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 lib/codeql/rust/generated/CastExpr.qll 0264db34cb111644de4d37569791a2c27665f3a7373c26adfdc1d68ab0a6fcc6 3a757ea06c6e0c715d88bf1eeb579998a0ecc5560fcf3b4066bbd86803ffa100 lib/codeql/rust/generated/ClosureExpr.qll 43d9ff09c156f1ce000c77bcf5ecc02c8fb569c0ca7f042a1aae9d311e18b13e 07e1461269e1f07144468ef7b64b927f29053fa6de71afef334732c33a797f33 -lib/codeql/rust/generated/ConstBlockPat.qll d0818fe4cee066f1e6d3439c82122942ae62941e69da686b7d5c399e820c395c 2fae5a2f0457bb7106d52ac7457afb597d7ac9658b8dcff8e76294f5fe34019a +lib/codeql/rust/generated/ConstBlockPat.qll be81c35576fd65caa9dbb657a85da18e4ad64e60c0dbf4df7e373584773eb19b 136a2c6b601decff5523a8aba51d797713271d5766dc4a4fe5cb895f660bafb9 lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f lib/codeql/rust/generated/DbFile.qll 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a @@ -154,7 +154,7 @@ lib/codeql/rust/generated/DbLocation.qll 735d9351b5eb46a3231b528600dddec3a4122c1 lib/codeql/rust/generated/Declaration.qll bbf5ba3792797a829b0032c41fa99d22c26e4277d655099912cdbafb80f0c8cd c4666a71099b21ad5cd83ef6f991ba18f9bef03b3ffbcedfa10aec081d6501d5 lib/codeql/rust/generated/Element.qll 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 lib/codeql/rust/generated/ElementListExpr.qll fd3a6fb638a38382a356b807acbbcb0bffb70fe75b827e7b46195b060a4b53d0 24da1239e70a7d95531784260af6867c62dca271246ae2c740d03231c329371d -lib/codeql/rust/generated/Expr.qll 32cdd43d17e8b2fb7c73ec723eba89704d1e853e29d304db5eea3979fcdd2e0b 0b8382b0659afa1bd1d13d0cd492d7fbdc0fd7a5162fa658ca2973bc15ee6534 +lib/codeql/rust/generated/Expr.qll 91b1744d6b07e8549b94d19832dac9e18b70f54990b328b1872b8c73be202417 ed71e6d24ab3f0dc687bfb8a665552c05f848ce52d8e338899c1cb48783a778a lib/codeql/rust/generated/ExprStmt.qll 40fd3659761005fe0de2a09e58d35b3b28203f8f354ef5f687e6064862eb73d2 c4bcefa928d8a82f6b9d26a6e4f42912114bd24a90ee5dcc24e7ec1a4c11dbcb lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 @@ -163,10 +163,10 @@ lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f15 lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 lib/codeql/rust/generated/InlineAsmExpr.qll 0fbc121595d55df71a9190200ee8d7244851c517181d907d07236a8c338f1ebe b41cad499ebcc6aae4326ac5ae596210997fde99b6107feee35d6c9f764f0f5a lib/codeql/rust/generated/ItemStmt.qll 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 -lib/codeql/rust/generated/Label.qll 7de504ea71f2847e305ab5ea3b30403cb0aafbaa0eb4cff3956a2931da6c024b 61e3c6a74b573aadcccefe0d4abe5d8e2542b1e5116c95f4e595b36efa3a86dc +lib/codeql/rust/generated/Label.qll 25121c47ad829d209bbd6b4388a8878b9ded1f25e5b9c0f992e88427b3eaecae 216e68ad49218a21466597afe2a6aec20982715642aca726235cb4075cbc1cb5 lib/codeql/rust/generated/LetExpr.qll 377099647451717af698677ca7119436982354d4e038a2097bffe8f34ac5686e 6bd51c497bcf2a684c1e6a2515e67228b0146b47a65e8d922cab54faf48b0d73 lib/codeql/rust/generated/LetStmt.qll 39b49089d68052147935f226bea75a49fdddb42ff1bb2e700ee7b698db5ffe92 1078a1b9e20ae83a44dc0c12617ed53d79896d5cbe353a900accd78ba46dc960 -lib/codeql/rust/generated/LitPat.qll 92c3c0f32ab9d5b08e246231e5465fe18536dee99351f73e158048bb007baf8a 6736a7824e5bdb0cc16de1231bdb5169d2f48251d5917bf2c31a36422b0bf2fd +lib/codeql/rust/generated/LitPat.qll 5009d9fc8d11a0fcbac379602635e6396f95194f69eec3285a4745f662c23d0a 128f5b9a394f79581ece1796f68288da827b100d5f742e2d3873860b441bdea3 lib/codeql/rust/generated/LiteralExpr.qll 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c @@ -175,33 +175,33 @@ lib/codeql/rust/generated/MatchArm.qll b70dd1934b7190e68cd6f9b2642f6fc67cba7ae13 lib/codeql/rust/generated/MatchExpr.qll d3984b540d7c8e8fda2d99437445f110c789d0c889eca1bd4a38b941884b487d df78f882f75cf443e1a5b21d899559e24e047d5a368dca22b453d8f976d259ef lib/codeql/rust/generated/MethodCallExpr.qll b94d96216c0203b27eb04c64500487ce284fdcf2158b9b636621fc2d2c93f377 91d00774e94600ba82ae5103b85e1e377b0baef866c7de87c34f806cc4c3bbac lib/codeql/rust/generated/MissingExpr.qll 9ab4844a2d719d29a95a69d1a6f9477ded0db508f83f3e4f2101847d0486c300 f0706af7d600a4ed1dc253c9e1220e863a58cfb9334f853877b80dffadb35a3a -lib/codeql/rust/generated/MissingPat.qll 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 +lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 lib/codeql/rust/generated/Module.qll 2a931a4f2cdb2fee00ed83af045ea63d36b7dbd708e58c30445b5610feaae333 cd62add5c31a509f965aa294f44a1607ec7c62e3a9e3fe9ee063b3c814f4eb62 lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 -lib/codeql/rust/generated/OrPat.qll f8fe5c7b83a08dabcc530484a696274930040ea13501ae20f1426faeec67bcf0 f3adb3148890531b698570a48740335983a5e81977ba4ac651778f940f184398 +lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d lib/codeql/rust/generated/ParentChild.qll 956f55ac17d66926c59f76d391b75c30767d236b145d6ae402f4308fa22a7d01 dd3cabb5b4a9ba42be60345f445cde18b0d7be934aeb94d7312eeef122e148d2 -lib/codeql/rust/generated/Pat.qll fe1c72856442dbab5655eff93f86c2cbce8d69d9fa1f99a0f9203061ea1112a4 d85d86e8b6c48df733589d186f610b1cd9086629180701e017774bddc62402c7 +lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f lib/codeql/rust/generated/PathExpr.qll ef6665a46332e5c1bc3495f9e7028b0e56b83e99eda692965ca0cd8fc8931cb2 475c1a5374a37b959b09780dac3d62773bdf9fed7fb73ac325cb087e8ee39022 -lib/codeql/rust/generated/PathPat.qll acc4dda795bae97626a8d0041538f3ba1f0b591c743fed381cf198a8b04653cb c3deee1b3bb9bd37ae3ed4761d8ee2f498384fe5e1f5e31c0f9b99dfd864a0d5 +lib/codeql/rust/generated/PathPat.qll 6544da3df717fa99f2b4480bc69e9b6a376c88766fd4565a9bb17cb459987b10 1edf79c181d8836479bc7a9d8f0b0d955272cf7d821386824f5aab65a36a10b9 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 -lib/codeql/rust/generated/RangePat.qll 6ec95f6cb9c4bd93b38990bb1e3b89b526624305ac6ee7b94e6fb0a2f3db28fc 0e193f3816a7587d5103dba421bc2bf22b869522353d4e3f43d49a792eac6cf4 -lib/codeql/rust/generated/Raw.qll 21a30c32dbc900f488d2768658bdabafbeb0bfb520c5cd2f14835d0e081c678c 1a490ffa8d8702cfa529c28e0ea4b55dcd0a3070023c4cdd669661d65a9ea8c8 -lib/codeql/rust/generated/RecordFieldPat.qll 26bed2285d849b9b7ac52d86131eacb40df912db350e423e81fb98c393c08a69 05ed735aecee90901a1bdfae05d9f85d7f6581616eca3a9262fdef6673222f9b +lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b +lib/codeql/rust/generated/Raw.qll 5dea1190c702f339a6c5da16cb922508cbc5818cb61f9bb6b2c7129167e68f3d 9f650660a6ca7e62426f4dd51fe33677d96658d48596baa52c390d8742caeb18 +lib/codeql/rust/generated/RecordFieldPat.qll bff47b9ec13fd5747a9d4597feb3acaacd17876ed1ff411bcecf605c5909a01f adc2e30ae9169b861ce28c6c21431e9dd3fb3d3f832e99cb39f9f0ff6b1dbe2d lib/codeql/rust/generated/RecordLitExpr.qll 442772626175d46dcd8e68b84d6a26b869affcc6cb1e88d880d31e7a705c772f 77976fea76b5741c1aff3e8a48eeb07987c3332ab9f52ef0c32caae75ad4f1c9 lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 -lib/codeql/rust/generated/RecordPat.qll 5fd26e95dd23b07a847bd28c95a4206df62f7cc22c8d7b3bafa10e902e917d15 e264a96c2af4e2f64a394a119329b8b376d4b23ec6a3fc6d123c5631845bc4ef +lib/codeql/rust/generated/RecordPat.qll fc5efed719d6dbceb4fa6eaa13dcbd9bcdb6958c2721dafd5bb56d7395003fef b7412c9376fd9628e6bba8dfea8914d76d3a6e63af3f8022cfc99f5c9e397c8d lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 -lib/codeql/rust/generated/RefPat.qll 3525331e8ba25a8612324e860423a39ddb29e8eb50a9f2bf62e49bf182d64b6d 804efbd32869f92e5515d34852fed6416288f99b0aab95b5be5cb5bdd1eea806 +lib/codeql/rust/generated/RefPat.qll 2a451553084306acc625f0433dc02546d07a1b6174a7d614379c9e8e28550118 40b845320c68283d0f6e47f17f4d4d893ef613f41422d35663582cfa3b5e7d75 lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb6f88638826dc37a712c05afaa c2cea180b7c068a3483cbda73168effe762ab2aa56bb8c590c8a15b6e54961ce lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df -lib/codeql/rust/generated/SlicePat.qll b4de6692eebf1205940e04da963adc20a07b15923c3c3a7a512a24e3bd8342c9 ee9b919983807f39d97cfe8ca66b76bdbfde76db02db5c93268ce22cbddf4213 -lib/codeql/rust/generated/Stmt.qll 55688c8f42f6e7fd1b871e572d75fac60d0543e38c4be4638abbb00187651d3d f978006a8453137f989249e849a7c935a090da3a9b0116145da80068760e12fd +lib/codeql/rust/generated/SlicePat.qll 73dce5e310068357eb41e8c51923ff5c4054548db27987cde85735ddf071fc44 67fa0c285c110f18446689d1eaad9e82896df79d62999ad3f788fc295fa1d2c3 +lib/codeql/rust/generated/Stmt.qll 58b010f32956f2736a7b9ebb43467ecd03308a1f27c99e2b09bb925c349ac859 9859da4a4aa29b4f7ab47313b2dfe8baf9717a162fcd8bd62a7cbab4afd1886e lib/codeql/rust/generated/Synth.qll 03ecd0d7e89aca555d2393bbea8de1cde0476e28fb9f198ed3355a74f1b5c1c8 11855cc446c2d8a77503795a7c395e86ff149ea10d773a6e50e54b08dd438642 lib/codeql/rust/generated/SynthConstructors.qll 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e -lib/codeql/rust/generated/TuplePat.qll 23911b2ac7ee2279df8ef40a6e447437ef0ed62518504b17874a7652bf5e3f4b fc4f6f7ea40754290de194ac55939f08549bd637104baf8dc84ca3938bcbd1f1 -lib/codeql/rust/generated/TupleStructPat.qll fff004cce780501eac94fe4b146619a84e02c85cae12ffeba5a4058e8c9738ea 738659f8208aa65d1d8cf601e0d92a90a890d6cbaec51cf04c81fc75a827e30b +lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d2493890e79c28c485f512a1 5cc082ea99de61662b2d4c8b59f7a833236e7e448943e8ee894ab6066cc761c4 +lib/codeql/rust/generated/TupleStructPat.qll 7807a635e3ed14247dad405d44b4730a4ccc34207d7363a39a0bd2d53a8ccc97 5eb8ac529c2ee51a4ca15028e70dd0f6833a7d7fb6db330103b27bd2d91715e4 lib/codeql/rust/generated/TypeRef.qll 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f @@ -209,7 +209,7 @@ lib/codeql/rust/generated/Unimplemented.qll 375b7935b7f4103728ece3042282ae82d19e lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 -lib/codeql/rust/generated/WildPat.qll 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 +lib/codeql/rust/generated/WildPat.qll ce495ae13180df09d134f295d67fe2d9680372784c5095bbd9302ef92a2163f0 ce495ae13180df09d134f295d67fe2d9680372784c5095bbd9302ef92a2163f0 lib/codeql/rust/generated/YeetExpr.qll 0e673204c592b6025570098b14e0378a0e0c68d13be9217ce1543f2781667d42 6546ce98d42717d4e6932e1add628591e488d063ef2a79bf093b831645342e21 lib/codeql/rust/generated/YieldExpr.qll 8f28a069a4a97d17a10b92200766f57ef0d372b88dd650f909167c7b3d643cc7 a0d8578c4f69e042788b7e1a8c066663541f1782589ea7521741d0b801ca0661 test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql fae7f09b653698aa78626a268711bbd8336c9d6572ab9fe85967a8bec69e33f5 91dd5893cefeb9fd45dea49962dfee5a373be790f5ab3569f79d9ffa05613033 @@ -219,11 +219,14 @@ test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql bd2a401989b0f452b448fadd8d test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 5661cb0d7b2285af31207232de2b685e851e4d70224cb16045bc0221c107de43 1fd41642343791d9b69e0c633ea3318c0a855f51f50062cb58225820a7540d50 test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql 555112b0180f20ccf917bf83e4b04ab104b194a46fb072ebc0eb3b99c2b3b406 7c085b42741159fb9fcc2debf6f127e9b1a85901068697dc3794085ae732736e test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql 176bcb2058a63081f2baca1b03b4a0264eede1606ad9396da915963fc00ca425 e4246975686c75b791041ea3f8b4dd428b0f6424d5833ab563acc23da1c77356 +test/extractor-tests/generated/BindPat/BindPat.ql 00c244d85566a165a9cf4d9b9238b76a5078c0864551d3a20ccd03bd1db24ca1 458db9febc0e9e6aafa1082a89017aaea60f3f93ee2fe9d507e82b79bb7ae222 +test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql a5254ffc2e1d0adac0952a1f367a1b089dcc6a59a5e35ef64b5c187419a39c1b 47092f6e6143d0c9996454c89e515d6a3547530416ffba64be60a09b821c254e test/extractor-tests/generated/BlockExpr/BlockExpr.ql fd1bc52af4bad96423cb86b1eed02595e139e533f48533299e32b7b45360b47f 021b58c6e6cad40cc0707d0a78fd8c4ddbc529422d3bb9ac62c490b2abc1bb00 test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b02c87bba8bdbeffab05632133a17d36b355624d7521083cc6c0b02f88b2ba46 91141e01393ec04f4bb1f86373f5f25c837b13865ab540419050e6c547cc2690 test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql 4de30a1e3c9de174688b8f9af57f72dfa6d9a2e3b3ab1b972ee69342ebd7ecad a6948240014d27fa9af7f56859cff2f8f7b44097f0bc47fbbb91b5be35e11d91 test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql 6df26e837dc4f8ecf6dda674dfc89b2dce25da5dc3301beba461c5c1e1776201 b4e205949d06fa355997f5a399ce1f7c381023e38be4db4ecbcec676d8ebec69 test/extractor-tests/generated/BoxExpr/BoxExpr.ql d74e58c16466ae5c08716eb027cb562ed50a96965fcaee3d0ebb64f1c9086c7b 9b01b9343cfa07e76de9ed781a5c03532fc740c8f794147d71815c98dfbcc076 +test/extractor-tests/generated/BoxPat/BoxPat.ql 1a5fd42309c669b3790a903d15b53d83ed5ccfa82409a1abba648b6fec39343a a4086b69da34827b14b63eee15eec3b951de14e941004024324fc00ec8680bc4 test/extractor-tests/generated/BreakExpr/BreakExpr.ql 2897243d4fe6e0975f7621cff7a44609f6f0d015e77bff9c73a0dca32e3e7b44 6a072aa7f6ab27d6f6e887e7fe86213668c1bacce6cddfa2b1e65afcc13abce7 test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql dd9b5ac06b3677eea02bc3204e3b23f212f29c418343a052befd903e622ffc32 f66a646c7efcb326ff70961df623761d342af4134677245e413cb9fc603334ab test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql e338d2582b191d4ae1640504262d5a0d5ed23ddf850b5adfffb679a057f55e5e f57e618dac8c79d70e520d1508e70032662db8e4fc43b319365e195efcbdc847 @@ -234,6 +237,7 @@ test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 75fd05fb47e90426745d6c test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql 48fb8656a350ba16cc3cd291692b542dca137587ee971999c439700c74e6dcba 5ff21525959142237ee1a32c9feacf331083fb40502df6ddf78dfb8d93caed66 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql 34f8b8fc82e0c798f3cddc7ad1bb80a361c95da9d8a768fb787d6ffc3be1c755 9c14ee19cf74f516d201b8be72fe3496e425cfd42db223fb537cc92515e2b021 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql 43fb702201d21b8f716df8e128f1b7995604f5829b832a163672ab465c2fbde8 fc28c03768a514260ce0feae6d7c347508c4800054b184cb3f9004bbaca33fd6 +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql 9ca3cf0695df6e71ad7c308ded9b1085474c105d85ea730d98921543a14029fc 45d17bb933d54f2dc56c95ef0a74b6cc00493eba6db3aec2b9319972675ff331 test/extractor-tests/generated/ConstExpr/ConstExpr.ql 644c34489fd7deb3790f9de131d958cd96102d5c09eb3b07bbf5462b3e90d253 025192a0bd742c16baf8b627f3b8216442a74c6497b752dd1207f572743a0f5a test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 259d98acb2d237ac630a7f92a26256f1af92372a3ef5b5feaf022b9b42a6a726 bed3e1332d65736194fa758e4a91433785e9da2ddc31d56c29ad27a7df392802 test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql 0fa15905b4c06382ab6bde50d28804d7b0af4f53229e69fc8038a77f190f7b24 2fb577cb92456371f5f056fed5a07998914a27f560d41da43fc3b94827436cac @@ -247,11 +251,13 @@ test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e3363 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql 34af9ef48d7d8d6dbcb063170e2a818d2c288ea964df3173248866f790e12fc4 594784fda228525bcd2e17a9b9a07634346866d43d2b4ae262ba7a786c698932 +test/extractor-tests/generated/Label/Label.ql ba8cbde90392eef8f9faf6177776272dfb000abac260c6231fb00bff46ac1a39 4718da4da854e89513758c964f11117e329ed00e548e14890ec916c93500c529 test/extractor-tests/generated/LetExpr/LetExpr.ql b311fb10d3a65cf682ced02aa4c9b589a84cb92adc653fbe630d471d88ca5f8a 3d93cc0cda8a6f34090d3000fee4a14e31fcf0fdc4d201a8d414e27cb8b9e4f4 test/extractor-tests/generated/LetStmt/LetStmt.ql 401f46acb7db90d6b51d6377e9257341fb2e45599ccd38e3e1afe7ce347536ee 47315699ae0f539dabdc040e238c27463790c710aa78fa589954cd800d35911d test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql 88bd37786d0a738d2cb0c861a2411236d9dce09b98ff050b5f03b0888ed2f521 622d96d1e99fd174c284b7a3f05eddf30faf667cddff2eb942e01128488b398d test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6e9a36a2a226ea0df1f01886bbd4e14997eb91f5b9422e37ce4985fd15a80622 ffbc3d9278e10aa78304cbc8876d96fe678a1d2f52ad170f651f842d1787156b test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql 845088548371993a0926e56d8493c72d2ca9b4b901f93bbf4f3b305897e59395 3586f8acbf01230fa919c2303b4f8c07b5cef30855902776967d60b4d34ad90f +test/extractor-tests/generated/LitPat/LitPat.ql 002578790ccd30a33cd107214930d6c3c49dfe5c166460fec44e2037b3802b27 7f5c2d4c18f6d5b06c81e49dc08992522148acf7f04c24d0b8914e9fb504f007 test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql 9fb9c6336d1e3a657d988ffb53a43ce66b8403e46bea05d73d546ae774a647bc 708e2878eca3e9661e8b0d54180b4a6f512d9233178e9ad5683a1f72fa9656aa test/extractor-tests/generated/LoopExpr/LoopExpr.ql 58dabe29df959b265fa568cdde1b589d65ca8649c8aae0f30079565c1106ad72 929fd3c5c4f01f47f926c49f1a519d415063ff23d5e1fb2f2e8f72bb5aa7fdd6 test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 1febfb8cff9b4f7ba1a658a2832238d2355f0f609778af33a3877e977aaf1805 6b9c008b041beb1c0a7e249b7f4a1bd5cea0885f82543a8909a23a7068f1f837 @@ -263,32 +269,54 @@ test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql d09a8c2c0d277bfe test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 4d975396405739dbb05a4019add804b92d97b12c8ead6107603540ed2b3fefdb c66bcda4342519fe2179e2cdd67ff6ddc7b3e8a475432b611f6de20578eb2f6d test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql 2226b4759bee9091d88a7d72be5d8f8ad43f17b07fdd1a1f64ae3da5aa6aa333 ee9e06838b879ce90b00d9289eea32fbda9c02e0074d306a2f1f5991956c7deb test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd91389f8282863613edda3fb804b917cce0675a8bb76 f2e600f8fb723f8f1bde4b0b0ef41f59b4e652882b5c788e8f6767822d5574e4 +test/extractor-tests/generated/MissingPat/MissingPat.ql 7a9ee46a40f6bfd31336beb6d9f6256fb8099cb6c052ba3131a95a45716224a4 619375e7dc6d95b8f1d1c958217350fc1553882f0f41ebd9f7a071d6947232d8 test/extractor-tests/generated/Module/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa4c8e4e79bffd8b7a797bc70a68054ab51950dbebf4f0 dd92801d8909d83be1f824a2dfc599551c11b63ad1e96593e22d3b43464d7cf1 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 -test/extractor-tests/generated/Pat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/OrPat/OrPat.ql 51d9a0f5993510542a2cca353c1ca48ba1e5fb97a65bee7f02398cd90debaa41 06e0936b80a07a16e22fad3a3a541000f170fd5ad301a3170b98a91f51d09144 +test/extractor-tests/generated/OrPat/OrPat_getArg.ql 693d62aa9817ce7661b4698c2948bca6567c1376b2ae832f3020462e8ab8d2ee 1fd9809826c6f2dece3014299f1d70210c9f23e5eefbd04b1d6024e1ecd46209 test/extractor-tests/generated/PathExpr/PathExpr.ql aa8c36042688ad96a268b066b38fcaac3befa6490cc3510c15f824fce63e8949 71de233de72dd87c7c9129617d03f9fbc9bb9460ea896002cbb881f84451835d +test/extractor-tests/generated/PathPat/PathPat.ql 3b8bf11f2ab1ebe1e19bca0e8f1095215ffd9ee5389cac203971888449b86124 a1e4a4964837a170ad88d3fe3a47e5437354b22fd19382baad2090b0e0b3e1f7 test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql 063ee8f6146110b97f4ee8944a5f37f0dd7cd5be049f13546d42a888a973d826 1184cc1fe937a01e9d12577478750be1497d4f99231486ae6d75104e7304eeb2 test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212f65c522387f726b2b9b3f204708a2a764e238aec8d89f 8b3095fdd9c6900eef656d4e9e18f5f4866b285634cc725e73246976af20450c -test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/RangePat/RangePat.ql 4cb48cd2a96ecaa3998f70e2ef5b117749448d9166af743d3b8cfe6f90938665 d5a894f6e56b28c1438e37191ddd623d89e4eb07d5c979ae3795119de9d01e49 +test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 823307f0e43fe6c02843417d254c6584e2ead04b961158f04494eb8197b9905e 016805e6063be3846cef24a5680f4f17e68ee9714430120aa91fface3461d97c +test/extractor-tests/generated/RangePat/RangePat_getStart.ql 1457a38514bf9fa7de44a4e5e3dd5218410149133074252bdf64d5eef5197d43 e9a6393aed20c710b2f19bc6482262664d8bc0245b5dfc35f636aa7966e0dba4 +test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql bd8fedb8c890b305247815d7a8ba8dd3e7dbb76283492edde9f9e7374bdfcdc5 b54f364705483b1f21fe59d190bddcb12959182f8aa596ae5f156abfdd08761c test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql d31550e195d6642736668ee2a0b0c370546dbd8d8ba77c7a0d266b4acb5253c7 8ff659dcbc2985dcfc04246ad16294701db1c012a37d6743e1befe5746c25def test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql 112614052020c4c775f77e3773ad83b6747bbf30a4d0fea70642f570e2879896 969642f51f1d106f096fcc77002bba057054180c3115ebd8ffd8a69fd0d8f24d test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql d01bae55f1e11a8527e8514262e6b16ec72fad9d294c33296a6c1cc750d910c1 ff680b4716a360b7b91a8d83ba8fdfa570f61369a25b17bcaf9b42a3987257df test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql 52cb0c020da2e5cf42ab94a9a2379c1ab5f7f6e2ce3763cb1d17e4173841b997 ed8fc6fc13d0f2be9c9c2f0d38ae1dc05824d44e1f1a72844b21f948d3f330c7 test/extractor-tests/generated/RecordLitField/RecordLitField.ql d27c55513ab2ee8ac62d05f3552476ad5d8c05eb2e09f7cd37f8c4821aab4979 6545caed544f2898706d2cd20854cd15caf2198326c38f69814d50e69954a089 +test/extractor-tests/generated/RecordPat/RecordPat.ql 485dab5489881a9040d841999fdc9eedd5fd34ed2c0847f9e9a8343c0d24f26d fc3a104ffd48af0d26ea3f2266f0fa5acd32278f8514b6f261a5fd77e5ff90d9 +test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql c23dbde4d3c8ad1ef418e06a7552390ebbc396a218a660b103d9be08a7111960 5a10690bac5446a52f2d8b0dd2c4d7dd742c4a60e91b47a5a7f617396ce0adb0 +test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql d2730342a2203ad7d6385a64d53874050bd084fe74c05168df223499f7e86100 0d223ccb9c127100557b70da89f0c6ec7c559babc885bff46b97f5cb7b877e63 test/extractor-tests/generated/RefExpr/RefExpr.ql e859cd59dbaa5aa5555aa13d4a75b7bfe2dbdb2d5c50675f3753adaaaabdedc2 d330ee941e9932054c32d0be5a52f38f285e4dc529821759ea38633f8ddbd517 +test/extractor-tests/generated/RefPat/RefPat.ql a5fa2a4435c11a935c0ed2dfb925874d44484dd0e0a6e31d50db7c1f63b1efaf e85077fdeb58983542b8a78f65bfc8498121fa699f5798c48dc59f1b74fa0b04 test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql a883874b6db9c084123b795ddc4b972f41da554a07d41b7d42242a4b4156ccc8 4aef5ebe3124ea3e13851df3e65d430b64740a3fda2fa4be4c6a3634e9f00fc1 test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 65397add1001e1593a303e3cec51e74aa4830a63e899b458a4247d017a84942d 34f138d22c9fa9195acd0c91a230dcf74dc5373db2315db0414aba710217720b test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql bea07d8461c84e87bd642ca3af79aeff53f3ca3b79a6cd73ff8c514bcf213655 3cb63fb46da4d1c305694fd7a004016ab7c5ec96372279ce58cdb5c2e7a1dcc1 +test/extractor-tests/generated/SlicePat/SlicePat.ql 7170bbb932c27e90aaeb4bcc2fe35e8e919427fa420d8e2ea7097ad41b850fef 9fcbfce069e43e61832dba9d92c80b015a68e437683f5a3531b016dcd9de7824 +test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql e2f42681f3fc56b1e4dc1dafa8be1d20f164017eabc6144eae0a30fa4b8e7a38 235e67231d2650f9085fcc0ff28e116d8a1e499fbddf0db1352eb3517d9ba722 +test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql 9f57b88b0bbe4726577994c7980c284edb72139b7036aaa9c7dabc235cbafb48 38416e3490ab10ed512dac698aac9cf9b74cd2ab68ef1f9b5721ace18cb2d03f +test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql ba921a0d73d6d76a7c83c12c0cb3bdfe2c40c6a206777614c4898d51a7349cf7 c5c36d8e9e5a5177be29b84ade0653121ba0e7888a9eda59498bd61d2be38e26 test/extractor-tests/generated/TupleExpr/TupleExpr.ql a14037288887ffd865289c4082e8438384344e3eeee9eed3bd4e36297670d94f b96191f6b65049e48899e72ac8e5b120ab3c6028bfa26df0e9c8aadd943c1023 test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql bce5ec6f86043699d913abe258754c198cb1a562d0f1baa79c5d41e11377f622 8880feac2a89ded4e729b023fd8ef59350f44c30889e248c2e4db476544ec544 +test/extractor-tests/generated/TuplePat/TuplePat.ql 1f87a26474a0c39a9c238ec0218409e5e21a3253a94e0de9a87c526174c1d32d 579e3482ca83a9a6c35c3db8d202e52c67cdbb99ac00c19c5a1babe76b6e8acd +test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql 97090448b81f1b347a4dfa4c954dadfeed09291ce03efe9fbb2f0cf95e16a815 549ccc1b8812f103fba5793cda3bb22544cea33dc5465166c506317d7156c4c8 +test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql 8f8bafa2ff18f3141bb2f2e33b19d1caf94c8814787b61f2e0147bf5e7f588e7 5333d06176129b818cf7f6caff772a4097cf62911378f99e88c2ea6036277f1f +test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 2d14109d39c7519a113340f4223067a12ae715bdf4ad51b7c2c321ed90094731 36a7b3e17238a1eee8233364fa201aaec83347c9ce8de00b0e99d23bc0fc9cc3 +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql f308a61384af5feebc58028a95d26499b6a666c7599b30aed33efbaca86c06b2 f298af5a861410281dee6cf22d3ceaa286a5be4d27968750321f2d016c34a0dd +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql 47e84e7db2d1cc23aca4c28b5bba2826eeeaba07377eb8c8de5141bcb9c36ab8 a5c1d23e2521c38b12c0942c88403bea5a0d77a4763f273ffdf48eaa000a00ff +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 5f19a261ade6e3249029d7268cc0385092234a896e72ccdf8376a592be1d545e bb4fefecefaa2d9634f31026e5ec8bff561bacf55a4105727032bab08fdbdea3 test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql 3e530c5beba93710b686d0bdaa6edfa58e13357be48bbf038c3a47c280d0bf08 0b0003cbebf44d0d2e3bcc1b318e0a4e90638dfcf3679ef6924a8461e81feabb test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 54cc3f7e6e9b9ac58922842dcd1960250e8bbb7ede5a63134ae622abc447be1e 1d5558d4ec9e4a1a510f37206772af3bf41015a99f1e9b83cc530db496dc2a5f test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql a743dbb15736b809e30769e1ea136afc9f0226885139150d6d1a5d353b6cb6fb 09849f178208406742007009da7f9b359b814477190d9d95370b94378e60be17 test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql 4409e1c39b7729dc393a0d60f9d6aa0dfeed294a090285442de85ce746095eb5 572d88a9c879905519d9a63d5937949771f9c163ee2ea8ba4eabe0f16c28ca67 +test/extractor-tests/generated/WildPat/WildPat.ql 3243e91456ddd53ba03241a36d95671b3e7927f2d47be8b6c16b058a873875ec ac0ec7d99a2decad380e564dec6bec27a5bb98171e7458b6a1fa31c0d59e6c44 test/extractor-tests/generated/YeetExpr/YeetExpr.ql c5919f7f2f42b7dc08b0fefc553bb602a772925c226c943e2c96158adaea7797 a5bfdf225d9f9653f5aae00f30744d03f7d1045ddb4469f23e57194b3b1a2f8e test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql 4ab79339d3f0a2a0334f66a7513ae5d27bcd608fdaf557da71757896e20f81b7 6d7b9da72a325b83539da4f353df2a0d4fcd11493773547ac89031525e7cd1fa test/extractor-tests/generated/YieldExpr/YieldExpr.ql 3bf0ed6b4ec11dbe8b6af6cb0c51813c193e17bd9df0a23cdb1bf39cecddd915 0ff0219d5356bd9cb62df995577909898b4b28e0ecd860339361731e4f64e703 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 4873570bad4f..027aeecacfca 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -221,11 +221,14 @@ /test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated /test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql linguist-generated /test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql linguist-generated +/test/extractor-tests/generated/BindPat/BindPat.ql linguist-generated +/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql linguist-generated /test/extractor-tests/generated/BoxExpr/BoxExpr.ql linguist-generated +/test/extractor-tests/generated/BoxPat/BoxPat.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql linguist-generated @@ -236,6 +239,7 @@ /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated +/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql linguist-generated /test/extractor-tests/generated/ConstExpr/ConstExpr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql linguist-generated @@ -249,11 +253,13 @@ /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated /test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql linguist-generated +/test/extractor-tests/generated/Label/Label.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql linguist-generated +/test/extractor-tests/generated/LitPat/LitPat.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated @@ -265,32 +271,54 @@ /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql linguist-generated /test/extractor-tests/generated/MissingExpr/MissingExpr.ql linguist-generated +/test/extractor-tests/generated/MissingPat/MissingPat.ql linguist-generated /test/extractor-tests/generated/Module/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated -/test/extractor-tests/generated/Pat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated +/test/extractor-tests/generated/OrPat/OrPat_getArg.ql linguist-generated /test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated +/test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql linguist-generated -/test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RangePat/RangePat.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated +/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql linguist-generated /test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql linguist-generated /test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql linguist-generated /test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql linguist-generated /test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql linguist-generated /test/extractor-tests/generated/RecordLitField/RecordLitField.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated +/test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated /test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat.ql linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated /test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/WildPat/WildPat.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/BindPat.qll b/rust/ql/lib/codeql/rust/elements/BindPat.qll index eb0d2b00448e..bd445e19920d 100644 --- a/rust/ql/lib/codeql/rust/elements/BindPat.qll +++ b/rust/ql/lib/codeql/rust/elements/BindPat.qll @@ -5,4 +5,19 @@ private import codeql.rust.generated.BindPat +/** + * A binding pattern. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * }; + * ``` + * ``` + * match x { + * y@Some(_) => y, + * None => 0, + * }; + * ``` + */ class BindPat extends Generated::BindPat { } diff --git a/rust/ql/lib/codeql/rust/elements/BoxPat.qll b/rust/ql/lib/codeql/rust/elements/BoxPat.qll index e2b1d9b7e779..b0f977aa4520 100644 --- a/rust/ql/lib/codeql/rust/elements/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/elements/BoxPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.BoxPat +/** + * A box pattern. For example: + * ``` + * match x { + * box Some(y) => y, + * box None => 0, + * }; + * ``` + */ class BoxPat extends Generated::BoxPat { } diff --git a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll index 80b48ac034e8..61984263e388 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.ConstBlockPat +/** + * A const block pattern. For example: + * ``` + * match x { + * const { 1 + 2 + 3} => "ok", + * _ => "fail", + * }; + * ``` + */ class ConstBlockPat extends Generated::ConstBlockPat { } diff --git a/rust/ql/lib/codeql/rust/elements/Expr.qll b/rust/ql/lib/codeql/rust/elements/Expr.qll index 40a7beac2499..581580fcfb09 100644 --- a/rust/ql/lib/codeql/rust/elements/Expr.qll +++ b/rust/ql/lib/codeql/rust/elements/Expr.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.Expr +/** + * The base class for expressions. + */ class Expr extends Generated::Expr { } diff --git a/rust/ql/lib/codeql/rust/elements/Label.qll b/rust/ql/lib/codeql/rust/elements/Label.qll index 20a006754e9f..43dffc197b1f 100644 --- a/rust/ql/lib/codeql/rust/elements/Label.qll +++ b/rust/ql/lib/codeql/rust/elements/Label.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.Label +/** + * A label. For example: + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + */ class Label extends Generated::Label { } diff --git a/rust/ql/lib/codeql/rust/elements/LitPat.qll b/rust/ql/lib/codeql/rust/elements/LitPat.qll index 0e8ac98c70d0..56056a7dcc31 100644 --- a/rust/ql/lib/codeql/rust/elements/LitPat.qll +++ b/rust/ql/lib/codeql/rust/elements/LitPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.LitPat +/** + * A literal pattern. For example: + * ``` + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ class LitPat extends Generated::LitPat { } diff --git a/rust/ql/lib/codeql/rust/elements/MissingPat.qll b/rust/ql/lib/codeql/rust/elements/MissingPat.qll index 88db4cdc7794..ce6ad1c144c6 100644 --- a/rust/ql/lib/codeql/rust/elements/MissingPat.qll +++ b/rust/ql/lib/codeql/rust/elements/MissingPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.MissingPat +/** + * A missing pattern, used as a place holder for incomplete syntax. + * ``` + * match Some(42) { + * .. => "ok", + * _ => "fail", + * }; + * ``` + */ class MissingPat extends Generated::MissingPat { } diff --git a/rust/ql/lib/codeql/rust/elements/OrPat.qll b/rust/ql/lib/codeql/rust/elements/OrPat.qll index 797060365a4e..5dd45a01cc48 100644 --- a/rust/ql/lib/codeql/rust/elements/OrPat.qll +++ b/rust/ql/lib/codeql/rust/elements/OrPat.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.OrPat +/** + * An or pattern. For example: + * ``` + * match x { + * Some(y) | None => 0, + * } + * ``` + */ class OrPat extends Generated::OrPat { } diff --git a/rust/ql/lib/codeql/rust/elements/Pat.qll b/rust/ql/lib/codeql/rust/elements/Pat.qll index 7e3c032c05b5..157f1289e6ad 100644 --- a/rust/ql/lib/codeql/rust/elements/Pat.qll +++ b/rust/ql/lib/codeql/rust/elements/Pat.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.Pat +/** + * The base class for patterns. + */ class Pat extends Generated::Pat { } diff --git a/rust/ql/lib/codeql/rust/elements/PathPat.qll b/rust/ql/lib/codeql/rust/elements/PathPat.qll index 92d794c658a7..f5e3329e18c0 100644 --- a/rust/ql/lib/codeql/rust/elements/PathPat.qll +++ b/rust/ql/lib/codeql/rust/elements/PathPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.PathPat +/** + * A path pattern. For example: + * ``` + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` + */ class PathPat extends Generated::PathPat { } diff --git a/rust/ql/lib/codeql/rust/elements/RangePat.qll b/rust/ql/lib/codeql/rust/elements/RangePat.qll index eeae9c8aec8b..ed0dbba6177f 100644 --- a/rust/ql/lib/codeql/rust/elements/RangePat.qll +++ b/rust/ql/lib/codeql/rust/elements/RangePat.qll @@ -5,4 +5,14 @@ private import codeql.rust.generated.RangePat +/** + * A range pattern. For example: + * ``` + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` + */ class RangePat extends Generated::RangePat { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll b/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll index 2b892418c4fc..fcb12e8d31a6 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.RecordFieldPat +/** + * A field in a record pattern. For example `a: 1` in: + * ``` + * let Foo { a: 1, b: 2 } = foo; + * ``` + */ class RecordFieldPat extends Generated::RecordFieldPat { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordPat.qll b/rust/ql/lib/codeql/rust/elements/RecordPat.qll index ac412f19d3d0..0f62ffadfc23 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RecordPat +/** + * A record pattern. For example: + * ``` + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` + */ class RecordPat extends Generated::RecordPat { } diff --git a/rust/ql/lib/codeql/rust/elements/RefPat.qll b/rust/ql/lib/codeql/rust/elements/RefPat.qll index 3c9c59e88c5e..a34c7a4d7213 100644 --- a/rust/ql/lib/codeql/rust/elements/RefPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RefPat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RefPat +/** + * A reference pattern. For example: + * ``` + * match x { + * &mut Some(y) => y, + * &None => 0, + * }; + * ``` + */ class RefPat extends Generated::RefPat { } diff --git a/rust/ql/lib/codeql/rust/elements/SlicePat.qll b/rust/ql/lib/codeql/rust/elements/SlicePat.qll index d89f159a7a7b..1c8ded0f1dd5 100644 --- a/rust/ql/lib/codeql/rust/elements/SlicePat.qll +++ b/rust/ql/lib/codeql/rust/elements/SlicePat.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.SlicePat +/** + * A slice pattern. For example: + * ``` + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + */ class SlicePat extends Generated::SlicePat { } diff --git a/rust/ql/lib/codeql/rust/elements/Stmt.qll b/rust/ql/lib/codeql/rust/elements/Stmt.qll index 4b3bd89ea76f..fbcb61c60ce2 100644 --- a/rust/ql/lib/codeql/rust/elements/Stmt.qll +++ b/rust/ql/lib/codeql/rust/elements/Stmt.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.Stmt +/** + * The base class for statements. + */ class Stmt extends Generated::Stmt { } diff --git a/rust/ql/lib/codeql/rust/elements/TuplePat.qll b/rust/ql/lib/codeql/rust/elements/TuplePat.qll index f814215aec65..c62adb8f1e7c 100644 --- a/rust/ql/lib/codeql/rust/elements/TuplePat.qll +++ b/rust/ql/lib/codeql/rust/elements/TuplePat.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.TuplePat +/** + * A tuple pattern. For example: + * ``` + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` + */ class TuplePat extends Generated::TuplePat { } diff --git a/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll b/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll index e4c4ffb24ec5..48054a74025e 100644 --- a/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll +++ b/rust/ql/lib/codeql/rust/elements/TupleStructPat.qll @@ -5,4 +5,14 @@ private import codeql.rust.generated.TupleStructPat +/** + * A tuple struct pattern. For example: + * ``` + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` + */ class TupleStructPat extends Generated::TupleStructPat { } diff --git a/rust/ql/lib/codeql/rust/elements/WildPat.qll b/rust/ql/lib/codeql/rust/elements/WildPat.qll index 346b61e8c2b0..004399d8d7a6 100644 --- a/rust/ql/lib/codeql/rust/elements/WildPat.qll +++ b/rust/ql/lib/codeql/rust/elements/WildPat.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.WildPat +/** + * A wildcard pattern. For example: + * ``` + * let _ = 42; + * ``` + */ class WildPat extends Generated::WildPat { } diff --git a/rust/ql/lib/codeql/rust/generated/BindPat.qll b/rust/ql/lib/codeql/rust/generated/BindPat.qll index b58d24225851..c08464045ba3 100644 --- a/rust/ql/lib/codeql/rust/generated/BindPat.qll +++ b/rust/ql/lib/codeql/rust/generated/BindPat.qll @@ -14,6 +14,19 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A binding pattern. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * }; + * ``` + * ``` + * match x { + * y@Some(_) => y, + * None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::BindPat` class directly. * Use the subclass `BindPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BoxPat.qll b/rust/ql/lib/codeql/rust/generated/BoxPat.qll index 690fc5155d7c..bf9f175d95c6 100644 --- a/rust/ql/lib/codeql/rust/generated/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/generated/BoxPat.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A box pattern. For example: + * ``` + * match x { + * box Some(y) => y, + * box None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::BoxPat` class directly. * Use the subclass `BoxPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll index f741124f180c..ca79ddb751ce 100644 --- a/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A const block pattern. For example: + * ``` + * match x { + * const { 1 + 2 + 3} => "ok", + * _ => "fail", + * }; + * ``` * INTERNAL: Do not reference the `Generated::ConstBlockPat` class directly. * Use the subclass `ConstBlockPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Expr.qll b/rust/ql/lib/codeql/rust/generated/Expr.qll index f395ff11840e..f7e8b41056bd 100644 --- a/rust/ql/lib/codeql/rust/generated/Expr.qll +++ b/rust/ql/lib/codeql/rust/generated/Expr.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.AstNode */ module Generated { /** + * The base class for expressions. * INTERNAL: Do not reference the `Generated::Expr` class directly. * Use the subclass `Expr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Label.qll b/rust/ql/lib/codeql/rust/generated/Label.qll index 6922dd193acd..cea7c19778d2 100644 --- a/rust/ql/lib/codeql/rust/generated/Label.qll +++ b/rust/ql/lib/codeql/rust/generated/Label.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.AstNode */ module Generated { /** + * A label. For example: + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` * INTERNAL: Do not reference the `Generated::Label` class directly. * Use the subclass `Label`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LitPat.qll b/rust/ql/lib/codeql/rust/generated/LitPat.qll index 1133ee3d1f1a..bf04b82c8ea6 100644 --- a/rust/ql/lib/codeql/rust/generated/LitPat.qll +++ b/rust/ql/lib/codeql/rust/generated/LitPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A literal pattern. For example: + * ``` + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::LitPat` class directly. * Use the subclass `LitPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MissingPat.qll b/rust/ql/lib/codeql/rust/generated/MissingPat.qll index fb8af9f5f5b8..0444917903c6 100644 --- a/rust/ql/lib/codeql/rust/generated/MissingPat.qll +++ b/rust/ql/lib/codeql/rust/generated/MissingPat.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A missing pattern, used as a place holder for incomplete syntax. + * ``` + * match Some(42) { + * .. => "ok", + * _ => "fail", + * }; + * ``` * INTERNAL: Do not reference the `Generated::MissingPat` class directly. * Use the subclass `MissingPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/OrPat.qll b/rust/ql/lib/codeql/rust/generated/OrPat.qll index 8f1541ea9b31..5efcc9bf641a 100644 --- a/rust/ql/lib/codeql/rust/generated/OrPat.qll +++ b/rust/ql/lib/codeql/rust/generated/OrPat.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Pat */ module Generated { /** + * An or pattern. For example: + * ``` + * match x { + * Some(y) | None => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::OrPat` class directly. * Use the subclass `OrPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Pat.qll b/rust/ql/lib/codeql/rust/generated/Pat.qll index c21fcf46d715..b7be54a90785 100644 --- a/rust/ql/lib/codeql/rust/generated/Pat.qll +++ b/rust/ql/lib/codeql/rust/generated/Pat.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.AstNode */ module Generated { /** + * The base class for patterns. * INTERNAL: Do not reference the `Generated::Pat` class directly. * Use the subclass `Pat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/PathPat.qll b/rust/ql/lib/codeql/rust/generated/PathPat.qll index 5fb2acfb13cf..bc3d9e3261e5 100644 --- a/rust/ql/lib/codeql/rust/generated/PathPat.qll +++ b/rust/ql/lib/codeql/rust/generated/PathPat.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A path pattern. For example: + * ``` + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::PathPat` class directly. * Use the subclass `PathPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RangePat.qll b/rust/ql/lib/codeql/rust/generated/RangePat.qll index f0cfa96e869a..d40d4b90358b 100644 --- a/rust/ql/lib/codeql/rust/generated/RangePat.qll +++ b/rust/ql/lib/codeql/rust/generated/RangePat.qll @@ -14,6 +14,14 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A range pattern. For example: + * ``` + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` * INTERNAL: Do not reference the `Generated::RangePat` class directly. * Use the subclass `RangePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index b216c9919257..fe56618cf66a 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -86,11 +86,19 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for expressions. */ class Expr extends @expr, AstNode { } /** * INTERNAL: Do not use. + * A label. For example: + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` */ class Label extends @label, AstNode { override string toString() { result = "Label" } @@ -138,11 +146,16 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for patterns. */ class Pat extends @pat, AstNode { } /** * INTERNAL: Do not use. + * A field in a record pattern. For example `a: 1` in: + * ``` + * let Foo { a: 1, b: 2 } = foo; + * ``` */ class RecordFieldPat extends @record_field_pat, AstNode { override string toString() { result = "RecordFieldPat" } @@ -181,6 +194,7 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for statements. */ class Stmt extends @stmt, AstNode { } @@ -280,6 +294,19 @@ module Raw { /** * INTERNAL: Do not use. + * A binding pattern. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * }; + * ``` + * ``` + * match x { + * y@Some(_) => y, + * None => 0, + * }; + * ``` */ class BindPat extends @bind_pat, Pat { override string toString() { result = "BindPat" } @@ -328,6 +355,13 @@ module Raw { /** * INTERNAL: Do not use. + * A box pattern. For example: + * ``` + * match x { + * box Some(y) => y, + * box None => 0, + * }; + * ``` */ class BoxPat extends @box_pat, Pat { override string toString() { result = "BoxPat" } @@ -469,6 +503,13 @@ module Raw { /** * INTERNAL: Do not use. + * A const block pattern. For example: + * ``` + * match x { + * const { 1 + 2 + 3} => "ok", + * _ => "fail", + * }; + * ``` */ class ConstBlockPat extends @const_block_pat, Pat { override string toString() { result = "ConstBlockPat" } @@ -751,6 +792,13 @@ module Raw { /** * INTERNAL: Do not use. + * A literal pattern. For example: + * ``` + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` */ class LitPat extends @lit_pat, Pat { override string toString() { result = "LitPat" } @@ -891,6 +939,13 @@ module Raw { /** * INTERNAL: Do not use. + * A missing pattern, used as a place holder for incomplete syntax. + * ``` + * match Some(42) { + * .. => "ok", + * _ => "fail", + * }; + * ``` */ class MissingPat extends @missing_pat, Pat { override string toString() { result = "MissingPat" } @@ -931,6 +986,12 @@ module Raw { /** * INTERNAL: Do not use. + * An or pattern. For example: + * ``` + * match x { + * Some(y) | None => 0, + * } + * ``` */ class OrPat extends @or_pat, Pat { override string toString() { result = "OrPat" } @@ -962,6 +1023,13 @@ module Raw { /** * INTERNAL: Do not use. + * A path pattern. For example: + * ``` + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` */ class PathPat extends @path_pat, Pat { override string toString() { result = "PathPat" } @@ -1005,6 +1073,14 @@ module Raw { /** * INTERNAL: Do not use. + * A range pattern. For example: + * ``` + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` */ class RangePat extends @range_pat, Pat { override string toString() { result = "RangePat" } @@ -1061,6 +1137,13 @@ module Raw { /** * INTERNAL: Do not use. + * A record pattern. For example: + * ``` + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` */ class RecordPat extends @record_pat, Pat { override string toString() { result = "RecordPat" } @@ -1112,6 +1195,13 @@ module Raw { /** * INTERNAL: Do not use. + * A reference pattern. For example: + * ``` + * match x { + * &mut Some(y) => y, + * &None => 0, + * }; + * ``` */ class RefPat extends @ref_pat, Pat { override string toString() { result = "RefPat" } @@ -1152,6 +1242,13 @@ module Raw { /** * INTERNAL: Do not use. + * A slice pattern. For example: + * ``` + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } */ class SlicePat extends @slice_pat, Pat { override string toString() { result = "SlicePat" } @@ -1196,6 +1293,11 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple pattern. For example: + * ``` + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` */ class TuplePat extends @tuple_pat, Pat { override string toString() { result = "TuplePat" } @@ -1213,6 +1315,14 @@ module Raw { /** * INTERNAL: Do not use. + * A tuple struct pattern. For example: + * ``` + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` */ class TupleStructPat extends @tuple_struct_pat, Pat { override string toString() { result = "TupleStructPat" } @@ -1269,6 +1379,10 @@ module Raw { /** * INTERNAL: Do not use. + * A wildcard pattern. For example: + * ``` + * let _ = 42; + * ``` */ class WildPat extends @wild_pat, Pat { override string toString() { result = "WildPat" } diff --git a/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll b/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll index d2924880931a..de78c3fcea4f 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A field in a record pattern. For example `a: 1` in: + * ``` + * let Foo { a: 1, b: 2 } = foo; + * ``` * INTERNAL: Do not reference the `Generated::RecordFieldPat` class directly. * Use the subclass `RecordFieldPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RecordPat.qll b/rust/ql/lib/codeql/rust/generated/RecordPat.qll index dca4cbb93822..c78897fc4f04 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordPat.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A record pattern. For example: + * ``` + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` * INTERNAL: Do not reference the `Generated::RecordPat` class directly. * Use the subclass `RecordPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RefPat.qll b/rust/ql/lib/codeql/rust/generated/RefPat.qll index 33674b00330b..38680ae4946e 100644 --- a/rust/ql/lib/codeql/rust/generated/RefPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RefPat.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A reference pattern. For example: + * ``` + * match x { + * &mut Some(y) => y, + * &None => 0, + * }; + * ``` * INTERNAL: Do not reference the `Generated::RefPat` class directly. * Use the subclass `RefPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/SlicePat.qll b/rust/ql/lib/codeql/rust/generated/SlicePat.qll index 272be5951670..106f0849dc78 100644 --- a/rust/ql/lib/codeql/rust/generated/SlicePat.qll +++ b/rust/ql/lib/codeql/rust/generated/SlicePat.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A slice pattern. For example: + * ``` + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } * INTERNAL: Do not reference the `Generated::SlicePat` class directly. * Use the subclass `SlicePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Stmt.qll b/rust/ql/lib/codeql/rust/generated/Stmt.qll index d1536f06e7cd..66cb42bee598 100644 --- a/rust/ql/lib/codeql/rust/generated/Stmt.qll +++ b/rust/ql/lib/codeql/rust/generated/Stmt.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.AstNode */ module Generated { /** + * The base class for statements. * INTERNAL: Do not reference the `Generated::Stmt` class directly. * Use the subclass `Stmt`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/TuplePat.qll b/rust/ql/lib/codeql/rust/generated/TuplePat.qll index 8ed7f0b15ecd..4a5b4499e666 100644 --- a/rust/ql/lib/codeql/rust/generated/TuplePat.qll +++ b/rust/ql/lib/codeql/rust/generated/TuplePat.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A tuple pattern. For example: + * ``` + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` * INTERNAL: Do not reference the `Generated::TuplePat` class directly. * Use the subclass `TuplePat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll b/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll index 606ceb90375c..725006b72539 100644 --- a/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll +++ b/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll @@ -15,6 +15,14 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A tuple struct pattern. For example: + * ``` + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` * INTERNAL: Do not reference the `Generated::TupleStructPat` class directly. * Use the subclass `TupleStructPat`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/WildPat.qll b/rust/ql/lib/codeql/rust/generated/WildPat.qll index 05db09c16e0c..519a55ad7f2c 100644 --- a/rust/ql/lib/codeql/rust/generated/WildPat.qll +++ b/rust/ql/lib/codeql/rust/generated/WildPat.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A wildcard pattern. For example: + * ``` + * let _ = 42; + * ``` * INTERNAL: Do not reference the `Generated::WildPat` class directly. * Use the subclass `WildPat`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 4bf6637d9043..780d1d8a138b 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -2,12 +2,15 @@ AsyncBlockExpr/gen_async_block_expr.rs 63b31fbeeead710902aa31184c06e88e604a1b7ff AwaitExpr/gen_await_expr.rs 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c BinaryOpExpr/gen_binary_op_expr.rs a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 +BindPat/gen_bind_pat.rs 38da98911aaaf5bccfafe40a116b6b1c02d1a3a4b170113129ecf4fd43cc66e4 38da98911aaaf5bccfafe40a116b6b1c02d1a3a4b170113129ecf4fd43cc66e4 BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 +BoxPat/gen_box_pat.rs ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 BreakExpr/gen_break_expr.rs 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 CallExpr/gen_call_expr.rs 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 CastExpr/gen_cast_expr.rs 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 ClosureExpr/gen_closure_expr.rs de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 +ConstBlockPat/gen_const_block_pat.rs 66caa0eb1445b2d0bf1ff5609b44975f88d72971ff558e02c69fe0459a2459ec 66caa0eb1445b2d0bf1ff5609b44975f88d72971ff558e02c69fe0459a2459ec ConstExpr/gen_const_expr.rs 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b ContinueExpr/gen_continue_expr.rs cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 ElementListExpr/gen_element_list_expr.rs 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 @@ -17,25 +20,38 @@ Function/gen_function.rs 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac2135 IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 InlineAsmExpr/gen_inline_asm_expr.rs b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a +Label/gen_label.rs 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd LetExpr/gen_let_expr.rs 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb +LitPat/gen_lit_pat.rs dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 LiteralExpr/gen_literal_expr.rs 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 MatchArm/gen_match_arm.rs 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 MatchExpr/gen_match_expr.rs 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 MissingExpr/gen_missing_expr.rs 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 +MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 +OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d +PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 +RangePat/gen_range_pat.rs f6661dd17ad104a8e80247e3c212517c6c888895edd86ac75f15ce0270eac0ce f6661dd17ad104a8e80247e3c212517c6c888895edd86ac75f15ce0270eac0ce +RecordFieldPat/gen_record_field_pat.rs 75951d23c45d8ff426c05bf4f6abb7673b713f66c97340fcbbe57520ba40011f 75951d23c45d8ff426c05bf4f6abb7673b713f66c97340fcbbe57520ba40011f RecordLitExpr/gen_record_lit_expr.rs da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a RecordLitField/gen_record_lit_field.rs 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a +RecordPat/gen_record_pat.rs 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed RefExpr/gen_ref_expr.rs b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 +RefPat/gen_ref_pat.rs fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 RepeatExpr/gen_repeat_expr.rs 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 ReturnExpr/gen_return_expr.rs ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 +SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19f437431568 fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19f437431568 TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 +TuplePat/gen_tuple_pat.rs 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf +TupleStructPat/gen_tuple_struct_pat.rs 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 +WildPat/gen_wild_pat.rs 3a4a9e77d09a690fddca434368f33c2f009d1098e5fa7fe2b404608d24c343fd 3a4a9e77d09a690fddca434368f33c2f009d1098e5fa7fe2b404608d24c343fd YeetExpr/gen_yeet_expr.rs 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 YieldExpr/gen_yield_expr.rs 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 3ab977bedf36..dfcc74a7bfa3 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -4,12 +4,15 @@ /AwaitExpr/gen_await_expr.rs linguist-generated /BecomeExpr/gen_become_expr.rs linguist-generated /BinaryOpExpr/gen_binary_op_expr.rs linguist-generated +/BindPat/gen_bind_pat.rs linguist-generated /BlockExpr/gen_block_expr.rs linguist-generated /BoxExpr/gen_box_expr.rs linguist-generated +/BoxPat/gen_box_pat.rs linguist-generated /BreakExpr/gen_break_expr.rs linguist-generated /CallExpr/gen_call_expr.rs linguist-generated /CastExpr/gen_cast_expr.rs linguist-generated /ClosureExpr/gen_closure_expr.rs linguist-generated +/ConstBlockPat/gen_const_block_pat.rs linguist-generated /ConstExpr/gen_const_expr.rs linguist-generated /ContinueExpr/gen_continue_expr.rs linguist-generated /ElementListExpr/gen_element_list_expr.rs linguist-generated @@ -19,25 +22,38 @@ /IfExpr/gen_if_expr.rs linguist-generated /IndexExpr/gen_index_expr.rs linguist-generated /InlineAsmExpr/gen_inline_asm_expr.rs linguist-generated +/Label/gen_label.rs linguist-generated /LetExpr/gen_let_expr.rs linguist-generated /LetStmt/gen_let_stmt.rs linguist-generated +/LitPat/gen_lit_pat.rs linguist-generated /LiteralExpr/gen_literal_expr.rs linguist-generated /LoopExpr/gen_loop_expr.rs linguist-generated /MatchArm/gen_match_arm.rs linguist-generated /MatchExpr/gen_match_expr.rs linguist-generated /MethodCallExpr/gen_method_call_expr.rs linguist-generated /MissingExpr/gen_missing_expr.rs linguist-generated +/MissingPat/gen_missing_pat.rs linguist-generated /OffsetOfExpr/gen_offset_of_expr.rs linguist-generated +/OrPat/gen_or_pat.rs linguist-generated /PathExpr/gen_path_expr.rs linguist-generated +/PathPat/gen_path_pat.rs linguist-generated /RangeExpr/gen_range_expr.rs linguist-generated +/RangePat/gen_range_pat.rs linguist-generated +/RecordFieldPat/gen_record_field_pat.rs linguist-generated /RecordLitExpr/gen_record_lit_expr.rs linguist-generated /RecordLitField/gen_record_lit_field.rs linguist-generated +/RecordPat/gen_record_pat.rs linguist-generated /RefExpr/gen_ref_expr.rs linguist-generated +/RefPat/gen_ref_pat.rs linguist-generated /RepeatExpr/gen_repeat_expr.rs linguist-generated /ReturnExpr/gen_return_expr.rs linguist-generated +/SlicePat/gen_slice_pat.rs linguist-generated /TupleExpr/gen_tuple_expr.rs linguist-generated +/TuplePat/gen_tuple_pat.rs linguist-generated +/TupleStructPat/gen_tuple_struct_pat.rs linguist-generated /UnaryOpExpr/gen_unary_op_expr.rs linguist-generated /UnderscoreExpr/gen_underscore_expr.rs linguist-generated /UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated +/WildPat/gen_wild_pat.rs linguist-generated /YeetExpr/gen_yeet_expr.rs linguist-generated /YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected b/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected new file mode 100644 index 000000000000..84b1cd34a335 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected @@ -0,0 +1,2 @@ +| gen_bind_pat.rs:6:14:6:14 | BindPat | getBindingId: | y | hasSubpat: | no | +| gen_bind_pat.rs:10:9:10:17 | BindPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql b/rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql new file mode 100644 index 000000000000..7de4f5492deb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BindPat x, string getBindingId, string hasSubpat +where + toBeTested(x) and + not x.isUnknown() and + getBindingId = x.getBindingId() and + if x.hasSubpat() then hasSubpat = "yes" else hasSubpat = "no" +select x, "getBindingId:", getBindingId, "hasSubpat:", hasSubpat diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected new file mode 100644 index 000000000000..e3ab52b2cf2e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected @@ -0,0 +1 @@ +| gen_bind_pat.rs:10:9:10:17 | BindPat | gen_bind_pat.rs:10:11:10:17 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql b/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql new file mode 100644 index 000000000000..5234ee8ef83d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BindPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getSubpat() diff --git a/rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs b/rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs new file mode 100644 index 000000000000..9767925cc27d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_bind_pat() -> () { + // A binding pattern. For example: + match x { + Some(y) => y, + None => 0, + }; + match x { + y@Some(_) => y, + None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected new file mode 100644 index 000000000000..655e3c463163 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected @@ -0,0 +1,2 @@ +| gen_box_pat.rs:6:9:6:19 | BoxPat | getInner: | gen_box_pat.rs:6:13:6:19 | TupleStructPat | +| gen_box_pat.rs:7:9:7:16 | BoxPat | getInner: | gen_box_pat.rs:7:13:7:16 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql new file mode 100644 index 000000000000..df6180cda58b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BoxPat x, Pat getInner +where + toBeTested(x) and + not x.isUnknown() and + getInner = x.getInner() +select x, "getInner:", getInner diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs new file mode 100644 index 000000000000..291e7d67c54d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_box_pat() -> () { + // A box pattern. For example: + match x { + box Some(y) => y, + box None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected new file mode 100644 index 000000000000..4c6c757fb0b2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected @@ -0,0 +1 @@ +| gen_const_block_pat.rs:6:9:6:26 | ConstBlockPat | getExpr: | gen_const_block_pat.rs:6:15:6:26 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql new file mode 100644 index 000000000000..c412596eb32c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ConstBlockPat x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs new file mode 100644 index 000000000000..680f416e457b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_const_block_pat() -> () { + // A const block pattern. For example: + match x { + const { 1 + 2 + 3} => "ok", + _ => "fail", + }; +} diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.expected b/rust/ql/test/extractor-tests/generated/Label/Label.expected new file mode 100644 index 000000000000..297511910be5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label.expected @@ -0,0 +1,2 @@ +| gen_label.rs:5:5:5:11 | Label | getName: | 'label | +| gen_label.rs:5:5:5:11 | Label | getName: | 'label | diff --git a/rust/ql/test/extractor-tests/generated/Label/Label.ql b/rust/ql/test/extractor-tests/generated/Label/Label.ql new file mode 100644 index 000000000000..873eacb4772c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/Label.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from Label x, string getName +where + toBeTested(x) and + not x.isUnknown() and + getName = x.getName() +select x, "getName:", getName diff --git a/rust/ql/test/extractor-tests/generated/Label/gen_label.rs b/rust/ql/test/extractor-tests/generated/Label/gen_label.rs new file mode 100644 index 000000000000..2fd977db1593 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Label/gen_label.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_label() -> () { + // A label. For example: + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; +} diff --git a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected b/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected new file mode 100644 index 000000000000..ee96c3aa516d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected @@ -0,0 +1 @@ +| gen_lit_pat.rs:6:9:6:10 | LitPat | getExpr: | gen_lit_pat.rs:6:9:6:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql b/rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql new file mode 100644 index 000000000000..bc2f1fe11a1e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LitPat x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs b/rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs new file mode 100644 index 000000000000..78f6759fe12d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_lit_pat() -> () { + // A literal pattern. For example: + match x { + 42 => "ok", + _ => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.expected b/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.expected new file mode 100644 index 000000000000..10515823daae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.expected @@ -0,0 +1 @@ +| gen_missing_pat.rs:6:9:6:10 | MissingPat | diff --git a/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.ql b/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.ql new file mode 100644 index 000000000000..ea33cd3b0820 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingPat/MissingPat.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MissingPat x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs b/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs new file mode 100644 index 000000000000..bed70f4d7ff9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_missing_pat() -> () { + // A missing pattern, used as a place holder for incomplete syntax. + match Some(42) { + .. => "ok", + _ => "fail", + }; +} diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected new file mode 100644 index 000000000000..73e937f56e73 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected @@ -0,0 +1 @@ +| gen_or_pat.rs:6:9:6:22 | OrPat | getNumberOfArgs: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql new file mode 100644 index 000000000000..f2b5bcae611b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from OrPat x, int getNumberOfArgs +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArgs = x.getNumberOfArgs() +select x, "getNumberOfArgs:", getNumberOfArgs diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected new file mode 100644 index 000000000000..a80d9a19e8f5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected @@ -0,0 +1,2 @@ +| gen_or_pat.rs:6:9:6:22 | OrPat | 0 | gen_or_pat.rs:6:9:6:15 | TupleStructPat | +| gen_or_pat.rs:6:9:6:22 | OrPat | 1 | gen_or_pat.rs:6:19:6:22 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.ql new file mode 100644 index 000000000000..24a924c8042a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from OrPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs new file mode 100644 index 000000000000..2409c4e41794 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_or_pat() -> () { + // An or pattern. For example: + match x { + Some(y) | None => 0, + } +} diff --git a/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected b/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected new file mode 100644 index 000000000000..84b1cd34a335 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected @@ -0,0 +1,2 @@ +| gen_bind_pat.rs:6:14:6:14 | BindPat | getBindingId: | y | hasSubpat: | no | +| gen_bind_pat.rs:10:9:10:17 | BindPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected new file mode 100644 index 000000000000..e3ab52b2cf2e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected @@ -0,0 +1 @@ +| gen_bind_pat.rs:10:9:10:17 | BindPat | gen_bind_pat.rs:10:11:10:17 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/Pat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Pat/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/Pat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected new file mode 100644 index 000000000000..746d3dcffe7a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | PathPat | getPath: | gen_path_pat.rs:6:9:6:16 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql new file mode 100644 index 000000000000..efa91319cf2f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from PathPat x, Unimplemented getPath +where + toBeTested(x) and + not x.isUnknown() and + getPath = x.getPath() +select x, "getPath:", getPath diff --git a/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs b/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs new file mode 100644 index 000000000000..5b61631593d0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_path_pat() -> () { + // A path pattern. For example: + match x { + Foo::Bar => "ok", + _ => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected new file mode 100644 index 000000000000..51b3ecd3d685 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected @@ -0,0 +1,3 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | hasStart: | no | hasEnd: | yes | +| gen_range_pat.rs:7:9:7:15 | RangePat | hasStart: | yes | hasEnd: | yes | +| gen_range_pat.rs:8:9:8:12 | RangePat | hasStart: | yes | hasEnd: | no | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql new file mode 100644 index 000000000000..d632e12ebe72 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangePat x, string hasStart, string hasEnd +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasStart() then hasStart = "yes" else hasStart = "no") and + if x.hasEnd() then hasEnd = "yes" else hasEnd = "no" +select x, "hasStart:", hasStart, "hasEnd:", hasEnd diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected new file mode 100644 index 000000000000..e183bce66412 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected @@ -0,0 +1,2 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:9:6:12 | LitPat | +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql new file mode 100644 index 000000000000..1c9d984689e3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getEnd() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected new file mode 100644 index 000000000000..0f9540cbbb40 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected @@ -0,0 +1,2 @@ +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LitPat | +| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:12 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql new file mode 100644 index 000000000000..53ba8f8e770b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getStart() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs b/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs new file mode 100644 index 000000000000..21fecc5f2a9e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/gen_range_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen + +fn test_range_pat() -> () { + // A range pattern. For example: + match x { + ..15 => "too cold", + 16..=25 => "just right", + 26.. => "too hot", + } +} diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected new file mode 100644 index 000000000000..655e3c463163 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected @@ -0,0 +1,2 @@ +| gen_box_pat.rs:6:9:6:19 | BoxPat | getInner: | gen_box_pat.rs:6:13:6:19 | TupleStructPat | +| gen_box_pat.rs:7:9:7:16 | BoxPat | getInner: | gen_box_pat.rs:7:13:7:16 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected b/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected new file mode 100644 index 000000000000..c6f11b0f5986 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected @@ -0,0 +1,2 @@ +| gen_record_field_pat.rs:5:18:5:18 | RecordFieldPat | getName: | a | getPat: | gen_record_field_pat.rs:5:18:5:18 | LitPat | +| gen_record_field_pat.rs:5:24:5:24 | RecordFieldPat | getName: | b | getPat: | gen_record_field_pat.rs:5:24:5:24 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql b/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql new file mode 100644 index 000000000000..8710a49db236 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordFieldPat x, string getName, Pat getPat +where + toBeTested(x) and + not x.isUnknown() and + getName = x.getName() and + getPat = x.getPat() +select x, "getName:", getName, "getPat:", getPat diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs b/rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs new file mode 100644 index 000000000000..e1f5104e5a0e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_record_field_pat() -> () { + // A field in a record pattern. For example `a: 1` in: + let Foo { a: 1, b: 2 } = foo; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected new file mode 100644 index 000000000000..12bf255517db --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | hasPath: | yes | getNumberOfArgs: | 2 | hasEllipsis: | no | +| gen_record_pat.rs:7:9:7:18 | RecordPat | hasPath: | yes | getNumberOfArgs: | 0 | hasEllipsis: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql new file mode 100644 index 000000000000..2a4ecedace57 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordPat x, string hasPath, int getNumberOfArgs, string hasEllipsis +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + getNumberOfArgs = x.getNumberOfArgs() and + if x.hasEllipsis() then hasEllipsis = "yes" else hasEllipsis = "no" +select x, "hasPath:", hasPath, "getNumberOfArgs:", getNumberOfArgs, "hasEllipsis:", hasEllipsis diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected new file mode 100644 index 000000000000..f40505869562 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | 0 | gen_record_pat.rs:6:18:6:18 | RecordFieldPat | +| gen_record_pat.rs:6:9:6:26 | RecordPat | 1 | gen_record_pat.rs:6:24:6:24 | RecordFieldPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql new file mode 100644 index 000000000000..4a9650d80851 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected new file mode 100644 index 000000000000..7fdceb60d1ab --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | RecordPat | gen_record_pat.rs:6:9:6:26 | Unimplemented | +| gen_record_pat.rs:7:9:7:18 | RecordPat | gen_record_pat.rs:7:9:7:18 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql new file mode 100644 index 000000000000..20e4befd2237 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs b/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs new file mode 100644 index 000000000000..161d8e46c8c4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/gen_record_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_record_pat() -> () { + // A record pattern. For example: + match x { + Foo { a: 1, b: 2 } => "ok", + Foo { .. } => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected new file mode 100644 index 000000000000..d45f05245203 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected @@ -0,0 +1,2 @@ +| gen_ref_pat.rs:6:9:6:20 | RefPat | getPat: | gen_ref_pat.rs:6:14:6:20 | TupleStructPat | isMut: | yes | +| gen_ref_pat.rs:7:9:7:13 | RefPat | getPat: | gen_ref_pat.rs:7:10:7:13 | PathPat | isMut: | no | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql new file mode 100644 index 000000000000..cceccf2e689e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RefPat x, Pat getPat, string isMut +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + if x.isMut() then isMut = "yes" else isMut = "no" +select x, "getPat:", getPat, "isMut:", isMut diff --git a/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs new file mode 100644 index 000000000000..58b24ddfbf5a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_ref_pat() -> () { + // A reference pattern. For example: + match x { + &mut Some(y) => y, + &None => 0, + }; +} diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected new file mode 100644 index 000000000000..96aa9c9cb287 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected @@ -0,0 +1,3 @@ +| gen_slice_pat.rs:6:9:6:23 | SlicePat | getNumberOfPrefixes: | 5 | hasSlice: | no | getNumberOfSuffixes: | 0 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | getNumberOfPrefixes: | 2 | hasSlice: | yes | getNumberOfSuffixes: | 0 | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | getNumberOfPrefixes: | 2 | hasSlice: | yes | getNumberOfSuffixes: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql new file mode 100644 index 000000000000..3e3441a18f9a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from SlicePat x, int getNumberOfPrefixes, string hasSlice, int getNumberOfSuffixes +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfPrefixes = x.getNumberOfPrefixes() and + (if x.hasSlice() then hasSlice = "yes" else hasSlice = "no") and + getNumberOfSuffixes = x.getNumberOfSuffixes() +select x, "getNumberOfPrefixes:", getNumberOfPrefixes, "hasSlice:", hasSlice, + "getNumberOfSuffixes:", getNumberOfSuffixes diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected new file mode 100644 index 000000000000..856034605c42 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected @@ -0,0 +1,9 @@ +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | LitPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | LitPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | LitPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | LitPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | LitPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | LitPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | LitPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | BindPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | BindPat | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql new file mode 100644 index 000000000000..ecb98e1821c8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from SlicePat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getPrefix(index) diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.expected new file mode 100644 index 000000000000..1e0f4586250f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.expected @@ -0,0 +1,2 @@ +| gen_slice_pat.rs:7:9:7:18 | SlicePat | gen_slice_pat.rs:7:16:7:17 | MissingPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | gen_slice_pat.rs:8:16:8:17 | MissingPat | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql new file mode 100644 index 000000000000..d7cb38f27601 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSlice.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from SlicePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getSlice() diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected new file mode 100644 index 000000000000..76d7ffd51416 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected @@ -0,0 +1,2 @@ +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:20:8:20 | BindPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:23:8:23 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql new file mode 100644 index 000000000000..fb3156272d3a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from SlicePat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getSuffix(index) diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs b/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs new file mode 100644 index 000000000000..b2c155960d59 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/gen_slice_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen + +fn test_slice_pat() -> () { + // A slice pattern. For example: + match x { + [1, 2, 3, 4, 5] => "ok", + [1, 2, ..] => "fail", + [x, y, .., z, 7] => "fail", + } +} diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected new file mode 100644 index 000000000000..393cbfdda381 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected @@ -0,0 +1,2 @@ +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | getNumberOfArgs: | 2 | hasEllipsisIndex: | no | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | getNumberOfArgs: | 3 | hasEllipsisIndex: | yes | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql new file mode 100644 index 000000000000..97f1df0380e6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TuplePat x, int getNumberOfArgs, string hasEllipsisIndex +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfArgs = x.getNumberOfArgs() and + if x.hasEllipsisIndex() then hasEllipsisIndex = "yes" else hasEllipsisIndex = "no" +select x, "getNumberOfArgs:", getNumberOfArgs, "hasEllipsisIndex:", hasEllipsisIndex diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected new file mode 100644 index 000000000000..3cb4a1055fdd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected @@ -0,0 +1,5 @@ +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | BindPat | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | BindPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | BindPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | BindPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:21:6:21 | BindPat | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql new file mode 100644 index 000000000000..42ff250f76f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TuplePat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.expected new file mode 100644 index 000000000000..7248cb17ab33 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.expected @@ -0,0 +1 @@ +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql new file mode 100644 index 000000000000..2d621b9abb06 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getEllipsisIndex.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TuplePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getEllipsisIndex() diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs b/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs new file mode 100644 index 000000000000..8bf0f63ebabc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/gen_tuple_pat.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_tuple_pat() -> () { + // A tuple pattern. For example: + let (x, y) = (1, 2); + let (a, b, .., z) = (1, 2, 3, 4, 5); +} diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected new file mode 100644 index 000000000000..03ce4b8082d9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected @@ -0,0 +1,3 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | hasPath: | yes | getNumberOfArgs: | 4 | hasEllipsisIndex: | no | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | hasPath: | yes | getNumberOfArgs: | 1 | hasEllipsisIndex: | yes | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | hasPath: | yes | getNumberOfArgs: | 0 | hasEllipsisIndex: | yes | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql new file mode 100644 index 000000000000..55c85f8b5545 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleStructPat x, string hasPath, int getNumberOfArgs, string hasEllipsisIndex +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + getNumberOfArgs = x.getNumberOfArgs() and + if x.hasEllipsisIndex() then hasEllipsisIndex = "yes" else hasEllipsisIndex = "no" +select x, "hasPath:", hasPath, "getNumberOfArgs:", getNumberOfArgs, "hasEllipsisIndex:", + hasEllipsisIndex diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected new file mode 100644 index 000000000000..2c33b82f1e72 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected @@ -0,0 +1,5 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | LitPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | LitPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | LitPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | LitPat | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:7:19:7:19 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql new file mode 100644 index 000000000000..a453cce4e1cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleStructPat x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.expected new file mode 100644 index 000000000000..96cb3797a629 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.expected @@ -0,0 +1,2 @@ +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | 0 | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql new file mode 100644 index 000000000000..51c3064f6205 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleStructPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getEllipsisIndex() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected new file mode 100644 index 000000000000..97d7dd69abdc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected @@ -0,0 +1,3 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | gen_tuple_struct_pat.rs:6:9:6:27 | Unimplemented | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | gen_tuple_struct_pat.rs:7:9:7:20 | Unimplemented | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | gen_tuple_struct_pat.rs:8:9:8:17 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql new file mode 100644 index 000000000000..2dd64f448806 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TupleStructPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs b/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs new file mode 100644 index 000000000000..6407217b7f01 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/gen_tuple_struct_pat.rs @@ -0,0 +1,10 @@ +// generated by codegen + +fn test_tuple_struct_pat() -> () { + // A tuple struct pattern. For example: + match x { + Tuple("a", 1, 2, 3) => "great", + Tuple(.., 3) => "fine", + Tuple(..) => "fail", + }; +} diff --git a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected b/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected new file mode 100644 index 000000000000..d24eafaad3c5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected @@ -0,0 +1 @@ +| gen_wild_pat.rs:5:9:5:9 | WildPat | diff --git a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql b/rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql new file mode 100644 index 000000000000..0bf1b45c3f7d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from WildPat x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs b/rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs new file mode 100644 index 000000000000..153657dc96b7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_wild_pat() -> () { + // A wildcard pattern. For example: + let _ = 42; +} diff --git a/rust/schema.py b/rust/schema.py index 9b51f571b560..45ab06823a80 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -77,20 +77,37 @@ class Module(Declaration): class Expr(AstNode): + """ + The base class for expressions. + """ pass -@qltest.collapse_hierarchy class Pat(AstNode): + """ + The base class for patterns. + """ pass -@qltest.skip +@rust.doc_test_signature("() -> ()") class Label(AstNode): + """ + A label. For example: + ``` + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + ``` + """ name: string class Stmt(AstNode): + """ + The base class for statements. + """ pass @@ -735,7 +752,7 @@ class InlineAsmExpr(Expr): class LetStmt(Stmt): """ A let statement. For example: - ``` + ``` let x = 42; let x: i32 = 42; let x: i32; @@ -781,72 +798,222 @@ class ItemStmt(Stmt): pass +@rust.doc_test_signature("() -> ()") class MissingPat(Pat): + """ + A missing pattern, used as a place holder for incomplete syntax. + ``` + match Some(42) { + .. => "ok", + _ => "fail", + }; + ``` + """ pass +@rust.doc_test_signature("() -> ()") class WildPat(Pat): + """ + A wildcard pattern. For example: + ``` + let _ = 42; + ``` + """ pass +@rust.doc_test_signature("() -> ()") class TuplePat(Pat): + """ + A tuple pattern. For example: + ``` + let (x, y) = (1, 2); + let (a, b, .., z) = (1, 2, 3, 4, 5); + ``` + """ args: list[Pat] | child ellipsis_index: optional[int] +@rust.doc_test_signature("() -> ()") class OrPat(Pat): + """ + An or pattern. For example: + ``` + match x { + Some(y) | None => 0, + } + ``` + """ args: list[Pat] | child +@rust.doc_test_signature("() -> ()") class RecordFieldPat(AstNode): + """ + A field in a record pattern. For example `a: 1` in: + ``` + let Foo { a: 1, b: 2 } = foo; + ``` + """ name: string pat: Pat | child +@rust.doc_test_signature("() -> ()") class RecordPat(Pat): + """ + A record pattern. For example: + ``` + match x { + Foo { a: 1, b: 2 } => "ok", + Foo { .. } => "fail", + } + ``` + """ + path: optional[Unimplemented] | child args: list[RecordFieldPat] | child has_ellipsis: predicate +@rust.doc_test_signature("() -> ()") class RangePat(Pat): + """ + A range pattern. For example: + ``` + match x { + ..15 => "too cold", + 16..=25 => "just right", + 26.. => "too hot", + } + ``` + """ start: optional[Pat] | child end: optional[Pat] | child +@rust.doc_test_signature("() -> ()") class SlicePat(Pat): + """ + A slice pattern. For example: + ``` + match x { + [1, 2, 3, 4, 5] => "ok", + [1, 2, ..] => "fail", + [x, y, .., z, 7] => "fail", + } + """ prefix: list[Pat] | child slice: optional[Pat] | child suffix: list[Pat] | child +@rust.doc_test_signature("() -> ()") class PathPat(Pat): + """ + A path pattern. For example: + ``` + match x { + Foo::Bar => "ok", + _ => "fail", + } + ``` + """ path: Unimplemented | child +@rust.doc_test_signature("() -> ()") class LitPat(Pat): + """ + A literal pattern. For example: + ``` + match x { + 42 => "ok", + _ => "fail", + } + ``` + """ expr: Expr | child +@rust.doc_test_signature("() -> ()") class BindPat(Pat): + """ + A binding pattern. For example: + ``` + match x { + Some(y) => y, + None => 0, + }; + ``` + ``` + match x { + y@Some(_) => y, + None => 0, + }; + ``` + """ binding_id: string subpat: optional[Pat] | child +@rust.doc_test_signature("() -> ()") class TupleStructPat(Pat): + """ + A tuple struct pattern. For example: + ``` + match x { + Tuple("a", 1, 2, 3) => "great", + Tuple(.., 3) => "fine", + Tuple(..) => "fail", + }; + ``` + """ path: optional[Unimplemented] | child args: list[Pat] | child ellipsis_index: optional[int] +@rust.doc_test_signature("() -> ()") class RefPat(Pat): + """ + A reference pattern. For example: + ``` + match x { + &mut Some(y) => y, + &None => 0, + }; + ``` + """ pat: Pat | child is_mut: predicate +@rust.doc_test_signature("() -> ()") class BoxPat(Pat): + """ + A box pattern. For example: + ``` + match x { + box Some(y) => y, + box None => 0, + }; + ``` + """ inner: Pat | child +@rust.doc_test_signature("() -> ()") class ConstBlockPat(Pat): + """ + A const block pattern. For example: + ``` + match x { + const { 1 + 2 + 3} => "ok", + _ => "fail", + }; + ``` + """ expr: Expr | child From 7572546efa7379ba86a62732f22d2ce400c68380 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 12 Sep 2024 21:41:03 +0200 Subject: [PATCH 04/22] Improve handling of unimplemented nodes --- rust/extractor/src/generated/.generated.list | 2 +- rust/extractor/src/generated/top.rs | 68 ++++++++--- rust/extractor/src/translate.rs | 70 ++++++++--- rust/ql/.generated.list | 63 ++++++---- rust/ql/.gitattributes | 15 ++- rust/ql/lib/codeql/rust/elements.qll | 3 + .../codeql/rust/elements/ConstBlockPat.qll | 2 +- rust/ql/lib/codeql/rust/elements/Function.qll | 2 +- .../lib/codeql/rust/elements/GenericArgs.qll | 8 ++ ...tructor.qll => GenericArgsConstructor.qll} | 6 +- rust/ql/lib/codeql/rust/elements/MatchArm.qll | 4 +- .../ql/lib/codeql/rust/elements/MatchExpr.qll | 1 + rust/ql/lib/codeql/rust/elements/Module.qll | 11 ++ rust/ql/lib/codeql/rust/elements/Path.qll | 8 ++ .../codeql/rust/elements/PathConstructor.qll | 14 +++ .../elements/UnimplementedDeclaration.qll | 8 ++ .../UnimplementedDeclarationConstructor.qll | 14 +++ .../codeql/rust/generated/ConstBlockPat.qll | 2 +- .../ql/lib/codeql/rust/generated/Function.qll | 2 +- .../lib/codeql/rust/generated/GenericArgs.qll | 24 ++++ .../ql/lib/codeql/rust/generated/MatchArm.qll | 4 +- .../lib/codeql/rust/generated/MatchExpr.qll | 1 + .../codeql/rust/generated/MethodCallExpr.qll | 6 +- rust/ql/lib/codeql/rust/generated/Module.qll | 9 ++ .../lib/codeql/rust/generated/ParentChild.qll | 101 +++++++++++++--- rust/ql/lib/codeql/rust/generated/Path.qll | 24 ++++ .../ql/lib/codeql/rust/generated/PathExpr.qll | 8 +- rust/ql/lib/codeql/rust/generated/PathPat.qll | 7 +- rust/ql/lib/codeql/rust/generated/Raw.qll | 65 +++++++--- .../codeql/rust/generated/RecordLitExpr.qll | 6 +- .../lib/codeql/rust/generated/RecordPat.qll | 8 +- rust/ql/lib/codeql/rust/generated/Synth.qll | 113 ++++++++++++++++-- .../rust/generated/SynthConstructors.qll | 4 +- .../codeql/rust/generated/TupleStructPat.qll | 6 +- rust/ql/lib/codeql/rust/generated/TypeRef.qll | 3 +- .../codeql/rust/generated/Unimplemented.qll | 6 +- .../generated/UnimplementedDeclaration.qll | 26 ++++ rust/ql/lib/rust.dbscheme | 40 +++++-- .../generated/.generated_tests.list | 9 +- .../extractor-tests/generated/.gitattributes | 1 + .../ConstBlockPat/gen_const_block_pat.rs | 2 +- .../generated/Function/gen_function.rs | 2 +- .../MISSING_SOURCE.txt | 0 .../generated/MatchArm/gen_match_arm.rs | 4 +- .../generated/MatchExpr/gen_match_expr.rs | 8 +- .../generated/Module/Module.ql | 10 ++ .../generated/Module/Module_getDeclaration.ql | 7 ++ .../generated/Module/gen_module.rs | 7 ++ .../generated/Path/MISSING_SOURCE.txt | 4 + .../generated/PathExpr/PathExpr.ql | 2 +- .../generated/PathPat/PathPat.ql | 2 +- rust/schema.py | 49 ++++++-- 52 files changed, 682 insertions(+), 189 deletions(-) create mode 100644 rust/ql/lib/codeql/rust/elements/GenericArgs.qll rename rust/ql/lib/codeql/rust/elements/{UnimplementedConstructor.qll => GenericArgsConstructor.qll} (60%) create mode 100644 rust/ql/lib/codeql/rust/elements/Path.qll create mode 100644 rust/ql/lib/codeql/rust/elements/PathConstructor.qll create mode 100644 rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll create mode 100644 rust/ql/lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll create mode 100644 rust/ql/lib/codeql/rust/generated/GenericArgs.qll create mode 100644 rust/ql/lib/codeql/rust/generated/Path.qll create mode 100644 rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll rename rust/ql/test/extractor-tests/generated/{Module => GenericArgs}/MISSING_SOURCE.txt (100%) create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.ql create mode 100644 rust/ql/test/extractor-tests/generated/Module/gen_module.rs create mode 100644 rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index e97b3eb02c8d..34a861244f72 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e -top.rs 569909061b9a993481764765a014327d143939778f2dbc79836e7496cdb83e1f 569909061b9a993481764765a014327d143939778f2dbc79836e7496cdb83e1f +top.rs a165d9d38458fa0a4fa07445bb4229d17c2be47d0718e4b0ac9f7a82e700c8b2 a165d9d38458fa0a4fa07445bb4229d17c2be47d0718e4b0ac9f7a82e700c8b2 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index 48ca548386be..c20581423976 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -43,6 +43,25 @@ impl TrapEntry for DbLocation { } } +#[derive(Debug)] +pub struct GenericArgs { + pub id: TrapId, + pub location: Option, +} + +impl TrapEntry for GenericArgs { + fn extract_id(&mut self) -> TrapId { + std::mem::replace(&mut self.id, TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("generic_args", vec![trap::Arg::Label(id)]); + if let Some(v) = self.location { + out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); + } + } +} + #[derive(Debug)] pub struct Label { pub id: TrapId, @@ -89,20 +108,18 @@ impl TrapEntry for MatchArm { } #[derive(Debug)] -pub struct RecordFieldPat { +pub struct Path { pub id: TrapId, pub location: Option, - pub name: String, - pub pat: trap::Label, } -impl TrapEntry for RecordFieldPat { +impl TrapEntry for Path { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("record_field_pats", vec![trap::Arg::Label(id), self.name.into(), self.pat.into()]); + out.add_tuple("paths", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -110,20 +127,20 @@ impl TrapEntry for RecordFieldPat { } #[derive(Debug)] -pub struct RecordLitField { +pub struct RecordFieldPat { pub id: TrapId, pub location: Option, pub name: String, - pub expr: trap::Label, + pub pat: trap::Label, } -impl TrapEntry for RecordLitField { +impl TrapEntry for RecordFieldPat { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("record_lit_fields", vec![trap::Arg::Label(id), self.name.into(), self.expr.into()]); + out.add_tuple("record_field_pats", vec![trap::Arg::Label(id), self.name.into(), self.pat.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -131,18 +148,20 @@ impl TrapEntry for RecordLitField { } #[derive(Debug)] -pub struct TypeRef { +pub struct RecordLitField { pub id: TrapId, pub location: Option, + pub name: String, + pub expr: trap::Label, } -impl TrapEntry for TypeRef { +impl TrapEntry for RecordLitField { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("type_refs", vec![trap::Arg::Label(id)]); + out.add_tuple("record_lit_fields", vec![trap::Arg::Label(id), self.name.into(), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -150,18 +169,18 @@ impl TrapEntry for TypeRef { } #[derive(Debug)] -pub struct Unimplemented { +pub struct TypeRef { pub id: TrapId, pub location: Option, } -impl TrapEntry for Unimplemented { +impl TrapEntry for TypeRef { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("unimplementeds", vec![trap::Arg::Label(id)]); + out.add_tuple("type_refs", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -1306,6 +1325,25 @@ impl TrapEntry for UnderscoreExpr { } } +#[derive(Debug)] +pub struct UnimplementedDeclaration { + pub id: TrapId, + pub location: Option, +} + +impl TrapEntry for UnimplementedDeclaration { + fn extract_id(&mut self) -> TrapId { + std::mem::replace(&mut self.id, TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("unimplemented_declarations", vec![trap::Arg::Label(id)]); + if let Some(v) = self.location { + out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); + } + } +} + #[derive(Debug)] pub struct WildPat { pub id: TrapId, diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 0cfc1cc7a047..2e11f33a9973 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -183,15 +183,12 @@ impl CrateTranslator<'_> { }) } - fn emit_unimplemented(&mut self, location: Option) -> trap::Label { - self.trap.emit(generated::Unimplemented { + fn emit_path(&mut self, _path: &Path, location: Option) -> trap::Label { + self.trap.emit(generated::Path { id: TrapId::Star, location, }) } - fn emit_path(&mut self, _path: &Path, location: Option) -> trap::Label { - self.emit_unimplemented(location) - } fn emit_record_field_pat( &mut self, @@ -610,9 +607,12 @@ impl CrateTranslator<'_> { .into_iter() .map(|e| self.emit_expr(*e, body, source_map)) .collect(); - let generic_args = generic_args - .as_ref() - .map(|_args| self.emit_unimplemented(None)); + let generic_args = generic_args.as_ref().map(|_args| { + self.trap.emit(generated::GenericArgs { + id: TrapId::Star, + location: None, + }) + }); self.trap.emit(generated::MethodCallExpr { id: TrapId::Star, location, @@ -929,8 +929,12 @@ impl CrateTranslator<'_> { labels: &mut Vec, ) { match id { - ModuleDef::Module(_) => { - self.emit_unimplemented(None); + ModuleDef::Module(_module) => { + let location = None; + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Function(function) => { let def: ra_ap_hir::DefWithBody = function.into(); @@ -958,38 +962,66 @@ impl CrateTranslator<'_> { } ModuleDef::Adt(adt) => { let location = self.emit_location(adt); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Variant(variant) => { let location = self.emit_location(variant); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Const(const_) => { let location = self.emit_location(const_); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Static(static_) => { let location = self.emit_location(static_); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Trait(trait_) => { let location = self.emit_location(trait_); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::TraitAlias(alias) => { let location = self.emit_location(alias); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::TypeAlias(type_alias) => { let location = self.emit_location(type_alias); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::BuiltinType(_builtin_type) => { - self.emit_unimplemented(None); + let location = None; + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } ModuleDef::Macro(macro_) => { let location = self.emit_location(macro_); - self.emit_unimplemented(location); + self.trap.emit(generated::UnimplementedDeclaration { + id: TrapId::Star, + location, + }); } } } diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 9c4af259e0b0..a154d8997e15 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -25,7 +25,7 @@ lib/codeql/rust/elements/CastExpr.qll cafc39afc4103781b475906a0e178175b32374a049 lib/codeql/rust/elements/CastExprConstructor.qll cab6e9a9872006cc811620bda522fafde23fc4edb5151af06a5a0938747dbdfb 6d972faff70166c4b07392a0bc90c6d72c9466b58b55e7651ef6c3d06cf72873 lib/codeql/rust/elements/ClosureExpr.qll cde112e1e1fcd5677cffa3469e376ff2b69ff6f55d907152b4afba4d92d06c55 f9180e4e0905ba233f64717719ee653ee5dfd2dad9f87a81b63b513ce5e73bc3 lib/codeql/rust/elements/ClosureExprConstructor.qll 238dceb78082a5566276640d4aa31484041700852c0751130d139a69ac8bde46 7aae22930def4d438d742255731cc59b78a95b73a0b1d6334ae9965e083e03bc -lib/codeql/rust/elements/ConstBlockPat.qll 2ed7b82917c0da34cfb53b37177e7c56b51011716c50bf0eea35e1a33dcddc58 24d2c3888adb404717e4263b36b48d531ec8d0a6d09b4dd577cdd4933b6c2dea +lib/codeql/rust/elements/ConstBlockPat.qll 397ad2bd112a34f39c486acf6c82c73881ce3f70d91634649ea040b92f96c8c1 96bf33b3732b8aa60e83c10f48eae538e695b1b8a6a5942e8e79a924e09e60f9 lib/codeql/rust/elements/ConstBlockPatConstructor.qll 04aa8b4f218ce87157f0d6b10c9c04660c34c90af1f121b1432402de2e5114cd 34e2fecbe91ea9ac1626bc27121a7d5abe99855e3f49bdca12a1969b42ac0ba5 lib/codeql/rust/elements/ConstExpr.qll 70a7c9db14efaf290a77401eb04c439b24ed77c21496cee53b89d92d350daeaf e3f98ac4dde94a4dc8d6df51ba4ecd4acc492d9de569ac3eee9dd3bc258bd03d lib/codeql/rust/elements/ConstExprConstructor.qll b4c96adc2878047c36d7ceaba2346ef66a2269b5260a56c3d7ff6e3a332bad75 ce15bbfd1448e47d3039e912363efa607cc2c29d44b8248ac91c307af7b57016 @@ -44,6 +44,8 @@ lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c3 lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c857cc703fca03d34f1f478b57ee8051590 1e5555910c643235e34b73f9844e894e51f357c3f7aba8165c47caa147336c53 lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c +lib/codeql/rust/elements/GenericArgs.qll e64db724addfba85bcb326d26640eef6e71467b3f55a0bcfdbe538f6efa154b3 7d6b80c1bac67efa8951987c8e01f286d5da9097e922640868646f639068a3f4 +lib/codeql/rust/elements/GenericArgsConstructor.qll 581b52a92fc3222bc4695ef403b37de513dfa820f0cf73a394a36a351de66bbb a61f06c2aa13ab5852c792faca80148aa8233168ff5b91e3ce9e8d458b62608e lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f lib/codeql/rust/elements/IndexExpr.qll 924fe6732ffefca376d099255e2eb6682cabd6cb4267dc997fcf85aa5478a3a6 09e65b09cfdb928d134d3aad17acc07602a0bcbca098d775028bcb7624f16b11 @@ -64,9 +66,9 @@ lib/codeql/rust/elements/LiteralExpr.qll 031edbbd52d2107a3a7149a4dde306f5fcce9a3 lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 lib/codeql/rust/elements/LoopExprConstructor.qll 635348fe22fb47c7e59bed02a8ed6420be5a9ce92a7d9bf4475465ee170c917b 2bcfe70247c55659b3a3e09562da52fc645cc3166748f268c5a38b35fca24233 -lib/codeql/rust/elements/MatchArm.qll 33c3d1d149b654f64ec8930aad77605d82ac542412e55084cb2fa914bffc5258 433221b39bd6365a868a5d9fa2d0b5f112561bd691fda98d7d2cec36c25be292 +lib/codeql/rust/elements/MatchArm.qll 2508d03a0a8f8e29483855affd08eca118ed756a18a60fc7ae6a9e5d63fae2d7 b88a33eaefe08131f7c8e80ca056c237aad9ef7c21deb2bf35a2f5ecfd320f55 lib/codeql/rust/elements/MatchArmConstructor.qll 49d134823a445a1ee995ebf5637fd0d736b9ab7f2b141026712f231ec4ed3389 f16e8adc8375e6a7334589d5732dcbe10f5ada9de7a12c549c55be3f028ec628 -lib/codeql/rust/elements/MatchExpr.qll 201ce069a53c70065ececa7005d9b03db34e78b0ff29c22b6f84349097f04f38 94fd75c60941d970aa637d9f3b4477ff6d04793966ffccd306bc25e1b84654f9 +lib/codeql/rust/elements/MatchExpr.qll cb38dfcdf896e8f5c429d13493f423d926c39ca928a5a8ef890e258b6ce7a048 5dc5f9e07d1021ac39f29ce6695ceab3d7bc751f33ea8b4ab463df50d3fd24e6 lib/codeql/rust/elements/MatchExprConstructor.qll 74df937d7d8bfbfb02bdbf095595eb3f2129ed4c0854bae6d73b5b38d4fc902d 5c388c02f02462d843945111b72de12bce33c7c332d55993d903aeb250213407 lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a629230991513326585c99dab7be1f3 ed05c7f40fb6d1c97fa0a3a631db1913b8e6abb5c2b3513d0e81a82a2e5f7f95 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e @@ -74,13 +76,15 @@ lib/codeql/rust/elements/MissingExpr.qll 30b04d6a7b67acbce40dc1ffb95edb833578fd5 lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 lib/codeql/rust/elements/MissingPat.qll 74a84a04d0aaabb3353419bba2225e6ca3f02ada55e00d28e6cceb37cefce43a c8ee5e6c411e0955ca0a775c8b09b894e2914fe24f9d16df1f0e6d186d15ebd2 lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 -lib/codeql/rust/elements/Module.qll d8995b361cc672f86a314bd53bd3e4d1ddb26b6afde62eb7c380923810785af0 3c10180c812d89a8116ac6e32cbd4d7ac2f549c8a76d327ed75c764b09251d52 +lib/codeql/rust/elements/Module.qll a104ed007091e5361db9e6be640fba6a22b02913c16fe50cb5d348399504f7b0 7633ef24e7c9e1daca9a82d89870462482536cded234e0e1bb7da9eabc43c00d lib/codeql/rust/elements/ModuleConstructor.qll 109ed8c1b5c61cc1d3e8613aa8bb8c168dc1943c93b5b622fa79665751b78318 601526c7f56578883d261d14653fdad08329f80fea71de14a5ac5ce671a8d436 lib/codeql/rust/elements/OffsetOfExpr.qll e7490d4db7cb4dd1c711ce57934970da8c9cc61af913a62b6963667313dcb0c5 c9043c5e68483b3d4da03ab191dc56e0150ff23af361a227fe91062e10ad66b2 lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57a0235ee01bb50e1fbaa6e5601e0e232c1977d 6e3b7c20a17fe4c45d503ba32264aea8f6dfdc69ccd95905a5bfb1e8b0cc91d0 lib/codeql/rust/elements/OrPat.qll 448ebaddc1b42fbb90e3240d990cb841d4775d9129350e8f5195904798efb27c ffb6121a0b4f0e661e1653c396d565053b9f89eb358bbaa1c218c31eac3b8221 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 lib/codeql/rust/elements/Pat.qll 79ac8430cc9047cf89fcf80cdb527166bd72e979d03e051fa2d60fa2f64f2294 914362a06ad0cac1e1777874bf4425fcc805021197f635ddd87b96d9e5c221d9 +lib/codeql/rust/elements/Path.qll 05a168a83168638e07eb3d746adad7ecd952976dfed6fd85becc0fd491bf4b0f 8f38d2ae227dfd4fc7cedde3008dc66df57aa4ac1714c8d5105c9989b4e8b93e +lib/codeql/rust/elements/PathConstructor.qll 97243db75d6337cf68a22ea68569fdddf4c3bc1b8875bb4bb66faeeba8846a53 03c8c665e2f3b103148fd38eb7a4d0459c8189b2f6160dc08ee1d6d2807e01b6 lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8cbc93779b80e494561af706 c6da0b2e8ace1c30a7cd468406353a457440aafacf8e31c32618fd9781c69113 lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 lib/codeql/rust/elements/PathPat.qll 748a43d1c25c4fd20eaf78f381e4680207557bb696a28d74a9eaa1887bc966c1 186c947b0bbed3111c9bdc564c3ce39432c1a3bbdbb15ebb503629625ffe1dea @@ -121,7 +125,8 @@ lib/codeql/rust/elements/UnaryOpExprConstructor.qll 43db7afbd3535b7edc801d99d772 lib/codeql/rust/elements/UnderscoreExpr.qll bf4c0bf76fa15b041f7ecbd492a499088bef2024b49dbdfa57232e84e72c3067 462380bac5f772c1986146d32b70deabc9f03581675f6e79f7b7f747acfb0bd5 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af0acb89883c5bc9b26d8d8d61718 9d869f83e73915bbeb5af27ea30b69f20c344cd7d7f253cb7dab74de20baa0a6 -lib/codeql/rust/elements/UnimplementedConstructor.qll ee024d4944aebe619ee3ea0ce4f84da0f4fca706baed250c8a65464a8d77979a f95966e3a63cbf2b466241f55bb47c23125645fad206ebd758236465afa4f97d +lib/codeql/rust/elements/UnimplementedDeclaration.qll 4d55b4530ea3dfc38fb41dbfd3907db992ab893407b02a387719921d3ddc990e cb86a99f7a6b21a2b10f61f8c28b97ecf1b71269a3aee652396ea68cf6c806d3 +lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll 44f4590db81e7504de0ede43eb2a33a54baa0738732e03a90721187a1cd303f3 11f27d8a9836b78d9ffac79efa3441fbfcb1dfdc1eb028d2016a1769b8a82ad5 lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 lib/codeql/rust/elements/WildPat.qll dda006b9e762a6f655842c2888bdd33c188c391adac2f2e79437ab1d4969388c 99cbb5c5d64f0bf7a20ce6f0d85bcaa065503505d42dcfd342fbce5a4704ac4e @@ -130,7 +135,7 @@ lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 lib/codeql/rust/elements/YieldExpr.qll 72682ae19d37abd6ec26569ae8f575979ebba1e0d373898211a9af4fad4979a1 ef0193011ee5f94cebbac5c007d652568f560685a213bf8be96cd0c0983a3880 lib/codeql/rust/elements/YieldExprConstructor.qll ff46ba17cc24abfcb0e310c7458d0539b704e7a771ad00853bd3a1844e4e6f82 1c13662ef01c88f1cf057d099eb46524036133e51a0e36ddf947f727ac6046bb -lib/codeql/rust/elements.qll c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 +lib/codeql/rust/elements.qll 515e43d4d74ee62b20e5f9a56d28d405717586a8adcbab1c3ceac1a090f68a0f 515e43d4d74ee62b20e5f9a56d28d405717586a8adcbab1c3ceac1a090f68a0f lib/codeql/rust/generated/ArrayExpr.qll 3fd7465da22e1eb810ae28ffab7b14e9ccceaab0082aa665f14b73d4221128b8 6e9edb5846656aad90283406a496aaae485d38854075a4443817b5098b72b427 lib/codeql/rust/generated/AstNode.qll 0598fac7859906f4103124270dfb2fbdb838387b1c45000bf50a4b62c797ec41 f47c84878c7c9676109e358073bddab92a1dbeb4d977d236ecc1eae44d81c894 lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 @@ -146,7 +151,7 @@ lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0 lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 lib/codeql/rust/generated/CastExpr.qll 0264db34cb111644de4d37569791a2c27665f3a7373c26adfdc1d68ab0a6fcc6 3a757ea06c6e0c715d88bf1eeb579998a0ecc5560fcf3b4066bbd86803ffa100 lib/codeql/rust/generated/ClosureExpr.qll 43d9ff09c156f1ce000c77bcf5ecc02c8fb569c0ca7f042a1aae9d311e18b13e 07e1461269e1f07144468ef7b64b927f29053fa6de71afef334732c33a797f33 -lib/codeql/rust/generated/ConstBlockPat.qll be81c35576fd65caa9dbb657a85da18e4ad64e60c0dbf4df7e373584773eb19b 136a2c6b601decff5523a8aba51d797713271d5766dc4a4fe5cb895f660bafb9 +lib/codeql/rust/generated/ConstBlockPat.qll 05141706ad963e1d9c41b004c73c9569fd0ba2f353da8c19629a153bfb17b769 786fa7db63ea7a8106162fd05e01b52c8338d22b9502d3638880bc6f6d678344 lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f lib/codeql/rust/generated/DbFile.qll 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a @@ -158,7 +163,8 @@ lib/codeql/rust/generated/Expr.qll 91b1744d6b07e8549b94d19832dac9e18b70f54990b32 lib/codeql/rust/generated/ExprStmt.qll 40fd3659761005fe0de2a09e58d35b3b28203f8f354ef5f687e6064862eb73d2 c4bcefa928d8a82f6b9d26a6e4f42912114bd24a90ee5dcc24e7ec1a4c11dbcb lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 -lib/codeql/rust/generated/Function.qll 84a00eb88479efdfe70fe51c3b5cb27ae64a54b48dcca1f2e02f68691b7d907a cde5b965ab27e811f0d24eb4f12bca90c3e8aec3a4c1d9b8bd0023745dfab105 +lib/codeql/rust/generated/Function.qll 133693679cd69f0c011d6aa779b067924e8d58ea15bc3f6b749cc3aa5d5e962d 5a18e3be5c7c681cebec762b2c2d3b1cb08c5fcc11ef422bf65c9b15fc82c893 +lib/codeql/rust/generated/GenericArgs.qll c47ede327602ba85d237920bb1523cb38ad461497f5396ddfae580d332ab16f8 c47ede327602ba85d237920bb1523cb38ad461497f5396ddfae580d332ab16f8 lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 lib/codeql/rust/generated/InlineAsmExpr.qll 0fbc121595d55df71a9190200ee8d7244851c517181d907d07236a8c338f1ebe b41cad499ebcc6aae4326ac5ae596210997fde99b6107feee35d6c9f764f0f5a @@ -171,41 +177,43 @@ lib/codeql/rust/generated/LiteralExpr.qll 70684629cd017f32c220993f57ee4ebea0b9f6 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c -lib/codeql/rust/generated/MatchArm.qll b70dd1934b7190e68cd6f9b2642f6fc67cba7ae13abd19d42f799a77e048d20e 9d544a6e09e9bdc84f0348b7b716e1dfab3bb98063f95938e83fe4264ee6c436 -lib/codeql/rust/generated/MatchExpr.qll d3984b540d7c8e8fda2d99437445f110c789d0c889eca1bd4a38b941884b487d df78f882f75cf443e1a5b21d899559e24e047d5a368dca22b453d8f976d259ef -lib/codeql/rust/generated/MethodCallExpr.qll b94d96216c0203b27eb04c64500487ce284fdcf2158b9b636621fc2d2c93f377 91d00774e94600ba82ae5103b85e1e377b0baef866c7de87c34f806cc4c3bbac +lib/codeql/rust/generated/MatchArm.qll c82a871b33633dc5908d6abc665048b0bc3d761f134b8ceca51338c4a84a55c3 90faaed01f5e7c3ff6b9114b275c80418737c48b64082763e83cb63499fefa6a +lib/codeql/rust/generated/MatchExpr.qll cf48ca2000a1cf2b2fa05b42403bba9be94aac23a88bc88e1b97e86982ff4fe9 244960785828aa62c4c3d17251ef5a3b7dd3ce3e10fd99a364f98f760ca84e77 +lib/codeql/rust/generated/MethodCallExpr.qll 83288ef71bb5f5ba9aadc3977ece9144b3eb58756270b9f76eaf3323153797b6 7fd96a56bb1fc0caa60b52d55a0cc14cc87bd3bd057a970993485375f9e3198a lib/codeql/rust/generated/MissingExpr.qll 9ab4844a2d719d29a95a69d1a6f9477ded0db508f83f3e4f2101847d0486c300 f0706af7d600a4ed1dc253c9e1220e863a58cfb9334f853877b80dffadb35a3a lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 -lib/codeql/rust/generated/Module.qll 2a931a4f2cdb2fee00ed83af045ea63d36b7dbd708e58c30445b5610feaae333 cd62add5c31a509f965aa294f44a1607ec7c62e3a9e3fe9ee063b3c814f4eb62 +lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d -lib/codeql/rust/generated/ParentChild.qll 956f55ac17d66926c59f76d391b75c30767d236b145d6ae402f4308fa22a7d01 dd3cabb5b4a9ba42be60345f445cde18b0d7be934aeb94d7312eeef122e148d2 +lib/codeql/rust/generated/ParentChild.qll 68f8595b5d6136e7b29dfa7d5f4a6e77ad4f7feea9c40a0408e41d438a0a9159 53246623aab7cfd38e8c094dfb09c2ddd3adcca52f568814f672539a4d35b064 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f -lib/codeql/rust/generated/PathExpr.qll ef6665a46332e5c1bc3495f9e7028b0e56b83e99eda692965ca0cd8fc8931cb2 475c1a5374a37b959b09780dac3d62773bdf9fed7fb73ac325cb087e8ee39022 -lib/codeql/rust/generated/PathPat.qll 6544da3df717fa99f2b4480bc69e9b6a376c88766fd4565a9bb17cb459987b10 1edf79c181d8836479bc7a9d8f0b0d955272cf7d821386824f5aab65a36a10b9 +lib/codeql/rust/generated/Path.qll 6814a5a437c11da5ceaac7dd80c8d496446cb884476a9f3361908f2cd417ebb4 6814a5a437c11da5ceaac7dd80c8d496446cb884476a9f3361908f2cd417ebb4 +lib/codeql/rust/generated/PathExpr.qll 5a82e07a0c641fec4e8ce29656fa4e33f420b19b2556b418769f4d899a3dfae3 21920262735114d8304c3569f884828a390b95ca039afcc3e81c75d3f23df9ca +lib/codeql/rust/generated/PathPat.qll 8aaa7fd5f3439ce567f4d6f729e3ba1e98ab24255070b7d4ba7bbde6506d97f5 10bd82ea0e846c96afa34cc6e467101a490a1191b4edc29a7154a6d93a467f1c lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll 5dea1190c702f339a6c5da16cb922508cbc5818cb61f9bb6b2c7129167e68f3d 9f650660a6ca7e62426f4dd51fe33677d96658d48596baa52c390d8742caeb18 +lib/codeql/rust/generated/Raw.qll d84338bad5b4d15d9379b3a1c76095b43d54bd542875161fb92eefead1db20c6 898a89f57aaa546355ff38ad2169b8d2e01d5c3556b2a969bf575a904c909f40 lib/codeql/rust/generated/RecordFieldPat.qll bff47b9ec13fd5747a9d4597feb3acaacd17876ed1ff411bcecf605c5909a01f adc2e30ae9169b861ce28c6c21431e9dd3fb3d3f832e99cb39f9f0ff6b1dbe2d -lib/codeql/rust/generated/RecordLitExpr.qll 442772626175d46dcd8e68b84d6a26b869affcc6cb1e88d880d31e7a705c772f 77976fea76b5741c1aff3e8a48eeb07987c3332ab9f52ef0c32caae75ad4f1c9 +lib/codeql/rust/generated/RecordLitExpr.qll c83dafa1f07a34c686cee81188045c9e04aba5ebd54c4778708f1b20ccb76702 da4c710226d6604c313bfd88bfbe005c6178db054860da265de616e9a5a8b3f3 lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 -lib/codeql/rust/generated/RecordPat.qll fc5efed719d6dbceb4fa6eaa13dcbd9bcdb6958c2721dafd5bb56d7395003fef b7412c9376fd9628e6bba8dfea8914d76d3a6e63af3f8022cfc99f5c9e397c8d +lib/codeql/rust/generated/RecordPat.qll 2c1ef4a18148a5f0f755d04a3b9d1cda892f784e1741c2d90601983b2e130ec2 559d0ef93a3d93c9236eb2675ed5b89cc7dcfe599c52d784e6759954e478bd47 lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 lib/codeql/rust/generated/RefPat.qll 2a451553084306acc625f0433dc02546d07a1b6174a7d614379c9e8e28550118 40b845320c68283d0f6e47f17f4d4d893ef613f41422d35663582cfa3b5e7d75 lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb6f88638826dc37a712c05afaa c2cea180b7c068a3483cbda73168effe762ab2aa56bb8c590c8a15b6e54961ce lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll 73dce5e310068357eb41e8c51923ff5c4054548db27987cde85735ddf071fc44 67fa0c285c110f18446689d1eaad9e82896df79d62999ad3f788fc295fa1d2c3 lib/codeql/rust/generated/Stmt.qll 58b010f32956f2736a7b9ebb43467ecd03308a1f27c99e2b09bb925c349ac859 9859da4a4aa29b4f7ab47313b2dfe8baf9717a162fcd8bd62a7cbab4afd1886e -lib/codeql/rust/generated/Synth.qll 03ecd0d7e89aca555d2393bbea8de1cde0476e28fb9f198ed3355a74f1b5c1c8 11855cc446c2d8a77503795a7c395e86ff149ea10d773a6e50e54b08dd438642 -lib/codeql/rust/generated/SynthConstructors.qll 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b 07106a119dcfc7a839454d1fa66c0e65d6ab17eeace40cd5bc857a65dc7c859b +lib/codeql/rust/generated/Synth.qll 8a3569fcb4678500a7d16673f8c1f014bfa9a857d0b8cdb0f77aa3eea5e31206 4e26058ad665dcb0ca95a1a504553fb5ec32500b4dc154cbc5854f48829bfb9f +lib/codeql/rust/generated/SynthConstructors.qll 7b696491e21b37bf5de023b68838e5c09112995f0da436bfdde13c27dd35c4bf 7b696491e21b37bf5de023b68838e5c09112995f0da436bfdde13c27dd35c4bf lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d2493890e79c28c485f512a1 5cc082ea99de61662b2d4c8b59f7a833236e7e448943e8ee894ab6066cc761c4 -lib/codeql/rust/generated/TupleStructPat.qll 7807a635e3ed14247dad405d44b4730a4ccc34207d7363a39a0bd2d53a8ccc97 5eb8ac529c2ee51a4ca15028e70dd0f6833a7d7fb6db330103b27bd2d91715e4 -lib/codeql/rust/generated/TypeRef.qll 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 +lib/codeql/rust/generated/TupleStructPat.qll 089563349c9866f5703e9d306ba2a475d7d4002e7236dbbf2feeb89290b4d24c a77842d7262a7d19b175f239d1ee6550b3b66a4efe903c5112bb82c0abd7b05d +lib/codeql/rust/generated/TypeRef.qll 919c1003fed54165a48617de35eb47ee1115f390ad56344fa8f20230e33a74b1 919c1003fed54165a48617de35eb47ee1115f390ad56344fa8f20230e33a74b1 lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f -lib/codeql/rust/generated/Unimplemented.qll 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 +lib/codeql/rust/generated/Unimplemented.qll 0bebbf22b5a6484077ceacdd4d11a14665b95cc9e68b859f2d8218290842d1ad addecc8027e14ebbcb2eff4d038c16aa1f33f100e17ffaecd5de36b9a4c719a8 +lib/codeql/rust/generated/UnimplementedDeclaration.qll ab05ff0a0fde6535e89ccb9cf197d97d722773f08bee5c0c742abeda956829d7 067be19ce1a963e59635e08f9eb7a3a7284874f45c651bdb1fe36509b5567912 lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 @@ -247,6 +255,7 @@ test/extractor-tests/generated/ExprStmt/ExprStmt.ql 037695af057183ef9e35569c9255 test/extractor-tests/generated/FieldExpr/FieldExpr.ql 6d85c8b85905baf66ae1f6ed716e42530d814f86261d98eddceab861939227e5 5765fb0376978a9006e2dc175bb224c5c944f19ddf628a2b933b1bebf81015a2 test/extractor-tests/generated/File/File.ql dec43be882fad904fab0c6447ca93633d801cb08ff8bec309befde7d2b9e5dda 74e1f1d698558c35fa03935cc34f4c8145d376b56d7657b18aeb338f5ca752cf test/extractor-tests/generated/Function/Function.ql c49434420dbb6fc3d9e6294161dcd3d3b306fae5ba5c85b610e534b8b15ef74c fe02208b673b74eebed92b5cbb3a8a06c31c0681eb28f3e596515663f14fa9e2 +test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e336308af6908cf12387fe8bbaa3c8c5360bd 28b5580a4e628286023b5d0de549d087f0a4224ecbb02bc7b3197d8f404b5066 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 @@ -270,13 +279,15 @@ test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 4d9753964 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql 2226b4759bee9091d88a7d72be5d8f8ad43f17b07fdd1a1f64ae3da5aa6aa333 ee9e06838b879ce90b00d9289eea32fbda9c02e0074d306a2f1f5991956c7deb test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd91389f8282863613edda3fb804b917cce0675a8bb76 f2e600f8fb723f8f1bde4b0b0ef41f59b4e652882b5c788e8f6767822d5574e4 test/extractor-tests/generated/MissingPat/MissingPat.ql 7a9ee46a40f6bfd31336beb6d9f6256fb8099cb6c052ba3131a95a45716224a4 619375e7dc6d95b8f1d1c958217350fc1553882f0f41ebd9f7a071d6947232d8 -test/extractor-tests/generated/Module/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/Module/Module.ql 0afd07f619ee68a7f7270ebf9a4a6b7d6849448924083369c4101650854e1e77 b3239a1ebdde858179f4eba19e6c0cb3ea28b823f423fdff90f7b870b7fbf003 +test/extractor-tests/generated/Module/Module_getDeclaration.ql 8343f2b4be470a502c4bfdba9ef74173a440f45b7300aa9d517c2bd68ccac36a fc7666228fd1d3fe4fc63466aa04ee8adf62e9fe0008fd92ea337c8585a7fef5 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa4c8e4e79bffd8b7a797bc70a68054ab51950dbebf4f0 dd92801d8909d83be1f824a2dfc599551c11b63ad1e96593e22d3b43464d7cf1 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 test/extractor-tests/generated/OrPat/OrPat.ql 51d9a0f5993510542a2cca353c1ca48ba1e5fb97a65bee7f02398cd90debaa41 06e0936b80a07a16e22fad3a3a541000f170fd5ad301a3170b98a91f51d09144 test/extractor-tests/generated/OrPat/OrPat_getArg.ql 693d62aa9817ce7661b4698c2948bca6567c1376b2ae832f3020462e8ab8d2ee 1fd9809826c6f2dece3014299f1d70210c9f23e5eefbd04b1d6024e1ecd46209 -test/extractor-tests/generated/PathExpr/PathExpr.ql aa8c36042688ad96a268b066b38fcaac3befa6490cc3510c15f824fce63e8949 71de233de72dd87c7c9129617d03f9fbc9bb9460ea896002cbb881f84451835d -test/extractor-tests/generated/PathPat/PathPat.ql 3b8bf11f2ab1ebe1e19bca0e8f1095215ffd9ee5389cac203971888449b86124 a1e4a4964837a170ad88d3fe3a47e5437354b22fd19382baad2090b0e0b3e1f7 +test/extractor-tests/generated/Path/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/PathExpr/PathExpr.ql 3013e12d5dab5c38c5b8fcaec59e78a3c6477f4edc8b01b078ecbfe7b8f82ffb 40427c9d420456174e1524ed046a5f445b9b72ca8b87abefb6c9498d4c809fc5 +test/extractor-tests/generated/PathPat/PathPat.ql 57dd735fe179cc1b91ee66b7849bcdd1aabe661762e88e1678cdaaa53526a10c 1734a45d47ee484fbf2cadb5620b28874a904fe944030a9e39166a6a25aa0de7 test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql 063ee8f6146110b97f4ee8944a5f37f0dd7cd5be049f13546d42a888a973d826 1184cc1fe937a01e9d12577478750be1497d4f99231486ae6d75104e7304eeb2 test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212f65c522387f726b2b9b3f204708a2a764e238aec8d89f 8b3095fdd9c6900eef656d4e9e18f5f4866b285634cc725e73246976af20450c diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 027aeecacfca..11c38dc9025a 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -46,6 +46,8 @@ /lib/codeql/rust/elements/FieldExpr.qll linguist-generated /lib/codeql/rust/elements/FieldExprConstructor.qll linguist-generated /lib/codeql/rust/elements/FunctionConstructor.qll linguist-generated +/lib/codeql/rust/elements/GenericArgs.qll linguist-generated +/lib/codeql/rust/elements/GenericArgsConstructor.qll linguist-generated /lib/codeql/rust/elements/IfExpr.qll linguist-generated /lib/codeql/rust/elements/IfExprConstructor.qll linguist-generated /lib/codeql/rust/elements/IndexExpr.qll linguist-generated @@ -83,6 +85,8 @@ /lib/codeql/rust/elements/OrPat.qll linguist-generated /lib/codeql/rust/elements/OrPatConstructor.qll linguist-generated /lib/codeql/rust/elements/Pat.qll linguist-generated +/lib/codeql/rust/elements/Path.qll linguist-generated +/lib/codeql/rust/elements/PathConstructor.qll linguist-generated /lib/codeql/rust/elements/PathExpr.qll linguist-generated /lib/codeql/rust/elements/PathExprConstructor.qll linguist-generated /lib/codeql/rust/elements/PathPat.qll linguist-generated @@ -123,7 +127,8 @@ /lib/codeql/rust/elements/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/elements/UnderscoreExprConstructor.qll linguist-generated /lib/codeql/rust/elements/Unimplemented.qll linguist-generated -/lib/codeql/rust/elements/UnimplementedConstructor.qll linguist-generated +/lib/codeql/rust/elements/UnimplementedDeclaration.qll linguist-generated +/lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll linguist-generated /lib/codeql/rust/elements/UnsafeBlockExpr.qll linguist-generated /lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll linguist-generated /lib/codeql/rust/elements/WildPat.qll linguist-generated @@ -161,6 +166,7 @@ /lib/codeql/rust/generated/FieldExpr.qll linguist-generated /lib/codeql/rust/generated/File.qll linguist-generated /lib/codeql/rust/generated/Function.qll linguist-generated +/lib/codeql/rust/generated/GenericArgs.qll linguist-generated /lib/codeql/rust/generated/IfExpr.qll linguist-generated /lib/codeql/rust/generated/IndexExpr.qll linguist-generated /lib/codeql/rust/generated/InlineAsmExpr.qll linguist-generated @@ -183,6 +189,7 @@ /lib/codeql/rust/generated/OrPat.qll linguist-generated /lib/codeql/rust/generated/ParentChild.qll linguist-generated /lib/codeql/rust/generated/Pat.qll linguist-generated +/lib/codeql/rust/generated/Path.qll linguist-generated /lib/codeql/rust/generated/PathExpr.qll linguist-generated /lib/codeql/rust/generated/PathPat.qll linguist-generated /lib/codeql/rust/generated/PureSynthConstructors.qll linguist-generated @@ -208,6 +215,7 @@ /lib/codeql/rust/generated/UnaryOpExpr.qll linguist-generated /lib/codeql/rust/generated/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/generated/Unimplemented.qll linguist-generated +/lib/codeql/rust/generated/UnimplementedDeclaration.qll linguist-generated /lib/codeql/rust/generated/UnknownFile.qll linguist-generated /lib/codeql/rust/generated/UnknownLocation.qll linguist-generated /lib/codeql/rust/generated/UnsafeBlockExpr.qll linguist-generated @@ -249,6 +257,7 @@ /test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated +/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated @@ -272,11 +281,13 @@ /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql linguist-generated /test/extractor-tests/generated/MissingExpr/MissingExpr.ql linguist-generated /test/extractor-tests/generated/MissingPat/MissingPat.ql linguist-generated -/test/extractor-tests/generated/Module/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Module/Module.ql linguist-generated +/test/extractor-tests/generated/Module/Module_getDeclaration.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat_getArg.ql linguist-generated +/test/extractor-tests/generated/Path/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated /test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements.qll b/rust/ql/lib/codeql/rust/elements.qll index efb06ae9eea2..5165f5b16c4a 100644 --- a/rust/ql/lib/codeql/rust/elements.qll +++ b/rust/ql/lib/codeql/rust/elements.qll @@ -31,6 +31,7 @@ import codeql.rust.elements.ExprStmt import codeql.rust.elements.FieldExpr import codeql.rust.elements.File import codeql.rust.elements.Function +import codeql.rust.elements.GenericArgs import codeql.rust.elements.IfExpr import codeql.rust.elements.IndexExpr import codeql.rust.elements.InlineAsmExpr @@ -52,6 +53,7 @@ import codeql.rust.elements.Module import codeql.rust.elements.OffsetOfExpr import codeql.rust.elements.OrPat import codeql.rust.elements.Pat +import codeql.rust.elements.Path import codeql.rust.elements.PathExpr import codeql.rust.elements.PathPat import codeql.rust.elements.RangeExpr @@ -73,6 +75,7 @@ import codeql.rust.elements.TypeRef import codeql.rust.elements.UnaryOpExpr import codeql.rust.elements.UnderscoreExpr import codeql.rust.elements.Unimplemented +import codeql.rust.elements.UnimplementedDeclaration import codeql.rust.elements.UnknownFile import codeql.rust.elements.UnknownLocation import codeql.rust.elements.UnsafeBlockExpr diff --git a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll index 61984263e388..96463f23483c 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstBlockPat.qll @@ -9,7 +9,7 @@ private import codeql.rust.generated.ConstBlockPat * A const block pattern. For example: * ``` * match x { - * const { 1 + 2 + 3} => "ok", + * const { 1 + 2 + 3 } => "ok", * _ => "fail", * }; * ``` diff --git a/rust/ql/lib/codeql/rust/elements/Function.qll b/rust/ql/lib/codeql/rust/elements/Function.qll index 23531c2bbd1f..bbeb26d9d9e3 100644 --- a/rust/ql/lib/codeql/rust/elements/Function.qll +++ b/rust/ql/lib/codeql/rust/elements/Function.qll @@ -8,7 +8,7 @@ private import codeql.rust.generated.Function /** * A function declaration. For example * ``` - * fn foo(x: u32) -> u64 { (x + 1).into() } + * fn foo(x: u32) -> u64 {(x + 1).into()} * ``` * A function declaration within a trait might not have a body: * ``` diff --git a/rust/ql/lib/codeql/rust/elements/GenericArgs.qll b/rust/ql/lib/codeql/rust/elements/GenericArgs.qll new file mode 100644 index 000000000000..f43b17629436 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/GenericArgs.qll @@ -0,0 +1,8 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `GenericArgs`. + */ + +private import codeql.rust.generated.GenericArgs + +class GenericArgs extends Generated::GenericArgs { } diff --git a/rust/ql/lib/codeql/rust/elements/UnimplementedConstructor.qll b/rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll similarity index 60% rename from rust/ql/lib/codeql/rust/elements/UnimplementedConstructor.qll rename to rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll index 1216fd22ce58..5068ff4a12ed 100644 --- a/rust/ql/lib/codeql/rust/elements/UnimplementedConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `Unimplemented` synthesized instances. + * `GenericArgs` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `Unimplemented` synthesized instances. + * The characteristic predicate of `GenericArgs` synthesized instances. * INTERNAL: Do not use. */ -predicate constructUnimplemented(Raw::Unimplemented id) { any() } +predicate constructGenericArgs(Raw::GenericArgs id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/MatchArm.qll index 1d2c565264e8..a1c38456276e 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArm.qll @@ -11,13 +11,13 @@ private import codeql.rust.generated.MatchArm * match x { * Some(y) => y, * None => 0, - * } + * }; * ``` * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, - * } + * }; * ``` */ class MatchArm extends Generated::MatchArm { } diff --git a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll index 175946568e34..1b5f7b51e968 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll @@ -13,6 +13,7 @@ private import codeql.rust.generated.MatchExpr * None => 0, * } * ``` + * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, diff --git a/rust/ql/lib/codeql/rust/elements/Module.qll b/rust/ql/lib/codeql/rust/elements/Module.qll index a001bb4edb8a..bd0207365269 100644 --- a/rust/ql/lib/codeql/rust/elements/Module.qll +++ b/rust/ql/lib/codeql/rust/elements/Module.qll @@ -5,4 +5,15 @@ private import codeql.rust.generated.Module +/** + * A module declaration. For example: + * ``` + * mod foo; + * ``` + * ``` + * mod bar { + * pub fn baz() {} + * } + * ``` + */ class Module extends Generated::Module { } diff --git a/rust/ql/lib/codeql/rust/elements/Path.qll b/rust/ql/lib/codeql/rust/elements/Path.qll new file mode 100644 index 000000000000..b73e16bc8b13 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/Path.qll @@ -0,0 +1,8 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `Path`. + */ + +private import codeql.rust.generated.Path + +class Path extends Generated::Path { } diff --git a/rust/ql/lib/codeql/rust/elements/PathConstructor.qll b/rust/ql/lib/codeql/rust/elements/PathConstructor.qll new file mode 100644 index 000000000000..ed195d2554b0 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/PathConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `Path` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `Path` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructPath(Raw::Path id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll new file mode 100644 index 000000000000..5d998f6a3ebf --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll @@ -0,0 +1,8 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `UnimplementedDeclaration`. + */ + +private import codeql.rust.generated.UnimplementedDeclaration + +class UnimplementedDeclaration extends Generated::UnimplementedDeclaration { } diff --git a/rust/ql/lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll new file mode 100644 index 000000000000..825e3fa836b4 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `UnimplementedDeclaration` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `UnimplementedDeclaration` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructUnimplementedDeclaration(Raw::UnimplementedDeclaration id) { any() } diff --git a/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll b/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll index ca79ddb751ce..74f3fd6bcdcd 100644 --- a/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll +++ b/rust/ql/lib/codeql/rust/generated/ConstBlockPat.qll @@ -18,7 +18,7 @@ module Generated { * A const block pattern. For example: * ``` * match x { - * const { 1 + 2 + 3} => "ok", + * const { 1 + 2 + 3 } => "ok", * _ => "fail", * }; * ``` diff --git a/rust/ql/lib/codeql/rust/generated/Function.qll b/rust/ql/lib/codeql/rust/generated/Function.qll index f0c053f97152..1b0c7ae375e7 100644 --- a/rust/ql/lib/codeql/rust/generated/Function.qll +++ b/rust/ql/lib/codeql/rust/generated/Function.qll @@ -17,7 +17,7 @@ module Generated { /** * A function declaration. For example * ``` - * fn foo(x: u32) -> u64 { (x + 1).into() } + * fn foo(x: u32) -> u64 {(x + 1).into()} * ``` * A function declaration within a trait might not have a body: * ``` diff --git a/rust/ql/lib/codeql/rust/generated/GenericArgs.qll b/rust/ql/lib/codeql/rust/generated/GenericArgs.qll new file mode 100644 index 000000000000..b0b66f5b3e8f --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/GenericArgs.qll @@ -0,0 +1,24 @@ +// generated by codegen +/** + * This module provides the generated definition of `GenericArgs`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.AstNode +import codeql.rust.elements.Unimplemented + +/** + * INTERNAL: This module contains the fully generated definition of `GenericArgs` and should not + * be referenced directly. + */ +module Generated { + /** + * INTERNAL: Do not reference the `Generated::GenericArgs` class directly. + * Use the subclass `GenericArgs`, where the following predicates are available. + */ + class GenericArgs extends Synth::TGenericArgs, AstNode, Unimplemented { + override string getAPrimaryQlClass() { result = "GenericArgs" } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/MatchArm.qll b/rust/ql/lib/codeql/rust/generated/MatchArm.qll index d57bec537fa2..f21c9b3550c4 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchArm.qll @@ -21,13 +21,13 @@ module Generated { * match x { * Some(y) => y, * None => 0, - * } + * }; * ``` * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, - * } + * }; * ``` * INTERNAL: Do not reference the `Generated::MatchArm` class directly. * Use the subclass `MatchArm`, where the following predicates are available. diff --git a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll index 2163751f20a6..7a7368027fae 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll @@ -22,6 +22,7 @@ module Generated { * None => 0, * } * ``` + * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, diff --git a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll index fb3c2e5d21b3..6bf5a90440a3 100644 --- a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.Unimplemented +import codeql.rust.elements.GenericArgs /** * INTERNAL: This module contains the fully generated definition of `MethodCallExpr` and should not @@ -65,9 +65,9 @@ module Generated { /** * Gets the generic arguments of this method call expression, if it exists. */ - Unimplemented getGenericArgs() { + GenericArgs getGenericArgs() { result = - Synth::convertUnimplementedFromRaw(Synth::convertMethodCallExprToRaw(this) + Synth::convertGenericArgsFromRaw(Synth::convertMethodCallExprToRaw(this) .(Raw::MethodCallExpr) .getGenericArgs()) } diff --git a/rust/ql/lib/codeql/rust/generated/Module.qll b/rust/ql/lib/codeql/rust/generated/Module.qll index ae5100ee9d8f..68fc098d321b 100644 --- a/rust/ql/lib/codeql/rust/generated/Module.qll +++ b/rust/ql/lib/codeql/rust/generated/Module.qll @@ -14,6 +14,15 @@ import codeql.rust.elements.Declaration */ module Generated { /** + * A module declaration. For example: + * ``` + * mod foo; + * ``` + * ``` + * mod bar { + * pub fn baz() {} + * } + * ``` * INTERNAL: Do not reference the `Generated::Module` class directly. * Use the subclass `Module`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/generated/ParentChild.qll index a383e174b769..01f0af0b608c 100644 --- a/rust/ql/lib/codeql/rust/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/generated/ParentChild.qll @@ -49,6 +49,21 @@ private module Impl { ) } + private Element getImmediateChildOfUnimplemented( + Unimplemented e, int index, string partialPredicateCall + ) { + exists(int b, int bElement, int n | + b = 0 and + bElement = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfElement(e, i, _)) | i) and + n = bElement and + ( + none() + or + result = getImmediateChildOfElement(e, index - b, partialPredicateCall) + ) + ) + } + private Element getImmediateChildOfAstNode(AstNode e, int index, string partialPredicateCall) { exists(int b, int bLocatable, int n | b = 0 and @@ -146,6 +161,25 @@ private module Impl { ) } + private Element getImmediateChildOfGenericArgs( + GenericArgs e, int index, string partialPredicateCall + ) { + exists(int b, int bAstNode, int bUnimplemented, int n | + b = 0 and + bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and + bUnimplemented = + bAstNode + 1 + max(int i | i = -1 or exists(getImmediateChildOfUnimplemented(e, i, _)) | i) and + n = bUnimplemented and + ( + none() + or + result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) + or + result = getImmediateChildOfUnimplemented(e, index - bAstNode, partialPredicateCall) + ) + ) + } + private Element getImmediateChildOfLabel(Label e, int index, string partialPredicateCall) { exists(int b, int bAstNode, int n | b = 0 and @@ -194,6 +228,23 @@ private module Impl { ) } + private Element getImmediateChildOfPath(Path e, int index, string partialPredicateCall) { + exists(int b, int bAstNode, int bUnimplemented, int n | + b = 0 and + bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and + bUnimplemented = + bAstNode + 1 + max(int i | i = -1 or exists(getImmediateChildOfUnimplemented(e, i, _)) | i) and + n = bUnimplemented and + ( + none() + or + result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) + or + result = getImmediateChildOfUnimplemented(e, index - bAstNode, partialPredicateCall) + ) + ) + } + private Element getImmediateChildOfRecordFieldPat( RecordFieldPat e, int index, string partialPredicateCall ) { @@ -244,29 +295,18 @@ private module Impl { } private Element getImmediateChildOfTypeRef(TypeRef e, int index, string partialPredicateCall) { - exists(int b, int bAstNode, int n | + exists(int b, int bAstNode, int bUnimplemented, int n | b = 0 and bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and - n = bAstNode and + bUnimplemented = + bAstNode + 1 + max(int i | i = -1 or exists(getImmediateChildOfUnimplemented(e, i, _)) | i) and + n = bUnimplemented and ( none() or result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) - ) - ) - } - - private Element getImmediateChildOfUnimplemented( - Unimplemented e, int index, string partialPredicateCall - ) { - exists(int b, int bAstNode, int n | - b = 0 and - bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and - n = bAstNode and - ( - none() or - result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) + result = getImmediateChildOfUnimplemented(e, index - bAstNode, partialPredicateCall) ) ) } @@ -1163,6 +1203,27 @@ private module Impl { ) } + private Element getImmediateChildOfUnimplementedDeclaration( + UnimplementedDeclaration e, int index, string partialPredicateCall + ) { + exists(int b, int bDeclaration, int bUnimplemented, int n | + b = 0 and + bDeclaration = + b + 1 + max(int i | i = -1 or exists(getImmediateChildOfDeclaration(e, i, _)) | i) and + bUnimplemented = + bDeclaration + 1 + + max(int i | i = -1 or exists(getImmediateChildOfUnimplemented(e, i, _)) | i) and + n = bUnimplemented and + ( + none() + or + result = getImmediateChildOfDeclaration(e, index - b, partialPredicateCall) + or + result = getImmediateChildOfUnimplemented(e, index - bDeclaration, partialPredicateCall) + ) + ) + } + private Element getImmediateChildOfWildPat(WildPat e, int index, string partialPredicateCall) { exists(int b, int bPat, int n | b = 0 and @@ -1309,18 +1370,20 @@ private module Impl { or result = getImmediateChildOfUnknownLocation(e, index, partialAccessor) or + result = getImmediateChildOfGenericArgs(e, index, partialAccessor) + or result = getImmediateChildOfLabel(e, index, partialAccessor) or result = getImmediateChildOfMatchArm(e, index, partialAccessor) or + result = getImmediateChildOfPath(e, index, partialAccessor) + or result = getImmediateChildOfRecordFieldPat(e, index, partialAccessor) or result = getImmediateChildOfRecordLitField(e, index, partialAccessor) or result = getImmediateChildOfTypeRef(e, index, partialAccessor) or - result = getImmediateChildOfUnimplemented(e, index, partialAccessor) - or result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) or result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) @@ -1415,6 +1478,8 @@ private module Impl { or result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) or + result = getImmediateChildOfUnimplementedDeclaration(e, index, partialAccessor) + or result = getImmediateChildOfWildPat(e, index, partialAccessor) or result = getImmediateChildOfYeetExpr(e, index, partialAccessor) diff --git a/rust/ql/lib/codeql/rust/generated/Path.qll b/rust/ql/lib/codeql/rust/generated/Path.qll new file mode 100644 index 000000000000..c669519f97cf --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/Path.qll @@ -0,0 +1,24 @@ +// generated by codegen +/** + * This module provides the generated definition of `Path`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.AstNode +import codeql.rust.elements.Unimplemented + +/** + * INTERNAL: This module contains the fully generated definition of `Path` and should not + * be referenced directly. + */ +module Generated { + /** + * INTERNAL: Do not reference the `Generated::Path` class directly. + * Use the subclass `Path`, where the following predicates are available. + */ + class Path extends Synth::TPath, AstNode, Unimplemented { + override string getAPrimaryQlClass() { result = "Path" } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/PathExpr.qll b/rust/ql/lib/codeql/rust/generated/PathExpr.qll index 08130ecd5c8d..577ed92cf1e3 100644 --- a/rust/ql/lib/codeql/rust/generated/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/PathExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.Unimplemented +import codeql.rust.elements.Path /** * INTERNAL: This module contains the fully generated definition of `PathExpr` and should not @@ -31,11 +31,9 @@ module Generated { /** * Gets the path of this path expression. */ - Unimplemented getPath() { + Path getPath() { result = - Synth::convertUnimplementedFromRaw(Synth::convertPathExprToRaw(this) - .(Raw::PathExpr) - .getPath()) + Synth::convertPathFromRaw(Synth::convertPathExprToRaw(this).(Raw::PathExpr).getPath()) } } } diff --git a/rust/ql/lib/codeql/rust/generated/PathPat.qll b/rust/ql/lib/codeql/rust/generated/PathPat.qll index bc3d9e3261e5..7670849b7492 100644 --- a/rust/ql/lib/codeql/rust/generated/PathPat.qll +++ b/rust/ql/lib/codeql/rust/generated/PathPat.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Pat -import codeql.rust.elements.Unimplemented +import codeql.rust.elements.Path /** * INTERNAL: This module contains the fully generated definition of `PathPat` and should not @@ -31,9 +31,8 @@ module Generated { /** * Gets the path of this path pat. */ - Unimplemented getPath() { - result = - Synth::convertUnimplementedFromRaw(Synth::convertPathPatToRaw(this).(Raw::PathPat).getPath()) + Path getPath() { + result = Synth::convertPathFromRaw(Synth::convertPathPatToRaw(this).(Raw::PathPat).getPath()) } } } diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index fe56618cf66a..e098e6c6fbdf 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -60,6 +60,11 @@ module Raw { int getEndColumn() { locations(this, _, _, _, _, result) } } + /** + * INTERNAL: Do not use. + */ + class Unimplemented extends @unimplemented, Element { } + /** * INTERNAL: Do not use. */ @@ -90,6 +95,13 @@ module Raw { */ class Expr extends @expr, AstNode { } + /** + * INTERNAL: Do not use. + */ + class GenericArgs extends @generic_args, AstNode, Unimplemented { + override string toString() { result = "GenericArgs" } + } + /** * INTERNAL: Do not use. * A label. For example: @@ -116,13 +128,13 @@ module Raw { * match x { * Some(y) => y, * None => 0, - * } + * }; * ``` * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, - * } + * }; * ``` */ class MatchArm extends @match_arm, AstNode { @@ -150,6 +162,13 @@ module Raw { */ class Pat extends @pat, AstNode { } + /** + * INTERNAL: Do not use. + */ + class Path extends @path, AstNode, Unimplemented { + override string toString() { result = "Path" } + } + /** * INTERNAL: Do not use. * A field in a record pattern. For example `a: 1` in: @@ -201,17 +220,10 @@ module Raw { /** * INTERNAL: Do not use. */ - class TypeRef extends @type_ref, AstNode { + class TypeRef extends @type_ref, AstNode, Unimplemented { override string toString() { result = "TypeRef" } } - /** - * INTERNAL: Do not use. - */ - class Unimplemented extends @unimplemented, AstNode { - override string toString() { result = "Unimplemented" } - } - /** * INTERNAL: Do not use. * An array expression. For example: @@ -506,7 +518,7 @@ module Raw { * A const block pattern. For example: * ``` * match x { - * const { 1 + 2 + 3} => "ok", + * const { 1 + 2 + 3 } => "ok", * _ => "fail", * }; * ``` @@ -613,7 +625,7 @@ module Raw { * INTERNAL: Do not use. * A function declaration. For example * ``` - * fn foo(x: u32) -> u64 { (x + 1).into() } + * fn foo(x: u32) -> u64 {(x + 1).into()} * ``` * A function declaration within a trait might not have a body: * ``` @@ -874,6 +886,7 @@ module Raw { * None => 0, * } * ``` + * ``` * match x { * Some(y) if y != 0 => 1 / y, * _ => 0, @@ -922,7 +935,7 @@ module Raw { /** * Gets the generic arguments of this method call expression, if it exists. */ - Unimplemented getGenericArgs() { method_call_expr_generic_args(this, result) } + GenericArgs getGenericArgs() { method_call_expr_generic_args(this, result) } } /** @@ -953,6 +966,15 @@ module Raw { /** * INTERNAL: Do not use. + * A module declaration. For example: + * ``` + * mod foo; + * ``` + * ``` + * mod bar { + * pub fn baz() {} + * } + * ``` */ class Module extends @module, Declaration { override string toString() { result = "Module" } @@ -1018,7 +1040,7 @@ module Raw { /** * Gets the path of this path expression. */ - Unimplemented getPath() { path_exprs(this, result) } + Path getPath() { path_exprs(this, result) } } /** @@ -1037,7 +1059,7 @@ module Raw { /** * Gets the path of this path pat. */ - Unimplemented getPath() { path_pats(this, result) } + Path getPath() { path_pats(this, result) } } /** @@ -1112,7 +1134,7 @@ module Raw { /** * Gets the path of this record lit expression, if it exists. */ - Unimplemented getPath() { record_lit_expr_paths(this, result) } + Path getPath() { record_lit_expr_paths(this, result) } /** * Gets the `index`th field of this record lit expression (0-based). @@ -1151,7 +1173,7 @@ module Raw { /** * Gets the path of this record pat, if it exists. */ - Unimplemented getPath() { record_pat_paths(this, result) } + Path getPath() { record_pat_paths(this, result) } /** * Gets the `index`th argument of this record pat (0-based). @@ -1330,7 +1352,7 @@ module Raw { /** * Gets the path of this tuple struct pat, if it exists. */ - Unimplemented getPath() { tuple_struct_pat_paths(this, result) } + Path getPath() { tuple_struct_pat_paths(this, result) } /** * Gets the `index`th argument of this tuple struct pat (0-based). @@ -1377,6 +1399,13 @@ module Raw { override string toString() { result = "UnderscoreExpr" } } + /** + * INTERNAL: Do not use. + */ + class UnimplementedDeclaration extends @unimplemented_declaration, Declaration, Unimplemented { + override string toString() { result = "UnimplementedDeclaration" } + } + /** * INTERNAL: Do not use. * A wildcard pattern. For example: diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll index 373dd1808953..12b2339751fe 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll @@ -7,8 +7,8 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr +import codeql.rust.elements.Path import codeql.rust.elements.RecordLitField -import codeql.rust.elements.Unimplemented /** * INTERNAL: This module contains the fully generated definition of `RecordLitExpr` and should not @@ -32,9 +32,9 @@ module Generated { /** * Gets the path of this record lit expression, if it exists. */ - Unimplemented getPath() { + Path getPath() { result = - Synth::convertUnimplementedFromRaw(Synth::convertRecordLitExprToRaw(this) + Synth::convertPathFromRaw(Synth::convertRecordLitExprToRaw(this) .(Raw::RecordLitExpr) .getPath()) } diff --git a/rust/ql/lib/codeql/rust/generated/RecordPat.qll b/rust/ql/lib/codeql/rust/generated/RecordPat.qll index c78897fc4f04..43832bb15d4b 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordPat.qll @@ -7,8 +7,8 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Pat +import codeql.rust.elements.Path import codeql.rust.elements.RecordFieldPat -import codeql.rust.elements.Unimplemented /** * INTERNAL: This module contains the fully generated definition of `RecordPat` and should not @@ -32,11 +32,9 @@ module Generated { /** * Gets the path of this record pat, if it exists. */ - Unimplemented getPath() { + Path getPath() { result = - Synth::convertUnimplementedFromRaw(Synth::convertRecordPatToRaw(this) - .(Raw::RecordPat) - .getPath()) + Synth::convertPathFromRaw(Synth::convertRecordPatToRaw(this).(Raw::RecordPat).getPath()) } /** diff --git a/rust/ql/lib/codeql/rust/generated/Synth.qll b/rust/ql/lib/codeql/rust/generated/Synth.qll index 24cd549448af..2ff13d6b7ad0 100644 --- a/rust/ql/lib/codeql/rust/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/generated/Synth.qll @@ -99,6 +99,10 @@ module Synth { * INTERNAL: Do not use. */ TFunction(Raw::Function id) { constructFunction(id) } or + /** + * INTERNAL: Do not use. + */ + TGenericArgs(Raw::GenericArgs id) { constructGenericArgs(id) } or /** * INTERNAL: Do not use. */ @@ -171,6 +175,10 @@ module Synth { * INTERNAL: Do not use. */ TOrPat(Raw::OrPat id) { constructOrPat(id) } or + /** + * INTERNAL: Do not use. + */ + TPath(Raw::Path id) { constructPath(id) } or /** * INTERNAL: Do not use. */ @@ -250,7 +258,9 @@ module Synth { /** * INTERNAL: Do not use. */ - TUnimplemented(Raw::Unimplemented id) { constructUnimplemented(id) } or + TUnimplementedDeclaration(Raw::UnimplementedDeclaration id) { + constructUnimplementedDeclaration(id) + } or /** * INTERNAL: Do not use. */ @@ -285,8 +295,8 @@ module Synth { * INTERNAL: Do not use. */ class TAstNode = - TDeclaration or TExpr or TLabel or TMatchArm or TPat or TRecordFieldPat or TRecordLitField or - TStmt or TTypeRef or TUnimplemented; + TDeclaration or TExpr or TGenericArgs or TLabel or TMatchArm or TPat or TPath or + TRecordFieldPat or TRecordLitField or TStmt or TTypeRef; /** * INTERNAL: Do not use. @@ -296,7 +306,7 @@ module Synth { /** * INTERNAL: Do not use. */ - class TDeclaration = TFunction or TModule; + class TDeclaration = TFunction or TModule or TUnimplementedDeclaration; /** * INTERNAL: Do not use. @@ -336,6 +346,11 @@ module Synth { */ class TStmt = TExprStmt or TItemStmt or TLetStmt; + /** + * INTERNAL: Do not use. + */ + class TUnimplemented = TGenericArgs or TPath or TTypeRef or TUnimplementedDeclaration; + /** * INTERNAL: Do not use. * Converts a raw element to a synthesized `TAsyncBlockExpr`, if possible. @@ -483,6 +498,13 @@ module Synth { cached TFunction convertFunctionFromRaw(Raw::Element e) { result = TFunction(e) } + /** + * INTERNAL: Do not use. + * Converts a raw element to a synthesized `TGenericArgs`, if possible. + */ + cached + TGenericArgs convertGenericArgsFromRaw(Raw::Element e) { result = TGenericArgs(e) } + /** * INTERNAL: Do not use. * Converts a raw element to a synthesized `TIfExpr`, if possible. @@ -609,6 +631,13 @@ module Synth { cached TOrPat convertOrPatFromRaw(Raw::Element e) { result = TOrPat(e) } + /** + * INTERNAL: Do not use. + * Converts a raw element to a synthesized `TPath`, if possible. + */ + cached + TPath convertPathFromRaw(Raw::Element e) { result = TPath(e) } + /** * INTERNAL: Do not use. * Converts a raw element to a synthesized `TPathExpr`, if possible. @@ -744,10 +773,12 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TUnimplemented`, if possible. + * Converts a raw element to a synthesized `TUnimplementedDeclaration`, if possible. */ cached - TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { result = TUnimplemented(e) } + TUnimplementedDeclaration convertUnimplementedDeclarationFromRaw(Raw::Element e) { + result = TUnimplementedDeclaration(e) + } /** * INTERNAL: Do not use. @@ -812,12 +843,16 @@ module Synth { or result = convertExprFromRaw(e) or + result = convertGenericArgsFromRaw(e) + or result = convertLabelFromRaw(e) or result = convertMatchArmFromRaw(e) or result = convertPatFromRaw(e) or + result = convertPathFromRaw(e) + or result = convertRecordFieldPatFromRaw(e) or result = convertRecordLitFieldFromRaw(e) @@ -825,8 +860,6 @@ module Synth { result = convertStmtFromRaw(e) or result = convertTypeRefFromRaw(e) - or - result = convertUnimplementedFromRaw(e) } /** @@ -851,6 +884,8 @@ module Synth { result = convertFunctionFromRaw(e) or result = convertModuleFromRaw(e) + or + result = convertUnimplementedDeclarationFromRaw(e) } /** @@ -864,6 +899,8 @@ module Synth { result = convertLocatableFromRaw(e) or result = convertLocationFromRaw(e) + or + result = convertUnimplementedFromRaw(e) } /** @@ -1016,6 +1053,21 @@ module Synth { result = convertLetStmtFromRaw(e) } + /** + * INTERNAL: Do not use. + * Converts a raw DB element to a synthesized `TUnimplemented`, if possible. + */ + cached + TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { + result = convertGenericArgsFromRaw(e) + or + result = convertPathFromRaw(e) + or + result = convertTypeRefFromRaw(e) + or + result = convertUnimplementedDeclarationFromRaw(e) + } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsyncBlockExpr` to a raw DB element, if possible. @@ -1163,6 +1215,13 @@ module Synth { cached Raw::Element convertFunctionToRaw(TFunction e) { e = TFunction(result) } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TGenericArgs` to a raw DB element, if possible. + */ + cached + Raw::Element convertGenericArgsToRaw(TGenericArgs e) { e = TGenericArgs(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TIfExpr` to a raw DB element, if possible. @@ -1289,6 +1348,13 @@ module Synth { cached Raw::Element convertOrPatToRaw(TOrPat e) { e = TOrPat(result) } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TPath` to a raw DB element, if possible. + */ + cached + Raw::Element convertPathToRaw(TPath e) { e = TPath(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathExpr` to a raw DB element, if possible. @@ -1424,10 +1490,12 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TUnimplemented` to a raw DB element, if possible. + * Converts a synthesized `TUnimplementedDeclaration` to a raw DB element, if possible. */ cached - Raw::Element convertUnimplementedToRaw(TUnimplemented e) { e = TUnimplemented(result) } + Raw::Element convertUnimplementedDeclarationToRaw(TUnimplementedDeclaration e) { + e = TUnimplementedDeclaration(result) + } /** * INTERNAL: Do not use. @@ -1492,12 +1560,16 @@ module Synth { or result = convertExprToRaw(e) or + result = convertGenericArgsToRaw(e) + or result = convertLabelToRaw(e) or result = convertMatchArmToRaw(e) or result = convertPatToRaw(e) or + result = convertPathToRaw(e) + or result = convertRecordFieldPatToRaw(e) or result = convertRecordLitFieldToRaw(e) @@ -1505,8 +1577,6 @@ module Synth { result = convertStmtToRaw(e) or result = convertTypeRefToRaw(e) - or - result = convertUnimplementedToRaw(e) } /** @@ -1531,6 +1601,8 @@ module Synth { result = convertFunctionToRaw(e) or result = convertModuleToRaw(e) + or + result = convertUnimplementedDeclarationToRaw(e) } /** @@ -1544,6 +1616,8 @@ module Synth { result = convertLocatableToRaw(e) or result = convertLocationToRaw(e) + or + result = convertUnimplementedToRaw(e) } /** @@ -1695,4 +1769,19 @@ module Synth { or result = convertLetStmtToRaw(e) } + + /** + * INTERNAL: Do not use. + * Converts a synthesized `TUnimplemented` to a raw DB element, if possible. + */ + cached + Raw::Element convertUnimplementedToRaw(TUnimplemented e) { + result = convertGenericArgsToRaw(e) + or + result = convertPathToRaw(e) + or + result = convertTypeRefToRaw(e) + or + result = convertUnimplementedDeclarationToRaw(e) + } } diff --git a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll index c4281ed696ee..5dc097431551 100644 --- a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll +++ b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll @@ -24,6 +24,7 @@ import codeql.rust.elements.ElementListExprConstructor import codeql.rust.elements.ExprStmtConstructor import codeql.rust.elements.FieldExprConstructor import codeql.rust.elements.FunctionConstructor +import codeql.rust.elements.GenericArgsConstructor import codeql.rust.elements.IfExprConstructor import codeql.rust.elements.IndexExprConstructor import codeql.rust.elements.InlineAsmExprConstructor @@ -42,6 +43,7 @@ import codeql.rust.elements.MissingPatConstructor import codeql.rust.elements.ModuleConstructor import codeql.rust.elements.OffsetOfExprConstructor import codeql.rust.elements.OrPatConstructor +import codeql.rust.elements.PathConstructor import codeql.rust.elements.PathExprConstructor import codeql.rust.elements.PathPatConstructor import codeql.rust.elements.RangeExprConstructor @@ -61,7 +63,7 @@ import codeql.rust.elements.TupleStructPatConstructor import codeql.rust.elements.TypeRefConstructor import codeql.rust.elements.UnaryOpExprConstructor import codeql.rust.elements.UnderscoreExprConstructor -import codeql.rust.elements.UnimplementedConstructor +import codeql.rust.elements.UnimplementedDeclarationConstructor import codeql.rust.elements.UnsafeBlockExprConstructor import codeql.rust.elements.WildPatConstructor import codeql.rust.elements.YeetExprConstructor diff --git a/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll b/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll index 725006b72539..9b03c2584ad6 100644 --- a/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll +++ b/rust/ql/lib/codeql/rust/generated/TupleStructPat.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Pat -import codeql.rust.elements.Unimplemented +import codeql.rust.elements.Path /** * INTERNAL: This module contains the fully generated definition of `TupleStructPat` and should not @@ -32,9 +32,9 @@ module Generated { /** * Gets the path of this tuple struct pat, if it exists. */ - Unimplemented getPath() { + Path getPath() { result = - Synth::convertUnimplementedFromRaw(Synth::convertTupleStructPatToRaw(this) + Synth::convertPathFromRaw(Synth::convertTupleStructPatToRaw(this) .(Raw::TupleStructPat) .getPath()) } diff --git a/rust/ql/lib/codeql/rust/generated/TypeRef.qll b/rust/ql/lib/codeql/rust/generated/TypeRef.qll index b75359dbbec7..0d69b0139cc7 100644 --- a/rust/ql/lib/codeql/rust/generated/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/generated/TypeRef.qll @@ -7,6 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.AstNode +import codeql.rust.elements.Unimplemented /** * INTERNAL: This module contains the fully generated definition of `TypeRef` and should not @@ -17,7 +18,7 @@ module Generated { * INTERNAL: Do not reference the `Generated::TypeRef` class directly. * Use the subclass `TypeRef`, where the following predicates are available. */ - class TypeRef extends Synth::TTypeRef, AstNode { + class TypeRef extends Synth::TTypeRef, AstNode, Unimplemented { override string getAPrimaryQlClass() { result = "TypeRef" } } } diff --git a/rust/ql/lib/codeql/rust/generated/Unimplemented.qll b/rust/ql/lib/codeql/rust/generated/Unimplemented.qll index 749c88b8acae..4c5d75c58bab 100644 --- a/rust/ql/lib/codeql/rust/generated/Unimplemented.qll +++ b/rust/ql/lib/codeql/rust/generated/Unimplemented.qll @@ -6,7 +6,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw -import codeql.rust.elements.AstNode +import codeql.rust.elements.Element /** * INTERNAL: This module contains the fully generated definition of `Unimplemented` and should not @@ -17,7 +17,5 @@ module Generated { * INTERNAL: Do not reference the `Generated::Unimplemented` class directly. * Use the subclass `Unimplemented`, where the following predicates are available. */ - class Unimplemented extends Synth::TUnimplemented, AstNode { - override string getAPrimaryQlClass() { result = "Unimplemented" } - } + class Unimplemented extends Synth::TUnimplemented, Element { } } diff --git a/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll b/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll new file mode 100644 index 000000000000..5af969e12a80 --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll @@ -0,0 +1,26 @@ +// generated by codegen +/** + * This module provides the generated definition of `UnimplementedDeclaration`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Declaration +import codeql.rust.elements.Unimplemented + +/** + * INTERNAL: This module contains the fully generated definition of `UnimplementedDeclaration` and should not + * be referenced directly. + */ +module Generated { + /** + * INTERNAL: Do not reference the `Generated::UnimplementedDeclaration` class directly. + * Use the subclass `UnimplementedDeclaration`, where the following predicates are available. + */ + class UnimplementedDeclaration extends Synth::TUnimplementedDeclaration, Declaration, + Unimplemented + { + override string getAPrimaryQlClass() { result = "UnimplementedDeclaration" } + } +} diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index c38f0f61ea0f..d2ae8deb73c7 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -15,6 +15,7 @@ sourceLocationPrefix( @file | @locatable | @location +| @unimplemented ; @file = @@ -51,17 +52,25 @@ locations( int end_column: int ref ); +@unimplemented = + @generic_args +| @path +| @type_ref +| @unimplemented_declaration +; + @ast_node = @declaration | @expr +| @generic_args | @label | @match_arm | @pat +| @path | @record_field_pat | @record_lit_field | @stmt | @type_ref -| @unimplemented ; db_files( @@ -75,6 +84,7 @@ db_locations( @declaration = @function | @module +| @unimplemented_declaration ; @expr = @@ -113,6 +123,10 @@ db_locations( | @yield_expr ; +generic_args( + unique int id: @generic_args +); + labels( unique int id: @label, string name: string ref @@ -147,6 +161,10 @@ match_arm_guards( | @wild_pat ; +paths( + unique int id: @path +); + record_field_pats( unique int id: @record_field_pat, string name: string ref, @@ -169,10 +187,6 @@ type_refs( unique int id: @type_ref ); -unimplementeds( - unique int id: @unimplemented -); - @array_expr = @element_list_expr | @repeat_expr @@ -461,7 +475,7 @@ method_call_expr_args( #keyset[id] method_call_expr_generic_args( int id: @method_call_expr ref, - int generic_args: @unimplemented ref + int generic_args: @generic_args ref ); missing_exprs( @@ -508,12 +522,12 @@ or_pat_args( path_exprs( unique int id: @path_expr, - int path: @unimplemented ref + int path: @path ref ); path_pats( unique int id: @path_pat, - int path: @unimplemented ref + int path: @path ref ); range_exprs( @@ -560,7 +574,7 @@ record_lit_exprs( #keyset[id] record_lit_expr_paths( int id: @record_lit_expr ref, - int path: @unimplemented ref + int path: @path ref ); #keyset[id, index] @@ -593,7 +607,7 @@ record_pats( #keyset[id] record_pat_paths( int id: @record_pat ref, - int path: @unimplemented ref + int path: @path ref ); #keyset[id, index] @@ -707,7 +721,7 @@ tuple_struct_pats( #keyset[id] tuple_struct_pat_paths( int id: @tuple_struct_pat ref, - int path: @unimplemented ref + int path: @path ref ); #keyset[id, index] @@ -733,6 +747,10 @@ underscore_exprs( unique int id: @underscore_expr ); +unimplemented_declarations( + unique int id: @unimplemented_declaration +); + wild_pats( unique int id: @wild_pat ); diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 780d1d8a138b..d67224f87319 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -10,13 +10,13 @@ BreakExpr/gen_break_expr.rs 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee CallExpr/gen_call_expr.rs 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 CastExpr/gen_cast_expr.rs 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 ClosureExpr/gen_closure_expr.rs de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 de77bc1d891b4e0f5a4d8a55a8a097990867f93a015c13d72fb10e767aa14ba4 -ConstBlockPat/gen_const_block_pat.rs 66caa0eb1445b2d0bf1ff5609b44975f88d72971ff558e02c69fe0459a2459ec 66caa0eb1445b2d0bf1ff5609b44975f88d72971ff558e02c69fe0459a2459ec +ConstBlockPat/gen_const_block_pat.rs 6117cee861ea278aa0fb10fe141902a3bb91e6750565e52e5d3e7f0ad03b9203 6117cee861ea278aa0fb10fe141902a3bb91e6750565e52e5d3e7f0ad03b9203 ConstExpr/gen_const_expr.rs 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b ContinueExpr/gen_continue_expr.rs cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 ElementListExpr/gen_element_list_expr.rs 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 66f8a3c4e02767e96692c44ada6fe7ed2b07b1aaefdad13e35ae41e081374f81 ExprStmt/gen_expr_stmt.rs eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 -Function/gen_function.rs 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 +Function/gen_function.rs 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 InlineAsmExpr/gen_inline_asm_expr.rs b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a @@ -26,11 +26,12 @@ LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403 LitPat/gen_lit_pat.rs dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 LiteralExpr/gen_literal_expr.rs 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 -MatchArm/gen_match_arm.rs 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 -MatchExpr/gen_match_expr.rs 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 +MatchArm/gen_match_arm.rs b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 +MatchExpr/gen_match_expr.rs 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 MissingExpr/gen_missing_expr.rs 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 +Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index dfcc74a7bfa3..f568ad60b566 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -33,6 +33,7 @@ /MethodCallExpr/gen_method_call_expr.rs linguist-generated /MissingExpr/gen_missing_expr.rs linguist-generated /MissingPat/gen_missing_pat.rs linguist-generated +/Module/gen_module.rs linguist-generated /OffsetOfExpr/gen_offset_of_expr.rs linguist-generated /OrPat/gen_or_pat.rs linguist-generated /PathExpr/gen_path_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs index 680f416e457b..bb2a1743de40 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/gen_const_block_pat.rs @@ -3,7 +3,7 @@ fn test_const_block_pat() -> () { // A const block pattern. For example: match x { - const { 1 + 2 + 3} => "ok", + const { 1 + 2 + 3 } => "ok", _ => "fail", }; } diff --git a/rust/ql/test/extractor-tests/generated/Function/gen_function.rs b/rust/ql/test/extractor-tests/generated/Function/gen_function.rs index 0df26fce0ee8..2c306d78c074 100644 --- a/rust/ql/test/extractor-tests/generated/Function/gen_function.rs +++ b/rust/ql/test/extractor-tests/generated/Function/gen_function.rs @@ -1,7 +1,7 @@ // generated by codegen // A function declaration. For example -fn foo(x: u32) -> u64 { (x + 1).into() } +fn foo(x: u32) -> u64 {(x + 1).into()} // A function declaration within a trait might not have a body: trait Trait { fn bar(); diff --git a/rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt similarity index 100% rename from rust/ql/test/extractor-tests/generated/Module/MISSING_SOURCE.txt rename to rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs index b4c8732b8e4c..5fe2f9c6e8e2 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs +++ b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs @@ -5,9 +5,9 @@ fn test_match_arm(x: i32) -> i32 { match x { Some(y) => y, None => 0, - } + }; match x { Some(y) if y != 0 => 1 / y, _ => 0, - } + }; } diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs index 3a6080e83cbc..efae3774aadc 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs @@ -6,8 +6,8 @@ fn test_match_expr(x: i32) -> i32 { Some(y) => y, None => 0, } - // match x { - // Some(y) if y != 0 => 1 / y, - // _ => 0, - // } + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } } diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.ql b/rust/ql/test/extractor-tests/generated/Module/Module.ql new file mode 100644 index 000000000000..bb7a1eece17b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from Module x, int getNumberOfDeclarations +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfDeclarations = x.getNumberOfDeclarations() +select x, "getNumberOfDeclarations:", getNumberOfDeclarations diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.ql b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.ql new file mode 100644 index 000000000000..f531c0184958 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from Module x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getDeclaration(index) diff --git a/rust/ql/test/extractor-tests/generated/Module/gen_module.rs b/rust/ql/test/extractor-tests/generated/Module/gen_module.rs new file mode 100644 index 000000000000..d7d84ee47725 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Module/gen_module.rs @@ -0,0 +1,7 @@ +// generated by codegen + +// A module declaration. For example: +mod foo; +mod bar { + pub fn baz() {} +} diff --git a/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt new file mode 100644 index 000000000000..9cb54ddd059e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +After a source file is added in this directory and codegen is run again, test queries +will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql index b7936833509b..064dbdea51a3 100644 --- a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from PathExpr x, Unimplemented getPath +from PathExpr x, Path getPath where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql index efa91319cf2f..35179c13ae24 100644 --- a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from PathPat x, Unimplemented getPath +from PathPat x, Path getPath where toBeTested(x) and not x.isUnknown() and diff --git a/rust/schema.py b/rust/schema.py index 45ab06823a80..d3572177c3be 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -63,7 +63,7 @@ class AstNode(Locatable): @qltest.skip -class Unimplemented(AstNode): +class Unimplemented(Element): pass @@ -71,8 +71,23 @@ class Declaration(AstNode): pass -class Module(Declaration): +@qltest.skip +class UnimplementedDeclaration(Declaration, Unimplemented): + pass + +class Module(Declaration): + """ + A module declaration. For example: + ``` + mod foo; + ``` + ``` + mod bar { + pub fn baz() {} + } + ``` + """ declarations: list[Declaration] | child @@ -112,8 +127,15 @@ class Stmt(AstNode): @qltest.collapse_hierarchy -class TypeRef(AstNode): +class TypeRef(AstNode, Unimplemented): + pass + + +class Path(AstNode, Unimplemented): + pass + +class GenericArgs(AstNode, Unimplemented): pass @@ -121,7 +143,7 @@ class Function(Declaration): """ A function declaration. For example ``` - fn foo(x: u32) -> u64 { (x + 1).into() } + fn foo(x: u32) -> u64 {(x + 1).into()} ``` A function declaration within a trait might not have a body: ``` @@ -157,7 +179,7 @@ class PathExpr(Expr): let z = ::foo; ``` """ - path: Unimplemented | child + path: Path | child @rust.doc_test_signature("() -> ()") @@ -318,7 +340,7 @@ class MethodCallExpr(Expr): receiver: Expr | child method_name: string args: list[Expr] | child - generic_args: optional[Unimplemented] | child + generic_args: optional[GenericArgs] | child @rust.doc_test_signature("(x: i32) -> i32") @@ -329,13 +351,13 @@ class MatchArm(AstNode): match x { Some(y) => y, None => 0, - } + }; ``` ``` match x { Some(y) if y != 0 => 1 / y, _ => 0, - } + }; ``` """ pat: Pat | child @@ -353,6 +375,7 @@ class MatchExpr(Expr): None => 0, } ``` + ``` match x { Some(y) if y != 0 => 1 / y, _ => 0, @@ -490,7 +513,7 @@ class RecordLitExpr(Expr): Foo { .. } = second; ``` """ - path: optional[Unimplemented] | child + path: optional[Path] | child fields: list[RecordLitField] | child spread: optional[Expr] | child has_ellipsis: predicate @@ -873,7 +896,7 @@ class RecordPat(Pat): ``` """ - path: optional[Unimplemented] | child + path: optional[Path] | child args: list[RecordFieldPat] | child has_ellipsis: predicate @@ -921,7 +944,7 @@ class PathPat(Pat): } ``` """ - path: Unimplemented | child + path: Path | child @rust.doc_test_signature("() -> ()") @@ -971,7 +994,7 @@ class TupleStructPat(Pat): }; ``` """ - path: optional[Unimplemented] | child + path: optional[Path] | child args: list[Pat] | child ellipsis_index: optional[int] @@ -1011,7 +1034,7 @@ class ConstBlockPat(Pat): A const block pattern. For example: ``` match x { - const { 1 + 2 + 3} => "ok", + const { 1 + 2 + 3 } => "ok", _ => "fail", }; ``` From 8e378d86dfaf891777d57c1056d7b4f56477a2e1 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 12 Sep 2024 22:06:56 +0200 Subject: [PATCH 05/22] Update test data --- .../generated/ConstBlockPat/ConstBlockPat.expected | 2 +- .../extractor-tests/generated/Function/Function.expected | 2 +- .../generated/MatchExpr/MatchExpr.expected | 1 + .../generated/MatchExpr/MatchExpr_getBranch.expected | 2 ++ .../MethodCallExpr/MethodCallExpr_getGenericArgs.expected | 2 +- .../extractor-tests/generated/PathExpr/PathExpr.expected | 8 ++++---- .../extractor-tests/generated/PathPat/PathPat.expected | 2 +- .../RecordLitExpr/RecordLitExpr_getPath.expected | 8 ++++---- .../generated/RecordPat/RecordPat_getPath.expected | 4 ++-- .../TupleStructPat/TupleStructPat_getPath.expected | 6 +++--- 10 files changed, 20 insertions(+), 17 deletions(-) diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected index 4c6c757fb0b2..965df88445ed 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected @@ -1 +1 @@ -| gen_const_block_pat.rs:6:9:6:26 | ConstBlockPat | getExpr: | gen_const_block_pat.rs:6:15:6:26 | BlockExpr | +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | getExpr: | gen_const_block_pat.rs:6:15:6:27 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/Function/Function.expected b/rust/ql/test/extractor-tests/generated/Function/Function.expected index 453a2db17934..ccb4ce460e3a 100644 --- a/rust/ql/test/extractor-tests/generated/Function/Function.expected +++ b/rust/ql/test/extractor-tests/generated/Function/Function.expected @@ -1 +1 @@ -| gen_function.rs:3:1:4:40 | foo | getName: | foo | getBody: | gen_function.rs:4:23:4:40 | BlockExpr | +| gen_function.rs:3:1:4:38 | foo | getName: | foo | getBody: | gen_function.rs:4:23:4:38 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected index c0ac41bbd503..15c7dcb2f237 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected @@ -1 +1,2 @@ | gen_match_expr.rs:5:5:8:5 | MatchExpr | getExpr: | gen_match_expr.rs:5:11:5:11 | PathExpr | getNumberOfBranches: | 2 | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | getExpr: | gen_match_expr.rs:9:11:9:11 | PathExpr | getNumberOfBranches: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected index 6142eaa9099c..75da7cef94d4 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected @@ -1,2 +1,4 @@ | gen_match_expr.rs:5:5:8:5 | MatchExpr | 0 | gen_match_expr.rs:6:9:6:15 | MatchArm | | gen_match_expr.rs:5:5:8:5 | MatchExpr | 1 | gen_match_expr.rs:7:9:7:12 | MatchArm | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | 0 | gen_match_expr.rs:10:9:10:15 | MatchArm | +| gen_match_expr.rs:9:5:12:5 | MatchExpr | 1 | gen_match_expr.rs:11:9:11:9 | MatchArm | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected index e1dbf7481846..b857e713823a 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected @@ -1 +1 @@ -| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | Unimplemented | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | GenericArgs | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected index 90b110d363eb..572d269aaa7d 100644 --- a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -1,4 +1,4 @@ -| gen_path_expr.rs:5:13:5:20 | PathExpr | getPath: | gen_path_expr.rs:5:13:5:20 | Unimplemented | -| gen_path_expr.rs:6:13:6:20 | PathExpr | getPath: | gen_path_expr.rs:6:13:6:20 | Unimplemented | -| gen_path_expr.rs:7:13:7:20 | PathExpr | getPath: | gen_path_expr.rs:7:13:7:20 | Unimplemented | -| gen_path_expr.rs:8:13:8:32 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:32 | Unimplemented | +| gen_path_expr.rs:5:13:5:20 | PathExpr | getPath: | gen_path_expr.rs:5:13:5:20 | Path | +| gen_path_expr.rs:6:13:6:20 | PathExpr | getPath: | gen_path_expr.rs:6:13:6:20 | Path | +| gen_path_expr.rs:7:13:7:20 | PathExpr | getPath: | gen_path_expr.rs:7:13:7:20 | Path | +| gen_path_expr.rs:8:13:8:32 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:32 | Path | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected index 746d3dcffe7a..38e42ebfcf2f 100644 --- a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected @@ -1 +1 @@ -| gen_path_pat.rs:6:9:6:16 | PathPat | getPath: | gen_path_pat.rs:6:9:6:16 | Unimplemented | +| gen_path_pat.rs:6:9:6:16 | PathPat | getPath: | gen_path_pat.rs:6:9:6:16 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected index febf7f1e78b4..95e6c3d889f8 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected @@ -1,4 +1,4 @@ -| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | gen_record_lit_expr.rs:5:17:5:34 | Unimplemented | -| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:18:6:38 | Unimplemented | -| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | gen_record_lit_expr.rs:7:5:7:22 | Unimplemented | -| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | gen_record_lit_expr.rs:8:5:8:14 | Unimplemented | +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | gen_record_lit_expr.rs:5:17:5:34 | Path | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:18:6:38 | Path | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | gen_record_lit_expr.rs:7:5:7:22 | Path | +| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | gen_record_lit_expr.rs:8:5:8:14 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected index 7fdceb60d1ab..0dfc1cf99cb7 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getPath.expected @@ -1,2 +1,2 @@ -| gen_record_pat.rs:6:9:6:26 | RecordPat | gen_record_pat.rs:6:9:6:26 | Unimplemented | -| gen_record_pat.rs:7:9:7:18 | RecordPat | gen_record_pat.rs:7:9:7:18 | Unimplemented | +| gen_record_pat.rs:6:9:6:26 | RecordPat | gen_record_pat.rs:6:9:6:26 | Path | +| gen_record_pat.rs:7:9:7:18 | RecordPat | gen_record_pat.rs:7:9:7:18 | Path | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected index 97d7dd69abdc..de7f0f1ffe06 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.expected @@ -1,3 +1,3 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | gen_tuple_struct_pat.rs:6:9:6:27 | Unimplemented | -| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | gen_tuple_struct_pat.rs:7:9:7:20 | Unimplemented | -| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | gen_tuple_struct_pat.rs:8:9:8:17 | Unimplemented | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | gen_tuple_struct_pat.rs:6:9:6:27 | Path | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | gen_tuple_struct_pat.rs:7:9:7:20 | Path | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | gen_tuple_struct_pat.rs:8:9:8:17 | Path | From c825ae4eaba3a693f71ccda1286805b9a9e3ef62 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Thu, 12 Sep 2024 22:12:07 +0200 Subject: [PATCH 06/22] Add some examples for some of the unimplemented nodes --- rust/ql/.generated.list | 20 ++++++++--------- rust/ql/.gitattributes | 6 ++--- .../lib/codeql/rust/elements/GenericArgs.qll | 6 +++++ rust/ql/lib/codeql/rust/elements/Path.qll | 6 +++++ rust/ql/lib/codeql/rust/elements/TypeRef.qll | 8 +++++++ .../lib/codeql/rust/generated/GenericArgs.qll | 4 ++++ rust/ql/lib/codeql/rust/generated/Path.qll | 4 ++++ rust/ql/lib/codeql/rust/generated/Raw.qll | 14 ++++++++++++ rust/ql/lib/codeql/rust/generated/TypeRef.qll | 6 +++++ .../generated/.generated_tests.list | 3 +++ .../extractor-tests/generated/.gitattributes | 3 +++ .../GenericArgs/GenericArgs.expected | 0 .../generated/GenericArgs/GenericArgs.ql | 7 ++++++ .../generated/GenericArgs/MISSING_SOURCE.txt | 4 ---- .../generated/GenericArgs/gen_generic_args.rs | 6 +++++ .../generated/Module/Module.expected | 0 .../Module/Module_getDeclaration.expected | 0 .../generated/Path/MISSING_SOURCE.txt | 4 ---- .../generated/Path/Path.expected | 0 .../extractor-tests/generated/Path/Path.ql | 7 ++++++ .../generated/Path/gen_path.rs | 4 ++++ .../generated/TypeRef/MISSING_SOURCE.txt | 4 ---- .../generated/TypeRef/TypeRef.expected | 0 .../generated/TypeRef/TypeRef.ql | 7 ++++++ .../generated/TypeRef/gen_type_ref.rs | 6 +++++ rust/schema.py | 22 ++++++++++++++++++- 26 files changed, 125 insertions(+), 26 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql delete mode 100644 rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module.expected create mode 100644 rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected delete mode 100644 rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.expected create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.ql create mode 100644 rust/ql/test/extractor-tests/generated/Path/gen_path.rs delete mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql create mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index a154d8997e15..704add7d5822 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -44,7 +44,7 @@ lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c3 lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c857cc703fca03d34f1f478b57ee8051590 1e5555910c643235e34b73f9844e894e51f357c3f7aba8165c47caa147336c53 lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c -lib/codeql/rust/elements/GenericArgs.qll e64db724addfba85bcb326d26640eef6e71467b3f55a0bcfdbe538f6efa154b3 7d6b80c1bac67efa8951987c8e01f286d5da9097e922640868646f639068a3f4 +lib/codeql/rust/elements/GenericArgs.qll 4cfd7696e2fd8117c2bad398222aa893222b15cf76255b9ac03ef6d47f8b653f 3012785c8601ca3942388b9a40fde58dd40365467a0c709a24259012c359b9b0 lib/codeql/rust/elements/GenericArgsConstructor.qll 581b52a92fc3222bc4695ef403b37de513dfa820f0cf73a394a36a351de66bbb a61f06c2aa13ab5852c792faca80148aa8233168ff5b91e3ce9e8d458b62608e lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f @@ -83,7 +83,7 @@ lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57 lib/codeql/rust/elements/OrPat.qll 448ebaddc1b42fbb90e3240d990cb841d4775d9129350e8f5195904798efb27c ffb6121a0b4f0e661e1653c396d565053b9f89eb358bbaa1c218c31eac3b8221 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 lib/codeql/rust/elements/Pat.qll 79ac8430cc9047cf89fcf80cdb527166bd72e979d03e051fa2d60fa2f64f2294 914362a06ad0cac1e1777874bf4425fcc805021197f635ddd87b96d9e5c221d9 -lib/codeql/rust/elements/Path.qll 05a168a83168638e07eb3d746adad7ecd952976dfed6fd85becc0fd491bf4b0f 8f38d2ae227dfd4fc7cedde3008dc66df57aa4ac1714c8d5105c9989b4e8b93e +lib/codeql/rust/elements/Path.qll 3863a424a10b840f05584e17cb642859b18093b205eb9125f9aa0a0c2de6bab3 0db28b1b40218961ff8db478842b54ed7eee7660229113aca93c180aa45bb243 lib/codeql/rust/elements/PathConstructor.qll 97243db75d6337cf68a22ea68569fdddf4c3bc1b8875bb4bb66faeeba8846a53 03c8c665e2f3b103148fd38eb7a4d0459c8189b2f6160dc08ee1d6d2807e01b6 lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8cbc93779b80e494561af706 c6da0b2e8ace1c30a7cd468406353a457440aafacf8e31c32618fd9781c69113 lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 @@ -118,7 +118,7 @@ lib/codeql/rust/elements/TuplePat.qll d9161426edabc199d206a3a1c2994bbda9430d7418 lib/codeql/rust/elements/TuplePatConstructor.qll 505c4f440b47da576acd7e3fc69d6b49e8287f981a21e79919ded374200f2578 b295526303bcae982ddd8c6b544288c0b8b8d62984d6986319e7f17baeb7a19b lib/codeql/rust/elements/TupleStructPat.qll ed443440791cf0868183c5e5304a855058ce78c1b3735507b5c35f269604022b f02c9481ea471b198eec0909d01bd3db03830bd98f10bcc3a2ca4f37b1466b79 lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb -lib/codeql/rust/elements/TypeRef.qll 223844544eab3e07b6edda805c6344fa8b486aeea7bbe62e4b98e235ce2008d8 7517748b0e7a57c925168f5ce7a31ecc1b59f7521a2095578f599b8d9045a4e5 +lib/codeql/rust/elements/TypeRef.qll 13824c88938542cc554bc9ead335136a4eb115ec07ced03e140c9a88f49afdb6 4d265a4fa37a9df406d4bbbad03a69bcb3b5edd3152482fdb90676466283194e lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 lib/codeql/rust/elements/UnaryOpExpr.qll 9948297ab5799279738499586e4fd4457e7770db8f33461d0d1c3641498a268e c637101ddfd1770ed0e47a452b2fc4d210ea6f61f36ea968c23a8cd3032c4884 lib/codeql/rust/elements/UnaryOpExprConstructor.qll 43db7afbd3535b7edc801d99d772233a734f4ed31eeee2ca74e7ab26cae33e87 7345f8d4cb958ee2fa83d3634285f12829bdd1cbac2697236d6fae062313ab6d @@ -164,7 +164,7 @@ lib/codeql/rust/generated/ExprStmt.qll 40fd3659761005fe0de2a09e58d35b3b28203f8f3 lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 lib/codeql/rust/generated/Function.qll 133693679cd69f0c011d6aa779b067924e8d58ea15bc3f6b749cc3aa5d5e962d 5a18e3be5c7c681cebec762b2c2d3b1cb08c5fcc11ef422bf65c9b15fc82c893 -lib/codeql/rust/generated/GenericArgs.qll c47ede327602ba85d237920bb1523cb38ad461497f5396ddfae580d332ab16f8 c47ede327602ba85d237920bb1523cb38ad461497f5396ddfae580d332ab16f8 +lib/codeql/rust/generated/GenericArgs.qll cfde67ab0c0fbc7a889f62cbf725f2a6ef375d2a2dc806976eb9ca343ab37b3a cfde67ab0c0fbc7a889f62cbf725f2a6ef375d2a2dc806976eb9ca343ab37b3a lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 lib/codeql/rust/generated/InlineAsmExpr.qll 0fbc121595d55df71a9190200ee8d7244851c517181d907d07236a8c338f1ebe b41cad499ebcc6aae4326ac5ae596210997fde99b6107feee35d6c9f764f0f5a @@ -187,13 +187,13 @@ lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2fa lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d lib/codeql/rust/generated/ParentChild.qll 68f8595b5d6136e7b29dfa7d5f4a6e77ad4f7feea9c40a0408e41d438a0a9159 53246623aab7cfd38e8c094dfb09c2ddd3adcca52f568814f672539a4d35b064 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f -lib/codeql/rust/generated/Path.qll 6814a5a437c11da5ceaac7dd80c8d496446cb884476a9f3361908f2cd417ebb4 6814a5a437c11da5ceaac7dd80c8d496446cb884476a9f3361908f2cd417ebb4 +lib/codeql/rust/generated/Path.qll ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff lib/codeql/rust/generated/PathExpr.qll 5a82e07a0c641fec4e8ce29656fa4e33f420b19b2556b418769f4d899a3dfae3 21920262735114d8304c3569f884828a390b95ca039afcc3e81c75d3f23df9ca lib/codeql/rust/generated/PathPat.qll 8aaa7fd5f3439ce567f4d6f729e3ba1e98ab24255070b7d4ba7bbde6506d97f5 10bd82ea0e846c96afa34cc6e467101a490a1191b4edc29a7154a6d93a467f1c lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll d84338bad5b4d15d9379b3a1c76095b43d54bd542875161fb92eefead1db20c6 898a89f57aaa546355ff38ad2169b8d2e01d5c3556b2a969bf575a904c909f40 +lib/codeql/rust/generated/Raw.qll 85281a7b1ee346d02d8238359368a7219a78d23207551852a109dfc0f0f44054 32e47611c6d36318c586893e98babfa0c1fae2b8737a3e44813f644f777215db lib/codeql/rust/generated/RecordFieldPat.qll bff47b9ec13fd5747a9d4597feb3acaacd17876ed1ff411bcecf605c5909a01f adc2e30ae9169b861ce28c6c21431e9dd3fb3d3f832e99cb39f9f0ff6b1dbe2d lib/codeql/rust/generated/RecordLitExpr.qll c83dafa1f07a34c686cee81188045c9e04aba5ebd54c4778708f1b20ccb76702 da4c710226d6604c313bfd88bfbe005c6178db054860da265de616e9a5a8b3f3 lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 @@ -209,7 +209,7 @@ lib/codeql/rust/generated/SynthConstructors.qll 7b696491e21b37bf5de023b68838e5c0 lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d2493890e79c28c485f512a1 5cc082ea99de61662b2d4c8b59f7a833236e7e448943e8ee894ab6066cc761c4 lib/codeql/rust/generated/TupleStructPat.qll 089563349c9866f5703e9d306ba2a475d7d4002e7236dbbf2feeb89290b4d24c a77842d7262a7d19b175f239d1ee6550b3b66a4efe903c5112bb82c0abd7b05d -lib/codeql/rust/generated/TypeRef.qll 919c1003fed54165a48617de35eb47ee1115f390ad56344fa8f20230e33a74b1 919c1003fed54165a48617de35eb47ee1115f390ad56344fa8f20230e33a74b1 +lib/codeql/rust/generated/TypeRef.qll 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f lib/codeql/rust/generated/Unimplemented.qll 0bebbf22b5a6484077ceacdd4d11a14665b95cc9e68b859f2d8218290842d1ad addecc8027e14ebbcb2eff4d038c16aa1f33f100e17ffaecd5de36b9a4c719a8 @@ -255,7 +255,7 @@ test/extractor-tests/generated/ExprStmt/ExprStmt.ql 037695af057183ef9e35569c9255 test/extractor-tests/generated/FieldExpr/FieldExpr.ql 6d85c8b85905baf66ae1f6ed716e42530d814f86261d98eddceab861939227e5 5765fb0376978a9006e2dc175bb224c5c944f19ddf628a2b933b1bebf81015a2 test/extractor-tests/generated/File/File.ql dec43be882fad904fab0c6447ca93633d801cb08ff8bec309befde7d2b9e5dda 74e1f1d698558c35fa03935cc34f4c8145d376b56d7657b18aeb338f5ca752cf test/extractor-tests/generated/Function/Function.ql c49434420dbb6fc3d9e6294161dcd3d3b306fae5ba5c85b610e534b8b15ef74c fe02208b673b74eebed92b5cbb3a8a06c31c0681eb28f3e596515663f14fa9e2 -test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/GenericArgs/GenericArgs.ql 206e6d302d0b76b7b4493bcbb2836509b7301873365a32c1769da084db243474 47dd2c22290ea8e726614419247db69daaf31fc6a0a49d3e2e3e5ce281bc1e1f test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e336308af6908cf12387fe8bbaa3c8c5360bd 28b5580a4e628286023b5d0de549d087f0a4224ecbb02bc7b3197d8f404b5066 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 @@ -285,7 +285,7 @@ test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 test/extractor-tests/generated/OrPat/OrPat.ql 51d9a0f5993510542a2cca353c1ca48ba1e5fb97a65bee7f02398cd90debaa41 06e0936b80a07a16e22fad3a3a541000f170fd5ad301a3170b98a91f51d09144 test/extractor-tests/generated/OrPat/OrPat_getArg.ql 693d62aa9817ce7661b4698c2948bca6567c1376b2ae832f3020462e8ab8d2ee 1fd9809826c6f2dece3014299f1d70210c9f23e5eefbd04b1d6024e1ecd46209 -test/extractor-tests/generated/Path/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/Path/Path.ql 331bcbea004111727f36fb9325b53bf1ac87cc62ffcd68659636fa68786529fd 94ca6f7c3df16779cf6b340099330e5e1122d2e58708a8ab2aaf0f4c78a92200 test/extractor-tests/generated/PathExpr/PathExpr.ql 3013e12d5dab5c38c5b8fcaec59e78a3c6477f4edc8b01b078ecbfe7b8f82ffb 40427c9d420456174e1524ed046a5f445b9b72ca8b87abefb6c9498d4c809fc5 test/extractor-tests/generated/PathPat/PathPat.ql 57dd735fe179cc1b91ee66b7849bcdd1aabe661762e88e1678cdaaa53526a10c 1734a45d47ee484fbf2cadb5620b28874a904fe944030a9e39166a6a25aa0de7 test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 @@ -321,7 +321,7 @@ test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 2d14109d39c7519a test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql f308a61384af5feebc58028a95d26499b6a666c7599b30aed33efbaca86c06b2 f298af5a861410281dee6cf22d3ceaa286a5be4d27968750321f2d016c34a0dd test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql 47e84e7db2d1cc23aca4c28b5bba2826eeeaba07377eb8c8de5141bcb9c36ab8 a5c1d23e2521c38b12c0942c88403bea5a0d77a4763f273ffdf48eaa000a00ff test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 5f19a261ade6e3249029d7268cc0385092234a896e72ccdf8376a592be1d545e bb4fefecefaa2d9634f31026e5ec8bff561bacf55a4105727032bab08fdbdea3 -test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/TypeRef/TypeRef.ql 73283955206c7e1ef71009969826e34c7f37624547c2ef39c80a23583cb37216 fedf7995b69805ce7ccc4e29aa592043cff2f7ac6730a70d27ed883d922b4684 test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql 3e530c5beba93710b686d0bdaa6edfa58e13357be48bbf038c3a47c280d0bf08 0b0003cbebf44d0d2e3bcc1b318e0a4e90638dfcf3679ef6924a8461e81feabb test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 54cc3f7e6e9b9ac58922842dcd1960250e8bbb7ede5a63134ae622abc447be1e 1d5558d4ec9e4a1a510f37206772af3bf41015a99f1e9b83cc530db496dc2a5f test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 11c38dc9025a..8fe184150696 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -257,7 +257,7 @@ /test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated -/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/GenericArgs/GenericArgs.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated @@ -287,7 +287,7 @@ /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat_getArg.ql linguist-generated -/test/extractor-tests/generated/Path/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/Path/Path.ql linguist-generated /test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated /test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated @@ -323,7 +323,7 @@ /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TypeRef/TypeRef.ql linguist-generated /test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/GenericArgs.qll b/rust/ql/lib/codeql/rust/elements/GenericArgs.qll index f43b17629436..0df4c9dcb214 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericArgs.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArgs.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.GenericArgs +/** + * The base class for generic arguments. + * ``` + * x.foo::(42); + * ``` + */ class GenericArgs extends Generated::GenericArgs { } diff --git a/rust/ql/lib/codeql/rust/elements/Path.qll b/rust/ql/lib/codeql/rust/elements/Path.qll index b73e16bc8b13..ac41381d30f5 100644 --- a/rust/ql/lib/codeql/rust/elements/Path.qll +++ b/rust/ql/lib/codeql/rust/elements/Path.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.Path +/** + * A path. For example: + * ``` + * foo::bar; + * ``` + */ class Path extends Generated::Path { } diff --git a/rust/ql/lib/codeql/rust/elements/TypeRef.qll b/rust/ql/lib/codeql/rust/elements/TypeRef.qll index 950ecbd9726a..296e3d4a40be 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeRef.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.TypeRef +/** + * The base class for type references. + * ``` + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` + */ class TypeRef extends Generated::TypeRef { } diff --git a/rust/ql/lib/codeql/rust/generated/GenericArgs.qll b/rust/ql/lib/codeql/rust/generated/GenericArgs.qll index b0b66f5b3e8f..0a7ac9a40d12 100644 --- a/rust/ql/lib/codeql/rust/generated/GenericArgs.qll +++ b/rust/ql/lib/codeql/rust/generated/GenericArgs.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * The base class for generic arguments. + * ``` + * x.foo::(42); + * ``` * INTERNAL: Do not reference the `Generated::GenericArgs` class directly. * Use the subclass `GenericArgs`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Path.qll b/rust/ql/lib/codeql/rust/generated/Path.qll index c669519f97cf..c929101f21a7 100644 --- a/rust/ql/lib/codeql/rust/generated/Path.qll +++ b/rust/ql/lib/codeql/rust/generated/Path.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A path. For example: + * ``` + * foo::bar; + * ``` * INTERNAL: Do not reference the `Generated::Path` class directly. * Use the subclass `Path`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index e098e6c6fbdf..df8e06f7112a 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -97,6 +97,10 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for generic arguments. + * ``` + * x.foo::(42); + * ``` */ class GenericArgs extends @generic_args, AstNode, Unimplemented { override string toString() { result = "GenericArgs" } @@ -164,6 +168,10 @@ module Raw { /** * INTERNAL: Do not use. + * A path. For example: + * ``` + * foo::bar; + * ``` */ class Path extends @path, AstNode, Unimplemented { override string toString() { result = "Path" } @@ -219,6 +227,12 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for type references. + * ``` + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` */ class TypeRef extends @type_ref, AstNode, Unimplemented { override string toString() { result = "TypeRef" } diff --git a/rust/ql/lib/codeql/rust/generated/TypeRef.qll b/rust/ql/lib/codeql/rust/generated/TypeRef.qll index 0d69b0139cc7..f6c45fcbad5f 100644 --- a/rust/ql/lib/codeql/rust/generated/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/generated/TypeRef.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * The base class for type references. + * ``` + * let x: i32; + * let y: Vec; + * let z: Option; + * ``` * INTERNAL: Do not reference the `Generated::TypeRef` class directly. * Use the subclass `TypeRef`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index d67224f87319..d9794ac585f0 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -17,6 +17,7 @@ ElementListExpr/gen_element_list_expr.rs 66f8a3c4e02767e96692c44ada6fe7ed2b07b1a ExprStmt/gen_expr_stmt.rs eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 Function/gen_function.rs 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 +GenericArgs/gen_generic_args.rs 9c559792205357f58472fe8136cc963a2732907c9d384458c6607dff593fb81a 9c559792205357f58472fe8136cc963a2732907c9d384458c6607dff593fb81a IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 InlineAsmExpr/gen_inline_asm_expr.rs b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a @@ -34,6 +35,7 @@ MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625 Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 +Path/gen_path.rs 35c33e872d7472d046a0ee46a37ecc007c5138a8198b1723e76255b6f4f8a0a7 35c33e872d7472d046a0ee46a37ecc007c5138a8198b1723e76255b6f4f8a0a7 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 @@ -50,6 +52,7 @@ SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19 TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 TuplePat/gen_tuple_pat.rs 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf TupleStructPat/gen_tuple_struct_pat.rs 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 +TypeRef/gen_type_ref.rs 1cf84cc5d57fa5a94aacdbbcce23cc303ad07a446ee8cb3db7140e98257c2d3c 1cf84cc5d57fa5a94aacdbbcce23cc303ad07a446ee8cb3db7140e98257c2d3c UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index f568ad60b566..3e7d2e4c05de 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -19,6 +19,7 @@ /ExprStmt/gen_expr_stmt.rs linguist-generated /FieldExpr/gen_field_expr.rs linguist-generated /Function/gen_function.rs linguist-generated +/GenericArgs/gen_generic_args.rs linguist-generated /IfExpr/gen_if_expr.rs linguist-generated /IndexExpr/gen_index_expr.rs linguist-generated /InlineAsmExpr/gen_inline_asm_expr.rs linguist-generated @@ -36,6 +37,7 @@ /Module/gen_module.rs linguist-generated /OffsetOfExpr/gen_offset_of_expr.rs linguist-generated /OrPat/gen_or_pat.rs linguist-generated +/Path/gen_path.rs linguist-generated /PathExpr/gen_path_expr.rs linguist-generated /PathPat/gen_path_pat.rs linguist-generated /RangeExpr/gen_range_expr.rs linguist-generated @@ -52,6 +54,7 @@ /TupleExpr/gen_tuple_expr.rs linguist-generated /TuplePat/gen_tuple_pat.rs linguist-generated /TupleStructPat/gen_tuple_struct_pat.rs linguist-generated +/TypeRef/gen_type_ref.rs linguist-generated /UnaryOpExpr/gen_unary_op_expr.rs linguist-generated /UnderscoreExpr/gen_underscore_expr.rs linguist-generated /UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql new file mode 100644 index 000000000000..821175b2df27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from GenericArgs x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/GenericArgs/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs b/rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs new file mode 100644 index 000000000000..ee661cadea27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_generic_args() -> () { + // The base class for generic arguments. + x.foo::(42); +} diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/Path/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.ql b/rust/ql/test/extractor-tests/generated/Path/Path.ql new file mode 100644 index 000000000000..ed36a54c785a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from Path x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs new file mode 100644 index 000000000000..1d44b1ee9aae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs @@ -0,0 +1,4 @@ +// generated by codegen + +// A path. For example: +foo::bar; diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt deleted file mode 100644 index 9cb54ddd059e..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt +++ /dev/null @@ -1,4 +0,0 @@ -// generated by codegen - -After a source file is added in this directory and codegen is run again, test queries -will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql new file mode 100644 index 000000000000..04748b7dd043 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from TypeRef x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs new file mode 100644 index 000000000000..41d3a2239dd7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs @@ -0,0 +1,6 @@ +// generated by codegen + +// The base class for type references. +let x: i32; +let y: Vec; +let z: Option; diff --git a/rust/schema.py b/rust/schema.py index d3572177c3be..5face9a42ac0 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -126,16 +126,36 @@ class Stmt(AstNode): pass -@qltest.collapse_hierarchy class TypeRef(AstNode, Unimplemented): + """ + The base class for type references. + ``` + let x: i32; + let y: Vec; + let z: Option; + ``` + """ pass class Path(AstNode, Unimplemented): + """ + A path. For example: + ``` + foo::bar; + ``` + """ pass +@rust.doc_test_signature("() -> ()") class GenericArgs(AstNode, Unimplemented): + """ + The base class for generic arguments. + ``` + x.foo::(42); + ``` + """ pass From 197fb04184908abfb26175753bd96c27ed68e817 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:16:34 +0200 Subject: [PATCH 07/22] Improve docs --- rust/ql/.generated.list | 6 +++--- rust/ql/lib/codeql/rust/elements/MissingExpr.qll | 2 +- rust/ql/lib/codeql/rust/generated/MissingExpr.qll | 2 +- rust/ql/lib/codeql/rust/generated/Raw.qll | 2 +- .../ql/test/extractor-tests/generated/.generated_tests.list | 2 +- .../generated/MissingExpr/gen_missing_expr.rs | 2 +- rust/schema.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 704add7d5822..fd0966270486 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -72,7 +72,7 @@ lib/codeql/rust/elements/MatchExpr.qll cb38dfcdf896e8f5c429d13493f423d926c39ca92 lib/codeql/rust/elements/MatchExprConstructor.qll 74df937d7d8bfbfb02bdbf095595eb3f2129ed4c0854bae6d73b5b38d4fc902d 5c388c02f02462d843945111b72de12bce33c7c332d55993d903aeb250213407 lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a629230991513326585c99dab7be1f3 ed05c7f40fb6d1c97fa0a3a631db1913b8e6abb5c2b3513d0e81a82a2e5f7f95 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e -lib/codeql/rust/elements/MissingExpr.qll 30b04d6a7b67acbce40dc1ffb95edb833578fd50ac7165213913b6c83d3181a8 444fb33c01ef6a311539f5b8a3159034aeabbf0284d192139e64c3e66ef0a18a +lib/codeql/rust/elements/MissingExpr.qll 618f80b813afda19783c689c67c79b2106483b559f49dc21ed713281d6b1ac87 9de89e36754a98b8caf9010690ceb8a9d32999d192e325a1a24892311f874268 lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 lib/codeql/rust/elements/MissingPat.qll 74a84a04d0aaabb3353419bba2225e6ca3f02ada55e00d28e6cceb37cefce43a c8ee5e6c411e0955ca0a775c8b09b894e2914fe24f9d16df1f0e6d186d15ebd2 lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 @@ -180,7 +180,7 @@ lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd624 lib/codeql/rust/generated/MatchArm.qll c82a871b33633dc5908d6abc665048b0bc3d761f134b8ceca51338c4a84a55c3 90faaed01f5e7c3ff6b9114b275c80418737c48b64082763e83cb63499fefa6a lib/codeql/rust/generated/MatchExpr.qll cf48ca2000a1cf2b2fa05b42403bba9be94aac23a88bc88e1b97e86982ff4fe9 244960785828aa62c4c3d17251ef5a3b7dd3ce3e10fd99a364f98f760ca84e77 lib/codeql/rust/generated/MethodCallExpr.qll 83288ef71bb5f5ba9aadc3977ece9144b3eb58756270b9f76eaf3323153797b6 7fd96a56bb1fc0caa60b52d55a0cc14cc87bd3bd057a970993485375f9e3198a -lib/codeql/rust/generated/MissingExpr.qll 9ab4844a2d719d29a95a69d1a6f9477ded0db508f83f3e4f2101847d0486c300 f0706af7d600a4ed1dc253c9e1220e863a58cfb9334f853877b80dffadb35a3a +lib/codeql/rust/generated/MissingExpr.qll 34cb27c927a62cc06b0fe26a085e2658abd5019e549c3e01b8273d99e9a9616f 34bf4cfbf3659b600b4aac121f7c2d6da0b00b61c3002f8fb1d554c11968c748 lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 @@ -193,7 +193,7 @@ lib/codeql/rust/generated/PathPat.qll 8aaa7fd5f3439ce567f4d6f729e3ba1e98ab242550 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll 85281a7b1ee346d02d8238359368a7219a78d23207551852a109dfc0f0f44054 32e47611c6d36318c586893e98babfa0c1fae2b8737a3e44813f644f777215db +lib/codeql/rust/generated/Raw.qll 5b79017778c820d208741ac58b57e662279e52a34a63420be55742f22aa20998 2ba908f867b14f2fc0815f1265f70d71871162b3abfc9d9ee55761be794a91a3 lib/codeql/rust/generated/RecordFieldPat.qll bff47b9ec13fd5747a9d4597feb3acaacd17876ed1ff411bcecf605c5909a01f adc2e30ae9169b861ce28c6c21431e9dd3fb3d3f832e99cb39f9f0ff6b1dbe2d lib/codeql/rust/generated/RecordLitExpr.qll c83dafa1f07a34c686cee81188045c9e04aba5ebd54c4778708f1b20ccb76702 da4c710226d6604c313bfd88bfbe005c6178db054860da265de616e9a5a8b3f3 lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 diff --git a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll index 4a9b9806abeb..2190168eaf5f 100644 --- a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll @@ -6,7 +6,7 @@ private import codeql.rust.generated.MissingExpr /** - * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * A missing expression, used as a placeholder for incomplete syntax. * * ``` * let x = non_existing_macro!(); diff --git a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll index 2b2641f52db3..955d662bce41 100644 --- a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll @@ -14,7 +14,7 @@ import codeql.rust.elements.Expr */ module Generated { /** - * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * A missing expression, used as a placeholder for incomplete syntax. * * ``` * let x = non_existing_macro!(); diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index df8e06f7112a..353f3e16cb2e 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -954,7 +954,7 @@ module Raw { /** * INTERNAL: Do not use. - * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * A missing expression, used as a placeholder for incomplete syntax. * * ``` * let x = non_existing_macro!(); diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index d9794ac585f0..d8f21163f9d5 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -30,7 +30,7 @@ LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db MatchArm/gen_match_arm.rs b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 MatchExpr/gen_match_expr.rs 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 -MissingExpr/gen_missing_expr.rs 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 +MissingExpr/gen_missing_expr.rs 24bed82f1e2a4bc18c00d59bc06ad0aa59371d5fab71e67a8b4eb1a5f59c61cb 24bed82f1e2a4bc18c00d59bc06ad0aa59371d5fab71e67a8b4eb1a5f59c61cb MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs index e4fd065c3645..0a0f6ad7660e 100644 --- a/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs @@ -1,7 +1,7 @@ // generated by codegen fn test_missing_expr() -> () { - // A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + // A missing expression, used as a placeholder for incomplete syntax. // let x = non_existing_macro!(); } diff --git a/rust/schema.py b/rust/schema.py index 5face9a42ac0..3e9e95442712 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -179,7 +179,7 @@ class Function(Declaration): @rust.doc_test_signature("() -> ()") class MissingExpr(Expr): """ - A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + A missing expression, used as a placeholder for incomplete syntax. ``` let x = non_existing_macro!(); From c634b0a000f3d175abdfa4c66fe41d300b69de8f Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:16:53 +0200 Subject: [PATCH 08/22] Don't extract non-source crates --- rust/extractor/src/main.rs | 16 ++++++---------- rust/extractor/src/translate.rs | 19 +++++-------------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index caac7d1243aa..8d1bcc98ab6c 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -65,6 +65,9 @@ fn main() -> anyhow::Result<()> { let crates = ::crate_graph(&db); for crate_id in crates.iter() { let krate = Crate::from(crate_id); + if !cfg.extract_dependencies && !krate.origin(&db).is_local() { + continue; + } let name = krate.display_name(&db); let crate_name = name .as_ref() @@ -78,16 +81,9 @@ fn main() -> anyhow::Result<()> { crate_id.into_raw().into_u32() )), ); - translate::CrateTranslator::new( - &db, - trap, - &krate, - &vfs, - &archiver, - cfg.extract_dependencies, - ) - .emit_crate() - .context("writing trap file")?; + translate::CrateTranslator::new(&db, trap, &krate, &vfs, &archiver) + .emit_crate() + .context("writing trap file")?; } } Ok(()) diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 2e11f33a9973..9213e11c3532 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -32,7 +32,6 @@ pub struct CrateTranslator<'a> { krate: &'a Crate, vfs: &'a Vfs, archiver: &'a Archiver, - extract_dependencies: bool, file_labels: HashMap, } @@ -43,7 +42,6 @@ impl CrateTranslator<'_> { krate: &'a Crate, vfs: &'a Vfs, archiver: &'a Archiver, - extract_dependencies: bool, ) -> CrateTranslator<'a> { CrateTranslator { db, @@ -51,7 +49,6 @@ impl CrateTranslator<'_> { krate, vfs, archiver, - extract_dependencies, file_labels: HashMap::new(), } } @@ -942,17 +939,11 @@ impl CrateTranslator<'_> { let name = function.name(self.db); let location = self.emit_location(function); - let body = if self.extract_dependencies || self.krate.origin(self.db).is_local() { - let (body, source_map) = self.db.body_with_source_map(def.into()); - let txt = body.pretty_print(self.db, def.into(), Edition::Edition2021); - log::trace!("{}", &txt); - self.emit_expr(body.body_expr, &body, &source_map) - } else { - self.trap.emit(generated::MissingExpr { - id: TrapId::Star, - location: None, - }) - }; + let (body, source_map) = self.db.body_with_source_map(def.into()); + let txt = body.pretty_print(self.db, def.into(), Edition::Edition2021); + log::trace!("{}", &txt); + let body = self.emit_expr(body.body_expr, &body, &source_map); + labels.push(self.trap.emit(generated::Function { id: trap_key![module_label, name.as_str()], location, From 085aad3b3c79d5c1102d9278096fc6fd2af771a7 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:22:01 +0200 Subject: [PATCH 09/22] Update test data --- rust/ql/test/TestUtils.qll | 11 +---------- .../test/extractor-tests/generated/File/File.expected | 1 + .../generated/GenericArgs/GenericArgs.expected | 1 + .../extractor-tests/generated/Module/Module.expected | 7 +++++++ .../generated/Module/Module_getDeclaration.expected | 1 + .../test/extractor-tests/generated/Path/Path.expected | 0 .../generated/TypeRef/TypeRef.expected | 0 7 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.expected delete mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected diff --git a/rust/ql/test/TestUtils.qll b/rust/ql/test/TestUtils.qll index 317b71f2bdfc..c20ad04e2b6c 100644 --- a/rust/ql/test/TestUtils.qll +++ b/rust/ql/test/TestUtils.qll @@ -1,13 +1,4 @@ private import codeql.rust.elements cached -predicate toBeTested(Element e) { - exists(File f | - f.getName().matches("%rust/ql/test%") and - ( - e = f - or - e.(Locatable).getLocation().getFile() = f - ) - ) -} +predicate toBeTested(Element e) { any() } diff --git a/rust/ql/test/extractor-tests/generated/File/File.expected b/rust/ql/test/extractor-tests/generated/File/File.expected index 47f86056a5f2..a22ae29c91b5 100644 --- a/rust/ql/test/extractor-tests/generated/File/File.expected +++ b/rust/ql/test/extractor-tests/generated/File/File.expected @@ -1,2 +1,3 @@ +| file://:0:0:0:0 | | UnknownFile | getName: | | | lib.rs:0:0:0:0 | lib.rs | DbFile | getName: | lib.rs | | test.rs:0:0:0:0 | test.rs | DbFile | getName: | test.rs | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected index e69de29bb2d1..f49c7814ba37 100644 --- a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected +++ b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected @@ -0,0 +1 @@ +| file://:0:0:0:0 | GenericArgs | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected index e69de29bb2d1..b534a491b841 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -0,0 +1,7 @@ +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected index e69de29bb2d1..4ac81a948267 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected @@ -0,0 +1 @@ +| file://:0:0:0:0 | Module | 0 | gen_module.rs:6:5:6:19 | baz | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected deleted file mode 100644 index e69de29bb2d1..000000000000 From 452424a0d2e1cebc20fc83cd8e6ce25dd66cc9f2 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:25:36 +0200 Subject: [PATCH 10/22] Fix tests for Path and TypeRef --- .../extractor-tests/generated/.generated_tests.list | 4 ++-- .../test/extractor-tests/generated/Path/Path.expected | 1 + .../ql/test/extractor-tests/generated/Path/gen_path.rs | 6 ++++-- .../extractor-tests/generated/TypeRef/TypeRef.expected | 3 +++ .../extractor-tests/generated/TypeRef/gen_type_ref.rs | 10 ++++++---- rust/schema.py | 2 ++ 6 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/Path/Path.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index d8f21163f9d5..c8f28a56bef5 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -35,7 +35,7 @@ MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625 Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 -Path/gen_path.rs 35c33e872d7472d046a0ee46a37ecc007c5138a8198b1723e76255b6f4f8a0a7 35c33e872d7472d046a0ee46a37ecc007c5138a8198b1723e76255b6f4f8a0a7 +Path/gen_path.rs 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 @@ -52,7 +52,7 @@ SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19 TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 TuplePat/gen_tuple_pat.rs 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf TupleStructPat/gen_tuple_struct_pat.rs 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 -TypeRef/gen_type_ref.rs 1cf84cc5d57fa5a94aacdbbcce23cc303ad07a446ee8cb3db7140e98257c2d3c 1cf84cc5d57fa5a94aacdbbcce23cc303ad07a446ee8cb3db7140e98257c2d3c +TypeRef/gen_type_ref.rs 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected new file mode 100644 index 000000000000..3e0c5eb3e26e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/Path.expected @@ -0,0 +1 @@ +| gen_path.rs:5:5:5:12 | Path | diff --git a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs index 1d44b1ee9aae..86cd3eec067a 100644 --- a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs +++ b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs @@ -1,4 +1,6 @@ // generated by codegen -// A path. For example: -foo::bar; +fn test_path() -> () { + // A path. For example: + foo::bar; +} diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected new file mode 100644 index 000000000000..af51fa0b6032 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected @@ -0,0 +1,3 @@ +| file://:0:0:0:0 | TypeRef | +| file://:0:0:0:0 | TypeRef | +| file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs index 41d3a2239dd7..1077dc2b4f5f 100644 --- a/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs +++ b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs @@ -1,6 +1,8 @@ // generated by codegen -// The base class for type references. -let x: i32; -let y: Vec; -let z: Option; +fn test_type_ref() -> () { + // The base class for type references. + let x: i32; + let y: Vec; + let z: Option; +} diff --git a/rust/schema.py b/rust/schema.py index 3e9e95442712..a56a525898bb 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -126,6 +126,7 @@ class Stmt(AstNode): pass +@rust.doc_test_signature("() -> ()") class TypeRef(AstNode, Unimplemented): """ The base class for type references. @@ -138,6 +139,7 @@ class TypeRef(AstNode, Unimplemented): pass +@rust.doc_test_signature("() -> ()") class Path(AstNode, Unimplemented): """ A path. For example: From 8dcf93d065415d788701f3979ac7326f82e15a9b Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:48:31 +0200 Subject: [PATCH 11/22] Make class names match rust.ungram https://github.com/rust-lang/rust-analyzer/blob/811905fce8532617df9e3216829e60bcdfd9e935/crates/syntax/rust.ungram --- rust/schema.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/rust/schema.py b/rust/schema.py index a56a525898bb..1aedeaae2c36 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -127,7 +127,7 @@ class Stmt(AstNode): @rust.doc_test_signature("() -> ()") -class TypeRef(AstNode, Unimplemented): +class Type(AstNode, Unimplemented): """ The base class for type references. ``` @@ -151,7 +151,7 @@ class Path(AstNode, Unimplemented): @rust.doc_test_signature("() -> ()") -class GenericArgs(AstNode, Unimplemented): +class GenericArgList(AstNode, Unimplemented): """ The base class for generic arguments. ``` @@ -362,7 +362,7 @@ class MethodCallExpr(Expr): receiver: Expr | child method_name: string args: list[Expr] | child - generic_args: optional[GenericArgs] | child + generic_args: optional[GenericArgList] | child @rust.doc_test_signature("(x: i32) -> i32") @@ -513,9 +513,9 @@ class YeetExpr(Expr): @rust.doc_test_signature("() -> ()") -class RecordLitField(AstNode): +class RecordExprField(AstNode): """ - A field in a record literal. For example `a: 1` in: + A field in a record expression. For example `a: 1` in: ``` Foo { a: 1, b: 2 }; ``` @@ -525,9 +525,9 @@ class RecordLitField(AstNode): @rust.doc_test_signature("() -> ()") -class RecordLitExpr(Expr): +class RecordExpr(Expr): """ - A record literal expression. For example: + A record expression. For example: ``` let first = Foo { a: 1, b: 2 }; let second = Foo { a: 2, ..first }; @@ -536,7 +536,7 @@ class RecordLitExpr(Expr): ``` """ path: optional[Path] | child - fields: list[RecordLitField] | child + fields: list[RecordExprField] | child spread: optional[Expr] | child has_ellipsis: predicate is_assignee_expr: predicate @@ -577,7 +577,7 @@ class CastExpr(Expr): ``` """ expr: Expr | child - type_ref: TypeRef | child + type: Type | child @rust.doc_test_signature("() -> ()") @@ -608,7 +608,7 @@ class BoxExpr(Expr): @rust.doc_test_signature("() -> ()") -class UnaryOpExpr(Expr): +class PrefixExpr(Expr): """ A unary operation expression. For example: ``` @@ -622,7 +622,7 @@ class UnaryOpExpr(Expr): @rust.doc_test_signature("() -> ()") -class BinaryOpExpr(Expr): +class BinExpr(Expr): """ A binary operation expression. For example: ``` @@ -685,8 +685,8 @@ class ClosureExpr(Expr): ``` """ args: list[Pat] | child - arg_types: list[optional[TypeRef]] | child - ret_type: optional[TypeRef] | child + arg_types: list[optional[Type]] | child + ret_type: optional[Type] | child body: Expr | child closure_kind: string is_move: predicate @@ -741,7 +741,7 @@ class RepeatExpr(ArrayExpr): @rust.doc_test_signature("() -> ()") -class LiteralExpr(Expr): +class Literal(Expr): """ A literal expression. For example: ``` @@ -776,12 +776,12 @@ class OffsetOfExpr(Expr): builtin # offset_of(Struct, field); ``` """ - container: TypeRef | child + container: Type | child fields: list[string] @rust.doc_test_signature("() -> ()") -class InlineAsmExpr(Expr): +class AsmExpr(Expr): """ An inline assembly expression. For example: ``` @@ -809,7 +809,7 @@ class LetStmt(Stmt): """ pat: Pat | child - type_ref: optional[TypeRef] | child + type: optional[Type] | child initializer: optional[Expr] | child else_: optional[Expr] | child @@ -858,7 +858,7 @@ class MissingPat(Pat): @rust.doc_test_signature("() -> ()") -class WildPat(Pat): +class WildcardPat(Pat): """ A wildcard pattern. For example: ``` @@ -895,7 +895,7 @@ class OrPat(Pat): @rust.doc_test_signature("() -> ()") -class RecordFieldPat(AstNode): +class RecordPatField(AstNode): """ A field in a record pattern. For example `a: 1` in: ``` @@ -919,7 +919,7 @@ class RecordPat(Pat): """ path: optional[Path] | child - args: list[RecordFieldPat] | child + args: list[RecordPatField] | child has_ellipsis: predicate @@ -970,7 +970,7 @@ class PathPat(Pat): @rust.doc_test_signature("() -> ()") -class LitPat(Pat): +class LiteralPat(Pat): """ A literal pattern. For example: ``` @@ -984,7 +984,7 @@ class LitPat(Pat): @rust.doc_test_signature("() -> ()") -class BindPat(Pat): +class IdentPat(Pat): """ A binding pattern. For example: ``` From fa9cfc1104a1bfc47d8a2e9095b2bd0365c73036 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:52:43 +0200 Subject: [PATCH 12/22] Regenerate code --- rust/extractor/src/generated/.generated.list | 2 +- rust/extractor/src/generated/top.rs | 200 ++++++------ rust/ql/.generated.list | 136 ++++---- rust/ql/.gitattributes | 108 +++---- rust/ql/lib/codeql/rust/elements.qll | 24 +- .../{InlineAsmExpr.qll => AsmExpr.qll} | 6 +- ...Constructor.qll => AsmExprConstructor.qll} | 6 +- .../{BinaryOpExpr.qll => BinExpr.qll} | 6 +- ...Constructor.qll => BinExprConstructor.qll} | 6 +- .../{GenericArgs.qll => GenericArgList.qll} | 6 +- ...ctor.qll => GenericArgListConstructor.qll} | 6 +- .../elements/{BindPat.qll => IdentPat.qll} | 6 +- .../rust/elements/IdentPatConstructor.qll | 14 + .../elements/InlineAsmExprConstructor.qll | 14 - .../elements/{LiteralExpr.qll => Literal.qll} | 6 +- ...Constructor.qll => LiteralConstructor.qll} | 6 +- .../rust/elements/LiteralExprConstructor.qll | 14 - .../elements/{LitPat.qll => LiteralPat.qll} | 6 +- .../rust/elements/LiteralPatConstructor.qll | 14 + .../{UnaryOpExpr.qll => PrefixExpr.qll} | 6 +- .../rust/elements/PrefixExprConstructor.qll | 14 + .../{RecordLitExpr.qll => RecordExpr.qll} | 8 +- .../rust/elements/RecordExprConstructor.qll | 14 + .../codeql/rust/elements/RecordExprField.qll | 14 + ...tor.qll => RecordExprFieldConstructor.qll} | 6 +- .../elements/RecordLitExprConstructor.qll | 14 - .../codeql/rust/elements/RecordLitField.qll | 14 - ...{RecordFieldPat.qll => RecordPatField.qll} | 6 +- ...ctor.qll => RecordPatFieldConstructor.qll} | 6 +- .../rust/elements/{TypeRef.qll => Type.qll} | 6 +- ...PatConstructor.qll => TypeConstructor.qll} | 6 +- .../rust/elements/UnaryOpExprConstructor.qll | 14 - .../elements/{WildPat.qll => WildcardPat.qll} | 6 +- ...tructor.qll => WildcardPatConstructor.qll} | 6 +- rust/ql/lib/codeql/rust/generated/AsmExpr.qll | 36 +++ rust/ql/lib/codeql/rust/generated/BinExpr.qll | 55 ++++ .../codeql/rust/generated/BinaryOpExpr.qll | 57 ---- .../ql/lib/codeql/rust/generated/CastExpr.qll | 8 +- .../lib/codeql/rust/generated/ClosureExpr.qll | 12 +- .../{GenericArgs.qll => GenericArgList.qll} | 12 +- .../generated/{BindPat.qll => IdentPat.qll} | 21 +- .../codeql/rust/generated/InlineAsmExpr.qll | 39 --- rust/ql/lib/codeql/rust/generated/LetStmt.qll | 13 +- rust/ql/lib/codeql/rust/generated/LitPat.qll | 38 --- .../{LiteralExpr.qll => Literal.qll} | 12 +- .../lib/codeql/rust/generated/LiteralPat.qll | 39 +++ .../codeql/rust/generated/MethodCallExpr.qll | 6 +- .../codeql/rust/generated/OffsetOfExpr.qll | 6 +- .../lib/codeql/rust/generated/ParentChild.qll | 210 ++++++------- .../lib/codeql/rust/generated/PrefixExpr.qll | 42 +++ rust/ql/lib/codeql/rust/generated/Raw.qll | 288 ++++++++--------- .../lib/codeql/rust/generated/RecordExpr.qll | 90 ++++++ .../codeql/rust/generated/RecordExprField.qll | 45 +++ .../codeql/rust/generated/RecordFieldPat.qll | 45 --- .../codeql/rust/generated/RecordLitExpr.qll | 96 ------ .../codeql/rust/generated/RecordLitField.qll | 45 --- .../lib/codeql/rust/generated/RecordPat.qll | 8 +- .../codeql/rust/generated/RecordPatField.qll | 45 +++ rust/ql/lib/codeql/rust/generated/Synth.qll | 291 +++++++++--------- .../rust/generated/SynthConstructors.qll | 24 +- .../rust/generated/{TypeRef.qll => Type.qll} | 12 +- .../lib/codeql/rust/generated/UnaryOpExpr.qll | 42 --- .../{WildPat.qll => WildcardPat.qll} | 12 +- rust/ql/lib/rust.dbscheme | 158 +++++----- .../generated/.generated_tests.list | 24 +- .../extractor-tests/generated/.gitattributes | 24 +- .../{LitPat/LitPat.ql => AsmExpr/AsmExpr.ql} | 2 +- .../gen_asm_expr.rs} | 2 +- .../BinaryOpExpr.ql => BinExpr/BinExpr.ql} | 2 +- .../BinExpr_getOp.ql} | 2 +- .../gen_bin_expr.rs} | 2 +- .../generated/CastExpr/CastExpr.ql | 6 +- .../GenericArgList.ql} | 2 +- .../gen_generic_arg_list.rs} | 2 +- .../BindPat.ql => IdentPat/IdentPat.ql} | 2 +- .../IdentPat_getSubpat.ql} | 2 +- .../gen_ident_pat.rs} | 2 +- .../generated/LetStmt/LetStmt.ql | 8 +- ...tStmt_getTypeRef.ql => LetStmt_getType.ql} | 2 +- .../TypeRef.ql => Literal/Literal.ql} | 2 +- .../gen_literal.rs} | 2 +- .../LiteralPat.ql} | 2 +- .../gen_literal_pat.rs} | 2 +- .../generated/OffsetOfExpr/OffsetOfExpr.ql | 2 +- .../PrefixExpr.ql} | 2 +- .../gen_prefix_expr.rs} | 2 +- .../RecordExpr.ql} | 2 +- .../RecordExpr_getField.ql} | 2 +- .../RecordExpr_getPath.ql} | 2 +- .../RecordExpr_getSpread.ql} | 2 +- .../gen_record_expr.rs} | 4 +- .../RecordExprField.ql} | 2 +- .../RecordExprField/gen_record_expr_field.rs | 6 + .../RecordLitField/gen_record_lit_field.rs | 6 - .../RecordPatField.ql} | 2 +- .../gen_record_pat_field.rs} | 2 +- .../{WildPat/WildPat.ql => Type/Type.ql} | 2 +- .../gen_type_ref.rs => Type/gen_type.rs} | 2 +- .../WildcardPat.ql} | 2 +- .../gen_wildcard_pat.rs} | 2 +- 100 files changed, 1326 insertions(+), 1343 deletions(-) rename rust/ql/lib/codeql/rust/elements/{InlineAsmExpr.qll => AsmExpr.qll} (65%) rename rust/ql/lib/codeql/rust/elements/{TypeRefConstructor.qll => AsmExprConstructor.qll} (64%) rename rust/ql/lib/codeql/rust/elements/{BinaryOpExpr.qll => BinExpr.qll} (66%) rename rust/ql/lib/codeql/rust/elements/{WildPatConstructor.qll => BinExprConstructor.qll} (64%) rename rust/ql/lib/codeql/rust/elements/{GenericArgs.qll => GenericArgList.qll} (62%) rename rust/ql/lib/codeql/rust/elements/{RecordFieldPatConstructor.qll => GenericArgListConstructor.qll} (62%) rename rust/ql/lib/codeql/rust/elements/{BindPat.qll => IdentPat.qll} (74%) create mode 100644 rust/ql/lib/codeql/rust/elements/IdentPatConstructor.qll delete mode 100644 rust/ql/lib/codeql/rust/elements/InlineAsmExprConstructor.qll rename rust/ql/lib/codeql/rust/elements/{LiteralExpr.qll => Literal.qll} (70%) rename rust/ql/lib/codeql/rust/elements/{BindPatConstructor.qll => LiteralConstructor.qll} (64%) delete mode 100644 rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll rename rust/ql/lib/codeql/rust/elements/{LitPat.qll => LiteralPat.qll} (67%) create mode 100644 rust/ql/lib/codeql/rust/elements/LiteralPatConstructor.qll rename rust/ql/lib/codeql/rust/elements/{UnaryOpExpr.qll => PrefixExpr.qll} (67%) create mode 100644 rust/ql/lib/codeql/rust/elements/PrefixExprConstructor.qll rename rust/ql/lib/codeql/rust/elements/{RecordLitExpr.qll => RecordExpr.qll} (62%) create mode 100644 rust/ql/lib/codeql/rust/elements/RecordExprConstructor.qll create mode 100644 rust/ql/lib/codeql/rust/elements/RecordExprField.qll rename rust/ql/lib/codeql/rust/elements/{BinaryOpExprConstructor.qll => RecordExprFieldConstructor.qll} (58%) delete mode 100644 rust/ql/lib/codeql/rust/elements/RecordLitExprConstructor.qll delete mode 100644 rust/ql/lib/codeql/rust/elements/RecordLitField.qll rename rust/ql/lib/codeql/rust/elements/{RecordFieldPat.qll => RecordPatField.qll} (64%) rename rust/ql/lib/codeql/rust/elements/{RecordLitFieldConstructor.qll => RecordPatFieldConstructor.qll} (62%) rename rust/ql/lib/codeql/rust/elements/{TypeRef.qll => Type.qll} (70%) rename rust/ql/lib/codeql/rust/elements/{LitPatConstructor.qll => TypeConstructor.qll} (63%) delete mode 100644 rust/ql/lib/codeql/rust/elements/UnaryOpExprConstructor.qll rename rust/ql/lib/codeql/rust/elements/{WildPat.qll => WildcardPat.qll} (63%) rename rust/ql/lib/codeql/rust/elements/{GenericArgsConstructor.qll => WildcardPatConstructor.qll} (63%) create mode 100644 rust/ql/lib/codeql/rust/generated/AsmExpr.qll create mode 100644 rust/ql/lib/codeql/rust/generated/BinExpr.qll delete mode 100644 rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll rename rust/ql/lib/codeql/rust/generated/{GenericArgs.qll => GenericArgList.qll} (51%) rename rust/ql/lib/codeql/rust/generated/{BindPat.qll => IdentPat.qll} (53%) delete mode 100644 rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll delete mode 100644 rust/ql/lib/codeql/rust/generated/LitPat.qll rename rust/ql/lib/codeql/rust/generated/{LiteralExpr.qll => Literal.qll} (56%) create mode 100644 rust/ql/lib/codeql/rust/generated/LiteralPat.qll create mode 100644 rust/ql/lib/codeql/rust/generated/PrefixExpr.qll create mode 100644 rust/ql/lib/codeql/rust/generated/RecordExpr.qll create mode 100644 rust/ql/lib/codeql/rust/generated/RecordExprField.qll delete mode 100644 rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll delete mode 100644 rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll delete mode 100644 rust/ql/lib/codeql/rust/generated/RecordLitField.qll create mode 100644 rust/ql/lib/codeql/rust/generated/RecordPatField.qll rename rust/ql/lib/codeql/rust/generated/{TypeRef.qll => Type.qll} (56%) delete mode 100644 rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll rename rust/ql/lib/codeql/rust/generated/{WildPat.qll => WildcardPat.qll} (50%) rename rust/ql/test/extractor-tests/generated/{LitPat/LitPat.ql => AsmExpr/AsmExpr.ql} (85%) rename rust/ql/test/extractor-tests/generated/{InlineAsmExpr/gen_inline_asm_expr.rs => AsmExpr/gen_asm_expr.rs} (78%) rename rust/ql/test/extractor-tests/generated/{BinaryOpExpr/BinaryOpExpr.ql => BinExpr/BinExpr.ql} (82%) rename rust/ql/test/extractor-tests/generated/{BinaryOpExpr/BinaryOpExpr_getOp.ql => BinExpr/BinExpr_getOp.ql} (86%) rename rust/ql/test/extractor-tests/generated/{BinaryOpExpr/gen_binary_op_expr.rs => BinExpr/gen_bin_expr.rs} (80%) rename rust/ql/test/extractor-tests/generated/{GenericArgs/GenericArgs.ql => GenericArgList/GenericArgList.ql} (84%) rename rust/ql/test/extractor-tests/generated/{GenericArgs/gen_generic_args.rs => GenericArgList/gen_generic_arg_list.rs} (73%) rename rust/ql/test/extractor-tests/generated/{BindPat/BindPat.ql => IdentPat/IdentPat.ql} (83%) rename rust/ql/test/extractor-tests/generated/{BindPat/BindPat_getSubpat.ql => IdentPat/IdentPat_getSubpat.ql} (89%) rename rust/ql/test/extractor-tests/generated/{BindPat/gen_bind_pat.rs => IdentPat/gen_ident_pat.rs} (87%) rename rust/ql/test/extractor-tests/generated/LetStmt/{LetStmt_getTypeRef.ql => LetStmt_getType.ql} (83%) rename rust/ql/test/extractor-tests/generated/{TypeRef/TypeRef.ql => Literal/Literal.ql} (88%) rename rust/ql/test/extractor-tests/generated/{LiteralExpr/gen_literal_expr.rs => Literal/gen_literal.rs} (85%) rename rust/ql/test/extractor-tests/generated/{InlineAsmExpr/InlineAsmExpr.ql => LiteralPat/LiteralPat.ql} (83%) rename rust/ql/test/extractor-tests/generated/{LitPat/gen_lit_pat.rs => LiteralPat/gen_literal_pat.rs} (80%) rename rust/ql/test/extractor-tests/generated/{UnaryOpExpr/UnaryOpExpr.ql => PrefixExpr/PrefixExpr.ql} (82%) rename rust/ql/test/extractor-tests/generated/{UnaryOpExpr/gen_unary_op_expr.rs => PrefixExpr/gen_prefix_expr.rs} (80%) rename rust/ql/test/extractor-tests/generated/{RecordLitExpr/RecordLitExpr.ql => RecordExpr/RecordExpr.ql} (87%) rename rust/ql/test/extractor-tests/generated/{RecordLitExpr/RecordLitExpr_getField.ql => RecordExpr/RecordExpr_getField.ql} (82%) rename rust/ql/test/extractor-tests/generated/{RecordLitExpr/RecordLitExpr_getPath.ql => RecordExpr/RecordExpr_getPath.ql} (86%) rename rust/ql/test/extractor-tests/generated/{RecordLitExpr/RecordLitExpr_getSpread.ql => RecordExpr/RecordExpr_getSpread.ql} (86%) rename rust/ql/test/extractor-tests/generated/{RecordLitExpr/gen_record_lit_expr.rs => RecordExpr/gen_record_expr.rs} (65%) rename rust/ql/test/extractor-tests/generated/{RecordLitField/RecordLitField.ql => RecordExprField/RecordExprField.ql} (80%) create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs rename rust/ql/test/extractor-tests/generated/{RecordFieldPat/RecordFieldPat.ql => RecordPatField/RecordPatField.ql} (81%) rename rust/ql/test/extractor-tests/generated/{RecordFieldPat/gen_record_field_pat.rs => RecordPatField/gen_record_pat_field.rs} (77%) rename rust/ql/test/extractor-tests/generated/{WildPat/WildPat.ql => Type/Type.ql} (88%) rename rust/ql/test/extractor-tests/generated/{TypeRef/gen_type_ref.rs => Type/gen_type.rs} (82%) rename rust/ql/test/extractor-tests/generated/{LiteralExpr/LiteralExpr.ql => WildcardPat/WildcardPat.ql} (86%) rename rust/ql/test/extractor-tests/generated/{WildPat/gen_wild_pat.rs => WildcardPat/gen_wildcard_pat.rs} (72%) diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index 34a861244f72..8cf819895a0c 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e -top.rs a165d9d38458fa0a4fa07445bb4229d17c2be47d0718e4b0ac9f7a82e700c8b2 a165d9d38458fa0a4fa07445bb4229d17c2be47d0718e4b0ac9f7a82e700c8b2 +top.rs c0701de6b3caad020b72b275d83209e6fff0771f84fb94a816921ae7ca7fd3df c0701de6b3caad020b72b275d83209e6fff0771f84fb94a816921ae7ca7fd3df diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index c20581423976..5a215c043c0e 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -44,18 +44,18 @@ impl TrapEntry for DbLocation { } #[derive(Debug)] -pub struct GenericArgs { +pub struct GenericArgList { pub id: TrapId, pub location: Option, } -impl TrapEntry for GenericArgs { +impl TrapEntry for GenericArgList { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("generic_args", vec![trap::Arg::Label(id)]); + out.add_tuple("generic_arg_lists", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -127,20 +127,20 @@ impl TrapEntry for Path { } #[derive(Debug)] -pub struct RecordFieldPat { +pub struct RecordExprField { pub id: TrapId, pub location: Option, pub name: String, - pub pat: trap::Label, + pub expr: trap::Label, } -impl TrapEntry for RecordFieldPat { +impl TrapEntry for RecordExprField { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("record_field_pats", vec![trap::Arg::Label(id), self.name.into(), self.pat.into()]); + out.add_tuple("record_expr_fields", vec![trap::Arg::Label(id), self.name.into(), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -148,20 +148,20 @@ impl TrapEntry for RecordFieldPat { } #[derive(Debug)] -pub struct RecordLitField { +pub struct RecordPatField { pub id: TrapId, pub location: Option, pub name: String, - pub expr: trap::Label, + pub pat: trap::Label, } -impl TrapEntry for RecordLitField { +impl TrapEntry for RecordPatField { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("record_lit_fields", vec![trap::Arg::Label(id), self.name.into(), self.expr.into()]); + out.add_tuple("record_pat_fields", vec![trap::Arg::Label(id), self.name.into(), self.pat.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -169,18 +169,18 @@ impl TrapEntry for RecordLitField { } #[derive(Debug)] -pub struct TypeRef { +pub struct Type { pub id: TrapId, pub location: Option, } -impl TrapEntry for TypeRef { +impl TrapEntry for Type { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("type_refs", vec![trap::Arg::Label(id)]); + out.add_tuple("types", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -188,19 +188,19 @@ impl TrapEntry for TypeRef { } #[derive(Debug)] -pub struct AwaitExpr { +pub struct AsmExpr { pub id: TrapId, pub location: Option, pub expr: trap::Label, } -impl TrapEntry for AwaitExpr { +impl TrapEntry for AsmExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("await_exprs", vec![trap::Arg::Label(id), self.expr.into()]); + out.add_tuple("asm_exprs", vec![trap::Arg::Label(id), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -208,19 +208,19 @@ impl TrapEntry for AwaitExpr { } #[derive(Debug)] -pub struct BecomeExpr { +pub struct AwaitExpr { pub id: TrapId, pub location: Option, pub expr: trap::Label, } -impl TrapEntry for BecomeExpr { +impl TrapEntry for AwaitExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("become_exprs", vec![trap::Arg::Label(id), self.expr.into()]); + out.add_tuple("await_exprs", vec![trap::Arg::Label(id), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -228,50 +228,46 @@ impl TrapEntry for BecomeExpr { } #[derive(Debug)] -pub struct BinaryOpExpr { +pub struct BecomeExpr { pub id: TrapId, pub location: Option, - pub lhs: trap::Label, - pub rhs: trap::Label, - pub op: Option, + pub expr: trap::Label, } -impl TrapEntry for BinaryOpExpr { +impl TrapEntry for BecomeExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("binary_op_exprs", vec![trap::Arg::Label(id), self.lhs.into(), self.rhs.into()]); + out.add_tuple("become_exprs", vec![trap::Arg::Label(id), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } - if let Some(v) = self.op { - out.add_tuple("binary_op_expr_ops", vec![trap::Arg::Label(id), v.into()]); - } } } #[derive(Debug)] -pub struct BindPat { +pub struct BinExpr { pub id: TrapId, pub location: Option, - pub binding_id: String, - pub subpat: Option, + pub lhs: trap::Label, + pub rhs: trap::Label, + pub op: Option, } -impl TrapEntry for BindPat { +impl TrapEntry for BinExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("bind_pats", vec![trap::Arg::Label(id), self.binding_id.into()]); + out.add_tuple("bin_exprs", vec![trap::Arg::Label(id), self.lhs.into(), self.rhs.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } - if let Some(v) = self.subpat { - out.add_tuple("bind_pat_subpats", vec![trap::Arg::Label(id), v.into()]); + if let Some(v) = self.op { + out.add_tuple("bin_expr_ops", vec![trap::Arg::Label(id), v.into()]); } } } @@ -376,7 +372,7 @@ pub struct CastExpr { pub id: TrapId, pub location: Option, pub expr: trap::Label, - pub type_ref: trap::Label, + pub type_: trap::Label, } impl TrapEntry for CastExpr { @@ -385,7 +381,7 @@ impl TrapEntry for CastExpr { } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("cast_exprs", vec![trap::Arg::Label(id), self.expr.into(), self.type_ref.into()]); + out.add_tuple("cast_exprs", vec![trap::Arg::Label(id), self.expr.into(), self.type_.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -561,72 +557,76 @@ impl TrapEntry for Function { } #[derive(Debug)] -pub struct IfExpr { +pub struct IdentPat { pub id: TrapId, pub location: Option, - pub condition: trap::Label, - pub then: trap::Label, - pub else_: Option, + pub binding_id: String, + pub subpat: Option, } -impl TrapEntry for IfExpr { +impl TrapEntry for IdentPat { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("if_exprs", vec![trap::Arg::Label(id), self.condition.into(), self.then.into()]); + out.add_tuple("ident_pats", vec![trap::Arg::Label(id), self.binding_id.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } - if let Some(v) = self.else_ { - out.add_tuple("if_expr_elses", vec![trap::Arg::Label(id), v.into()]); + if let Some(v) = self.subpat { + out.add_tuple("ident_pat_subpats", vec![trap::Arg::Label(id), v.into()]); } } } #[derive(Debug)] -pub struct IndexExpr { +pub struct IfExpr { pub id: TrapId, pub location: Option, - pub base: trap::Label, - pub index: trap::Label, - pub is_assignee_expr: bool, + pub condition: trap::Label, + pub then: trap::Label, + pub else_: Option, } -impl TrapEntry for IndexExpr { +impl TrapEntry for IfExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("index_exprs", vec![trap::Arg::Label(id), self.base.into(), self.index.into()]); + out.add_tuple("if_exprs", vec![trap::Arg::Label(id), self.condition.into(), self.then.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } - if self.is_assignee_expr { - out.add_tuple("index_expr_is_assignee_expr", vec![trap::Arg::Label(id)]); + if let Some(v) = self.else_ { + out.add_tuple("if_expr_elses", vec![trap::Arg::Label(id), v.into()]); } } } #[derive(Debug)] -pub struct InlineAsmExpr { +pub struct IndexExpr { pub id: TrapId, pub location: Option, - pub expr: trap::Label, + pub base: trap::Label, + pub index: trap::Label, + pub is_assignee_expr: bool, } -impl TrapEntry for InlineAsmExpr { +impl TrapEntry for IndexExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("inline_asm_exprs", vec![trap::Arg::Label(id), self.expr.into()]); + out.add_tuple("index_exprs", vec![trap::Arg::Label(id), self.base.into(), self.index.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } + if self.is_assignee_expr { + out.add_tuple("index_expr_is_assignee_expr", vec![trap::Arg::Label(id)]); + } } } @@ -675,7 +675,7 @@ pub struct LetStmt { pub id: TrapId, pub location: Option, pub pat: trap::Label, - pub type_ref: Option, + pub type_: Option, pub initializer: Option, pub else_: Option, } @@ -690,8 +690,8 @@ impl TrapEntry for LetStmt { if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } - if let Some(v) = self.type_ref { - out.add_tuple("let_stmt_type_refs", vec![trap::Arg::Label(id), v.into()]); + if let Some(v) = self.type_ { + out.add_tuple("let_stmt_types", vec![trap::Arg::Label(id), v.into()]); } if let Some(v) = self.initializer { out.add_tuple("let_stmt_initializers", vec![trap::Arg::Label(id), v.into()]); @@ -703,19 +703,18 @@ impl TrapEntry for LetStmt { } #[derive(Debug)] -pub struct LitPat { +pub struct Literal { pub id: TrapId, pub location: Option, - pub expr: trap::Label, } -impl TrapEntry for LitPat { +impl TrapEntry for Literal { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("lit_pats", vec![trap::Arg::Label(id), self.expr.into()]); + out.add_tuple("literals", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -723,18 +722,19 @@ impl TrapEntry for LitPat { } #[derive(Debug)] -pub struct LiteralExpr { +pub struct LiteralPat { pub id: TrapId, pub location: Option, + pub expr: trap::Label, } -impl TrapEntry for LiteralExpr { +impl TrapEntry for LiteralPat { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("literal_exprs", vec![trap::Arg::Label(id)]); + out.add_tuple("literal_pats", vec![trap::Arg::Label(id), self.expr.into()]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } @@ -966,6 +966,27 @@ impl TrapEntry for PathPat { } } +#[derive(Debug)] +pub struct PrefixExpr { + pub id: TrapId, + pub location: Option, + pub expr: trap::Label, + pub op: String, +} + +impl TrapEntry for PrefixExpr { + fn extract_id(&mut self) -> TrapId { + std::mem::replace(&mut self.id, TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("prefix_exprs", vec![trap::Arg::Label(id), self.expr.into(), self.op.into()]); + if let Some(v) = self.location { + out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); + } + } +} + #[derive(Debug)] pub struct RangeExpr { pub id: TrapId, @@ -1025,7 +1046,7 @@ impl TrapEntry for RangePat { } #[derive(Debug)] -pub struct RecordLitExpr { +pub struct RecordExpr { pub id: TrapId, pub location: Option, pub path: Option, @@ -1035,30 +1056,30 @@ pub struct RecordLitExpr { pub is_assignee_expr: bool, } -impl TrapEntry for RecordLitExpr { +impl TrapEntry for RecordExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("record_lit_exprs", vec![trap::Arg::Label(id)]); + out.add_tuple("record_exprs", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } if let Some(v) = self.path { - out.add_tuple("record_lit_expr_paths", vec![trap::Arg::Label(id), v.into()]); + out.add_tuple("record_expr_paths", vec![trap::Arg::Label(id), v.into()]); } for (i, v) in self.fields.into_iter().enumerate() { - out.add_tuple("record_lit_expr_fields", vec![trap::Arg::Label(id), i.into(), v.into()]); + out.add_tuple("record_expr_fields", vec![trap::Arg::Label(id), i.into(), v.into()]); } if let Some(v) = self.spread { - out.add_tuple("record_lit_expr_spreads", vec![trap::Arg::Label(id), v.into()]); + out.add_tuple("record_expr_spreads", vec![trap::Arg::Label(id), v.into()]); } if self.has_ellipsis { - out.add_tuple("record_lit_expr_has_ellipsis", vec![trap::Arg::Label(id)]); + out.add_tuple("record_expr_has_ellipsis", vec![trap::Arg::Label(id)]); } if self.is_assignee_expr { - out.add_tuple("record_lit_expr_is_assignee_expr", vec![trap::Arg::Label(id)]); + out.add_tuple("record_expr_is_assignee_expr", vec![trap::Arg::Label(id)]); } } } @@ -1285,27 +1306,6 @@ impl TrapEntry for TupleStructPat { } } -#[derive(Debug)] -pub struct UnaryOpExpr { - pub id: TrapId, - pub location: Option, - pub expr: trap::Label, - pub op: String, -} - -impl TrapEntry for UnaryOpExpr { - fn extract_id(&mut self) -> TrapId { - std::mem::replace(&mut self.id, TrapId::Star) - } - - fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("unary_op_exprs", vec![trap::Arg::Label(id), self.expr.into(), self.op.into()]); - if let Some(v) = self.location { - out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); - } - } -} - #[derive(Debug)] pub struct UnderscoreExpr { pub id: TrapId, @@ -1345,18 +1345,18 @@ impl TrapEntry for UnimplementedDeclaration { } #[derive(Debug)] -pub struct WildPat { +pub struct WildcardPat { pub id: TrapId, pub location: Option, } -impl TrapEntry for WildPat { +impl TrapEntry for WildcardPat { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("wild_pats", vec![trap::Arg::Label(id)]); + out.add_tuple("wildcard_pats", vec![trap::Arg::Label(id)]); if let Some(v) = self.location { out.add_tuple("locatable_locations", vec![trap::Arg::Label(id), v.into()]); } diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index fd0966270486..e1c4cfcacd72 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,6 @@ lib/codeql/rust/elements/ArrayExpr.qll 822b7dea414d3948f15ee89a014d9ab5ab857db59d8eba7ade8ceed3b453bba4 fb0fc738da8142e8226d99db5ccc1006458bf50f1a95699cbd3012d0917db196 +lib/codeql/rust/elements/AsmExpr.qll 825f9aad83cb4f40cf25ff2da0bb6bf4c7e2b469443f7a8902a994c89d134e38 24212a120cb55658a621085d4e1a3fa611ca9ba742784c772e2e1d353e73783d +lib/codeql/rust/elements/AsmExprConstructor.qll 2b81ea1b0df1171f990e30f074cf8bbccfe7cfd775a746d48e09c60d5d5c8e04 e427132d2731a703ebe047a5e81559813ed4cd055aaf3a0f1221eeb76247ad6a lib/codeql/rust/elements/AstNode.qll 2069047c779514867c12d845dcdf889db6f27fa6a9e484966a3c28a77973b7d4 e214616c81418b0018c0d36896ac2ec7273634e3213bc8257d8b172f396c00ee lib/codeql/rust/elements/AsyncBlockExpr.qll 7cc9709af8c5f844fd6bf6d4cf49e245d19a0ab6d73ef69e84888a4a9b8e47ce 2f9ede385321df47d2e4ac1297d07be987ff53a576a8dded9a615ad83fba6de3 lib/codeql/rust/elements/AsyncBlockExprConstructor.qll 2d7d22caca1984e850d723f9ddd581530734bf4c31c545ea598bc27144a32f1b bf2ff9edff95db8400017b7583d6881581c431755c70e0068a495787993010f9 @@ -6,10 +8,8 @@ lib/codeql/rust/elements/AwaitExpr.qll da0f5928cfee39223c48b74b1921d18c39cc4f8ce lib/codeql/rust/elements/AwaitExprConstructor.qll af0dfdf36b300d412a7b8668f68e6594fe3338216cdf1aa420c9a58608aa86f5 cfa115902ccf070e34ee451bc2f89295c97e8418501359a8cdc646d16c4cc7cd lib/codeql/rust/elements/BecomeExpr.qll cf7d219b639e8e93f6a44bb14be14740b17bdb789f7299863560b2b5d4bfc7f7 26511c65fbdbb9352b6628a813e3f00be8495f2a34abdfae5a5ece8dd59cb04f lib/codeql/rust/elements/BecomeExprConstructor.qll 0c206e657417066415850672a804a69e5fccc605c309bb8755737ae01e332f18 e70bd0c411ffc23c37b22a459455c95ff75a72fa2d179f751bff99866eeef2bc -lib/codeql/rust/elements/BinaryOpExpr.qll 8bd02bff68a9a611ed82b2d380bbd8e541f9cfaef570cb33ab33ba9da7169172 2e51a9f16c4c91d2aef717ddb4c3080eab1a9c8720dbe44f83bf668668e4e772 -lib/codeql/rust/elements/BinaryOpExprConstructor.qll efa89c084def020961641772f4829fc54bf718817831d4752b9bf403ce0e61dd d7937326ba08410fc3ba37e44b76530804f492177ef5e62dd416094e1e2f9bd6 -lib/codeql/rust/elements/BindPat.qll 712176af2ff0eb8aa2bc97fdd792576fafd349b7e33d04347cb5b4c6392e8c81 d44ae771c75a090f83890ee2e1fcc4816d8fe685ba2981a9e7cfe28118b0ae4b -lib/codeql/rust/elements/BindPatConstructor.qll 2bbcc296bcdcd945313d83294b90d327c51c9f1e96f92d37dd10bf0c32dfaf6a 612b4fc651f32129155727e866796edee8fff939614c6fd0b7baa1392930a38c +lib/codeql/rust/elements/BinExpr.qll 201798bde3e0f8e2c6b40e1771c8de21c7a962da4c18f69773fb6fb7f59bba36 e8134215b75065bd8acb3d2b11a0c4129615e333a5dac48ab4b588f7463afc3f +lib/codeql/rust/elements/BinExprConstructor.qll 29d27d66a269ef84a4d6f9ff4785d9aa44225a109886294670828f0e0fa56a35 4da4fec6432c73880eff119a4cc7dbef5816c433a7d25ab3e5818283a0e28944 lib/codeql/rust/elements/BlockExpr.qll b699906fba2dee34699e110b8759419079a5ce3dc1fab207001c9c9b612dac5e 429016df600e3905bd235d0e707c50ecdbf12b3ceddedcbf48944ea76e60f915 lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e8c704f6ce26503ddbd65c6f5282 d2e05a51d3840caf4de4cca6cdab9551f396df317c8ad1da661205aa822646cc lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 @@ -44,14 +44,14 @@ lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c3 lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c857cc703fca03d34f1f478b57ee8051590 1e5555910c643235e34b73f9844e894e51f357c3f7aba8165c47caa147336c53 lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c -lib/codeql/rust/elements/GenericArgs.qll 4cfd7696e2fd8117c2bad398222aa893222b15cf76255b9ac03ef6d47f8b653f 3012785c8601ca3942388b9a40fde58dd40365467a0c709a24259012c359b9b0 -lib/codeql/rust/elements/GenericArgsConstructor.qll 581b52a92fc3222bc4695ef403b37de513dfa820f0cf73a394a36a351de66bbb a61f06c2aa13ab5852c792faca80148aa8233168ff5b91e3ce9e8d458b62608e +lib/codeql/rust/elements/GenericArgList.qll 3db540d2cc2ee748aae2d4ed7917644e78e0016649e8a8e0d96aab78f2893564 b6b826e9a5ab14448e1ae35d5a22029050c08a18f9ef68d4731c6641c7e0f6cb +lib/codeql/rust/elements/GenericArgListConstructor.qll 68e8739557bb470c04ae12f6b39d34c6fa4966bfdad1768b9e4f1a596447cd72 e0fc7e51fea925b7f21e771eca7e1bb2d506d6992c80ecd7902c9656610e545c +lib/codeql/rust/elements/IdentPat.qll a38187662d8e7db4a448f10aede36a3bfbebae3ff352758e28c951245f1c656f 3f8c5ffb92d5c2e79c98a6b19084d78215156c5fb3d86ccfccc8c5fdf3a5fffe +lib/codeql/rust/elements/IdentPatConstructor.qll 3144353f70712a224b5e7af6c5a2cd3452d4c2e164c38092ecb5f6c668401a92 26732573959eec1690afbc1d99ddc76d1fe4936244e0108e7d7c84f69136539f lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f lib/codeql/rust/elements/IndexExpr.qll 924fe6732ffefca376d099255e2eb6682cabd6cb4267dc997fcf85aa5478a3a6 09e65b09cfdb928d134d3aad17acc07602a0bcbca098d775028bcb7624f16b11 lib/codeql/rust/elements/IndexExprConstructor.qll 37e70c773123d775b6281514a2727e133e02fa87e774076f857a676697a1f2ba da2ed2819a13ab7c526b74c1c375ab2fce63ed17f61d5b29e4212343d6b77d06 -lib/codeql/rust/elements/InlineAsmExpr.qll e462d3d71b25124216acfa3f037b675c57bbce1ae98513fe52330a05152463a7 8789d586fe30368b037ff16835a9b36c8da8a1efac1bd7cfd3e048ef115b6cf0 -lib/codeql/rust/elements/InlineAsmExprConstructor.qll 5a3eb5162805366dcc2aea00714c1a0880c31b614b73b69f1638ff4f088cdb11 89c54b68b0246fe5d86f119c1892149746d7fe22d6ef8b625c9ab64398d19d26 lib/codeql/rust/elements/ItemStmt.qll 7482437f4acc6a213a65cd1615be2f909cc4bfa354894df665c8f5e17622d325 aab0311fe7a189bf8221f51c3f46fccd785887d53e664b230abd94f5a89dfd44 lib/codeql/rust/elements/ItemStmtConstructor.qll cd27051f73ab2897b1f7a725313f97d36507fc9f5e0dd7b2ad8bd1caaf8c42ad 67596c97386fbe6cb9e5e6abc45b674158f411d927297345cb25359587380bcd lib/codeql/rust/elements/Label.qll bcd453a21ecba694ea3e42316f0c2b6a213d885bf2cb5ad80fb14d64a1d4952f dbde62a6567c79b137c78210bf04609b2c259ada9a8bf8c1e35e44438c61b983 @@ -60,10 +60,10 @@ lib/codeql/rust/elements/LetExpr.qll 49a9ba97471d04d52bee73f9b5651bec09fae40c577 lib/codeql/rust/elements/LetExprConstructor.qll 8904b25d70fd0e6f3db74d2e09bb3e3fee407282ee45030fdaeac31b6111db70 36dcc877f6c1810228d593d914cffa7b04ecf0afe13c4c122aca72f33d03f566 lib/codeql/rust/elements/LetStmt.qll 542dacce4a4991f0250b45a6c3b28829117e6e5692320494819244a155d05e8d b3e50baeb3534a4352d6bf898ace88e250d84aa05ba0c0debdae5c18c446f3c7 lib/codeql/rust/elements/LetStmtConstructor.qll 5882f0e4379d07e8281a955c9eed7dd907b610750887de3dd6451cd1c8d104d4 68b0890d8a493dcca74190904b00f05b0e58aacfe5a2aa63e5ead1ba366d3c38 -lib/codeql/rust/elements/LitPat.qll 1a95fc2a1dc6e871f861c984433f341b0e8a1b1c38823fe05b0f5a4aad59f007 693317895b39b9ce0791e3b2cdf46f36fc5f4429f4340658e913973bfb6e9964 -lib/codeql/rust/elements/LitPatConstructor.qll 1a1c5f711b04bfc9b8b9a197564cc8acfeeaff1a9c8b30d57657747d84138fce 19cfa7386fd1f4ad8ba1ffe8b14bc547b9884dc98e731b6935afd11ceac6b5fe -lib/codeql/rust/elements/LiteralExpr.qll 031edbbd52d2107a3a7149a4dde306f5fcce9a32b7f4c5f7398b013c06ef37fe 7c18930dc7514f5fbe0a4248242430ee06f403b4e301c4e594355fc5b2fc8941 -lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 +lib/codeql/rust/elements/Literal.qll 5088223cfb4625a191c86f7c45d6b0c3b689f165f84d213e666f25828847b293 c76d8f97ed23b1c8f19d290d5cf367cf6e7820f1c7f7fd3dd6924fcdcd94ad2d +lib/codeql/rust/elements/LiteralConstructor.qll 6a80cc2175b6f7ceeedab2c06ca7f980ccbf64f6a7dda8c779fc92cecf91f7bc 177eee9c8214f2a776df18fc02754a6685f116aefe00d1444643eea954436739 +lib/codeql/rust/elements/LiteralPat.qll 1971f70ba0b872de28e1a168ac63d35afc123c5a710efe83b78e88cf949ff20a 1d00573dcffe4d4cfd444baafed38ec693035057d6b825e76e47d436fd08d02a +lib/codeql/rust/elements/LiteralPatConstructor.qll abe137b2b8ec9dd9450fc77d2d826fe891bbb0af23b0c26ff5e2d1751988f747 e1642805588737ed98eebec1d16cb0fb9fd081db203ec725db85b02c4837bdcb lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 lib/codeql/rust/elements/LoopExprConstructor.qll 635348fe22fb47c7e59bed02a8ed6420be5a9ce92a7d9bf4475465ee170c917b 2bcfe70247c55659b3a3e09562da52fc645cc3166748f268c5a38b35fca24233 lib/codeql/rust/elements/MatchArm.qll 2508d03a0a8f8e29483855affd08eca118ed756a18a60fc7ae6a9e5d63fae2d7 b88a33eaefe08131f7c8e80ca056c237aad9ef7c21deb2bf35a2f5ecfd320f55 @@ -89,18 +89,20 @@ lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8c lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 lib/codeql/rust/elements/PathPat.qll 748a43d1c25c4fd20eaf78f381e4680207557bb696a28d74a9eaa1887bc966c1 186c947b0bbed3111c9bdc564c3ce39432c1a3bbdbb15ebb503629625ffe1dea lib/codeql/rust/elements/PathPatConstructor.qll 476a38723c63bbfa2565946725c90f1224ac2c5283fde79bf14dcefce6f500ca e9e9b000cac44851772bd9ca519edc89e8518e89a0930df21af14a69f5b0e864 +lib/codeql/rust/elements/PrefixExpr.qll b00c0033177df5668f951689e3b12b039fd53c8618492b0e79a759712f3d3c81 1757e788a5a33b6ac4622752c1e8d7c2a48e9893116355b350b04836fc7d1e8d +lib/codeql/rust/elements/PrefixExprConstructor.qll 511dbd31bbbd6b31cfba4a8f76e05a9fe3d1c996d9c6ac77991059f26214775f f6d1b1a96e148debb6cf03908c07cf2f42e2891ef0c54f1705a477a4ffeaf34c lib/codeql/rust/elements/RangeExpr.qll 42bf1320c3060b6d225e7ece9bef54f3d823704a6aedea6d8af594a0fa676134 03a84ac76225e2a6172f6240af21478ad3f978b03a1b9e3fceba39fd0bcacba1 lib/codeql/rust/elements/RangeExprConstructor.qll a04153bf88dd71c3f516418bdb7377ded9db21c07f7ee6dd245ed8b44719d8f3 2d578f8dbc49da98694676d6a59bb9d58c6d2a200ffc893ffa90dca77878e38a lib/codeql/rust/elements/RangePat.qll 7df30b22d972c48151c9a0428245b9d33cbe3ed61a8767ef3cf1a82dcb949a85 33fe10d12a8d9abd4128fb6af4a61badf3204c538a1bb583f20a30df4ee42b42 lib/codeql/rust/elements/RangePatConstructor.qll c391431118ed6ce16f7b7126c5d43e61f07b98fab7b8bc48e9dfe22f7e21ed19 bbafe1c9595b0b004f7b27999a14df27d0710d5b058e7ab14dddd2fae058fc31 -lib/codeql/rust/elements/RecordFieldPat.qll 3bbdde1d7fcaaddeea674a7812216d3e25bc9cd7252ab190bfaf0d43f53dfc60 a1eac9ca2819871d361e751f3a180b5f785441310b182340637252975f2b631a -lib/codeql/rust/elements/RecordFieldPatConstructor.qll 36859753aa70086c540a1700495fe6c414521553877bfdd56800f586eb577743 1b31233a5e6da0bf88aaf40c52fa08cfbca5b44088cd3f91957ce8c96f4aeaea -lib/codeql/rust/elements/RecordLitExpr.qll 5dd804785e2bef9decee1aa1b4512dad799ba6b8e70c3fbe65a9a7bca029ed87 875a6b37072010496974a36b535e8ac656928b504b9b9488b31f81108a25102e -lib/codeql/rust/elements/RecordLitExprConstructor.qll 7b676a8e0fd9ba5a932988e613fe3dda8b6b0430feed8791ef5585fd9cd81767 f7811928dd8269138d75f0a6dd1c60f70d18806227bd2caaa5cd4cc1341e9286 -lib/codeql/rust/elements/RecordLitField.qll 09cabffa00afa3a1e7798b735828b613b2c6bbc03c27c1b3229c0b4ee43ba3be b1ec3a53f7370b2702d042b78d829bffd35b738365e93b289f0f30313ed9222a -lib/codeql/rust/elements/RecordLitFieldConstructor.qll 0f83c9dc00937d90ee0d64d157458145078f5f3c87c9c0484600fdcc830ab207 e2852d5bc4f0174d94b90a2ee34fae1e6c4b24d5d8ccb58a51c520b12adf8512 +lib/codeql/rust/elements/RecordExpr.qll 20d6b98d1d16bf20cfdccb75b77f012b1450349a756eefe16da56916188dbdf6 61a724e9cc82bd1617f2824d4b778b464284172ac5bc21c8f7d9730c5aeb82cf +lib/codeql/rust/elements/RecordExprConstructor.qll e27ab2bcb3af858fa8112a28603da8ba2357347339ca31b6bfc3ae35694a7db9 b947ab8999924cf578d2fa26902285008d4994d3b740ca956fb3e32b4bdede52 +lib/codeql/rust/elements/RecordExprField.qll 4eed8b07e512ee858c6407d6602dab6e45a4bedd62a526a1be979e3bf57aec45 af181dd655abead2dfc4c9123ab2bd3755a73394ec1312a4c145bef8c22aba14 +lib/codeql/rust/elements/RecordExprFieldConstructor.qll 17bf9cf80046b2c49678e221177e2f6b520ebb124d39308ddb1f2f0b93a3d818 67c91c4e7b8923888901c785b40cb90561e81a870d74e0760a2eeabc5e5a7d4e lib/codeql/rust/elements/RecordPat.qll fb02784f6f7b1e1cfa5e2f493dd3e9b084fba5755d237f80296bfab734b4744a 619b6fb3b14d154b3bb17d2937b01d0c4b2c56544bccb8400dfc3c2b848cee18 lib/codeql/rust/elements/RecordPatConstructor.qll 93c794efa5050b86c458470224de7f3206c1a004b46ef374780f080a8e9a4ce0 157800f342de96095e118dbcfa20f8e65cc79ccae712e8e37bff1ba92a227fda +lib/codeql/rust/elements/RecordPatField.qll 0ef9ff7a71d938a39d2cc220ba395426198c0de790f8f9da23090e95b65bd0a8 69e58fad68784ed49909b32948aec754828841067c7ec08338df1ec6ec0b5d68 +lib/codeql/rust/elements/RecordPatFieldConstructor.qll c105362a0d1acdd69bbb3b0c1f0ae2e20f677020d15d02aa9e7416803ddb3a21 5cdd18cb9c26197eca67e162ac080b7f17dbb46061419bad07c6f6d12508f642 lib/codeql/rust/elements/RefExpr.qll 4c3176d24c52d61dc220d0ebf0c277126975a7e4189094c5f36e0d386bbd95e3 dd143ae809b9c3cd1ca20e8ccf2ed2fa79f0b75d3ce3d92de5e88dad68bf7fed lib/codeql/rust/elements/RefExprConstructor.qll 4a2b9dd4ec2638a5ccfca268ba377980aab3179b27177e34e44e0e9dc6653b36 752f6f298369b8c0f59d49ca9e729c20aceb3559df68be416c7bbf65f578489d lib/codeql/rust/elements/RefPat.qll a273a13acefaaf366a6c9092f5a60e37bf8467e6d245384fad97a79f682cca9a 19199e218fb18920c5338e748106c53d13dd72b6b49681768b3781c93e277b46 @@ -118,10 +120,8 @@ lib/codeql/rust/elements/TuplePat.qll d9161426edabc199d206a3a1c2994bbda9430d7418 lib/codeql/rust/elements/TuplePatConstructor.qll 505c4f440b47da576acd7e3fc69d6b49e8287f981a21e79919ded374200f2578 b295526303bcae982ddd8c6b544288c0b8b8d62984d6986319e7f17baeb7a19b lib/codeql/rust/elements/TupleStructPat.qll ed443440791cf0868183c5e5304a855058ce78c1b3735507b5c35f269604022b f02c9481ea471b198eec0909d01bd3db03830bd98f10bcc3a2ca4f37b1466b79 lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb -lib/codeql/rust/elements/TypeRef.qll 13824c88938542cc554bc9ead335136a4eb115ec07ced03e140c9a88f49afdb6 4d265a4fa37a9df406d4bbbad03a69bcb3b5edd3152482fdb90676466283194e -lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 -lib/codeql/rust/elements/UnaryOpExpr.qll 9948297ab5799279738499586e4fd4457e7770db8f33461d0d1c3641498a268e c637101ddfd1770ed0e47a452b2fc4d210ea6f61f36ea968c23a8cd3032c4884 -lib/codeql/rust/elements/UnaryOpExprConstructor.qll 43db7afbd3535b7edc801d99d772233a734f4ed31eeee2ca74e7ab26cae33e87 7345f8d4cb958ee2fa83d3634285f12829bdd1cbac2697236d6fae062313ab6d +lib/codeql/rust/elements/Type.qll eac066a4d80006795d420d7000c69389eebe8fe8bfeaaac384a03c1cd829eb51 03549e3b3bbcc89cd8b9f81d30e8b567c846660824aa906fad846d1aa717659a +lib/codeql/rust/elements/TypeConstructor.qll 10d8f9157d864e1035a1773d8a8355e3b8671b1605377b7a8427ea8625fbba6c 02a2cd28ef2379de6fb70f5e68bbb5ceaf815defea15ed990cec46bb70efdadf lib/codeql/rust/elements/UnderscoreExpr.qll bf4c0bf76fa15b041f7ecbd492a499088bef2024b49dbdfa57232e84e72c3067 462380bac5f772c1986146d32b70deabc9f03581675f6e79f7b7f747acfb0bd5 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af0acb89883c5bc9b26d8d8d61718 9d869f83e73915bbeb5af27ea30b69f20c344cd7d7f253cb7dab74de20baa0a6 @@ -129,28 +129,28 @@ lib/codeql/rust/elements/UnimplementedDeclaration.qll 4d55b4530ea3dfc38fb41dbfd3 lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll 44f4590db81e7504de0ede43eb2a33a54baa0738732e03a90721187a1cd303f3 11f27d8a9836b78d9ffac79efa3441fbfcb1dfdc1eb028d2016a1769b8a82ad5 lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 -lib/codeql/rust/elements/WildPat.qll dda006b9e762a6f655842c2888bdd33c188c391adac2f2e79437ab1d4969388c 99cbb5c5d64f0bf7a20ce6f0d85bcaa065503505d42dcfd342fbce5a4704ac4e -lib/codeql/rust/elements/WildPatConstructor.qll 538cde83119510e0b3fc9728127cbf980d17f7f4a9371b4572de26329ab08341 66b96aee3862d5c314a2fbcc6930258f755189c4359394b432e8edb13a9d0eaf +lib/codeql/rust/elements/WildcardPat.qll 1c67ed3bf441d04a57f5d82a78856008fff694e534eacb8a96c41fa7b43b12a4 e98d72b2d9aa50cfb805dfc917d8ac454af60fde11e8139f001ebf67e6987e9a +lib/codeql/rust/elements/WildcardPatConstructor.qll f974e89eedde9d8a2a59562d0f5c87f6b00c61a428b7df734804fc87a6cf5090 36f5e961c88b0be4db1a907607dbcc8e0ff2f8e49c9eda0ead88a4da8af5b177 lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d11a926ce452588501731bb 848736c361d420945fbf670d6c126d258d095f7f8509ac1cbc949f5ba280f851 lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 lib/codeql/rust/elements/YieldExpr.qll 72682ae19d37abd6ec26569ae8f575979ebba1e0d373898211a9af4fad4979a1 ef0193011ee5f94cebbac5c007d652568f560685a213bf8be96cd0c0983a3880 lib/codeql/rust/elements/YieldExprConstructor.qll ff46ba17cc24abfcb0e310c7458d0539b704e7a771ad00853bd3a1844e4e6f82 1c13662ef01c88f1cf057d099eb46524036133e51a0e36ddf947f727ac6046bb -lib/codeql/rust/elements.qll 515e43d4d74ee62b20e5f9a56d28d405717586a8adcbab1c3ceac1a090f68a0f 515e43d4d74ee62b20e5f9a56d28d405717586a8adcbab1c3ceac1a090f68a0f +lib/codeql/rust/elements.qll 6bccd637e50ab9e7dd59ac18553d5c4a523e7883bf5261fd388715332cc7e500 6bccd637e50ab9e7dd59ac18553d5c4a523e7883bf5261fd388715332cc7e500 lib/codeql/rust/generated/ArrayExpr.qll 3fd7465da22e1eb810ae28ffab7b14e9ccceaab0082aa665f14b73d4221128b8 6e9edb5846656aad90283406a496aaae485d38854075a4443817b5098b72b427 +lib/codeql/rust/generated/AsmExpr.qll 66f1a4bfb4d32d99b4dab1918a1aac75e0903c499d65a18105e3c837c1aa314d cd5c8ed300b5f5d19e404cd2e5f9dcbcee1081c5538f1840359eb491eb6ecaa2 lib/codeql/rust/generated/AstNode.qll 0598fac7859906f4103124270dfb2fbdb838387b1c45000bf50a4b62c797ec41 f47c84878c7c9676109e358073bddab92a1dbeb4d977d236ecc1eae44d81c894 lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 lib/codeql/rust/generated/AwaitExpr.qll 5a6d94ba4083e00dd971f41be7f32693812cdd7f8efb9dc7ef0fc18296ed560c 7af5433b8e945932a453eededcdc931a62d85d1505c0b4e417291c694ac6cc5b lib/codeql/rust/generated/BecomeExpr.qll 62daf23501554f0b786adbee8e1d430323c6dac79afb8fdbc28d19dc10bdb3bc b17eac6c775fc38bca90a65caffe1294678aeab92d456fb9b9f555e1ac59a0b7 -lib/codeql/rust/generated/BinaryOpExpr.qll 54902ee8922ebecc3e6c03d5cf31f90a8c305601889b93177f413142c61d451f 56a56b576ac8ec7aed8778b411f7e670b40789fb63a2234d7144b21b5a9dff61 -lib/codeql/rust/generated/BindPat.qll 8ad576c6dd5d16103bcda7f7e08c19d088190b27b43e61223010bf79eaeaafb1 98ef91d831f66d3df84add160df863adefe4b3ae54c8f8d06091af4392c1011b +lib/codeql/rust/generated/BinExpr.qll 1e50692aa42f5b57b4644a368941b29f5941c7cd753be79be0f79340cda583eb 99ef64567805b97d83d31d55df728be74dab07af8252b9edad74b87bdd5019cf lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 lib/codeql/rust/generated/BoxPat.qll 8a856d3bc45313bb67b3411fe500c4fa508f7d80abcacb8bbe0a497624282b0a 2e0c7e16f437792c3de5d66dee5562dd7955a22a3e835d723915cc296d3264ea lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 -lib/codeql/rust/generated/CastExpr.qll 0264db34cb111644de4d37569791a2c27665f3a7373c26adfdc1d68ab0a6fcc6 3a757ea06c6e0c715d88bf1eeb579998a0ecc5560fcf3b4066bbd86803ffa100 -lib/codeql/rust/generated/ClosureExpr.qll 43d9ff09c156f1ce000c77bcf5ecc02c8fb569c0ca7f042a1aae9d311e18b13e 07e1461269e1f07144468ef7b64b927f29053fa6de71afef334732c33a797f33 +lib/codeql/rust/generated/CastExpr.qll bda5ec9c2639325ac6ffc65ef44bad0ce7769a0618925d93e59101c3a7b6b804 a40eba5690369b55f373e2c2d724e19791f7721c50365fa6ce1ac93b387a1ea1 +lib/codeql/rust/generated/ClosureExpr.qll 326e2de4da089a078861f5b67fe1c4f4afb7dc295e983fb13c08ffce1d88e577 7e39547d367be795891668e5fcb8a694689beaee3eae63293af1d7c9c6961875 lib/codeql/rust/generated/ConstBlockPat.qll 05141706ad963e1d9c41b004c73c9569fd0ba2f353da8c19629a153bfb17b769 786fa7db63ea7a8106162fd05e01b52c8338d22b9502d3638880bc6f6d678344 lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f @@ -164,71 +164,70 @@ lib/codeql/rust/generated/ExprStmt.qll 40fd3659761005fe0de2a09e58d35b3b28203f8f3 lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 lib/codeql/rust/generated/Function.qll 133693679cd69f0c011d6aa779b067924e8d58ea15bc3f6b749cc3aa5d5e962d 5a18e3be5c7c681cebec762b2c2d3b1cb08c5fcc11ef422bf65c9b15fc82c893 -lib/codeql/rust/generated/GenericArgs.qll cfde67ab0c0fbc7a889f62cbf725f2a6ef375d2a2dc806976eb9ca343ab37b3a cfde67ab0c0fbc7a889f62cbf725f2a6ef375d2a2dc806976eb9ca343ab37b3a +lib/codeql/rust/generated/GenericArgList.qll abc549b0a763d2f5a162794676ab8f9a2fef8a02c77dbd14467dbafccf261c29 abc549b0a763d2f5a162794676ab8f9a2fef8a02c77dbd14467dbafccf261c29 +lib/codeql/rust/generated/IdentPat.qll 981fac200aecc4fc956c7fbd68f2516b5bd66be241ddefce21863ecf582bb283 8f371c7e08013fdd641d090c4a07b51b28e64cfe7114ab910ba4e151e5894e7b lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 -lib/codeql/rust/generated/InlineAsmExpr.qll 0fbc121595d55df71a9190200ee8d7244851c517181d907d07236a8c338f1ebe b41cad499ebcc6aae4326ac5ae596210997fde99b6107feee35d6c9f764f0f5a lib/codeql/rust/generated/ItemStmt.qll 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 lib/codeql/rust/generated/Label.qll 25121c47ad829d209bbd6b4388a8878b9ded1f25e5b9c0f992e88427b3eaecae 216e68ad49218a21466597afe2a6aec20982715642aca726235cb4075cbc1cb5 lib/codeql/rust/generated/LetExpr.qll 377099647451717af698677ca7119436982354d4e038a2097bffe8f34ac5686e 6bd51c497bcf2a684c1e6a2515e67228b0146b47a65e8d922cab54faf48b0d73 -lib/codeql/rust/generated/LetStmt.qll 39b49089d68052147935f226bea75a49fdddb42ff1bb2e700ee7b698db5ffe92 1078a1b9e20ae83a44dc0c12617ed53d79896d5cbe353a900accd78ba46dc960 -lib/codeql/rust/generated/LitPat.qll 5009d9fc8d11a0fcbac379602635e6396f95194f69eec3285a4745f662c23d0a 128f5b9a394f79581ece1796f68288da827b100d5f742e2d3873860b441bdea3 -lib/codeql/rust/generated/LiteralExpr.qll 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 +lib/codeql/rust/generated/LetStmt.qll 5d347ca3dbc1b6801de1b339a7694cf6fb4e4b30731356321ccab865d5ab6599 506c4a9745d0e014c600d23a2eb7862a069902b1ebe79dc5bd346147e3a08bdb +lib/codeql/rust/generated/Literal.qll 66f362fb7e464f1d1350ce13465b029ae14673c84dd8ba7db1bc66083c3da4e7 66f362fb7e464f1d1350ce13465b029ae14673c84dd8ba7db1bc66083c3da4e7 +lib/codeql/rust/generated/LiteralPat.qll 6cb250e374f6c3d2c86aaea6ad7baeaa40ee438b42ac6987d823edb91b757d4c f8cf9ef6bb6cd39d65c6eb905f11f79c65daf3d493e1240c0781be29c3fe9202 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c lib/codeql/rust/generated/MatchArm.qll c82a871b33633dc5908d6abc665048b0bc3d761f134b8ceca51338c4a84a55c3 90faaed01f5e7c3ff6b9114b275c80418737c48b64082763e83cb63499fefa6a lib/codeql/rust/generated/MatchExpr.qll cf48ca2000a1cf2b2fa05b42403bba9be94aac23a88bc88e1b97e86982ff4fe9 244960785828aa62c4c3d17251ef5a3b7dd3ce3e10fd99a364f98f760ca84e77 -lib/codeql/rust/generated/MethodCallExpr.qll 83288ef71bb5f5ba9aadc3977ece9144b3eb58756270b9f76eaf3323153797b6 7fd96a56bb1fc0caa60b52d55a0cc14cc87bd3bd057a970993485375f9e3198a +lib/codeql/rust/generated/MethodCallExpr.qll 187d28d3869f5b44cca8420948266e8370ca1e3e389dc3317dc24364c8d53088 7a4744cce29b53ca04b6b2eaf4fd146b9a64e3f53151e5c6cd1085fc35d50823 lib/codeql/rust/generated/MissingExpr.qll 34cb27c927a62cc06b0fe26a085e2658abd5019e549c3e01b8273d99e9a9616f 34bf4cfbf3659b600b4aac121f7c2d6da0b00b61c3002f8fb1d554c11968c748 lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 -lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 +lib/codeql/rust/generated/OffsetOfExpr.qll 5f2c1d2b5d63d2a86c02c8a20fede528403f8dd267f3026ddc420e128f53c73c d4a7eb9e533a943913aa3bdc6f57d89023a0a2075681b6aaa53d5c4dd7ad764b lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d -lib/codeql/rust/generated/ParentChild.qll 68f8595b5d6136e7b29dfa7d5f4a6e77ad4f7feea9c40a0408e41d438a0a9159 53246623aab7cfd38e8c094dfb09c2ddd3adcca52f568814f672539a4d35b064 +lib/codeql/rust/generated/ParentChild.qll ffe3bb352e1530ba64a394a70541d86dbedebd004a201b94c1b15d368b127319 1c8f74ba0bebb390ee774bfe295c9b25b466e64fd6ba4a1a4f1655885ecebce6 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f lib/codeql/rust/generated/Path.qll ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff lib/codeql/rust/generated/PathExpr.qll 5a82e07a0c641fec4e8ce29656fa4e33f420b19b2556b418769f4d899a3dfae3 21920262735114d8304c3569f884828a390b95ca039afcc3e81c75d3f23df9ca lib/codeql/rust/generated/PathPat.qll 8aaa7fd5f3439ce567f4d6f729e3ba1e98ab24255070b7d4ba7bbde6506d97f5 10bd82ea0e846c96afa34cc6e467101a490a1191b4edc29a7154a6d93a467f1c +lib/codeql/rust/generated/PrefixExpr.qll a3f6cc62e5a12acd253ea59cb6957fb7157aa709b888eed3cd974eb88e1346f3 830a5c729ed770df6247dff8adacce5dcf7f3a06649177ec9542e032cd4993ce lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll 5b79017778c820d208741ac58b57e662279e52a34a63420be55742f22aa20998 2ba908f867b14f2fc0815f1265f70d71871162b3abfc9d9ee55761be794a91a3 -lib/codeql/rust/generated/RecordFieldPat.qll bff47b9ec13fd5747a9d4597feb3acaacd17876ed1ff411bcecf605c5909a01f adc2e30ae9169b861ce28c6c21431e9dd3fb3d3f832e99cb39f9f0ff6b1dbe2d -lib/codeql/rust/generated/RecordLitExpr.qll c83dafa1f07a34c686cee81188045c9e04aba5ebd54c4778708f1b20ccb76702 da4c710226d6604c313bfd88bfbe005c6178db054860da265de616e9a5a8b3f3 -lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 -lib/codeql/rust/generated/RecordPat.qll 2c1ef4a18148a5f0f755d04a3b9d1cda892f784e1741c2d90601983b2e130ec2 559d0ef93a3d93c9236eb2675ed5b89cc7dcfe599c52d784e6759954e478bd47 +lib/codeql/rust/generated/Raw.qll a6d94287077dff8af5d7d41af29589df1209cd22d996dcc41eb4c5c9084eb064 8d0159d571217c6c89b6cfd27975a9a5568051e2799e69c2d39bed9ed36822aa +lib/codeql/rust/generated/RecordExpr.qll 7099ed90ed466a3c849fa78e3c934d83e0d0fd6d8be5fb774596f5048f299478 2efb691f6f611f852253ac08be90bba6e25b695b8def83b416110ca63a790d5c +lib/codeql/rust/generated/RecordExprField.qll eb06236fbdb856169dfe50ae1ebf59384222de6670ca91c34eed647823dda4ce 750bc7ab1e156db3927d6dd206e9d2c9388519425c0e8665afd322a6594aa5e2 +lib/codeql/rust/generated/RecordPat.qll 80ea7a231c3e33c539d0fd892b1cdca63bada265650f5eeee6d76b45b091be0d 858af1b0c992af44ed148ded54c2ce7cbfcb9e747110255bccfe8dc33ca655cf +lib/codeql/rust/generated/RecordPatField.qll d862245163667ede676e407f109ad44e4ce732de59ea9025b696dd8b9803fbef 60166a21d7deee112325bc301b5893cf3072c4d8d095dbf9080cb00269b71d40 lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 lib/codeql/rust/generated/RefPat.qll 2a451553084306acc625f0433dc02546d07a1b6174a7d614379c9e8e28550118 40b845320c68283d0f6e47f17f4d4d893ef613f41422d35663582cfa3b5e7d75 lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb6f88638826dc37a712c05afaa c2cea180b7c068a3483cbda73168effe762ab2aa56bb8c590c8a15b6e54961ce lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll 73dce5e310068357eb41e8c51923ff5c4054548db27987cde85735ddf071fc44 67fa0c285c110f18446689d1eaad9e82896df79d62999ad3f788fc295fa1d2c3 lib/codeql/rust/generated/Stmt.qll 58b010f32956f2736a7b9ebb43467ecd03308a1f27c99e2b09bb925c349ac859 9859da4a4aa29b4f7ab47313b2dfe8baf9717a162fcd8bd62a7cbab4afd1886e -lib/codeql/rust/generated/Synth.qll 8a3569fcb4678500a7d16673f8c1f014bfa9a857d0b8cdb0f77aa3eea5e31206 4e26058ad665dcb0ca95a1a504553fb5ec32500b4dc154cbc5854f48829bfb9f -lib/codeql/rust/generated/SynthConstructors.qll 7b696491e21b37bf5de023b68838e5c09112995f0da436bfdde13c27dd35c4bf 7b696491e21b37bf5de023b68838e5c09112995f0da436bfdde13c27dd35c4bf +lib/codeql/rust/generated/Synth.qll e0f3f080170ea9906c3969c0ace3b4852e9c99369bc8aba7b90f378e9aae0b4e 63b2dc0096f382743898d4958d7947bafa44318f192c251ba6b2d0cb4db0e44c +lib/codeql/rust/generated/SynthConstructors.qll 59c6e7ff37e6b8a2eb9ef8cd4546adfa4caeba76fa0c13d36e9509c3cb0d689e 59c6e7ff37e6b8a2eb9ef8cd4546adfa4caeba76fa0c13d36e9509c3cb0d689e lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d2493890e79c28c485f512a1 5cc082ea99de61662b2d4c8b59f7a833236e7e448943e8ee894ab6066cc761c4 lib/codeql/rust/generated/TupleStructPat.qll 089563349c9866f5703e9d306ba2a475d7d4002e7236dbbf2feeb89290b4d24c a77842d7262a7d19b175f239d1ee6550b3b66a4efe903c5112bb82c0abd7b05d -lib/codeql/rust/generated/TypeRef.qll 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 -lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 +lib/codeql/rust/generated/Type.qll abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f lib/codeql/rust/generated/Unimplemented.qll 0bebbf22b5a6484077ceacdd4d11a14665b95cc9e68b859f2d8218290842d1ad addecc8027e14ebbcb2eff4d038c16aa1f33f100e17ffaecd5de36b9a4c719a8 lib/codeql/rust/generated/UnimplementedDeclaration.qll ab05ff0a0fde6535e89ccb9cf197d97d722773f08bee5c0c742abeda956829d7 067be19ce1a963e59635e08f9eb7a3a7284874f45c651bdb1fe36509b5567912 lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 -lib/codeql/rust/generated/WildPat.qll ce495ae13180df09d134f295d67fe2d9680372784c5095bbd9302ef92a2163f0 ce495ae13180df09d134f295d67fe2d9680372784c5095bbd9302ef92a2163f0 +lib/codeql/rust/generated/WildcardPat.qll 84da49dc571151b0c5e0661426546a53d499ce37fe927ca07f67c4977dd70e16 84da49dc571151b0c5e0661426546a53d499ce37fe927ca07f67c4977dd70e16 lib/codeql/rust/generated/YeetExpr.qll 0e673204c592b6025570098b14e0378a0e0c68d13be9217ce1543f2781667d42 6546ce98d42717d4e6932e1add628591e488d063ef2a79bf093b831645342e21 lib/codeql/rust/generated/YieldExpr.qll 8f28a069a4a97d17a10b92200766f57ef0d372b88dd650f909167c7b3d643cc7 a0d8578c4f69e042788b7e1a8c066663541f1782589ea7521741d0b801ca0661 +test/extractor-tests/generated/AsmExpr/AsmExpr.ql 009b9c7470dc71fbd8bb75e17b180df196407550f0e4ddb9b760b58033c80245 03c2a6c81038d1f81058cf9d59a239c72db7f08e32faf694dbd976e93aa6fac1 test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql fae7f09b653698aa78626a268711bbd8336c9d6572ab9fe85967a8bec69e33f5 91dd5893cefeb9fd45dea49962dfee5a373be790f5ab3569f79d9ffa05613033 test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql de0941b5e2fad01300b77ac6db85ec37bd85b7d508b01e2b8a332c1ab9f6e787 7f9bdd81447cbc5a63b09c41a7d0edc15f826f7e672c518dc6fca08ae0107639 test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql 75f59d680d0f559dfc586306af2748c59c15789514a4ebca9f908ccc1fd63674 1a9f952485846fb93fc0afeabeb07845fa5c026520a0542302f971cb6b4d8e3e test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql bd2a401989b0f452b448fadd8d456dac9c46ca5ffe3775e5ac46e755782a4f20 c1922cdd6995a9c63eb841abf09f575bc78ec0be222062034b89ff63649a875e test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 5661cb0d7b2285af31207232de2b685e851e4d70224cb16045bc0221c107de43 1fd41642343791d9b69e0c633ea3318c0a855f51f50062cb58225820a7540d50 -test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql 555112b0180f20ccf917bf83e4b04ab104b194a46fb072ebc0eb3b99c2b3b406 7c085b42741159fb9fcc2debf6f127e9b1a85901068697dc3794085ae732736e -test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql 176bcb2058a63081f2baca1b03b4a0264eede1606ad9396da915963fc00ca425 e4246975686c75b791041ea3f8b4dd428b0f6424d5833ab563acc23da1c77356 -test/extractor-tests/generated/BindPat/BindPat.ql 00c244d85566a165a9cf4d9b9238b76a5078c0864551d3a20ccd03bd1db24ca1 458db9febc0e9e6aafa1082a89017aaea60f3f93ee2fe9d507e82b79bb7ae222 -test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql a5254ffc2e1d0adac0952a1f367a1b089dcc6a59a5e35ef64b5c187419a39c1b 47092f6e6143d0c9996454c89e515d6a3547530416ffba64be60a09b821c254e +test/extractor-tests/generated/BinExpr/BinExpr.ql bb749e937074759573200bbb343398b6f4ecabb35fb3b35f8adcddadb0266c21 5e0b4d8d200ec43345775da8daa173ef79934d0e8259174823ba019fbc36db7d +test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql b50642b0c85f18bc96ef26f13251a3a34ef5bde2007092194324023c447446b2 8cfeba7f4bb76db88db4c4524f1840905f8c77a97212110dface353cfd6e2a11 test/extractor-tests/generated/BlockExpr/BlockExpr.ql fd1bc52af4bad96423cb86b1eed02595e139e533f48533299e32b7b45360b47f 021b58c6e6cad40cc0707d0a78fd8c4ddbc529422d3bb9ac62c490b2abc1bb00 test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b02c87bba8bdbeffab05632133a17d36b355624d7521083cc6c0b02f88b2ba46 91141e01393ec04f4bb1f86373f5f25c837b13865ab540419050e6c547cc2690 test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql 4de30a1e3c9de174688b8f9af57f72dfa6d9a2e3b3ab1b972ee69342ebd7ecad a6948240014d27fa9af7f56859cff2f8f7b44097f0bc47fbbb91b5be35e11d91 @@ -240,7 +239,7 @@ test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql dd9b5ac06b3677eea0 test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql e338d2582b191d4ae1640504262d5a0d5ed23ddf850b5adfffb679a057f55e5e f57e618dac8c79d70e520d1508e70032662db8e4fc43b319365e195efcbdc847 test/extractor-tests/generated/CallExpr/CallExpr.ql 2b91a02ad6f2ba6e200b2797dabda4dbcea08c7c2836d0a1be4bf47a7e7d786c 6830905e8993836f258c84b557f0f044dd5ebb32dad8d74089a903ca0d820eb5 test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 0c7e6eb1bab788050c51ae36b954925c48618c5d6fb3129522eada6d911288be 251ae5a7119a2cfe427650c38e7df5d3c0a1711aa7a2ced21f5022798a5088d0 -test/extractor-tests/generated/CastExpr/CastExpr.ql 40308d07046e6cdbe8d4494c41334c7191b377c589cac97776da6377fe0a4c34 47716185cbe23a7bbb6d5e69d737aafd1cad66024ba6600766cf9b7871546db6 +test/extractor-tests/generated/CastExpr/CastExpr.ql 302ed396ea5889cfb7d36d307055cb81965534c55ea00a8dcc2a4949de1f230b a32fd4ef4f6d0410a8d57a150d5bec8bc0df9aaf8fbab74d17b52a0665e7c488 test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 75fd05fb47e90426745d6c8ffff35cbcba3fb0792317155d0a139b7a4b87dd14 865a776a3312ef5e93a9a857a6ad7d66233e58547c4fa3ce924dbb320a324e2c test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql 48fb8656a350ba16cc3cd291692b542dca137587ee971999c439700c74e6dcba 5ff21525959142237ee1a32c9feacf331083fb40502df6ddf78dfb8d93caed66 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql 34f8b8fc82e0c798f3cddc7ad1bb80a361c95da9d8a768fb787d6ffc3be1c755 9c14ee19cf74f516d201b8be72fe3496e425cfd42db223fb537cc92515e2b021 @@ -255,19 +254,20 @@ test/extractor-tests/generated/ExprStmt/ExprStmt.ql 037695af057183ef9e35569c9255 test/extractor-tests/generated/FieldExpr/FieldExpr.ql 6d85c8b85905baf66ae1f6ed716e42530d814f86261d98eddceab861939227e5 5765fb0376978a9006e2dc175bb224c5c944f19ddf628a2b933b1bebf81015a2 test/extractor-tests/generated/File/File.ql dec43be882fad904fab0c6447ca93633d801cb08ff8bec309befde7d2b9e5dda 74e1f1d698558c35fa03935cc34f4c8145d376b56d7657b18aeb338f5ca752cf test/extractor-tests/generated/Function/Function.ql c49434420dbb6fc3d9e6294161dcd3d3b306fae5ba5c85b610e534b8b15ef74c fe02208b673b74eebed92b5cbb3a8a06c31c0681eb28f3e596515663f14fa9e2 -test/extractor-tests/generated/GenericArgs/GenericArgs.ql 206e6d302d0b76b7b4493bcbb2836509b7301873365a32c1769da084db243474 47dd2c22290ea8e726614419247db69daaf31fc6a0a49d3e2e3e5ce281bc1e1f +test/extractor-tests/generated/GenericArgList/GenericArgList.ql f03097d3a9840ba08efa367d9da32011da8474e078eb13e14dd8a17955689887 57b9934868d324e7e99e9e79b8c3e2a5f760ba9ed6bed98b537dc3f5580253bd +test/extractor-tests/generated/IdentPat/IdentPat.ql dee6892ebf23f374f8e0403e7f6c4006f958159ecffc96dde8e4244e689ed7b4 0b48b337bc9ddc184ca240e3aafd9f5fdcfb1348f0a4e80106d4ce6541567f84 +test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.ql 725da30485e43fb0c42e6f888a14eba4e2f9d75cc5144d2c9831ccac5eb10496 e680e324500a34d3c70958f9976f5e3643e3403475ef57ccaf6d7a402b40f30f test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e336308af6908cf12387fe8bbaa3c8c5360bd 28b5580a4e628286023b5d0de549d087f0a4224ecbb02bc7b3197d8f404b5066 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 -test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql 34af9ef48d7d8d6dbcb063170e2a818d2c288ea964df3173248866f790e12fc4 594784fda228525bcd2e17a9b9a07634346866d43d2b4ae262ba7a786c698932 test/extractor-tests/generated/Label/Label.ql ba8cbde90392eef8f9faf6177776272dfb000abac260c6231fb00bff46ac1a39 4718da4da854e89513758c964f11117e329ed00e548e14890ec916c93500c529 test/extractor-tests/generated/LetExpr/LetExpr.ql b311fb10d3a65cf682ced02aa4c9b589a84cb92adc653fbe630d471d88ca5f8a 3d93cc0cda8a6f34090d3000fee4a14e31fcf0fdc4d201a8d414e27cb8b9e4f4 -test/extractor-tests/generated/LetStmt/LetStmt.ql 401f46acb7db90d6b51d6377e9257341fb2e45599ccd38e3e1afe7ce347536ee 47315699ae0f539dabdc040e238c27463790c710aa78fa589954cd800d35911d +test/extractor-tests/generated/LetStmt/LetStmt.ql 842f58d8d744a567c44bf3742e4a9146339184903e0e119506b17f2958596bee 4900bc11ddedca66c8992b6384cd7bc1ae084bab93452bbf54e76b2e4342e46b test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql 88bd37786d0a738d2cb0c861a2411236d9dce09b98ff050b5f03b0888ed2f521 622d96d1e99fd174c284b7a3f05eddf30faf667cddff2eb942e01128488b398d test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6e9a36a2a226ea0df1f01886bbd4e14997eb91f5b9422e37ce4985fd15a80622 ffbc3d9278e10aa78304cbc8876d96fe678a1d2f52ad170f651f842d1787156b -test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql 845088548371993a0926e56d8493c72d2ca9b4b901f93bbf4f3b305897e59395 3586f8acbf01230fa919c2303b4f8c07b5cef30855902776967d60b4d34ad90f -test/extractor-tests/generated/LitPat/LitPat.ql 002578790ccd30a33cd107214930d6c3c49dfe5c166460fec44e2037b3802b27 7f5c2d4c18f6d5b06c81e49dc08992522148acf7f04c24d0b8914e9fb504f007 -test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql 9fb9c6336d1e3a657d988ffb53a43ce66b8403e46bea05d73d546ae774a647bc 708e2878eca3e9661e8b0d54180b4a6f512d9233178e9ad5683a1f72fa9656aa +test/extractor-tests/generated/LetStmt/LetStmt_getType.ql 3326644b606a846afbd2eaf8ed4223eadb0061e23e953d085d2a3df0935ef534 c414e5a1f927779249a26c370ba07c82c99d489cb65f984003674b288a690109 +test/extractor-tests/generated/Literal/Literal.ql fac18e7ec3d9a78223be0de6f318eb93e9986fd7cb353a68fa853c96db4bd0b9 048ad873316f227ea289533d2bb6f4bafab4625f270b109e29dde28b0c3828e6 +test/extractor-tests/generated/LiteralPat/LiteralPat.ql b7636712d6a5e0b76c0195444514284b9d81ea948d42f19e683e134fe61f8a9a 9836c86f457b967ee9f5dd06f3c3206131d41bc838df60b5bd0ee8369a9a88fc test/extractor-tests/generated/LoopExpr/LoopExpr.ql 58dabe29df959b265fa568cdde1b589d65ca8649c8aae0f30079565c1106ad72 929fd3c5c4f01f47f926c49f1a519d415063ff23d5e1fb2f2e8f72bb5aa7fdd6 test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 1febfb8cff9b4f7ba1a658a2832238d2355f0f609778af33a3877e977aaf1805 6b9c008b041beb1c0a7e249b7f4a1bd5cea0885f82543a8909a23a7068f1f837 test/extractor-tests/generated/MatchArm/MatchArm.ql bf1ff34940f8682e69450bc3429b0e071ae2e31b94699cd7579dddf6126f821b 83329681067983788ac712fd72299719e4cd1ce85cea613e373751e6bed05f42 @@ -281,28 +281,29 @@ test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd9 test/extractor-tests/generated/MissingPat/MissingPat.ql 7a9ee46a40f6bfd31336beb6d9f6256fb8099cb6c052ba3131a95a45716224a4 619375e7dc6d95b8f1d1c958217350fc1553882f0f41ebd9f7a071d6947232d8 test/extractor-tests/generated/Module/Module.ql 0afd07f619ee68a7f7270ebf9a4a6b7d6849448924083369c4101650854e1e77 b3239a1ebdde858179f4eba19e6c0cb3ea28b823f423fdff90f7b870b7fbf003 test/extractor-tests/generated/Module/Module_getDeclaration.ql 8343f2b4be470a502c4bfdba9ef74173a440f45b7300aa9d517c2bd68ccac36a fc7666228fd1d3fe4fc63466aa04ee8adf62e9fe0008fd92ea337c8585a7fef5 -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa4c8e4e79bffd8b7a797bc70a68054ab51950dbebf4f0 dd92801d8909d83be1f824a2dfc599551c11b63ad1e96593e22d3b43464d7cf1 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql cff3a4a196eeee98e812ae7c8bbab4a381cc3f0462566b699fd7011e84925476 60c002bb0686b853e72b12f092433ab6f5ada0f556629e0711ce8b23b260fa89 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 test/extractor-tests/generated/OrPat/OrPat.ql 51d9a0f5993510542a2cca353c1ca48ba1e5fb97a65bee7f02398cd90debaa41 06e0936b80a07a16e22fad3a3a541000f170fd5ad301a3170b98a91f51d09144 test/extractor-tests/generated/OrPat/OrPat_getArg.ql 693d62aa9817ce7661b4698c2948bca6567c1376b2ae832f3020462e8ab8d2ee 1fd9809826c6f2dece3014299f1d70210c9f23e5eefbd04b1d6024e1ecd46209 test/extractor-tests/generated/Path/Path.ql 331bcbea004111727f36fb9325b53bf1ac87cc62ffcd68659636fa68786529fd 94ca6f7c3df16779cf6b340099330e5e1122d2e58708a8ab2aaf0f4c78a92200 test/extractor-tests/generated/PathExpr/PathExpr.ql 3013e12d5dab5c38c5b8fcaec59e78a3c6477f4edc8b01b078ecbfe7b8f82ffb 40427c9d420456174e1524ed046a5f445b9b72ca8b87abefb6c9498d4c809fc5 test/extractor-tests/generated/PathPat/PathPat.ql 57dd735fe179cc1b91ee66b7849bcdd1aabe661762e88e1678cdaaa53526a10c 1734a45d47ee484fbf2cadb5620b28874a904fe944030a9e39166a6a25aa0de7 +test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql e69ba11e6509519bf8cc527d21aacc330eba756a49b2b6c88422837aa0cbfe28 77424ea4db666f93de683562096d435dc88f141bfc0b1122187067299a775183 test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql 063ee8f6146110b97f4ee8944a5f37f0dd7cd5be049f13546d42a888a973d826 1184cc1fe937a01e9d12577478750be1497d4f99231486ae6d75104e7304eeb2 test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212f65c522387f726b2b9b3f204708a2a764e238aec8d89f 8b3095fdd9c6900eef656d4e9e18f5f4866b285634cc725e73246976af20450c test/extractor-tests/generated/RangePat/RangePat.ql 4cb48cd2a96ecaa3998f70e2ef5b117749448d9166af743d3b8cfe6f90938665 d5a894f6e56b28c1438e37191ddd623d89e4eb07d5c979ae3795119de9d01e49 test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 823307f0e43fe6c02843417d254c6584e2ead04b961158f04494eb8197b9905e 016805e6063be3846cef24a5680f4f17e68ee9714430120aa91fface3461d97c test/extractor-tests/generated/RangePat/RangePat_getStart.ql 1457a38514bf9fa7de44a4e5e3dd5218410149133074252bdf64d5eef5197d43 e9a6393aed20c710b2f19bc6482262664d8bc0245b5dfc35f636aa7966e0dba4 -test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql bd8fedb8c890b305247815d7a8ba8dd3e7dbb76283492edde9f9e7374bdfcdc5 b54f364705483b1f21fe59d190bddcb12959182f8aa596ae5f156abfdd08761c -test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql d31550e195d6642736668ee2a0b0c370546dbd8d8ba77c7a0d266b4acb5253c7 8ff659dcbc2985dcfc04246ad16294701db1c012a37d6743e1befe5746c25def -test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql 112614052020c4c775f77e3773ad83b6747bbf30a4d0fea70642f570e2879896 969642f51f1d106f096fcc77002bba057054180c3115ebd8ffd8a69fd0d8f24d -test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql d01bae55f1e11a8527e8514262e6b16ec72fad9d294c33296a6c1cc750d910c1 ff680b4716a360b7b91a8d83ba8fdfa570f61369a25b17bcaf9b42a3987257df -test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql 52cb0c020da2e5cf42ab94a9a2379c1ab5f7f6e2ce3763cb1d17e4173841b997 ed8fc6fc13d0f2be9c9c2f0d38ae1dc05824d44e1f1a72844b21f948d3f330c7 -test/extractor-tests/generated/RecordLitField/RecordLitField.ql d27c55513ab2ee8ac62d05f3552476ad5d8c05eb2e09f7cd37f8c4821aab4979 6545caed544f2898706d2cd20854cd15caf2198326c38f69814d50e69954a089 +test/extractor-tests/generated/RecordExpr/RecordExpr.ql f9760a715119ffa6a888c25c9d786457e1c982933524dbd5cae974c4ce36fff8 4d2b69b2f4639eb598c2642b42c2c159e00f13ceb39e6c15c5998571861f6bd0 +test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql ec56578c4110cfb348c5b0e298edfe972e26af62166a3e75fbb3c307cab83436 ef69eb85a20c9de83de98babfbf158b281200527fa71fd44cbeb1a05636ed62e +test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql 6989f2b785813685e2233476abb13c0041a417d6a7e33179336739160f2569b7 fa1e08ee46ac863fdf69fc71b1823f18db6195aa66ea4a228c7c8eee3b448130 +test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql d221a3847a077d3574de6ea15ccf433f1bea24baa1080eb90f9e3d104f1ba22a 97b325e5fa8bc8af4968dc96bf5930d05bb4083d7a945ab6a34a55a7016da09d +test/extractor-tests/generated/RecordExprField/RecordExprField.ql c533740aecaae604d5c7d3261aa8df511d837b19fd74b4f88897373da6d932bd 037e33faf0195cb67314f7eef9571088391586366bf71a6fef3ef83845fb573c test/extractor-tests/generated/RecordPat/RecordPat.ql 485dab5489881a9040d841999fdc9eedd5fd34ed2c0847f9e9a8343c0d24f26d fc3a104ffd48af0d26ea3f2266f0fa5acd32278f8514b6f261a5fd77e5ff90d9 test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql c23dbde4d3c8ad1ef418e06a7552390ebbc396a218a660b103d9be08a7111960 5a10690bac5446a52f2d8b0dd2c4d7dd742c4a60e91b47a5a7f617396ce0adb0 test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql d2730342a2203ad7d6385a64d53874050bd084fe74c05168df223499f7e86100 0d223ccb9c127100557b70da89f0c6ec7c559babc885bff46b97f5cb7b877e63 +test/extractor-tests/generated/RecordPatField/RecordPatField.ql 70babedca815ef3a5759a398993cd20645a43d45ada0e71ba68318811274606e 24635139cc3b95bfa36921008ff1db0455257ed0a0384b10ac267dbd4a125fb9 test/extractor-tests/generated/RefExpr/RefExpr.ql e859cd59dbaa5aa5555aa13d4a75b7bfe2dbdb2d5c50675f3753adaaaabdedc2 d330ee941e9932054c32d0be5a52f38f285e4dc529821759ea38633f8ddbd517 test/extractor-tests/generated/RefPat/RefPat.ql a5fa2a4435c11a935c0ed2dfb925874d44484dd0e0a6e31d50db7c1f63b1efaf e85077fdeb58983542b8a78f65bfc8498121fa699f5798c48dc59f1b74fa0b04 test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql a883874b6db9c084123b795ddc4b972f41da554a07d41b7d42242a4b4156ccc8 4aef5ebe3124ea3e13851df3e65d430b64740a3fda2fa4be4c6a3634e9f00fc1 @@ -321,13 +322,12 @@ test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 2d14109d39c7519a test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql f308a61384af5feebc58028a95d26499b6a666c7599b30aed33efbaca86c06b2 f298af5a861410281dee6cf22d3ceaa286a5be4d27968750321f2d016c34a0dd test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql 47e84e7db2d1cc23aca4c28b5bba2826eeeaba07377eb8c8de5141bcb9c36ab8 a5c1d23e2521c38b12c0942c88403bea5a0d77a4763f273ffdf48eaa000a00ff test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 5f19a261ade6e3249029d7268cc0385092234a896e72ccdf8376a592be1d545e bb4fefecefaa2d9634f31026e5ec8bff561bacf55a4105727032bab08fdbdea3 -test/extractor-tests/generated/TypeRef/TypeRef.ql 73283955206c7e1ef71009969826e34c7f37624547c2ef39c80a23583cb37216 fedf7995b69805ce7ccc4e29aa592043cff2f7ac6730a70d27ed883d922b4684 -test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql 3e530c5beba93710b686d0bdaa6edfa58e13357be48bbf038c3a47c280d0bf08 0b0003cbebf44d0d2e3bcc1b318e0a4e90638dfcf3679ef6924a8461e81feabb +test/extractor-tests/generated/Type/Type.ql e4e62ad1209870ec39455fbcf3b2e6fcb8c46e7b6fed9b9054cc4a7c0999529d 42ee022e1811b81fb3912fef9f6b55b15fc2ed99f3e48d2a8ca9375c7c6d71bd test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 54cc3f7e6e9b9ac58922842dcd1960250e8bbb7ede5a63134ae622abc447be1e 1d5558d4ec9e4a1a510f37206772af3bf41015a99f1e9b83cc530db496dc2a5f test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql a743dbb15736b809e30769e1ea136afc9f0226885139150d6d1a5d353b6cb6fb 09849f178208406742007009da7f9b359b814477190d9d95370b94378e60be17 test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql 4409e1c39b7729dc393a0d60f9d6aa0dfeed294a090285442de85ce746095eb5 572d88a9c879905519d9a63d5937949771f9c163ee2ea8ba4eabe0f16c28ca67 -test/extractor-tests/generated/WildPat/WildPat.ql 3243e91456ddd53ba03241a36d95671b3e7927f2d47be8b6c16b058a873875ec ac0ec7d99a2decad380e564dec6bec27a5bb98171e7458b6a1fa31c0d59e6c44 +test/extractor-tests/generated/WildcardPat/WildcardPat.ql 375da3e10385e17ff4005528e08629ce4aa6a796b2fb3aa20178f75615af0ede 16823ab6240a113c005136cb3747bd3e69de4b4e341eafb2d1f39956c7de749d test/extractor-tests/generated/YeetExpr/YeetExpr.ql c5919f7f2f42b7dc08b0fefc553bb602a772925c226c943e2c96158adaea7797 a5bfdf225d9f9653f5aae00f30744d03f7d1045ddb4469f23e57194b3b1a2f8e test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql 4ab79339d3f0a2a0334f66a7513ae5d27bcd608fdaf557da71757896e20f81b7 6d7b9da72a325b83539da4f353df2a0d4fcd11493773547ac89031525e7cd1fa test/extractor-tests/generated/YieldExpr/YieldExpr.ql 3bf0ed6b4ec11dbe8b6af6cb0c51813c193e17bd9df0a23cdb1bf39cecddd915 0ff0219d5356bd9cb62df995577909898b4b28e0ecd860339361731e4f64e703 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 8fe184150696..ce944d9cf169 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -1,6 +1,8 @@ /.generated.list linguist-generated /.gitattributes linguist-generated /lib/codeql/rust/elements/ArrayExpr.qll linguist-generated +/lib/codeql/rust/elements/AsmExpr.qll linguist-generated +/lib/codeql/rust/elements/AsmExprConstructor.qll linguist-generated /lib/codeql/rust/elements/AstNode.qll linguist-generated /lib/codeql/rust/elements/AsyncBlockExpr.qll linguist-generated /lib/codeql/rust/elements/AsyncBlockExprConstructor.qll linguist-generated @@ -8,10 +10,8 @@ /lib/codeql/rust/elements/AwaitExprConstructor.qll linguist-generated /lib/codeql/rust/elements/BecomeExpr.qll linguist-generated /lib/codeql/rust/elements/BecomeExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/BinaryOpExpr.qll linguist-generated -/lib/codeql/rust/elements/BinaryOpExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/BindPat.qll linguist-generated -/lib/codeql/rust/elements/BindPatConstructor.qll linguist-generated +/lib/codeql/rust/elements/BinExpr.qll linguist-generated +/lib/codeql/rust/elements/BinExprConstructor.qll linguist-generated /lib/codeql/rust/elements/BlockExpr.qll linguist-generated /lib/codeql/rust/elements/BlockExprBase.qll linguist-generated /lib/codeql/rust/elements/BlockExprConstructor.qll linguist-generated @@ -46,14 +46,14 @@ /lib/codeql/rust/elements/FieldExpr.qll linguist-generated /lib/codeql/rust/elements/FieldExprConstructor.qll linguist-generated /lib/codeql/rust/elements/FunctionConstructor.qll linguist-generated -/lib/codeql/rust/elements/GenericArgs.qll linguist-generated -/lib/codeql/rust/elements/GenericArgsConstructor.qll linguist-generated +/lib/codeql/rust/elements/GenericArgList.qll linguist-generated +/lib/codeql/rust/elements/GenericArgListConstructor.qll linguist-generated +/lib/codeql/rust/elements/IdentPat.qll linguist-generated +/lib/codeql/rust/elements/IdentPatConstructor.qll linguist-generated /lib/codeql/rust/elements/IfExpr.qll linguist-generated /lib/codeql/rust/elements/IfExprConstructor.qll linguist-generated /lib/codeql/rust/elements/IndexExpr.qll linguist-generated /lib/codeql/rust/elements/IndexExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/InlineAsmExpr.qll linguist-generated -/lib/codeql/rust/elements/InlineAsmExprConstructor.qll linguist-generated /lib/codeql/rust/elements/ItemStmt.qll linguist-generated /lib/codeql/rust/elements/ItemStmtConstructor.qll linguist-generated /lib/codeql/rust/elements/Label.qll linguist-generated @@ -62,10 +62,10 @@ /lib/codeql/rust/elements/LetExprConstructor.qll linguist-generated /lib/codeql/rust/elements/LetStmt.qll linguist-generated /lib/codeql/rust/elements/LetStmtConstructor.qll linguist-generated -/lib/codeql/rust/elements/LitPat.qll linguist-generated -/lib/codeql/rust/elements/LitPatConstructor.qll linguist-generated -/lib/codeql/rust/elements/LiteralExpr.qll linguist-generated -/lib/codeql/rust/elements/LiteralExprConstructor.qll linguist-generated +/lib/codeql/rust/elements/Literal.qll linguist-generated +/lib/codeql/rust/elements/LiteralConstructor.qll linguist-generated +/lib/codeql/rust/elements/LiteralPat.qll linguist-generated +/lib/codeql/rust/elements/LiteralPatConstructor.qll linguist-generated /lib/codeql/rust/elements/LoopExpr.qll linguist-generated /lib/codeql/rust/elements/LoopExprConstructor.qll linguist-generated /lib/codeql/rust/elements/MatchArm.qll linguist-generated @@ -91,18 +91,20 @@ /lib/codeql/rust/elements/PathExprConstructor.qll linguist-generated /lib/codeql/rust/elements/PathPat.qll linguist-generated /lib/codeql/rust/elements/PathPatConstructor.qll linguist-generated +/lib/codeql/rust/elements/PrefixExpr.qll linguist-generated +/lib/codeql/rust/elements/PrefixExprConstructor.qll linguist-generated /lib/codeql/rust/elements/RangeExpr.qll linguist-generated /lib/codeql/rust/elements/RangeExprConstructor.qll linguist-generated /lib/codeql/rust/elements/RangePat.qll linguist-generated /lib/codeql/rust/elements/RangePatConstructor.qll linguist-generated -/lib/codeql/rust/elements/RecordFieldPat.qll linguist-generated -/lib/codeql/rust/elements/RecordFieldPatConstructor.qll linguist-generated -/lib/codeql/rust/elements/RecordLitExpr.qll linguist-generated -/lib/codeql/rust/elements/RecordLitExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/RecordLitField.qll linguist-generated -/lib/codeql/rust/elements/RecordLitFieldConstructor.qll linguist-generated +/lib/codeql/rust/elements/RecordExpr.qll linguist-generated +/lib/codeql/rust/elements/RecordExprConstructor.qll linguist-generated +/lib/codeql/rust/elements/RecordExprField.qll linguist-generated +/lib/codeql/rust/elements/RecordExprFieldConstructor.qll linguist-generated /lib/codeql/rust/elements/RecordPat.qll linguist-generated /lib/codeql/rust/elements/RecordPatConstructor.qll linguist-generated +/lib/codeql/rust/elements/RecordPatField.qll linguist-generated +/lib/codeql/rust/elements/RecordPatFieldConstructor.qll linguist-generated /lib/codeql/rust/elements/RefExpr.qll linguist-generated /lib/codeql/rust/elements/RefExprConstructor.qll linguist-generated /lib/codeql/rust/elements/RefPat.qll linguist-generated @@ -120,10 +122,8 @@ /lib/codeql/rust/elements/TuplePatConstructor.qll linguist-generated /lib/codeql/rust/elements/TupleStructPat.qll linguist-generated /lib/codeql/rust/elements/TupleStructPatConstructor.qll linguist-generated -/lib/codeql/rust/elements/TypeRef.qll linguist-generated -/lib/codeql/rust/elements/TypeRefConstructor.qll linguist-generated -/lib/codeql/rust/elements/UnaryOpExpr.qll linguist-generated -/lib/codeql/rust/elements/UnaryOpExprConstructor.qll linguist-generated +/lib/codeql/rust/elements/Type.qll linguist-generated +/lib/codeql/rust/elements/TypeConstructor.qll linguist-generated /lib/codeql/rust/elements/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/elements/UnderscoreExprConstructor.qll linguist-generated /lib/codeql/rust/elements/Unimplemented.qll linguist-generated @@ -131,20 +131,20 @@ /lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll linguist-generated /lib/codeql/rust/elements/UnsafeBlockExpr.qll linguist-generated /lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/WildPat.qll linguist-generated -/lib/codeql/rust/elements/WildPatConstructor.qll linguist-generated +/lib/codeql/rust/elements/WildcardPat.qll linguist-generated +/lib/codeql/rust/elements/WildcardPatConstructor.qll linguist-generated /lib/codeql/rust/elements/YeetExpr.qll linguist-generated /lib/codeql/rust/elements/YeetExprConstructor.qll linguist-generated /lib/codeql/rust/elements/YieldExpr.qll linguist-generated /lib/codeql/rust/elements/YieldExprConstructor.qll linguist-generated /lib/codeql/rust/elements.qll linguist-generated /lib/codeql/rust/generated/ArrayExpr.qll linguist-generated +/lib/codeql/rust/generated/AsmExpr.qll linguist-generated /lib/codeql/rust/generated/AstNode.qll linguist-generated /lib/codeql/rust/generated/AsyncBlockExpr.qll linguist-generated /lib/codeql/rust/generated/AwaitExpr.qll linguist-generated /lib/codeql/rust/generated/BecomeExpr.qll linguist-generated -/lib/codeql/rust/generated/BinaryOpExpr.qll linguist-generated -/lib/codeql/rust/generated/BindPat.qll linguist-generated +/lib/codeql/rust/generated/BinExpr.qll linguist-generated /lib/codeql/rust/generated/BlockExpr.qll linguist-generated /lib/codeql/rust/generated/BlockExprBase.qll linguist-generated /lib/codeql/rust/generated/BoxExpr.qll linguist-generated @@ -166,16 +166,16 @@ /lib/codeql/rust/generated/FieldExpr.qll linguist-generated /lib/codeql/rust/generated/File.qll linguist-generated /lib/codeql/rust/generated/Function.qll linguist-generated -/lib/codeql/rust/generated/GenericArgs.qll linguist-generated +/lib/codeql/rust/generated/GenericArgList.qll linguist-generated +/lib/codeql/rust/generated/IdentPat.qll linguist-generated /lib/codeql/rust/generated/IfExpr.qll linguist-generated /lib/codeql/rust/generated/IndexExpr.qll linguist-generated -/lib/codeql/rust/generated/InlineAsmExpr.qll linguist-generated /lib/codeql/rust/generated/ItemStmt.qll linguist-generated /lib/codeql/rust/generated/Label.qll linguist-generated /lib/codeql/rust/generated/LetExpr.qll linguist-generated /lib/codeql/rust/generated/LetStmt.qll linguist-generated -/lib/codeql/rust/generated/LitPat.qll linguist-generated -/lib/codeql/rust/generated/LiteralExpr.qll linguist-generated +/lib/codeql/rust/generated/Literal.qll linguist-generated +/lib/codeql/rust/generated/LiteralPat.qll linguist-generated /lib/codeql/rust/generated/Locatable.qll linguist-generated /lib/codeql/rust/generated/Location.qll linguist-generated /lib/codeql/rust/generated/LoopExpr.qll linguist-generated @@ -192,14 +192,15 @@ /lib/codeql/rust/generated/Path.qll linguist-generated /lib/codeql/rust/generated/PathExpr.qll linguist-generated /lib/codeql/rust/generated/PathPat.qll linguist-generated +/lib/codeql/rust/generated/PrefixExpr.qll linguist-generated /lib/codeql/rust/generated/PureSynthConstructors.qll linguist-generated /lib/codeql/rust/generated/RangeExpr.qll linguist-generated /lib/codeql/rust/generated/RangePat.qll linguist-generated /lib/codeql/rust/generated/Raw.qll linguist-generated -/lib/codeql/rust/generated/RecordFieldPat.qll linguist-generated -/lib/codeql/rust/generated/RecordLitExpr.qll linguist-generated -/lib/codeql/rust/generated/RecordLitField.qll linguist-generated +/lib/codeql/rust/generated/RecordExpr.qll linguist-generated +/lib/codeql/rust/generated/RecordExprField.qll linguist-generated /lib/codeql/rust/generated/RecordPat.qll linguist-generated +/lib/codeql/rust/generated/RecordPatField.qll linguist-generated /lib/codeql/rust/generated/RefExpr.qll linguist-generated /lib/codeql/rust/generated/RefPat.qll linguist-generated /lib/codeql/rust/generated/RepeatExpr.qll linguist-generated @@ -211,26 +212,24 @@ /lib/codeql/rust/generated/TupleExpr.qll linguist-generated /lib/codeql/rust/generated/TuplePat.qll linguist-generated /lib/codeql/rust/generated/TupleStructPat.qll linguist-generated -/lib/codeql/rust/generated/TypeRef.qll linguist-generated -/lib/codeql/rust/generated/UnaryOpExpr.qll linguist-generated +/lib/codeql/rust/generated/Type.qll linguist-generated /lib/codeql/rust/generated/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/generated/Unimplemented.qll linguist-generated /lib/codeql/rust/generated/UnimplementedDeclaration.qll linguist-generated /lib/codeql/rust/generated/UnknownFile.qll linguist-generated /lib/codeql/rust/generated/UnknownLocation.qll linguist-generated /lib/codeql/rust/generated/UnsafeBlockExpr.qll linguist-generated -/lib/codeql/rust/generated/WildPat.qll linguist-generated +/lib/codeql/rust/generated/WildcardPat.qll linguist-generated /lib/codeql/rust/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/generated/YieldExpr.qll linguist-generated +/test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated /test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql linguist-generated /test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql linguist-generated /test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated -/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql linguist-generated -/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql linguist-generated -/test/extractor-tests/generated/BindPat/BindPat.ql linguist-generated -/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql linguist-generated +/test/extractor-tests/generated/BinExpr/BinExpr.ql linguist-generated +/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql linguist-generated @@ -257,19 +256,20 @@ /test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated -/test/extractor-tests/generated/GenericArgs/GenericArgs.ql linguist-generated +/test/extractor-tests/generated/GenericArgList/GenericArgList.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated -/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql linguist-generated /test/extractor-tests/generated/Label/Label.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated -/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql linguist-generated -/test/extractor-tests/generated/LitPat/LitPat.ql linguist-generated -/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated +/test/extractor-tests/generated/LetStmt/LetStmt_getType.ql linguist-generated +/test/extractor-tests/generated/Literal/Literal.ql linguist-generated +/test/extractor-tests/generated/LiteralPat/LiteralPat.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated @@ -290,21 +290,22 @@ /test/extractor-tests/generated/Path/Path.ql linguist-generated /test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated /test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated -/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql linguist-generated -/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql linguist-generated -/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql linguist-generated -/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql linguist-generated -/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql linguist-generated -/test/extractor-tests/generated/RecordLitField/RecordLitField.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql linguist-generated +/test/extractor-tests/generated/RecordExprField/RecordExprField.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordPatField/RecordPatField.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated /test/extractor-tests/generated/RepeatExpr/RepeatExpr.ql linguist-generated @@ -323,13 +324,12 @@ /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/TypeRef/TypeRef.ql linguist-generated -/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql linguist-generated +/test/extractor-tests/generated/Type/Type.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql linguist-generated -/test/extractor-tests/generated/WildPat/WildPat.ql linguist-generated +/test/extractor-tests/generated/WildcardPat/WildcardPat.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements.qll b/rust/ql/lib/codeql/rust/elements.qll index 5165f5b16c4a..74bf11413982 100644 --- a/rust/ql/lib/codeql/rust/elements.qll +++ b/rust/ql/lib/codeql/rust/elements.qll @@ -4,12 +4,12 @@ */ import codeql.rust.elements.ArrayExpr +import codeql.rust.elements.AsmExpr import codeql.rust.elements.AstNode import codeql.rust.elements.AsyncBlockExpr import codeql.rust.elements.AwaitExpr import codeql.rust.elements.BecomeExpr -import codeql.rust.elements.BinaryOpExpr -import codeql.rust.elements.BindPat +import codeql.rust.elements.BinExpr import codeql.rust.elements.BlockExpr import codeql.rust.elements.BlockExprBase import codeql.rust.elements.BoxExpr @@ -31,16 +31,16 @@ import codeql.rust.elements.ExprStmt import codeql.rust.elements.FieldExpr import codeql.rust.elements.File import codeql.rust.elements.Function -import codeql.rust.elements.GenericArgs +import codeql.rust.elements.GenericArgList +import codeql.rust.elements.IdentPat import codeql.rust.elements.IfExpr import codeql.rust.elements.IndexExpr -import codeql.rust.elements.InlineAsmExpr import codeql.rust.elements.ItemStmt import codeql.rust.elements.Label import codeql.rust.elements.LetExpr import codeql.rust.elements.LetStmt -import codeql.rust.elements.LitPat -import codeql.rust.elements.LiteralExpr +import codeql.rust.elements.Literal +import codeql.rust.elements.LiteralPat import codeql.rust.elements.Locatable import codeql.rust.elements.Location import codeql.rust.elements.LoopExpr @@ -56,12 +56,13 @@ import codeql.rust.elements.Pat import codeql.rust.elements.Path import codeql.rust.elements.PathExpr import codeql.rust.elements.PathPat +import codeql.rust.elements.PrefixExpr import codeql.rust.elements.RangeExpr import codeql.rust.elements.RangePat -import codeql.rust.elements.RecordFieldPat -import codeql.rust.elements.RecordLitExpr -import codeql.rust.elements.RecordLitField +import codeql.rust.elements.RecordExpr +import codeql.rust.elements.RecordExprField import codeql.rust.elements.RecordPat +import codeql.rust.elements.RecordPatField import codeql.rust.elements.RefExpr import codeql.rust.elements.RefPat import codeql.rust.elements.RepeatExpr @@ -71,14 +72,13 @@ import codeql.rust.elements.Stmt import codeql.rust.elements.TupleExpr import codeql.rust.elements.TuplePat import codeql.rust.elements.TupleStructPat -import codeql.rust.elements.TypeRef -import codeql.rust.elements.UnaryOpExpr +import codeql.rust.elements.Type import codeql.rust.elements.UnderscoreExpr import codeql.rust.elements.Unimplemented import codeql.rust.elements.UnimplementedDeclaration import codeql.rust.elements.UnknownFile import codeql.rust.elements.UnknownLocation import codeql.rust.elements.UnsafeBlockExpr -import codeql.rust.elements.WildPat +import codeql.rust.elements.WildcardPat import codeql.rust.elements.YeetExpr import codeql.rust.elements.YieldExpr diff --git a/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll b/rust/ql/lib/codeql/rust/elements/AsmExpr.qll similarity index 65% rename from rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll rename to rust/ql/lib/codeql/rust/elements/AsmExpr.qll index 70fccfc59ed9..9e9038c76806 100644 --- a/rust/ql/lib/codeql/rust/elements/InlineAsmExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AsmExpr.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `InlineAsmExpr`. + * This module provides a hand-modifiable wrapper around the generated class `AsmExpr`. */ -private import codeql.rust.generated.InlineAsmExpr +private import codeql.rust.generated.AsmExpr /** * An inline assembly expression. For example: @@ -13,4 +13,4 @@ private import codeql.rust.generated.InlineAsmExpr * } * ``` */ -class InlineAsmExpr extends Generated::InlineAsmExpr { } +class AsmExpr extends Generated::AsmExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll b/rust/ql/lib/codeql/rust/elements/AsmExprConstructor.qll similarity index 64% rename from rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll rename to rust/ql/lib/codeql/rust/elements/AsmExprConstructor.qll index 20b97fae70d2..0a65d8b6d491 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/AsmExprConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `TypeRef` synthesized instances. + * `AsmExpr` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `TypeRef` synthesized instances. + * The characteristic predicate of `AsmExpr` synthesized instances. * INTERNAL: Do not use. */ -predicate constructTypeRef(Raw::TypeRef id) { any() } +predicate constructAsmExpr(Raw::AsmExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/BinExpr.qll similarity index 66% rename from rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll rename to rust/ql/lib/codeql/rust/elements/BinExpr.qll index e0e61e46a29a..31f35c13da22 100644 --- a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BinExpr.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `BinaryOpExpr`. + * This module provides a hand-modifiable wrapper around the generated class `BinExpr`. */ -private import codeql.rust.generated.BinaryOpExpr +private import codeql.rust.generated.BinExpr /** * A binary operation expression. For example: @@ -15,4 +15,4 @@ private import codeql.rust.generated.BinaryOpExpr * x += y; * ``` */ -class BinaryOpExpr extends Generated::BinaryOpExpr { } +class BinExpr extends Generated::BinExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/WildPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll similarity index 64% rename from rust/ql/lib/codeql/rust/elements/WildPatConstructor.qll rename to rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll index 13375a8d8aef..4eb31bd7cb14 100644 --- a/rust/ql/lib/codeql/rust/elements/WildPatConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `WildPat` synthesized instances. + * `BinExpr` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `WildPat` synthesized instances. + * The characteristic predicate of `BinExpr` synthesized instances. * INTERNAL: Do not use. */ -predicate constructWildPat(Raw::WildPat id) { any() } +predicate constructBinExpr(Raw::BinExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/GenericArgs.qll b/rust/ql/lib/codeql/rust/elements/GenericArgList.qll similarity index 62% rename from rust/ql/lib/codeql/rust/elements/GenericArgs.qll rename to rust/ql/lib/codeql/rust/elements/GenericArgList.qll index 0df4c9dcb214..43c85a596aa1 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericArgs.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArgList.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `GenericArgs`. + * This module provides a hand-modifiable wrapper around the generated class `GenericArgList`. */ -private import codeql.rust.generated.GenericArgs +private import codeql.rust.generated.GenericArgList /** * The base class for generic arguments. @@ -11,4 +11,4 @@ private import codeql.rust.generated.GenericArgs * x.foo::(42); * ``` */ -class GenericArgs extends Generated::GenericArgs { } +class GenericArgList extends Generated::GenericArgList { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordFieldPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/GenericArgListConstructor.qll similarity index 62% rename from rust/ql/lib/codeql/rust/elements/RecordFieldPatConstructor.qll rename to rust/ql/lib/codeql/rust/elements/GenericArgListConstructor.qll index 4d0aa7f23279..1c22ba333e6a 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordFieldPatConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/GenericArgListConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `RecordFieldPat` synthesized instances. + * `GenericArgList` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `RecordFieldPat` synthesized instances. + * The characteristic predicate of `GenericArgList` synthesized instances. * INTERNAL: Do not use. */ -predicate constructRecordFieldPat(Raw::RecordFieldPat id) { any() } +predicate constructGenericArgList(Raw::GenericArgList id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/BindPat.qll b/rust/ql/lib/codeql/rust/elements/IdentPat.qll similarity index 74% rename from rust/ql/lib/codeql/rust/elements/BindPat.qll rename to rust/ql/lib/codeql/rust/elements/IdentPat.qll index bd445e19920d..7c38db53b8be 100644 --- a/rust/ql/lib/codeql/rust/elements/BindPat.qll +++ b/rust/ql/lib/codeql/rust/elements/IdentPat.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `BindPat`. + * This module provides a hand-modifiable wrapper around the generated class `IdentPat`. */ -private import codeql.rust.generated.BindPat +private import codeql.rust.generated.IdentPat /** * A binding pattern. For example: @@ -20,4 +20,4 @@ private import codeql.rust.generated.BindPat * }; * ``` */ -class BindPat extends Generated::BindPat { } +class IdentPat extends Generated::IdentPat { } diff --git a/rust/ql/lib/codeql/rust/elements/IdentPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/IdentPatConstructor.qll new file mode 100644 index 000000000000..0ceec57153b7 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/IdentPatConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `IdentPat` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `IdentPat` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructIdentPat(Raw::IdentPat id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/InlineAsmExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/InlineAsmExprConstructor.qll deleted file mode 100644 index 9cf7d34d2467..000000000000 --- a/rust/ql/lib/codeql/rust/elements/InlineAsmExprConstructor.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, remove this comment if you wish to edit this file -/** - * This module defines the hook used internally to tweak the characteristic predicate of - * `InlineAsmExpr` synthesized instances. - * INTERNAL: Do not use. - */ - -private import codeql.rust.generated.Raw - -/** - * The characteristic predicate of `InlineAsmExpr` synthesized instances. - * INTERNAL: Do not use. - */ -predicate constructInlineAsmExpr(Raw::InlineAsmExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll b/rust/ql/lib/codeql/rust/elements/Literal.qll similarity index 70% rename from rust/ql/lib/codeql/rust/elements/LiteralExpr.qll rename to rust/ql/lib/codeql/rust/elements/Literal.qll index bf892ed395cf..7fd9d8c7ef41 100644 --- a/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/Literal.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `LiteralExpr`. + * This module provides a hand-modifiable wrapper around the generated class `Literal`. */ -private import codeql.rust.generated.LiteralExpr +private import codeql.rust.generated.Literal /** * A literal expression. For example: @@ -17,4 +17,4 @@ private import codeql.rust.generated.LiteralExpr * r"Hello, world!"; * true; */ -class LiteralExpr extends Generated::LiteralExpr { } +class Literal extends Generated::Literal { } diff --git a/rust/ql/lib/codeql/rust/elements/BindPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll similarity index 64% rename from rust/ql/lib/codeql/rust/elements/BindPatConstructor.qll rename to rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll index 80445356bf0d..fb21ea5b9f6e 100644 --- a/rust/ql/lib/codeql/rust/elements/BindPatConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `BindPat` synthesized instances. + * `Literal` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `BindPat` synthesized instances. + * The characteristic predicate of `Literal` synthesized instances. * INTERNAL: Do not use. */ -predicate constructBindPat(Raw::BindPat id) { any() } +predicate constructLiteral(Raw::Literal id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll deleted file mode 100644 index 9363a2f628b9..000000000000 --- a/rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, remove this comment if you wish to edit this file -/** - * This module defines the hook used internally to tweak the characteristic predicate of - * `LiteralExpr` synthesized instances. - * INTERNAL: Do not use. - */ - -private import codeql.rust.generated.Raw - -/** - * The characteristic predicate of `LiteralExpr` synthesized instances. - * INTERNAL: Do not use. - */ -predicate constructLiteralExpr(Raw::LiteralExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/LitPat.qll b/rust/ql/lib/codeql/rust/elements/LiteralPat.qll similarity index 67% rename from rust/ql/lib/codeql/rust/elements/LitPat.qll rename to rust/ql/lib/codeql/rust/elements/LiteralPat.qll index 56056a7dcc31..53f0f809ad77 100644 --- a/rust/ql/lib/codeql/rust/elements/LitPat.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralPat.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `LitPat`. + * This module provides a hand-modifiable wrapper around the generated class `LiteralPat`. */ -private import codeql.rust.generated.LitPat +private import codeql.rust.generated.LiteralPat /** * A literal pattern. For example: @@ -14,4 +14,4 @@ private import codeql.rust.generated.LitPat * } * ``` */ -class LitPat extends Generated::LitPat { } +class LiteralPat extends Generated::LiteralPat { } diff --git a/rust/ql/lib/codeql/rust/elements/LiteralPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/LiteralPatConstructor.qll new file mode 100644 index 000000000000..4c8d0d8ad00c --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/LiteralPatConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `LiteralPat` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `LiteralPat` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructLiteralPat(Raw::LiteralPat id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll similarity index 67% rename from rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll rename to rust/ql/lib/codeql/rust/elements/PrefixExpr.qll index 57350920fb16..632f9d76742f 100644 --- a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PrefixExpr.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `UnaryOpExpr`. + * This module provides a hand-modifiable wrapper around the generated class `PrefixExpr`. */ -private import codeql.rust.generated.UnaryOpExpr +private import codeql.rust.generated.PrefixExpr /** * A unary operation expression. For example: @@ -13,4 +13,4 @@ private import codeql.rust.generated.UnaryOpExpr * let z = *ptr * ``` */ -class UnaryOpExpr extends Generated::UnaryOpExpr { } +class PrefixExpr extends Generated::PrefixExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/PrefixExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/PrefixExprConstructor.qll new file mode 100644 index 000000000000..c4d3cc8f4bb8 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/PrefixExprConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `PrefixExpr` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `PrefixExpr` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructPrefixExpr(Raw::PrefixExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/elements/RecordExpr.qll similarity index 62% rename from rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll rename to rust/ql/lib/codeql/rust/elements/RecordExpr.qll index bda6fae41216..6403f5c6f50a 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordExpr.qll @@ -1,12 +1,12 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `RecordLitExpr`. + * This module provides a hand-modifiable wrapper around the generated class `RecordExpr`. */ -private import codeql.rust.generated.RecordLitExpr +private import codeql.rust.generated.RecordExpr /** - * A record literal expression. For example: + * A record expression. For example: * ``` * let first = Foo { a: 1, b: 2 }; * let second = Foo { a: 2, ..first }; @@ -14,4 +14,4 @@ private import codeql.rust.generated.RecordLitExpr * Foo { .. } = second; * ``` */ -class RecordLitExpr extends Generated::RecordLitExpr { } +class RecordExpr extends Generated::RecordExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/RecordExprConstructor.qll new file mode 100644 index 000000000000..5351a9300730 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/RecordExprConstructor.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `RecordExpr` synthesized instances. + * INTERNAL: Do not use. + */ + +private import codeql.rust.generated.Raw + +/** + * The characteristic predicate of `RecordExpr` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructRecordExpr(Raw::RecordExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/RecordExprField.qll b/rust/ql/lib/codeql/rust/elements/RecordExprField.qll new file mode 100644 index 000000000000..e202511d0ae3 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/RecordExprField.qll @@ -0,0 +1,14 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `RecordExprField`. + */ + +private import codeql.rust.generated.RecordExprField + +/** + * A field in a record expression. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` + */ +class RecordExprField extends Generated::RecordExprField { } diff --git a/rust/ql/lib/codeql/rust/elements/BinaryOpExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/RecordExprFieldConstructor.qll similarity index 58% rename from rust/ql/lib/codeql/rust/elements/BinaryOpExprConstructor.qll rename to rust/ql/lib/codeql/rust/elements/RecordExprFieldConstructor.qll index 757b2f42e300..1296a998fa82 100644 --- a/rust/ql/lib/codeql/rust/elements/BinaryOpExprConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordExprFieldConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `BinaryOpExpr` synthesized instances. + * `RecordExprField` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `BinaryOpExpr` synthesized instances. + * The characteristic predicate of `RecordExprField` synthesized instances. * INTERNAL: Do not use. */ -predicate constructBinaryOpExpr(Raw::BinaryOpExpr id) { any() } +predicate constructRecordExprField(Raw::RecordExprField id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/RecordLitExprConstructor.qll deleted file mode 100644 index f5d6c3d9fe30..000000000000 --- a/rust/ql/lib/codeql/rust/elements/RecordLitExprConstructor.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, remove this comment if you wish to edit this file -/** - * This module defines the hook used internally to tweak the characteristic predicate of - * `RecordLitExpr` synthesized instances. - * INTERNAL: Do not use. - */ - -private import codeql.rust.generated.Raw - -/** - * The characteristic predicate of `RecordLitExpr` synthesized instances. - * INTERNAL: Do not use. - */ -predicate constructRecordLitExpr(Raw::RecordLitExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll b/rust/ql/lib/codeql/rust/elements/RecordLitField.qll deleted file mode 100644 index b432ba6fd852..000000000000 --- a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, remove this comment if you wish to edit this file -/** - * This module provides a hand-modifiable wrapper around the generated class `RecordLitField`. - */ - -private import codeql.rust.generated.RecordLitField - -/** - * A field in a record literal. For example `a: 1` in: - * ``` - * Foo { a: 1, b: 2 }; - * ``` - */ -class RecordLitField extends Generated::RecordLitField { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll b/rust/ql/lib/codeql/rust/elements/RecordPatField.qll similarity index 64% rename from rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll rename to rust/ql/lib/codeql/rust/elements/RecordPatField.qll index fcb12e8d31a6..d221f700bc4b 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordFieldPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPatField.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `RecordFieldPat`. + * This module provides a hand-modifiable wrapper around the generated class `RecordPatField`. */ -private import codeql.rust.generated.RecordFieldPat +private import codeql.rust.generated.RecordPatField /** * A field in a record pattern. For example `a: 1` in: @@ -11,4 +11,4 @@ private import codeql.rust.generated.RecordFieldPat * let Foo { a: 1, b: 2 } = foo; * ``` */ -class RecordFieldPat extends Generated::RecordFieldPat { } +class RecordPatField extends Generated::RecordPatField { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitFieldConstructor.qll b/rust/ql/lib/codeql/rust/elements/RecordPatFieldConstructor.qll similarity index 62% rename from rust/ql/lib/codeql/rust/elements/RecordLitFieldConstructor.qll rename to rust/ql/lib/codeql/rust/elements/RecordPatFieldConstructor.qll index 537701fc7d5d..cc86518509f1 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitFieldConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordPatFieldConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `RecordLitField` synthesized instances. + * `RecordPatField` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `RecordLitField` synthesized instances. + * The characteristic predicate of `RecordPatField` synthesized instances. * INTERNAL: Do not use. */ -predicate constructRecordLitField(Raw::RecordLitField id) { any() } +predicate constructRecordPatField(Raw::RecordPatField id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/TypeRef.qll b/rust/ql/lib/codeql/rust/elements/Type.qll similarity index 70% rename from rust/ql/lib/codeql/rust/elements/TypeRef.qll rename to rust/ql/lib/codeql/rust/elements/Type.qll index 296e3d4a40be..a2d0a08b3b14 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/elements/Type.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `TypeRef`. + * This module provides a hand-modifiable wrapper around the generated class `Type`. */ -private import codeql.rust.generated.TypeRef +private import codeql.rust.generated.Type /** * The base class for type references. @@ -13,4 +13,4 @@ private import codeql.rust.generated.TypeRef * let z: Option; * ``` */ -class TypeRef extends Generated::TypeRef { } +class Type extends Generated::Type { } diff --git a/rust/ql/lib/codeql/rust/elements/LitPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/TypeConstructor.qll similarity index 63% rename from rust/ql/lib/codeql/rust/elements/LitPatConstructor.qll rename to rust/ql/lib/codeql/rust/elements/TypeConstructor.qll index a72498ba0978..fa8f0c00c503 100644 --- a/rust/ql/lib/codeql/rust/elements/LitPatConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `LitPat` synthesized instances. + * `Type` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `LitPat` synthesized instances. + * The characteristic predicate of `Type` synthesized instances. * INTERNAL: Do not use. */ -predicate constructLitPat(Raw::LitPat id) { any() } +predicate constructType(Raw::Type id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/UnaryOpExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/UnaryOpExprConstructor.qll deleted file mode 100644 index bd155164de94..000000000000 --- a/rust/ql/lib/codeql/rust/elements/UnaryOpExprConstructor.qll +++ /dev/null @@ -1,14 +0,0 @@ -// generated by codegen, remove this comment if you wish to edit this file -/** - * This module defines the hook used internally to tweak the characteristic predicate of - * `UnaryOpExpr` synthesized instances. - * INTERNAL: Do not use. - */ - -private import codeql.rust.generated.Raw - -/** - * The characteristic predicate of `UnaryOpExpr` synthesized instances. - * INTERNAL: Do not use. - */ -predicate constructUnaryOpExpr(Raw::UnaryOpExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/WildPat.qll b/rust/ql/lib/codeql/rust/elements/WildcardPat.qll similarity index 63% rename from rust/ql/lib/codeql/rust/elements/WildPat.qll rename to rust/ql/lib/codeql/rust/elements/WildcardPat.qll index 004399d8d7a6..d5283f4e4d21 100644 --- a/rust/ql/lib/codeql/rust/elements/WildPat.qll +++ b/rust/ql/lib/codeql/rust/elements/WildcardPat.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `WildPat`. + * This module provides a hand-modifiable wrapper around the generated class `WildcardPat`. */ -private import codeql.rust.generated.WildPat +private import codeql.rust.generated.WildcardPat /** * A wildcard pattern. For example: @@ -11,4 +11,4 @@ private import codeql.rust.generated.WildPat * let _ = 42; * ``` */ -class WildPat extends Generated::WildPat { } +class WildcardPat extends Generated::WildcardPat { } diff --git a/rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll b/rust/ql/lib/codeql/rust/elements/WildcardPatConstructor.qll similarity index 63% rename from rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll rename to rust/ql/lib/codeql/rust/elements/WildcardPatConstructor.qll index 5068ff4a12ed..edd5db183aa1 100644 --- a/rust/ql/lib/codeql/rust/elements/GenericArgsConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/WildcardPatConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `GenericArgs` synthesized instances. + * `WildcardPat` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `GenericArgs` synthesized instances. + * The characteristic predicate of `WildcardPat` synthesized instances. * INTERNAL: Do not use. */ -predicate constructGenericArgs(Raw::GenericArgs id) { any() } +predicate constructWildcardPat(Raw::WildcardPat id) { any() } diff --git a/rust/ql/lib/codeql/rust/generated/AsmExpr.qll b/rust/ql/lib/codeql/rust/generated/AsmExpr.qll new file mode 100644 index 000000000000..05933b5d84cb --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/AsmExpr.qll @@ -0,0 +1,36 @@ +// generated by codegen +/** + * This module provides the generated definition of `AsmExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr + +/** + * INTERNAL: This module contains the fully generated definition of `AsmExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * An inline assembly expression. For example: + * ``` + * unsafe { + * builtin # asm(_); + * } + * ``` + * INTERNAL: Do not reference the `Generated::AsmExpr` class directly. + * Use the subclass `AsmExpr`, where the following predicates are available. + */ + class AsmExpr extends Synth::TAsmExpr, Expr { + override string getAPrimaryQlClass() { result = "AsmExpr" } + + /** + * Gets the expression of this asm expression. + */ + Expr getExpr() { + result = Synth::convertExprFromRaw(Synth::convertAsmExprToRaw(this).(Raw::AsmExpr).getExpr()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/BinExpr.qll b/rust/ql/lib/codeql/rust/generated/BinExpr.qll new file mode 100644 index 000000000000..37c8d69911ac --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/BinExpr.qll @@ -0,0 +1,55 @@ +// generated by codegen +/** + * This module provides the generated definition of `BinExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr + +/** + * INTERNAL: This module contains the fully generated definition of `BinExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + * INTERNAL: Do not reference the `Generated::BinExpr` class directly. + * Use the subclass `BinExpr`, where the following predicates are available. + */ + class BinExpr extends Synth::TBinExpr, Expr { + override string getAPrimaryQlClass() { result = "BinExpr" } + + /** + * Gets the lhs of this bin expression. + */ + Expr getLhs() { + result = Synth::convertExprFromRaw(Synth::convertBinExprToRaw(this).(Raw::BinExpr).getLhs()) + } + + /** + * Gets the rhs of this bin expression. + */ + Expr getRhs() { + result = Synth::convertExprFromRaw(Synth::convertBinExprToRaw(this).(Raw::BinExpr).getRhs()) + } + + /** + * Gets the op of this bin expression, if it exists. + */ + string getOp() { result = Synth::convertBinExprToRaw(this).(Raw::BinExpr).getOp() } + + /** + * Holds if `getOp()` exists. + */ + final predicate hasOp() { exists(this.getOp()) } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll deleted file mode 100644 index eeef87aa292c..000000000000 --- a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll +++ /dev/null @@ -1,57 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `BinaryOpExpr`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr - -/** - * INTERNAL: This module contains the fully generated definition of `BinaryOpExpr` and should not - * be referenced directly. - */ -module Generated { - /** - * A binary operation expression. For example: - * ``` - * x + y; - * x && y; - * x <= y; - * x = y; - * x += y; - * ``` - * INTERNAL: Do not reference the `Generated::BinaryOpExpr` class directly. - * Use the subclass `BinaryOpExpr`, where the following predicates are available. - */ - class BinaryOpExpr extends Synth::TBinaryOpExpr, Expr { - override string getAPrimaryQlClass() { result = "BinaryOpExpr" } - - /** - * Gets the lhs of this binary op expression. - */ - Expr getLhs() { - result = - Synth::convertExprFromRaw(Synth::convertBinaryOpExprToRaw(this).(Raw::BinaryOpExpr).getLhs()) - } - - /** - * Gets the rhs of this binary op expression. - */ - Expr getRhs() { - result = - Synth::convertExprFromRaw(Synth::convertBinaryOpExprToRaw(this).(Raw::BinaryOpExpr).getRhs()) - } - - /** - * Gets the op of this binary op expression, if it exists. - */ - string getOp() { result = Synth::convertBinaryOpExprToRaw(this).(Raw::BinaryOpExpr).getOp() } - - /** - * Holds if `getOp()` exists. - */ - final predicate hasOp() { exists(this.getOp()) } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/CastExpr.qll b/rust/ql/lib/codeql/rust/generated/CastExpr.qll index e546735ea711..a7669a824fd1 100644 --- a/rust/ql/lib/codeql/rust/generated/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CastExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.TypeRef +import codeql.rust.elements.Type /** * INTERNAL: This module contains the fully generated definition of `CastExpr` and should not @@ -34,11 +34,11 @@ module Generated { } /** - * Gets the type reference of this cast expression. + * Gets the type of this cast expression. */ - TypeRef getTypeRef() { + Type getType() { result = - Synth::convertTypeRefFromRaw(Synth::convertCastExprToRaw(this).(Raw::CastExpr).getTypeRef()) + Synth::convertTypeFromRaw(Synth::convertCastExprToRaw(this).(Raw::CastExpr).getType()) } } } diff --git a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll index 822fbdcc6772..97e9530a27bc 100644 --- a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll @@ -8,7 +8,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr import codeql.rust.elements.Pat -import codeql.rust.elements.TypeRef +import codeql.rust.elements.Type /** * INTERNAL: This module contains the fully generated definition of `ClosureExpr` and should not @@ -55,9 +55,9 @@ module Generated { /** * Gets the `index`th argument type of this closure expression (0-based), if it exists. */ - TypeRef getArgType(int index) { + Type getArgType(int index) { result = - Synth::convertTypeRefFromRaw(Synth::convertClosureExprToRaw(this) + Synth::convertTypeFromRaw(Synth::convertClosureExprToRaw(this) .(Raw::ClosureExpr) .getArgType(index)) } @@ -70,14 +70,14 @@ module Generated { /** * Gets any of the argument types of this closure expression. */ - final TypeRef getAnArgType() { result = this.getArgType(_) } + final Type getAnArgType() { result = this.getArgType(_) } /** * Gets the ret type of this closure expression, if it exists. */ - TypeRef getRetType() { + Type getRetType() { result = - Synth::convertTypeRefFromRaw(Synth::convertClosureExprToRaw(this) + Synth::convertTypeFromRaw(Synth::convertClosureExprToRaw(this) .(Raw::ClosureExpr) .getRetType()) } diff --git a/rust/ql/lib/codeql/rust/generated/GenericArgs.qll b/rust/ql/lib/codeql/rust/generated/GenericArgList.qll similarity index 51% rename from rust/ql/lib/codeql/rust/generated/GenericArgs.qll rename to rust/ql/lib/codeql/rust/generated/GenericArgList.qll index 0a7ac9a40d12..10e436d5d7c4 100644 --- a/rust/ql/lib/codeql/rust/generated/GenericArgs.qll +++ b/rust/ql/lib/codeql/rust/generated/GenericArgList.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `GenericArgs`. + * This module provides the generated definition of `GenericArgList`. * INTERNAL: Do not import directly. */ @@ -10,7 +10,7 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Unimplemented /** - * INTERNAL: This module contains the fully generated definition of `GenericArgs` and should not + * INTERNAL: This module contains the fully generated definition of `GenericArgList` and should not * be referenced directly. */ module Generated { @@ -19,10 +19,10 @@ module Generated { * ``` * x.foo::(42); * ``` - * INTERNAL: Do not reference the `Generated::GenericArgs` class directly. - * Use the subclass `GenericArgs`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::GenericArgList` class directly. + * Use the subclass `GenericArgList`, where the following predicates are available. */ - class GenericArgs extends Synth::TGenericArgs, AstNode, Unimplemented { - override string getAPrimaryQlClass() { result = "GenericArgs" } + class GenericArgList extends Synth::TGenericArgList, AstNode, Unimplemented { + override string getAPrimaryQlClass() { result = "GenericArgList" } } } diff --git a/rust/ql/lib/codeql/rust/generated/BindPat.qll b/rust/ql/lib/codeql/rust/generated/IdentPat.qll similarity index 53% rename from rust/ql/lib/codeql/rust/generated/BindPat.qll rename to rust/ql/lib/codeql/rust/generated/IdentPat.qll index c08464045ba3..857795ce3156 100644 --- a/rust/ql/lib/codeql/rust/generated/BindPat.qll +++ b/rust/ql/lib/codeql/rust/generated/IdentPat.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `BindPat`. + * This module provides the generated definition of `IdentPat`. * INTERNAL: Do not import directly. */ @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Pat /** - * INTERNAL: This module contains the fully generated definition of `BindPat` and should not + * INTERNAL: This module contains the fully generated definition of `IdentPat` and should not * be referenced directly. */ module Generated { @@ -27,24 +27,25 @@ module Generated { * None => 0, * }; * ``` - * INTERNAL: Do not reference the `Generated::BindPat` class directly. - * Use the subclass `BindPat`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::IdentPat` class directly. + * Use the subclass `IdentPat`, where the following predicates are available. */ - class BindPat extends Synth::TBindPat, Pat { - override string getAPrimaryQlClass() { result = "BindPat" } + class IdentPat extends Synth::TIdentPat, Pat { + override string getAPrimaryQlClass() { result = "IdentPat" } /** - * Gets the binding of this bind pat. + * Gets the binding of this ident pat. */ string getBindingId() { - result = Synth::convertBindPatToRaw(this).(Raw::BindPat).getBindingId() + result = Synth::convertIdentPatToRaw(this).(Raw::IdentPat).getBindingId() } /** - * Gets the subpat of this bind pat, if it exists. + * Gets the subpat of this ident pat, if it exists. */ Pat getSubpat() { - result = Synth::convertPatFromRaw(Synth::convertBindPatToRaw(this).(Raw::BindPat).getSubpat()) + result = + Synth::convertPatFromRaw(Synth::convertIdentPatToRaw(this).(Raw::IdentPat).getSubpat()) } /** diff --git a/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll b/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll deleted file mode 100644 index 254c735d942d..000000000000 --- a/rust/ql/lib/codeql/rust/generated/InlineAsmExpr.qll +++ /dev/null @@ -1,39 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `InlineAsmExpr`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr - -/** - * INTERNAL: This module contains the fully generated definition of `InlineAsmExpr` and should not - * be referenced directly. - */ -module Generated { - /** - * An inline assembly expression. For example: - * ``` - * unsafe { - * builtin # asm(_); - * } - * ``` - * INTERNAL: Do not reference the `Generated::InlineAsmExpr` class directly. - * Use the subclass `InlineAsmExpr`, where the following predicates are available. - */ - class InlineAsmExpr extends Synth::TInlineAsmExpr, Expr { - override string getAPrimaryQlClass() { result = "InlineAsmExpr" } - - /** - * Gets the expression of this inline asm expression. - */ - Expr getExpr() { - result = - Synth::convertExprFromRaw(Synth::convertInlineAsmExprToRaw(this) - .(Raw::InlineAsmExpr) - .getExpr()) - } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/LetStmt.qll b/rust/ql/lib/codeql/rust/generated/LetStmt.qll index 47898811660c..1bae00962a90 100644 --- a/rust/ql/lib/codeql/rust/generated/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/generated/LetStmt.qll @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Expr import codeql.rust.elements.Pat import codeql.rust.elements.Stmt -import codeql.rust.elements.TypeRef +import codeql.rust.elements.Type /** * INTERNAL: This module contains the fully generated definition of `LetStmt` and should not @@ -41,17 +41,16 @@ module Generated { } /** - * Gets the type reference of this let statement, if it exists. + * Gets the type of this let statement, if it exists. */ - TypeRef getTypeRef() { - result = - Synth::convertTypeRefFromRaw(Synth::convertLetStmtToRaw(this).(Raw::LetStmt).getTypeRef()) + Type getType() { + result = Synth::convertTypeFromRaw(Synth::convertLetStmtToRaw(this).(Raw::LetStmt).getType()) } /** - * Holds if `getTypeRef()` exists. + * Holds if `getType()` exists. */ - final predicate hasTypeRef() { exists(this.getTypeRef()) } + final predicate hasType() { exists(this.getType()) } /** * Gets the initializer of this let statement, if it exists. diff --git a/rust/ql/lib/codeql/rust/generated/LitPat.qll b/rust/ql/lib/codeql/rust/generated/LitPat.qll deleted file mode 100644 index bf04b82c8ea6..000000000000 --- a/rust/ql/lib/codeql/rust/generated/LitPat.qll +++ /dev/null @@ -1,38 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `LitPat`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr -import codeql.rust.elements.Pat - -/** - * INTERNAL: This module contains the fully generated definition of `LitPat` and should not - * be referenced directly. - */ -module Generated { - /** - * A literal pattern. For example: - * ``` - * match x { - * 42 => "ok", - * _ => "fail", - * } - * ``` - * INTERNAL: Do not reference the `Generated::LitPat` class directly. - * Use the subclass `LitPat`, where the following predicates are available. - */ - class LitPat extends Synth::TLitPat, Pat { - override string getAPrimaryQlClass() { result = "LitPat" } - - /** - * Gets the expression of this lit pat. - */ - Expr getExpr() { - result = Synth::convertExprFromRaw(Synth::convertLitPatToRaw(this).(Raw::LitPat).getExpr()) - } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll b/rust/ql/lib/codeql/rust/generated/Literal.qll similarity index 56% rename from rust/ql/lib/codeql/rust/generated/LiteralExpr.qll rename to rust/ql/lib/codeql/rust/generated/Literal.qll index 7c9ee19e3217..825ab6024075 100644 --- a/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/Literal.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `LiteralExpr`. + * This module provides the generated definition of `Literal`. * INTERNAL: Do not import directly. */ @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Expr /** - * INTERNAL: This module contains the fully generated definition of `LiteralExpr` and should not + * INTERNAL: This module contains the fully generated definition of `Literal` and should not * be referenced directly. */ module Generated { @@ -24,10 +24,10 @@ module Generated { * b'x'; * r"Hello, world!"; * true; - * INTERNAL: Do not reference the `Generated::LiteralExpr` class directly. - * Use the subclass `LiteralExpr`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::Literal` class directly. + * Use the subclass `Literal`, where the following predicates are available. */ - class LiteralExpr extends Synth::TLiteralExpr, Expr { - override string getAPrimaryQlClass() { result = "LiteralExpr" } + class Literal extends Synth::TLiteral, Expr { + override string getAPrimaryQlClass() { result = "Literal" } } } diff --git a/rust/ql/lib/codeql/rust/generated/LiteralPat.qll b/rust/ql/lib/codeql/rust/generated/LiteralPat.qll new file mode 100644 index 000000000000..ba38d34342cc --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/LiteralPat.qll @@ -0,0 +1,39 @@ +// generated by codegen +/** + * This module provides the generated definition of `LiteralPat`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr +import codeql.rust.elements.Pat + +/** + * INTERNAL: This module contains the fully generated definition of `LiteralPat` and should not + * be referenced directly. + */ +module Generated { + /** + * A literal pattern. For example: + * ``` + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + * INTERNAL: Do not reference the `Generated::LiteralPat` class directly. + * Use the subclass `LiteralPat`, where the following predicates are available. + */ + class LiteralPat extends Synth::TLiteralPat, Pat { + override string getAPrimaryQlClass() { result = "LiteralPat" } + + /** + * Gets the expression of this literal pat. + */ + Expr getExpr() { + result = + Synth::convertExprFromRaw(Synth::convertLiteralPatToRaw(this).(Raw::LiteralPat).getExpr()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll index 6bf5a90440a3..8bb7c201596c 100644 --- a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.GenericArgs +import codeql.rust.elements.GenericArgList /** * INTERNAL: This module contains the fully generated definition of `MethodCallExpr` and should not @@ -65,9 +65,9 @@ module Generated { /** * Gets the generic arguments of this method call expression, if it exists. */ - GenericArgs getGenericArgs() { + GenericArgList getGenericArgs() { result = - Synth::convertGenericArgsFromRaw(Synth::convertMethodCallExprToRaw(this) + Synth::convertGenericArgListFromRaw(Synth::convertMethodCallExprToRaw(this) .(Raw::MethodCallExpr) .getGenericArgs()) } diff --git a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll index 109a63775e66..a151c19e5507 100644 --- a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.TypeRef +import codeql.rust.elements.Type /** * INTERNAL: This module contains the fully generated definition of `OffsetOfExpr` and should not @@ -28,9 +28,9 @@ module Generated { /** * Gets the container of this offset of expression. */ - TypeRef getContainer() { + Type getContainer() { result = - Synth::convertTypeRefFromRaw(Synth::convertOffsetOfExprToRaw(this) + Synth::convertTypeFromRaw(Synth::convertOffsetOfExprToRaw(this) .(Raw::OffsetOfExpr) .getContainer()) } diff --git a/rust/ql/lib/codeql/rust/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/generated/ParentChild.qll index 01f0af0b608c..a0e43cbcb18c 100644 --- a/rust/ql/lib/codeql/rust/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/generated/ParentChild.qll @@ -161,8 +161,8 @@ private module Impl { ) } - private Element getImmediateChildOfGenericArgs( - GenericArgs e, int index, string partialPredicateCall + private Element getImmediateChildOfGenericArgList( + GenericArgList e, int index, string partialPredicateCall ) { exists(int b, int bAstNode, int bUnimplemented, int n | b = 0 and @@ -245,38 +245,38 @@ private module Impl { ) } - private Element getImmediateChildOfRecordFieldPat( - RecordFieldPat e, int index, string partialPredicateCall + private Element getImmediateChildOfRecordExprField( + RecordExprField e, int index, string partialPredicateCall ) { - exists(int b, int bAstNode, int n, int nPat | + exists(int b, int bAstNode, int n, int nExpr | b = 0 and bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and n = bAstNode and - nPat = n + 1 and + nExpr = n + 1 and ( none() or result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" ) ) } - private Element getImmediateChildOfRecordLitField( - RecordLitField e, int index, string partialPredicateCall + private Element getImmediateChildOfRecordPatField( + RecordPatField e, int index, string partialPredicateCall ) { - exists(int b, int bAstNode, int n, int nExpr | + exists(int b, int bAstNode, int n, int nPat | b = 0 and bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and n = bAstNode and - nExpr = n + 1 and + nPat = n + 1 and ( none() or result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall) or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + index = n and result = e.getPat() and partialPredicateCall = "Pat()" ) ) } @@ -294,7 +294,7 @@ private module Impl { ) } - private Element getImmediateChildOfTypeRef(TypeRef e, int index, string partialPredicateCall) { + private Element getImmediateChildOfType(Type e, int index, string partialPredicateCall) { exists(int b, int bAstNode, int bUnimplemented, int n | b = 0 and bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and @@ -324,7 +324,7 @@ private module Impl { ) } - private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { + private Element getImmediateChildOfAsmExpr(AsmExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nExpr | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and @@ -340,7 +340,7 @@ private module Impl { ) } - private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { + private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nExpr | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and @@ -356,39 +356,37 @@ private module Impl { ) } - private Element getImmediateChildOfBinaryOpExpr( - BinaryOpExpr e, int index, string partialPredicateCall - ) { - exists(int b, int bExpr, int n, int nLhs, int nRhs | + private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { + exists(int b, int bExpr, int n, int nExpr | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and n = bExpr and - nLhs = n + 1 and - nRhs = nLhs + 1 and + nExpr = n + 1 and ( none() or result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) or - index = n and result = e.getLhs() and partialPredicateCall = "Lhs()" - or - index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" ) ) } - private Element getImmediateChildOfBindPat(BindPat e, int index, string partialPredicateCall) { - exists(int b, int bPat, int n, int nSubpat | + private Element getImmediateChildOfBinExpr(BinExpr e, int index, string partialPredicateCall) { + exists(int b, int bExpr, int n, int nLhs, int nRhs | b = 0 and - bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and - n = bPat and - nSubpat = n + 1 and + bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and + n = bExpr and + nLhs = n + 1 and + nRhs = nLhs + 1 and ( none() or - result = getImmediateChildOfPat(e, index - b, partialPredicateCall) + result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) or - index = n and result = e.getSubpat() and partialPredicateCall = "Subpat()" + index = n and result = e.getLhs() and partialPredicateCall = "Lhs()" + or + index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" ) ) } @@ -487,12 +485,12 @@ private module Impl { } private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { - exists(int b, int bExpr, int n, int nExpr, int nTypeRef | + exists(int b, int bExpr, int n, int nExpr, int nType | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and n = bExpr and nExpr = n + 1 and - nTypeRef = nExpr + 1 and + nType = nExpr + 1 and ( none() or @@ -500,7 +498,7 @@ private module Impl { or index = n and result = e.getExpr() and partialPredicateCall = "Expr()" or - index = nExpr and result = e.getTypeRef() and partialPredicateCall = "TypeRef()" + index = nExpr and result = e.getType() and partialPredicateCall = "Type()" ) ) } @@ -635,6 +633,22 @@ private module Impl { ) } + private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) { + exists(int b, int bPat, int n, int nSubpat | + b = 0 and + bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and + n = bPat and + nSubpat = n + 1 and + ( + none() + or + result = getImmediateChildOfPat(e, index - b, partialPredicateCall) + or + index = n and result = e.getSubpat() and partialPredicateCall = "Subpat()" + ) + ) + } + private Element getImmediateChildOfIfExpr(IfExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nCondition, int nThen, int nElse | b = 0 and @@ -676,24 +690,6 @@ private module Impl { ) } - private Element getImmediateChildOfInlineAsmExpr( - InlineAsmExpr e, int index, string partialPredicateCall - ) { - exists(int b, int bExpr, int n, int nExpr | - b = 0 and - bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and - n = bExpr and - nExpr = n + 1 and - ( - none() - or - result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - private Element getImmediateChildOfItemStmt(ItemStmt e, int index, string partialPredicateCall) { exists(int b, int bStmt, int n | b = 0 and @@ -727,13 +723,13 @@ private module Impl { } private Element getImmediateChildOfLetStmt(LetStmt e, int index, string partialPredicateCall) { - exists(int b, int bStmt, int n, int nPat, int nTypeRef, int nInitializer, int nElse | + exists(int b, int bStmt, int n, int nPat, int nType, int nInitializer, int nElse | b = 0 and bStmt = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfStmt(e, i, _)) | i) and n = bStmt and nPat = n + 1 and - nTypeRef = nPat + 1 and - nInitializer = nTypeRef + 1 and + nType = nPat + 1 and + nInitializer = nType + 1 and nElse = nInitializer + 1 and ( none() @@ -742,42 +738,40 @@ private module Impl { or index = n and result = e.getPat() and partialPredicateCall = "Pat()" or - index = nPat and result = e.getTypeRef() and partialPredicateCall = "TypeRef()" + index = nPat and result = e.getType() and partialPredicateCall = "Type()" or - index = nTypeRef and result = e.getInitializer() and partialPredicateCall = "Initializer()" + index = nType and result = e.getInitializer() and partialPredicateCall = "Initializer()" or index = nInitializer and result = e.getElse() and partialPredicateCall = "Else()" ) ) } - private Element getImmediateChildOfLitPat(LitPat e, int index, string partialPredicateCall) { - exists(int b, int bPat, int n, int nExpr | + private Element getImmediateChildOfLiteral(Literal e, int index, string partialPredicateCall) { + exists(int b, int bExpr, int n | b = 0 and - bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and - n = bPat and - nExpr = n + 1 and + bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and + n = bExpr and ( none() or - result = getImmediateChildOfPat(e, index - b, partialPredicateCall) - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) ) ) } - private Element getImmediateChildOfLiteralExpr( - LiteralExpr e, int index, string partialPredicateCall - ) { - exists(int b, int bExpr, int n | + private Element getImmediateChildOfLiteralPat(LiteralPat e, int index, string partialPredicateCall) { + exists(int b, int bPat, int n, int nExpr | b = 0 and - bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and - n = bExpr and + bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and + n = bPat and + nExpr = n + 1 and ( none() or - result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) + result = getImmediateChildOfPat(e, index - b, partialPredicateCall) + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" ) ) } @@ -959,6 +953,22 @@ private module Impl { ) } + private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index, string partialPredicateCall) { + exists(int b, int bExpr, int n, int nExpr | + b = 0 and + bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and + n = bExpr and + nExpr = n + 1 and + ( + none() + or + result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + private Element getImmediateChildOfRangeExpr(RangeExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nLhs, int nRhs | b = 0 and @@ -997,9 +1007,7 @@ private module Impl { ) } - private Element getImmediateChildOfRecordLitExpr( - RecordLitExpr e, int index, string partialPredicateCall - ) { + private Element getImmediateChildOfRecordExpr(RecordExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nPath, int nField, int nSpread | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and @@ -1170,24 +1178,6 @@ private module Impl { ) } - private Element getImmediateChildOfUnaryOpExpr( - UnaryOpExpr e, int index, string partialPredicateCall - ) { - exists(int b, int bExpr, int n, int nExpr | - b = 0 and - bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and - n = bExpr and - nExpr = n + 1 and - ( - none() - or - result = getImmediateChildOfExpr(e, index - b, partialPredicateCall) - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - private Element getImmediateChildOfUnderscoreExpr( UnderscoreExpr e, int index, string partialPredicateCall ) { @@ -1224,7 +1214,9 @@ private module Impl { ) } - private Element getImmediateChildOfWildPat(WildPat e, int index, string partialPredicateCall) { + private Element getImmediateChildOfWildcardPat( + WildcardPat e, int index, string partialPredicateCall + ) { exists(int b, int bPat, int n | b = 0 and bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and @@ -1370,7 +1362,7 @@ private module Impl { or result = getImmediateChildOfUnknownLocation(e, index, partialAccessor) or - result = getImmediateChildOfGenericArgs(e, index, partialAccessor) + result = getImmediateChildOfGenericArgList(e, index, partialAccessor) or result = getImmediateChildOfLabel(e, index, partialAccessor) or @@ -1378,19 +1370,19 @@ private module Impl { or result = getImmediateChildOfPath(e, index, partialAccessor) or - result = getImmediateChildOfRecordFieldPat(e, index, partialAccessor) + result = getImmediateChildOfRecordExprField(e, index, partialAccessor) or - result = getImmediateChildOfRecordLitField(e, index, partialAccessor) + result = getImmediateChildOfRecordPatField(e, index, partialAccessor) or - result = getImmediateChildOfTypeRef(e, index, partialAccessor) + result = getImmediateChildOfType(e, index, partialAccessor) + or + result = getImmediateChildOfAsmExpr(e, index, partialAccessor) or result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) or result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) or - result = getImmediateChildOfBinaryOpExpr(e, index, partialAccessor) - or - result = getImmediateChildOfBindPat(e, index, partialAccessor) + result = getImmediateChildOfBinExpr(e, index, partialAccessor) or result = getImmediateChildOfBoxExpr(e, index, partialAccessor) or @@ -1416,21 +1408,21 @@ private module Impl { or result = getImmediateChildOfFunction(e, index, partialAccessor) or + result = getImmediateChildOfIdentPat(e, index, partialAccessor) + or result = getImmediateChildOfIfExpr(e, index, partialAccessor) or result = getImmediateChildOfIndexExpr(e, index, partialAccessor) or - result = getImmediateChildOfInlineAsmExpr(e, index, partialAccessor) - or result = getImmediateChildOfItemStmt(e, index, partialAccessor) or result = getImmediateChildOfLetExpr(e, index, partialAccessor) or result = getImmediateChildOfLetStmt(e, index, partialAccessor) or - result = getImmediateChildOfLitPat(e, index, partialAccessor) + result = getImmediateChildOfLiteral(e, index, partialAccessor) or - result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) + result = getImmediateChildOfLiteralPat(e, index, partialAccessor) or result = getImmediateChildOfLoopExpr(e, index, partialAccessor) or @@ -1452,11 +1444,13 @@ private module Impl { or result = getImmediateChildOfPathPat(e, index, partialAccessor) or + result = getImmediateChildOfPrefixExpr(e, index, partialAccessor) + or result = getImmediateChildOfRangeExpr(e, index, partialAccessor) or result = getImmediateChildOfRangePat(e, index, partialAccessor) or - result = getImmediateChildOfRecordLitExpr(e, index, partialAccessor) + result = getImmediateChildOfRecordExpr(e, index, partialAccessor) or result = getImmediateChildOfRecordPat(e, index, partialAccessor) or @@ -1474,13 +1468,11 @@ private module Impl { or result = getImmediateChildOfTupleStructPat(e, index, partialAccessor) or - result = getImmediateChildOfUnaryOpExpr(e, index, partialAccessor) - or result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) or result = getImmediateChildOfUnimplementedDeclaration(e, index, partialAccessor) or - result = getImmediateChildOfWildPat(e, index, partialAccessor) + result = getImmediateChildOfWildcardPat(e, index, partialAccessor) or result = getImmediateChildOfYeetExpr(e, index, partialAccessor) or diff --git a/rust/ql/lib/codeql/rust/generated/PrefixExpr.qll b/rust/ql/lib/codeql/rust/generated/PrefixExpr.qll new file mode 100644 index 000000000000..8d31aa2ffa8b --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/PrefixExpr.qll @@ -0,0 +1,42 @@ +// generated by codegen +/** + * This module provides the generated definition of `PrefixExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr + +/** + * INTERNAL: This module contains the fully generated definition of `PrefixExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + * INTERNAL: Do not reference the `Generated::PrefixExpr` class directly. + * Use the subclass `PrefixExpr`, where the following predicates are available. + */ + class PrefixExpr extends Synth::TPrefixExpr, Expr { + override string getAPrimaryQlClass() { result = "PrefixExpr" } + + /** + * Gets the expression of this prefix expression. + */ + Expr getExpr() { + result = + Synth::convertExprFromRaw(Synth::convertPrefixExprToRaw(this).(Raw::PrefixExpr).getExpr()) + } + + /** + * Gets the op of this prefix expression. + */ + string getOp() { result = Synth::convertPrefixExprToRaw(this).(Raw::PrefixExpr).getOp() } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index 353f3e16cb2e..74c7dc50ed9c 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -102,8 +102,8 @@ module Raw { * x.foo::(42); * ``` */ - class GenericArgs extends @generic_args, AstNode, Unimplemented { - override string toString() { result = "GenericArgs" } + class GenericArgList extends @generic_arg_list, AstNode, Unimplemented { + override string toString() { result = "GenericArgList" } } /** @@ -179,44 +179,44 @@ module Raw { /** * INTERNAL: Do not use. - * A field in a record pattern. For example `a: 1` in: + * A field in a record expression. For example `a: 1` in: * ``` - * let Foo { a: 1, b: 2 } = foo; + * Foo { a: 1, b: 2 }; * ``` */ - class RecordFieldPat extends @record_field_pat, AstNode { - override string toString() { result = "RecordFieldPat" } + class RecordExprField extends @record_expr_field, AstNode { + override string toString() { result = "RecordExprField" } /** - * Gets the name of this record field pat. + * Gets the name of this record expression field. */ - string getName() { record_field_pats(this, result, _) } + string getName() { record_expr_fields(this, result, _) } /** - * Gets the pat of this record field pat. + * Gets the expression of this record expression field. */ - Pat getPat() { record_field_pats(this, _, result) } + Expr getExpr() { record_expr_fields(this, _, result) } } /** * INTERNAL: Do not use. - * A field in a record literal. For example `a: 1` in: + * A field in a record pattern. For example `a: 1` in: * ``` - * Foo { a: 1, b: 2 }; + * let Foo { a: 1, b: 2 } = foo; * ``` */ - class RecordLitField extends @record_lit_field, AstNode { - override string toString() { result = "RecordLitField" } + class RecordPatField extends @record_pat_field, AstNode { + override string toString() { result = "RecordPatField" } /** - * Gets the name of this record lit field. + * Gets the name of this record pat field. */ - string getName() { record_lit_fields(this, result, _) } + string getName() { record_pat_fields(this, result, _) } /** - * Gets the expression of this record lit field. + * Gets the pat of this record pat field. */ - Expr getExpr() { record_lit_fields(this, _, result) } + Pat getPat() { record_pat_fields(this, _, result) } } /** @@ -234,8 +234,8 @@ module Raw { * let z: Option; * ``` */ - class TypeRef extends @type_ref, AstNode, Unimplemented { - override string toString() { result = "TypeRef" } + class Type extends @type, AstNode, Unimplemented { + override string toString() { result = "Type" } } /** @@ -248,6 +248,24 @@ module Raw { */ class ArrayExpr extends @array_expr, Expr { } + /** + * INTERNAL: Do not use. + * An inline assembly expression. For example: + * ``` + * unsafe { + * builtin # asm(_); + * } + * ``` + */ + class AsmExpr extends @asm_expr, Expr { + override string toString() { result = "AsmExpr" } + + /** + * Gets the expression of this asm expression. + */ + Expr getExpr() { asm_exprs(this, result) } + } + /** * INTERNAL: Do not use. * An `await` expression. For example: @@ -299,53 +317,23 @@ module Raw { * x += y; * ``` */ - class BinaryOpExpr extends @binary_op_expr, Expr { - override string toString() { result = "BinaryOpExpr" } + class BinExpr extends @bin_expr, Expr { + override string toString() { result = "BinExpr" } /** - * Gets the lhs of this binary op expression. + * Gets the lhs of this bin expression. */ - Expr getLhs() { binary_op_exprs(this, result, _) } + Expr getLhs() { bin_exprs(this, result, _) } /** - * Gets the rhs of this binary op expression. + * Gets the rhs of this bin expression. */ - Expr getRhs() { binary_op_exprs(this, _, result) } + Expr getRhs() { bin_exprs(this, _, result) } /** - * Gets the op of this binary op expression, if it exists. + * Gets the op of this bin expression, if it exists. */ - string getOp() { binary_op_expr_ops(this, result) } - } - - /** - * INTERNAL: Do not use. - * A binding pattern. For example: - * ``` - * match x { - * Some(y) => y, - * None => 0, - * }; - * ``` - * ``` - * match x { - * y@Some(_) => y, - * None => 0, - * }; - * ``` - */ - class BindPat extends @bind_pat, Pat { - override string toString() { result = "BindPat" } - - /** - * Gets the binding of this bind pat. - */ - string getBindingId() { bind_pats(this, result) } - - /** - * Gets the subpat of this bind pat, if it exists. - */ - Pat getSubpat() { bind_pat_subpats(this, result) } + string getOp() { bin_expr_ops(this, result) } } /** @@ -475,9 +463,9 @@ module Raw { Expr getExpr() { cast_exprs(this, result, _) } /** - * Gets the type reference of this cast expression. + * Gets the type of this cast expression. */ - TypeRef getTypeRef() { cast_exprs(this, _, result) } + Type getType() { cast_exprs(this, _, result) } } /** @@ -504,12 +492,12 @@ module Raw { /** * Gets the `index`th argument type of this closure expression (0-based), if it exists. */ - TypeRef getArgType(int index) { closure_expr_arg_types(this, index, result) } + Type getArgType(int index) { closure_expr_arg_types(this, index, result) } /** * Gets the ret type of this closure expression, if it exists. */ - TypeRef getRetType() { closure_expr_ret_types(this, result) } + Type getRetType() { closure_expr_ret_types(this, result) } /** * Gets the body of this closure expression. @@ -662,6 +650,36 @@ module Raw { Expr getBody() { functions(this, _, result) } } + /** + * INTERNAL: Do not use. + * A binding pattern. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * }; + * ``` + * ``` + * match x { + * y@Some(_) => y, + * None => 0, + * }; + * ``` + */ + class IdentPat extends @ident_pat, Pat { + override string toString() { result = "IdentPat" } + + /** + * Gets the binding of this ident pat. + */ + string getBindingId() { ident_pats(this, result) } + + /** + * Gets the subpat of this ident pat, if it exists. + */ + Pat getSubpat() { ident_pat_subpats(this, result) } + } + /** * INTERNAL: Do not use. * An `if` expression. For example: @@ -724,24 +742,6 @@ module Raw { predicate isAssigneeExpr() { index_expr_is_assignee_expr(this) } } - /** - * INTERNAL: Do not use. - * An inline assembly expression. For example: - * ``` - * unsafe { - * builtin # asm(_); - * } - * ``` - */ - class InlineAsmExpr extends @inline_asm_expr, Expr { - override string toString() { result = "InlineAsmExpr" } - - /** - * Gets the expression of this inline asm expression. - */ - Expr getExpr() { inline_asm_exprs(this, result) } - } - /** * INTERNAL: Do not use. * An item statement. For example: @@ -801,9 +801,9 @@ module Raw { Pat getPat() { let_stmts(this, result) } /** - * Gets the type reference of this let statement, if it exists. + * Gets the type of this let statement, if it exists. */ - TypeRef getTypeRef() { let_stmt_type_refs(this, result) } + Type getType() { let_stmt_types(this, result) } /** * Gets the initializer of this let statement, if it exists. @@ -816,25 +816,6 @@ module Raw { Expr getElse() { let_stmt_elses(this, result) } } - /** - * INTERNAL: Do not use. - * A literal pattern. For example: - * ``` - * match x { - * 42 => "ok", - * _ => "fail", - * } - * ``` - */ - class LitPat extends @lit_pat, Pat { - override string toString() { result = "LitPat" } - - /** - * Gets the expression of this lit pat. - */ - Expr getExpr() { lit_pats(this, result) } - } - /** * INTERNAL: Do not use. * A literal expression. For example: @@ -848,8 +829,27 @@ module Raw { * r"Hello, world!"; * true; */ - class LiteralExpr extends @literal_expr, Expr { - override string toString() { result = "LiteralExpr" } + class Literal extends @literal, Expr { + override string toString() { result = "Literal" } + } + + /** + * INTERNAL: Do not use. + * A literal pattern. For example: + * ``` + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ + class LiteralPat extends @literal_pat, Pat { + override string toString() { result = "LiteralPat" } + + /** + * Gets the expression of this literal pat. + */ + Expr getExpr() { literal_pats(this, result) } } /** @@ -949,7 +949,7 @@ module Raw { /** * Gets the generic arguments of this method call expression, if it exists. */ - GenericArgs getGenericArgs() { method_call_expr_generic_args(this, result) } + GenericArgList getGenericArgs() { method_call_expr_generic_args(this, result) } } /** @@ -1012,7 +1012,7 @@ module Raw { /** * Gets the container of this offset of expression. */ - TypeRef getContainer() { offset_of_exprs(this, result) } + Type getContainer() { offset_of_exprs(this, result) } /** * Gets the `index`th field of this offset of expression (0-based). @@ -1076,6 +1076,29 @@ module Raw { Path getPath() { path_pats(this, result) } } + /** + * INTERNAL: Do not use. + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + */ + class PrefixExpr extends @prefix_expr, Expr { + override string toString() { result = "PrefixExpr" } + + /** + * Gets the expression of this prefix expression. + */ + Expr getExpr() { prefix_exprs(this, result, _) } + + /** + * Gets the op of this prefix expression. + */ + string getOp() { prefix_exprs(this, _, result) } + } + /** * INTERNAL: Do not use. * A range expression. For example: @@ -1134,7 +1157,7 @@ module Raw { /** * INTERNAL: Do not use. - * A record literal expression. For example: + * A record expression. For example: * ``` * let first = Foo { a: 1, b: 2 }; * let second = Foo { a: 2, ..first }; @@ -1142,33 +1165,33 @@ module Raw { * Foo { .. } = second; * ``` */ - class RecordLitExpr extends @record_lit_expr, Expr { - override string toString() { result = "RecordLitExpr" } + class RecordExpr extends @record_expr, Expr { + override string toString() { result = "RecordExpr" } /** - * Gets the path of this record lit expression, if it exists. + * Gets the path of this record expression, if it exists. */ - Path getPath() { record_lit_expr_paths(this, result) } + Path getPath() { record_expr_paths(this, result) } /** - * Gets the `index`th field of this record lit expression (0-based). + * Gets the `index`th field of this record expression (0-based). */ - RecordLitField getField(int index) { record_lit_expr_fields(this, index, result) } + RecordExprField getField(int index) { record_expr_fields(this, index, result) } /** - * Gets the spread of this record lit expression, if it exists. + * Gets the spread of this record expression, if it exists. */ - Expr getSpread() { record_lit_expr_spreads(this, result) } + Expr getSpread() { record_expr_spreads(this, result) } /** - * Holds if this record lit expression has ellipsis. + * Holds if this record expression has ellipsis. */ - predicate hasEllipsis() { record_lit_expr_has_ellipsis(this) } + predicate hasEllipsis() { record_expr_has_ellipsis(this) } /** - * Holds if this record lit expression is assignee expression. + * Holds if this record expression is assignee expression. */ - predicate isAssigneeExpr() { record_lit_expr_is_assignee_expr(this) } + predicate isAssigneeExpr() { record_expr_is_assignee_expr(this) } } /** @@ -1192,7 +1215,7 @@ module Raw { /** * Gets the `index`th argument of this record pat (0-based). */ - RecordFieldPat getArg(int index) { record_pat_args(this, index, result) } + RecordPatField getArg(int index) { record_pat_args(this, index, result) } /** * Holds if this record pat has ellipsis. @@ -1379,29 +1402,6 @@ module Raw { int getEllipsisIndex() { tuple_struct_pat_ellipsis_indices(this, result) } } - /** - * INTERNAL: Do not use. - * A unary operation expression. For example: - * ``` - * let x = -42 - * let y = !true - * let z = *ptr - * ``` - */ - class UnaryOpExpr extends @unary_op_expr, Expr { - override string toString() { result = "UnaryOpExpr" } - - /** - * Gets the expression of this unary op expression. - */ - Expr getExpr() { unary_op_exprs(this, result, _) } - - /** - * Gets the op of this unary op expression. - */ - string getOp() { unary_op_exprs(this, _, result) } - } - /** * INTERNAL: Do not use. * An underscore expression. For example: @@ -1427,8 +1427,8 @@ module Raw { * let _ = 42; * ``` */ - class WildPat extends @wild_pat, Pat { - override string toString() { result = "WildPat" } + class WildcardPat extends @wildcard_pat, Pat { + override string toString() { result = "WildcardPat" } } /** diff --git a/rust/ql/lib/codeql/rust/generated/RecordExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordExpr.qll new file mode 100644 index 000000000000..f7b9c2194362 --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/RecordExpr.qll @@ -0,0 +1,90 @@ +// generated by codegen +/** + * This module provides the generated definition of `RecordExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr +import codeql.rust.elements.Path +import codeql.rust.elements.RecordExprField + +/** + * INTERNAL: This module contains the fully generated definition of `RecordExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * A record expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` + * INTERNAL: Do not reference the `Generated::RecordExpr` class directly. + * Use the subclass `RecordExpr`, where the following predicates are available. + */ + class RecordExpr extends Synth::TRecordExpr, Expr { + override string getAPrimaryQlClass() { result = "RecordExpr" } + + /** + * Gets the path of this record expression, if it exists. + */ + Path getPath() { + result = + Synth::convertPathFromRaw(Synth::convertRecordExprToRaw(this).(Raw::RecordExpr).getPath()) + } + + /** + * Holds if `getPath()` exists. + */ + final predicate hasPath() { exists(this.getPath()) } + + /** + * Gets the `index`th field of this record expression (0-based). + */ + RecordExprField getField(int index) { + result = + Synth::convertRecordExprFieldFromRaw(Synth::convertRecordExprToRaw(this) + .(Raw::RecordExpr) + .getField(index)) + } + + /** + * Gets any of the fields of this record expression. + */ + final RecordExprField getAField() { result = this.getField(_) } + + /** + * Gets the number of fields of this record expression. + */ + final int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + + /** + * Gets the spread of this record expression, if it exists. + */ + Expr getSpread() { + result = + Synth::convertExprFromRaw(Synth::convertRecordExprToRaw(this).(Raw::RecordExpr).getSpread()) + } + + /** + * Holds if `getSpread()` exists. + */ + final predicate hasSpread() { exists(this.getSpread()) } + + /** + * Holds if this record expression has ellipsis. + */ + predicate hasEllipsis() { Synth::convertRecordExprToRaw(this).(Raw::RecordExpr).hasEllipsis() } + + /** + * Holds if this record expression is assignee expression. + */ + predicate isAssigneeExpr() { + Synth::convertRecordExprToRaw(this).(Raw::RecordExpr).isAssigneeExpr() + } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/RecordExprField.qll b/rust/ql/lib/codeql/rust/generated/RecordExprField.qll new file mode 100644 index 000000000000..23b741b14621 --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/RecordExprField.qll @@ -0,0 +1,45 @@ +// generated by codegen +/** + * This module provides the generated definition of `RecordExprField`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.AstNode +import codeql.rust.elements.Expr + +/** + * INTERNAL: This module contains the fully generated definition of `RecordExprField` and should not + * be referenced directly. + */ +module Generated { + /** + * A field in a record expression. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` + * INTERNAL: Do not reference the `Generated::RecordExprField` class directly. + * Use the subclass `RecordExprField`, where the following predicates are available. + */ + class RecordExprField extends Synth::TRecordExprField, AstNode { + override string getAPrimaryQlClass() { result = "RecordExprField" } + + /** + * Gets the name of this record expression field. + */ + string getName() { + result = Synth::convertRecordExprFieldToRaw(this).(Raw::RecordExprField).getName() + } + + /** + * Gets the expression of this record expression field. + */ + Expr getExpr() { + result = + Synth::convertExprFromRaw(Synth::convertRecordExprFieldToRaw(this) + .(Raw::RecordExprField) + .getExpr()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll b/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll deleted file mode 100644 index de78c3fcea4f..000000000000 --- a/rust/ql/lib/codeql/rust/generated/RecordFieldPat.qll +++ /dev/null @@ -1,45 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `RecordFieldPat`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.AstNode -import codeql.rust.elements.Pat - -/** - * INTERNAL: This module contains the fully generated definition of `RecordFieldPat` and should not - * be referenced directly. - */ -module Generated { - /** - * A field in a record pattern. For example `a: 1` in: - * ``` - * let Foo { a: 1, b: 2 } = foo; - * ``` - * INTERNAL: Do not reference the `Generated::RecordFieldPat` class directly. - * Use the subclass `RecordFieldPat`, where the following predicates are available. - */ - class RecordFieldPat extends Synth::TRecordFieldPat, AstNode { - override string getAPrimaryQlClass() { result = "RecordFieldPat" } - - /** - * Gets the name of this record field pat. - */ - string getName() { - result = Synth::convertRecordFieldPatToRaw(this).(Raw::RecordFieldPat).getName() - } - - /** - * Gets the pat of this record field pat. - */ - Pat getPat() { - result = - Synth::convertPatFromRaw(Synth::convertRecordFieldPatToRaw(this) - .(Raw::RecordFieldPat) - .getPat()) - } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll deleted file mode 100644 index 12b2339751fe..000000000000 --- a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll +++ /dev/null @@ -1,96 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `RecordLitExpr`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr -import codeql.rust.elements.Path -import codeql.rust.elements.RecordLitField - -/** - * INTERNAL: This module contains the fully generated definition of `RecordLitExpr` and should not - * be referenced directly. - */ -module Generated { - /** - * A record literal expression. For example: - * ``` - * let first = Foo { a: 1, b: 2 }; - * let second = Foo { a: 2, ..first }; - * Foo { a: 1, b: 2 }[2] = 10; - * Foo { .. } = second; - * ``` - * INTERNAL: Do not reference the `Generated::RecordLitExpr` class directly. - * Use the subclass `RecordLitExpr`, where the following predicates are available. - */ - class RecordLitExpr extends Synth::TRecordLitExpr, Expr { - override string getAPrimaryQlClass() { result = "RecordLitExpr" } - - /** - * Gets the path of this record lit expression, if it exists. - */ - Path getPath() { - result = - Synth::convertPathFromRaw(Synth::convertRecordLitExprToRaw(this) - .(Raw::RecordLitExpr) - .getPath()) - } - - /** - * Holds if `getPath()` exists. - */ - final predicate hasPath() { exists(this.getPath()) } - - /** - * Gets the `index`th field of this record lit expression (0-based). - */ - RecordLitField getField(int index) { - result = - Synth::convertRecordLitFieldFromRaw(Synth::convertRecordLitExprToRaw(this) - .(Raw::RecordLitExpr) - .getField(index)) - } - - /** - * Gets any of the fields of this record lit expression. - */ - final RecordLitField getAField() { result = this.getField(_) } - - /** - * Gets the number of fields of this record lit expression. - */ - final int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } - - /** - * Gets the spread of this record lit expression, if it exists. - */ - Expr getSpread() { - result = - Synth::convertExprFromRaw(Synth::convertRecordLitExprToRaw(this) - .(Raw::RecordLitExpr) - .getSpread()) - } - - /** - * Holds if `getSpread()` exists. - */ - final predicate hasSpread() { exists(this.getSpread()) } - - /** - * Holds if this record lit expression has ellipsis. - */ - predicate hasEllipsis() { - Synth::convertRecordLitExprToRaw(this).(Raw::RecordLitExpr).hasEllipsis() - } - - /** - * Holds if this record lit expression is assignee expression. - */ - predicate isAssigneeExpr() { - Synth::convertRecordLitExprToRaw(this).(Raw::RecordLitExpr).isAssigneeExpr() - } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll b/rust/ql/lib/codeql/rust/generated/RecordLitField.qll deleted file mode 100644 index af1188ba8d1e..000000000000 --- a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll +++ /dev/null @@ -1,45 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `RecordLitField`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.AstNode -import codeql.rust.elements.Expr - -/** - * INTERNAL: This module contains the fully generated definition of `RecordLitField` and should not - * be referenced directly. - */ -module Generated { - /** - * A field in a record literal. For example `a: 1` in: - * ``` - * Foo { a: 1, b: 2 }; - * ``` - * INTERNAL: Do not reference the `Generated::RecordLitField` class directly. - * Use the subclass `RecordLitField`, where the following predicates are available. - */ - class RecordLitField extends Synth::TRecordLitField, AstNode { - override string getAPrimaryQlClass() { result = "RecordLitField" } - - /** - * Gets the name of this record lit field. - */ - string getName() { - result = Synth::convertRecordLitFieldToRaw(this).(Raw::RecordLitField).getName() - } - - /** - * Gets the expression of this record lit field. - */ - Expr getExpr() { - result = - Synth::convertExprFromRaw(Synth::convertRecordLitFieldToRaw(this) - .(Raw::RecordLitField) - .getExpr()) - } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/RecordPat.qll b/rust/ql/lib/codeql/rust/generated/RecordPat.qll index 43832bb15d4b..7913ab6c30b2 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordPat.qll @@ -8,7 +8,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Pat import codeql.rust.elements.Path -import codeql.rust.elements.RecordFieldPat +import codeql.rust.elements.RecordPatField /** * INTERNAL: This module contains the fully generated definition of `RecordPat` and should not @@ -45,9 +45,9 @@ module Generated { /** * Gets the `index`th argument of this record pat (0-based). */ - RecordFieldPat getArg(int index) { + RecordPatField getArg(int index) { result = - Synth::convertRecordFieldPatFromRaw(Synth::convertRecordPatToRaw(this) + Synth::convertRecordPatFieldFromRaw(Synth::convertRecordPatToRaw(this) .(Raw::RecordPat) .getArg(index)) } @@ -55,7 +55,7 @@ module Generated { /** * Gets any of the arguments of this record pat. */ - final RecordFieldPat getAnArg() { result = this.getArg(_) } + final RecordPatField getAnArg() { result = this.getArg(_) } /** * Gets the number of arguments of this record pat. diff --git a/rust/ql/lib/codeql/rust/generated/RecordPatField.qll b/rust/ql/lib/codeql/rust/generated/RecordPatField.qll new file mode 100644 index 000000000000..01d349c11881 --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/RecordPatField.qll @@ -0,0 +1,45 @@ +// generated by codegen +/** + * This module provides the generated definition of `RecordPatField`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.AstNode +import codeql.rust.elements.Pat + +/** + * INTERNAL: This module contains the fully generated definition of `RecordPatField` and should not + * be referenced directly. + */ +module Generated { + /** + * A field in a record pattern. For example `a: 1` in: + * ``` + * let Foo { a: 1, b: 2 } = foo; + * ``` + * INTERNAL: Do not reference the `Generated::RecordPatField` class directly. + * Use the subclass `RecordPatField`, where the following predicates are available. + */ + class RecordPatField extends Synth::TRecordPatField, AstNode { + override string getAPrimaryQlClass() { result = "RecordPatField" } + + /** + * Gets the name of this record pat field. + */ + string getName() { + result = Synth::convertRecordPatFieldToRaw(this).(Raw::RecordPatField).getName() + } + + /** + * Gets the pat of this record pat field. + */ + Pat getPat() { + result = + Synth::convertPatFromRaw(Synth::convertRecordPatFieldToRaw(this) + .(Raw::RecordPatField) + .getPat()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/Synth.qll b/rust/ql/lib/codeql/rust/generated/Synth.qll index 2ff13d6b7ad0..c4e5b7e35c7d 100644 --- a/rust/ql/lib/codeql/rust/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/generated/Synth.qll @@ -18,23 +18,23 @@ module Synth { /** * INTERNAL: Do not use. */ - TAsyncBlockExpr(Raw::AsyncBlockExpr id) { constructAsyncBlockExpr(id) } or + TAsmExpr(Raw::AsmExpr id) { constructAsmExpr(id) } or /** * INTERNAL: Do not use. */ - TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } or + TAsyncBlockExpr(Raw::AsyncBlockExpr id) { constructAsyncBlockExpr(id) } or /** * INTERNAL: Do not use. */ - TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } or + TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } or /** * INTERNAL: Do not use. */ - TBinaryOpExpr(Raw::BinaryOpExpr id) { constructBinaryOpExpr(id) } or + TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } or /** * INTERNAL: Do not use. */ - TBindPat(Raw::BindPat id) { constructBindPat(id) } or + TBinExpr(Raw::BinExpr id) { constructBinExpr(id) } or /** * INTERNAL: Do not use. */ @@ -102,19 +102,19 @@ module Synth { /** * INTERNAL: Do not use. */ - TGenericArgs(Raw::GenericArgs id) { constructGenericArgs(id) } or + TGenericArgList(Raw::GenericArgList id) { constructGenericArgList(id) } or /** * INTERNAL: Do not use. */ - TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } or + TIdentPat(Raw::IdentPat id) { constructIdentPat(id) } or /** * INTERNAL: Do not use. */ - TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } or + TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } or /** * INTERNAL: Do not use. */ - TInlineAsmExpr(Raw::InlineAsmExpr id) { constructInlineAsmExpr(id) } or + TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } or /** * INTERNAL: Do not use. */ @@ -134,11 +134,11 @@ module Synth { /** * INTERNAL: Do not use. */ - TLitPat(Raw::LitPat id) { constructLitPat(id) } or + TLiteral(Raw::Literal id) { constructLiteral(id) } or /** * INTERNAL: Do not use. */ - TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } or + TLiteralPat(Raw::LiteralPat id) { constructLiteralPat(id) } or /** * INTERNAL: Do not use. */ @@ -187,6 +187,10 @@ module Synth { * INTERNAL: Do not use. */ TPathPat(Raw::PathPat id) { constructPathPat(id) } or + /** + * INTERNAL: Do not use. + */ + TPrefixExpr(Raw::PrefixExpr id) { constructPrefixExpr(id) } or /** * INTERNAL: Do not use. */ @@ -198,19 +202,19 @@ module Synth { /** * INTERNAL: Do not use. */ - TRecordFieldPat(Raw::RecordFieldPat id) { constructRecordFieldPat(id) } or + TRecordExpr(Raw::RecordExpr id) { constructRecordExpr(id) } or /** * INTERNAL: Do not use. */ - TRecordLitExpr(Raw::RecordLitExpr id) { constructRecordLitExpr(id) } or + TRecordExprField(Raw::RecordExprField id) { constructRecordExprField(id) } or /** * INTERNAL: Do not use. */ - TRecordLitField(Raw::RecordLitField id) { constructRecordLitField(id) } or + TRecordPat(Raw::RecordPat id) { constructRecordPat(id) } or /** * INTERNAL: Do not use. */ - TRecordPat(Raw::RecordPat id) { constructRecordPat(id) } or + TRecordPatField(Raw::RecordPatField id) { constructRecordPatField(id) } or /** * INTERNAL: Do not use. */ @@ -246,11 +250,7 @@ module Synth { /** * INTERNAL: Do not use. */ - TTypeRef(Raw::TypeRef id) { constructTypeRef(id) } or - /** - * INTERNAL: Do not use. - */ - TUnaryOpExpr(Raw::UnaryOpExpr id) { constructUnaryOpExpr(id) } or + TType(Raw::Type id) { constructType(id) } or /** * INTERNAL: Do not use. */ @@ -276,7 +276,7 @@ module Synth { /** * INTERNAL: Do not use. */ - TWildPat(Raw::WildPat id) { constructWildPat(id) } or + TWildcardPat(Raw::WildcardPat id) { constructWildcardPat(id) } or /** * INTERNAL: Do not use. */ @@ -295,8 +295,8 @@ module Synth { * INTERNAL: Do not use. */ class TAstNode = - TDeclaration or TExpr or TGenericArgs or TLabel or TMatchArm or TPat or TPath or - TRecordFieldPat or TRecordLitField or TStmt or TTypeRef; + TDeclaration or TExpr or TGenericArgList or TLabel or TMatchArm or TPat or TPath or + TRecordExprField or TRecordPatField or TStmt or TType; /** * INTERNAL: Do not use. @@ -312,12 +312,12 @@ module Synth { * INTERNAL: Do not use. */ class TExpr = - TArrayExpr or TAwaitExpr or TBecomeExpr or TBinaryOpExpr or TBlockExprBase or TBoxExpr or + TArrayExpr or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinExpr or TBlockExprBase or TBoxExpr or TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TConstExpr or TContinueExpr or - TFieldExpr or TIfExpr or TIndexExpr or TInlineAsmExpr or TLetExpr or TLiteralExpr or - TLoopExpr or TMatchExpr or TMethodCallExpr or TMissingExpr or TOffsetOfExpr or TPathExpr or - TRangeExpr or TRecordLitExpr or TRefExpr or TReturnExpr or TTupleExpr or TUnaryOpExpr or - TUnderscoreExpr or TYeetExpr or TYieldExpr; + TFieldExpr or TIfExpr or TIndexExpr or TLetExpr or TLiteral or TLoopExpr or TMatchExpr or + TMethodCallExpr or TMissingExpr or TOffsetOfExpr or TPathExpr or TPrefixExpr or + TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or TTupleExpr or TUnderscoreExpr or + TYeetExpr or TYieldExpr; /** * INTERNAL: Do not use. @@ -338,8 +338,9 @@ module Synth { * INTERNAL: Do not use. */ class TPat = - TBindPat or TBoxPat or TConstBlockPat or TLitPat or TMissingPat or TOrPat or TPathPat or - TRangePat or TRecordPat or TRefPat or TSlicePat or TTuplePat or TTupleStructPat or TWildPat; + TBoxPat or TConstBlockPat or TIdentPat or TLiteralPat or TMissingPat or TOrPat or TPathPat or + TRangePat or TRecordPat or TRefPat or TSlicePat or TTuplePat or TTupleStructPat or + TWildcardPat; /** * INTERNAL: Do not use. @@ -349,7 +350,14 @@ module Synth { /** * INTERNAL: Do not use. */ - class TUnimplemented = TGenericArgs or TPath or TTypeRef or TUnimplementedDeclaration; + class TUnimplemented = TGenericArgList or TPath or TType or TUnimplementedDeclaration; + + /** + * INTERNAL: Do not use. + * Converts a raw element to a synthesized `TAsmExpr`, if possible. + */ + cached + TAsmExpr convertAsmExprFromRaw(Raw::Element e) { result = TAsmExpr(e) } /** * INTERNAL: Do not use. @@ -374,17 +382,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TBinaryOpExpr`, if possible. + * Converts a raw element to a synthesized `TBinExpr`, if possible. */ cached - TBinaryOpExpr convertBinaryOpExprFromRaw(Raw::Element e) { result = TBinaryOpExpr(e) } - - /** - * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TBindPat`, if possible. - */ - cached - TBindPat convertBindPatFromRaw(Raw::Element e) { result = TBindPat(e) } + TBinExpr convertBinExprFromRaw(Raw::Element e) { result = TBinExpr(e) } /** * INTERNAL: Do not use. @@ -500,31 +501,31 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TGenericArgs`, if possible. + * Converts a raw element to a synthesized `TGenericArgList`, if possible. */ cached - TGenericArgs convertGenericArgsFromRaw(Raw::Element e) { result = TGenericArgs(e) } + TGenericArgList convertGenericArgListFromRaw(Raw::Element e) { result = TGenericArgList(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TIfExpr`, if possible. + * Converts a raw element to a synthesized `TIdentPat`, if possible. */ cached - TIfExpr convertIfExprFromRaw(Raw::Element e) { result = TIfExpr(e) } + TIdentPat convertIdentPatFromRaw(Raw::Element e) { result = TIdentPat(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TIndexExpr`, if possible. + * Converts a raw element to a synthesized `TIfExpr`, if possible. */ cached - TIndexExpr convertIndexExprFromRaw(Raw::Element e) { result = TIndexExpr(e) } + TIfExpr convertIfExprFromRaw(Raw::Element e) { result = TIfExpr(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TInlineAsmExpr`, if possible. + * Converts a raw element to a synthesized `TIndexExpr`, if possible. */ cached - TInlineAsmExpr convertInlineAsmExprFromRaw(Raw::Element e) { result = TInlineAsmExpr(e) } + TIndexExpr convertIndexExprFromRaw(Raw::Element e) { result = TIndexExpr(e) } /** * INTERNAL: Do not use. @@ -556,17 +557,17 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TLitPat`, if possible. + * Converts a raw element to a synthesized `TLiteral`, if possible. */ cached - TLitPat convertLitPatFromRaw(Raw::Element e) { result = TLitPat(e) } + TLiteral convertLiteralFromRaw(Raw::Element e) { result = TLiteral(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TLiteralExpr`, if possible. + * Converts a raw element to a synthesized `TLiteralPat`, if possible. */ cached - TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { result = TLiteralExpr(e) } + TLiteralPat convertLiteralPatFromRaw(Raw::Element e) { result = TLiteralPat(e) } /** * INTERNAL: Do not use. @@ -652,6 +653,13 @@ module Synth { cached TPathPat convertPathPatFromRaw(Raw::Element e) { result = TPathPat(e) } + /** + * INTERNAL: Do not use. + * Converts a raw element to a synthesized `TPrefixExpr`, if possible. + */ + cached + TPrefixExpr convertPrefixExprFromRaw(Raw::Element e) { result = TPrefixExpr(e) } + /** * INTERNAL: Do not use. * Converts a raw element to a synthesized `TRangeExpr`, if possible. @@ -668,31 +676,31 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TRecordFieldPat`, if possible. + * Converts a raw element to a synthesized `TRecordExpr`, if possible. */ cached - TRecordFieldPat convertRecordFieldPatFromRaw(Raw::Element e) { result = TRecordFieldPat(e) } + TRecordExpr convertRecordExprFromRaw(Raw::Element e) { result = TRecordExpr(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TRecordLitExpr`, if possible. + * Converts a raw element to a synthesized `TRecordExprField`, if possible. */ cached - TRecordLitExpr convertRecordLitExprFromRaw(Raw::Element e) { result = TRecordLitExpr(e) } + TRecordExprField convertRecordExprFieldFromRaw(Raw::Element e) { result = TRecordExprField(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TRecordLitField`, if possible. + * Converts a raw element to a synthesized `TRecordPat`, if possible. */ cached - TRecordLitField convertRecordLitFieldFromRaw(Raw::Element e) { result = TRecordLitField(e) } + TRecordPat convertRecordPatFromRaw(Raw::Element e) { result = TRecordPat(e) } /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TRecordPat`, if possible. + * Converts a raw element to a synthesized `TRecordPatField`, if possible. */ cached - TRecordPat convertRecordPatFromRaw(Raw::Element e) { result = TRecordPat(e) } + TRecordPatField convertRecordPatFieldFromRaw(Raw::Element e) { result = TRecordPatField(e) } /** * INTERNAL: Do not use. @@ -752,17 +760,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TTypeRef`, if possible. - */ - cached - TTypeRef convertTypeRefFromRaw(Raw::Element e) { result = TTypeRef(e) } - - /** - * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TUnaryOpExpr`, if possible. + * Converts a raw element to a synthesized `TType`, if possible. */ cached - TUnaryOpExpr convertUnaryOpExprFromRaw(Raw::Element e) { result = TUnaryOpExpr(e) } + TType convertTypeFromRaw(Raw::Element e) { result = TType(e) } /** * INTERNAL: Do not use. @@ -803,10 +804,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TWildPat`, if possible. + * Converts a raw element to a synthesized `TWildcardPat`, if possible. */ cached - TWildPat convertWildPatFromRaw(Raw::Element e) { result = TWildPat(e) } + TWildcardPat convertWildcardPatFromRaw(Raw::Element e) { result = TWildcardPat(e) } /** * INTERNAL: Do not use. @@ -843,7 +844,7 @@ module Synth { or result = convertExprFromRaw(e) or - result = convertGenericArgsFromRaw(e) + result = convertGenericArgListFromRaw(e) or result = convertLabelFromRaw(e) or @@ -853,13 +854,13 @@ module Synth { or result = convertPathFromRaw(e) or - result = convertRecordFieldPatFromRaw(e) + result = convertRecordExprFieldFromRaw(e) or - result = convertRecordLitFieldFromRaw(e) + result = convertRecordPatFieldFromRaw(e) or result = convertStmtFromRaw(e) or - result = convertTypeRefFromRaw(e) + result = convertTypeFromRaw(e) } /** @@ -911,11 +912,13 @@ module Synth { TExpr convertExprFromRaw(Raw::Element e) { result = convertArrayExprFromRaw(e) or + result = convertAsmExprFromRaw(e) + or result = convertAwaitExprFromRaw(e) or result = convertBecomeExprFromRaw(e) or - result = convertBinaryOpExprFromRaw(e) + result = convertBinExprFromRaw(e) or result = convertBlockExprBaseFromRaw(e) or @@ -939,11 +942,9 @@ module Synth { or result = convertIndexExprFromRaw(e) or - result = convertInlineAsmExprFromRaw(e) - or result = convertLetExprFromRaw(e) or - result = convertLiteralExprFromRaw(e) + result = convertLiteralFromRaw(e) or result = convertLoopExprFromRaw(e) or @@ -957,9 +958,11 @@ module Synth { or result = convertPathExprFromRaw(e) or + result = convertPrefixExprFromRaw(e) + or result = convertRangeExprFromRaw(e) or - result = convertRecordLitExprFromRaw(e) + result = convertRecordExprFromRaw(e) or result = convertRefExprFromRaw(e) or @@ -967,8 +970,6 @@ module Synth { or result = convertTupleExprFromRaw(e) or - result = convertUnaryOpExprFromRaw(e) - or result = convertUnderscoreExprFromRaw(e) or result = convertYeetExprFromRaw(e) @@ -1011,13 +1012,13 @@ module Synth { */ cached TPat convertPatFromRaw(Raw::Element e) { - result = convertBindPatFromRaw(e) - or result = convertBoxPatFromRaw(e) or result = convertConstBlockPatFromRaw(e) or - result = convertLitPatFromRaw(e) + result = convertIdentPatFromRaw(e) + or + result = convertLiteralPatFromRaw(e) or result = convertMissingPatFromRaw(e) or @@ -1037,7 +1038,7 @@ module Synth { or result = convertTupleStructPatFromRaw(e) or - result = convertWildPatFromRaw(e) + result = convertWildcardPatFromRaw(e) } /** @@ -1059,15 +1060,22 @@ module Synth { */ cached TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { - result = convertGenericArgsFromRaw(e) + result = convertGenericArgListFromRaw(e) or result = convertPathFromRaw(e) or - result = convertTypeRefFromRaw(e) + result = convertTypeFromRaw(e) or result = convertUnimplementedDeclarationFromRaw(e) } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TAsmExpr` to a raw DB element, if possible. + */ + cached + Raw::Element convertAsmExprToRaw(TAsmExpr e) { e = TAsmExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsyncBlockExpr` to a raw DB element, if possible. @@ -1091,17 +1099,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TBinaryOpExpr` to a raw DB element, if possible. - */ - cached - Raw::Element convertBinaryOpExprToRaw(TBinaryOpExpr e) { e = TBinaryOpExpr(result) } - - /** - * INTERNAL: Do not use. - * Converts a synthesized `TBindPat` to a raw DB element, if possible. + * Converts a synthesized `TBinExpr` to a raw DB element, if possible. */ cached - Raw::Element convertBindPatToRaw(TBindPat e) { e = TBindPat(result) } + Raw::Element convertBinExprToRaw(TBinExpr e) { e = TBinExpr(result) } /** * INTERNAL: Do not use. @@ -1217,31 +1218,31 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TGenericArgs` to a raw DB element, if possible. + * Converts a synthesized `TGenericArgList` to a raw DB element, if possible. */ cached - Raw::Element convertGenericArgsToRaw(TGenericArgs e) { e = TGenericArgs(result) } + Raw::Element convertGenericArgListToRaw(TGenericArgList e) { e = TGenericArgList(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TIfExpr` to a raw DB element, if possible. + * Converts a synthesized `TIdentPat` to a raw DB element, if possible. */ cached - Raw::Element convertIfExprToRaw(TIfExpr e) { e = TIfExpr(result) } + Raw::Element convertIdentPatToRaw(TIdentPat e) { e = TIdentPat(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TIndexExpr` to a raw DB element, if possible. + * Converts a synthesized `TIfExpr` to a raw DB element, if possible. */ cached - Raw::Element convertIndexExprToRaw(TIndexExpr e) { e = TIndexExpr(result) } + Raw::Element convertIfExprToRaw(TIfExpr e) { e = TIfExpr(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TInlineAsmExpr` to a raw DB element, if possible. + * Converts a synthesized `TIndexExpr` to a raw DB element, if possible. */ cached - Raw::Element convertInlineAsmExprToRaw(TInlineAsmExpr e) { e = TInlineAsmExpr(result) } + Raw::Element convertIndexExprToRaw(TIndexExpr e) { e = TIndexExpr(result) } /** * INTERNAL: Do not use. @@ -1273,17 +1274,17 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TLitPat` to a raw DB element, if possible. + * Converts a synthesized `TLiteral` to a raw DB element, if possible. */ cached - Raw::Element convertLitPatToRaw(TLitPat e) { e = TLitPat(result) } + Raw::Element convertLiteralToRaw(TLiteral e) { e = TLiteral(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TLiteralExpr` to a raw DB element, if possible. + * Converts a synthesized `TLiteralPat` to a raw DB element, if possible. */ cached - Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { e = TLiteralExpr(result) } + Raw::Element convertLiteralPatToRaw(TLiteralPat e) { e = TLiteralPat(result) } /** * INTERNAL: Do not use. @@ -1369,6 +1370,13 @@ module Synth { cached Raw::Element convertPathPatToRaw(TPathPat e) { e = TPathPat(result) } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TPrefixExpr` to a raw DB element, if possible. + */ + cached + Raw::Element convertPrefixExprToRaw(TPrefixExpr e) { e = TPrefixExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRangeExpr` to a raw DB element, if possible. @@ -1385,31 +1393,31 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TRecordFieldPat` to a raw DB element, if possible. + * Converts a synthesized `TRecordExpr` to a raw DB element, if possible. */ cached - Raw::Element convertRecordFieldPatToRaw(TRecordFieldPat e) { e = TRecordFieldPat(result) } + Raw::Element convertRecordExprToRaw(TRecordExpr e) { e = TRecordExpr(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TRecordLitExpr` to a raw DB element, if possible. + * Converts a synthesized `TRecordExprField` to a raw DB element, if possible. */ cached - Raw::Element convertRecordLitExprToRaw(TRecordLitExpr e) { e = TRecordLitExpr(result) } + Raw::Element convertRecordExprFieldToRaw(TRecordExprField e) { e = TRecordExprField(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TRecordLitField` to a raw DB element, if possible. + * Converts a synthesized `TRecordPat` to a raw DB element, if possible. */ cached - Raw::Element convertRecordLitFieldToRaw(TRecordLitField e) { e = TRecordLitField(result) } + Raw::Element convertRecordPatToRaw(TRecordPat e) { e = TRecordPat(result) } /** * INTERNAL: Do not use. - * Converts a synthesized `TRecordPat` to a raw DB element, if possible. + * Converts a synthesized `TRecordPatField` to a raw DB element, if possible. */ cached - Raw::Element convertRecordPatToRaw(TRecordPat e) { e = TRecordPat(result) } + Raw::Element convertRecordPatFieldToRaw(TRecordPatField e) { e = TRecordPatField(result) } /** * INTERNAL: Do not use. @@ -1469,17 +1477,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TTypeRef` to a raw DB element, if possible. + * Converts a synthesized `TType` to a raw DB element, if possible. */ cached - Raw::Element convertTypeRefToRaw(TTypeRef e) { e = TTypeRef(result) } - - /** - * INTERNAL: Do not use. - * Converts a synthesized `TUnaryOpExpr` to a raw DB element, if possible. - */ - cached - Raw::Element convertUnaryOpExprToRaw(TUnaryOpExpr e) { e = TUnaryOpExpr(result) } + Raw::Element convertTypeToRaw(TType e) { e = TType(result) } /** * INTERNAL: Do not use. @@ -1520,10 +1521,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TWildPat` to a raw DB element, if possible. + * Converts a synthesized `TWildcardPat` to a raw DB element, if possible. */ cached - Raw::Element convertWildPatToRaw(TWildPat e) { e = TWildPat(result) } + Raw::Element convertWildcardPatToRaw(TWildcardPat e) { e = TWildcardPat(result) } /** * INTERNAL: Do not use. @@ -1560,7 +1561,7 @@ module Synth { or result = convertExprToRaw(e) or - result = convertGenericArgsToRaw(e) + result = convertGenericArgListToRaw(e) or result = convertLabelToRaw(e) or @@ -1570,13 +1571,13 @@ module Synth { or result = convertPathToRaw(e) or - result = convertRecordFieldPatToRaw(e) + result = convertRecordExprFieldToRaw(e) or - result = convertRecordLitFieldToRaw(e) + result = convertRecordPatFieldToRaw(e) or result = convertStmtToRaw(e) or - result = convertTypeRefToRaw(e) + result = convertTypeToRaw(e) } /** @@ -1628,11 +1629,13 @@ module Synth { Raw::Element convertExprToRaw(TExpr e) { result = convertArrayExprToRaw(e) or + result = convertAsmExprToRaw(e) + or result = convertAwaitExprToRaw(e) or result = convertBecomeExprToRaw(e) or - result = convertBinaryOpExprToRaw(e) + result = convertBinExprToRaw(e) or result = convertBlockExprBaseToRaw(e) or @@ -1656,11 +1659,9 @@ module Synth { or result = convertIndexExprToRaw(e) or - result = convertInlineAsmExprToRaw(e) - or result = convertLetExprToRaw(e) or - result = convertLiteralExprToRaw(e) + result = convertLiteralToRaw(e) or result = convertLoopExprToRaw(e) or @@ -1674,9 +1675,11 @@ module Synth { or result = convertPathExprToRaw(e) or + result = convertPrefixExprToRaw(e) + or result = convertRangeExprToRaw(e) or - result = convertRecordLitExprToRaw(e) + result = convertRecordExprToRaw(e) or result = convertRefExprToRaw(e) or @@ -1684,8 +1687,6 @@ module Synth { or result = convertTupleExprToRaw(e) or - result = convertUnaryOpExprToRaw(e) - or result = convertUnderscoreExprToRaw(e) or result = convertYeetExprToRaw(e) @@ -1728,13 +1729,13 @@ module Synth { */ cached Raw::Element convertPatToRaw(TPat e) { - result = convertBindPatToRaw(e) - or result = convertBoxPatToRaw(e) or result = convertConstBlockPatToRaw(e) or - result = convertLitPatToRaw(e) + result = convertIdentPatToRaw(e) + or + result = convertLiteralPatToRaw(e) or result = convertMissingPatToRaw(e) or @@ -1754,7 +1755,7 @@ module Synth { or result = convertTupleStructPatToRaw(e) or - result = convertWildPatToRaw(e) + result = convertWildcardPatToRaw(e) } /** @@ -1776,11 +1777,11 @@ module Synth { */ cached Raw::Element convertUnimplementedToRaw(TUnimplemented e) { - result = convertGenericArgsToRaw(e) + result = convertGenericArgListToRaw(e) or result = convertPathToRaw(e) or - result = convertTypeRefToRaw(e) + result = convertTypeToRaw(e) or result = convertUnimplementedDeclarationToRaw(e) } diff --git a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll index 5dc097431551..9f88ca8dd814 100644 --- a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll +++ b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll @@ -3,11 +3,11 @@ * This module exports all modules providing `Element` subclasses. */ +import codeql.rust.elements.AsmExprConstructor import codeql.rust.elements.AsyncBlockExprConstructor import codeql.rust.elements.AwaitExprConstructor import codeql.rust.elements.BecomeExprConstructor -import codeql.rust.elements.BinaryOpExprConstructor -import codeql.rust.elements.BindPatConstructor +import codeql.rust.elements.BinExprConstructor import codeql.rust.elements.BlockExprConstructor import codeql.rust.elements.BoxExprConstructor import codeql.rust.elements.BoxPatConstructor @@ -24,16 +24,16 @@ import codeql.rust.elements.ElementListExprConstructor import codeql.rust.elements.ExprStmtConstructor import codeql.rust.elements.FieldExprConstructor import codeql.rust.elements.FunctionConstructor -import codeql.rust.elements.GenericArgsConstructor +import codeql.rust.elements.GenericArgListConstructor +import codeql.rust.elements.IdentPatConstructor import codeql.rust.elements.IfExprConstructor import codeql.rust.elements.IndexExprConstructor -import codeql.rust.elements.InlineAsmExprConstructor import codeql.rust.elements.ItemStmtConstructor import codeql.rust.elements.LabelConstructor import codeql.rust.elements.LetExprConstructor import codeql.rust.elements.LetStmtConstructor -import codeql.rust.elements.LitPatConstructor -import codeql.rust.elements.LiteralExprConstructor +import codeql.rust.elements.LiteralConstructor +import codeql.rust.elements.LiteralPatConstructor import codeql.rust.elements.LoopExprConstructor import codeql.rust.elements.MatchArmConstructor import codeql.rust.elements.MatchExprConstructor @@ -46,12 +46,13 @@ import codeql.rust.elements.OrPatConstructor import codeql.rust.elements.PathConstructor import codeql.rust.elements.PathExprConstructor import codeql.rust.elements.PathPatConstructor +import codeql.rust.elements.PrefixExprConstructor import codeql.rust.elements.RangeExprConstructor import codeql.rust.elements.RangePatConstructor -import codeql.rust.elements.RecordFieldPatConstructor -import codeql.rust.elements.RecordLitExprConstructor -import codeql.rust.elements.RecordLitFieldConstructor +import codeql.rust.elements.RecordExprConstructor +import codeql.rust.elements.RecordExprFieldConstructor import codeql.rust.elements.RecordPatConstructor +import codeql.rust.elements.RecordPatFieldConstructor import codeql.rust.elements.RefExprConstructor import codeql.rust.elements.RefPatConstructor import codeql.rust.elements.RepeatExprConstructor @@ -60,11 +61,10 @@ import codeql.rust.elements.SlicePatConstructor import codeql.rust.elements.TupleExprConstructor import codeql.rust.elements.TuplePatConstructor import codeql.rust.elements.TupleStructPatConstructor -import codeql.rust.elements.TypeRefConstructor -import codeql.rust.elements.UnaryOpExprConstructor +import codeql.rust.elements.TypeConstructor import codeql.rust.elements.UnderscoreExprConstructor import codeql.rust.elements.UnimplementedDeclarationConstructor import codeql.rust.elements.UnsafeBlockExprConstructor -import codeql.rust.elements.WildPatConstructor +import codeql.rust.elements.WildcardPatConstructor import codeql.rust.elements.YeetExprConstructor import codeql.rust.elements.YieldExprConstructor diff --git a/rust/ql/lib/codeql/rust/generated/TypeRef.qll b/rust/ql/lib/codeql/rust/generated/Type.qll similarity index 56% rename from rust/ql/lib/codeql/rust/generated/TypeRef.qll rename to rust/ql/lib/codeql/rust/generated/Type.qll index f6c45fcbad5f..4b7208324911 100644 --- a/rust/ql/lib/codeql/rust/generated/TypeRef.qll +++ b/rust/ql/lib/codeql/rust/generated/Type.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `TypeRef`. + * This module provides the generated definition of `Type`. * INTERNAL: Do not import directly. */ @@ -10,7 +10,7 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Unimplemented /** - * INTERNAL: This module contains the fully generated definition of `TypeRef` and should not + * INTERNAL: This module contains the fully generated definition of `Type` and should not * be referenced directly. */ module Generated { @@ -21,10 +21,10 @@ module Generated { * let y: Vec; * let z: Option; * ``` - * INTERNAL: Do not reference the `Generated::TypeRef` class directly. - * Use the subclass `TypeRef`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::Type` class directly. + * Use the subclass `Type`, where the following predicates are available. */ - class TypeRef extends Synth::TTypeRef, AstNode, Unimplemented { - override string getAPrimaryQlClass() { result = "TypeRef" } + class Type extends Synth::TType, AstNode, Unimplemented { + override string getAPrimaryQlClass() { result = "Type" } } } diff --git a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll deleted file mode 100644 index 1849af2d4112..000000000000 --- a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll +++ /dev/null @@ -1,42 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `UnaryOpExpr`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr - -/** - * INTERNAL: This module contains the fully generated definition of `UnaryOpExpr` and should not - * be referenced directly. - */ -module Generated { - /** - * A unary operation expression. For example: - * ``` - * let x = -42 - * let y = !true - * let z = *ptr - * ``` - * INTERNAL: Do not reference the `Generated::UnaryOpExpr` class directly. - * Use the subclass `UnaryOpExpr`, where the following predicates are available. - */ - class UnaryOpExpr extends Synth::TUnaryOpExpr, Expr { - override string getAPrimaryQlClass() { result = "UnaryOpExpr" } - - /** - * Gets the expression of this unary op expression. - */ - Expr getExpr() { - result = - Synth::convertExprFromRaw(Synth::convertUnaryOpExprToRaw(this).(Raw::UnaryOpExpr).getExpr()) - } - - /** - * Gets the op of this unary op expression. - */ - string getOp() { result = Synth::convertUnaryOpExprToRaw(this).(Raw::UnaryOpExpr).getOp() } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/WildPat.qll b/rust/ql/lib/codeql/rust/generated/WildcardPat.qll similarity index 50% rename from rust/ql/lib/codeql/rust/generated/WildPat.qll rename to rust/ql/lib/codeql/rust/generated/WildcardPat.qll index 519a55ad7f2c..50bca3150bac 100644 --- a/rust/ql/lib/codeql/rust/generated/WildPat.qll +++ b/rust/ql/lib/codeql/rust/generated/WildcardPat.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `WildPat`. + * This module provides the generated definition of `WildcardPat`. * INTERNAL: Do not import directly. */ @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Pat /** - * INTERNAL: This module contains the fully generated definition of `WildPat` and should not + * INTERNAL: This module contains the fully generated definition of `WildcardPat` and should not * be referenced directly. */ module Generated { @@ -18,10 +18,10 @@ module Generated { * ``` * let _ = 42; * ``` - * INTERNAL: Do not reference the `Generated::WildPat` class directly. - * Use the subclass `WildPat`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::WildcardPat` class directly. + * Use the subclass `WildcardPat`, where the following predicates are available. */ - class WildPat extends Synth::TWildPat, Pat { - override string getAPrimaryQlClass() { result = "WildPat" } + class WildcardPat extends Synth::TWildcardPat, Pat { + override string getAPrimaryQlClass() { result = "WildcardPat" } } } diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index d2ae8deb73c7..84ddeeb486ba 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -53,24 +53,24 @@ locations( ); @unimplemented = - @generic_args + @generic_arg_list | @path -| @type_ref +| @type | @unimplemented_declaration ; @ast_node = @declaration | @expr -| @generic_args +| @generic_arg_list | @label | @match_arm | @pat | @path -| @record_field_pat -| @record_lit_field +| @record_expr_field +| @record_pat_field | @stmt -| @type_ref +| @type ; db_files( @@ -89,9 +89,10 @@ db_locations( @expr = @array_expr +| @asm_expr | @await_expr | @become_expr -| @binary_op_expr +| @bin_expr | @block_expr_base | @box_expr | @break_expr @@ -103,28 +104,27 @@ db_locations( | @field_expr | @if_expr | @index_expr -| @inline_asm_expr | @let_expr -| @literal_expr +| @literal | @loop_expr | @match_expr | @method_call_expr | @missing_expr | @offset_of_expr | @path_expr +| @prefix_expr | @range_expr -| @record_lit_expr +| @record_expr | @ref_expr | @return_expr | @tuple_expr -| @unary_op_expr | @underscore_expr | @yeet_expr | @yield_expr ; -generic_args( - unique int id: @generic_args +generic_arg_lists( + unique int id: @generic_arg_list ); labels( @@ -145,10 +145,10 @@ match_arm_guards( ); @pat = - @bind_pat -| @box_pat + @box_pat | @const_block_pat -| @lit_pat +| @ident_pat +| @literal_pat | @missing_pat | @or_pat | @path_pat @@ -158,23 +158,23 @@ match_arm_guards( | @slice_pat | @tuple_pat | @tuple_struct_pat -| @wild_pat +| @wildcard_pat ; paths( unique int id: @path ); -record_field_pats( - unique int id: @record_field_pat, +record_expr_fields( + unique int id: @record_expr_field, string name: string ref, - int pat: @pat ref + int expr: @expr ref ); -record_lit_fields( - unique int id: @record_lit_field, +record_pat_fields( + unique int id: @record_pat_field, string name: string ref, - int expr: @expr ref + int pat: @pat ref ); @stmt = @@ -183,8 +183,8 @@ record_lit_fields( | @let_stmt ; -type_refs( - unique int id: @type_ref +types( + unique int id: @type ); @array_expr = @@ -192,6 +192,11 @@ type_refs( | @repeat_expr ; +asm_exprs( + unique int id: @asm_expr, + int expr: @expr ref +); + await_exprs( unique int id: @await_expr, int expr: @expr ref @@ -202,29 +207,18 @@ become_exprs( int expr: @expr ref ); -binary_op_exprs( - unique int id: @binary_op_expr, +bin_exprs( + unique int id: @bin_expr, int lhs: @expr ref, int rhs: @expr ref ); #keyset[id] -binary_op_expr_ops( - int id: @binary_op_expr ref, +bin_expr_ops( + int id: @bin_expr ref, string op: string ref ); -bind_pats( - unique int id: @bind_pat, - string binding_id: string ref -); - -#keyset[id] -bind_pat_subpats( - int id: @bind_pat ref, - int subpat: @pat ref -); - @block_expr_base = @async_block_expr | @block_expr @@ -290,7 +284,7 @@ call_expr_is_assignee_expr( cast_exprs( unique int id: @cast_expr, int expr: @expr ref, - int type_ref: @type_ref ref + int type_: @type ref ); closure_exprs( @@ -310,13 +304,13 @@ closure_expr_args( closure_expr_arg_types( int id: @closure_expr ref, int index: int ref, - int arg_type: @type_ref ref + int arg_type: @type ref ); #keyset[id] closure_expr_ret_types( int id: @closure_expr ref, - int ret_type: @type_ref ref + int ret_type: @type ref ); #keyset[id] @@ -366,6 +360,17 @@ functions( int body: @expr ref ); +ident_pats( + unique int id: @ident_pat, + string binding_id: string ref +); + +#keyset[id] +ident_pat_subpats( + int id: @ident_pat ref, + int subpat: @pat ref +); + if_exprs( unique int id: @if_expr, int condition: @expr ref, @@ -389,11 +394,6 @@ index_expr_is_assignee_expr( int id: @index_expr ref ); -inline_asm_exprs( - unique int id: @inline_asm_expr, - int expr: @expr ref -); - item_stmts( unique int id: @item_stmt ); @@ -410,9 +410,9 @@ let_stmts( ); #keyset[id] -let_stmt_type_refs( +let_stmt_types( int id: @let_stmt ref, - int type_ref: @type_ref ref + int type_: @type ref ); #keyset[id] @@ -427,13 +427,13 @@ let_stmt_elses( int else: @expr ref ); -lit_pats( - unique int id: @lit_pat, - int expr: @expr ref +literals( + unique int id: @literal ); -literal_exprs( - unique int id: @literal_expr +literal_pats( + unique int id: @literal_pat, + int expr: @expr ref ); loop_exprs( @@ -475,7 +475,7 @@ method_call_expr_args( #keyset[id] method_call_expr_generic_args( int id: @method_call_expr ref, - int generic_args: @generic_args ref + int generic_args: @generic_arg_list ref ); missing_exprs( @@ -499,7 +499,7 @@ module_declarations( offset_of_exprs( unique int id: @offset_of_expr, - int container: @type_ref ref + int container: @type ref ); #keyset[id, index] @@ -530,6 +530,12 @@ path_pats( int path: @path ref ); +prefix_exprs( + unique int id: @prefix_expr, + int expr: @expr ref, + string op: string ref +); + range_exprs( unique int id: @range_expr ); @@ -567,37 +573,37 @@ range_pat_ends( int end: @pat ref ); -record_lit_exprs( - unique int id: @record_lit_expr +record_exprs( + unique int id: @record_expr ); #keyset[id] -record_lit_expr_paths( - int id: @record_lit_expr ref, +record_expr_paths( + int id: @record_expr ref, int path: @path ref ); #keyset[id, index] -record_lit_expr_fields( - int id: @record_lit_expr ref, +record_expr_fields( + int id: @record_expr ref, int index: int ref, - int field: @record_lit_field ref + int field: @record_expr_field ref ); #keyset[id] -record_lit_expr_spreads( - int id: @record_lit_expr ref, +record_expr_spreads( + int id: @record_expr ref, int spread: @expr ref ); #keyset[id] -record_lit_expr_has_ellipsis( - int id: @record_lit_expr ref +record_expr_has_ellipsis( + int id: @record_expr ref ); #keyset[id] -record_lit_expr_is_assignee_expr( - int id: @record_lit_expr ref +record_expr_is_assignee_expr( + int id: @record_expr ref ); record_pats( @@ -614,7 +620,7 @@ record_pat_paths( record_pat_args( int id: @record_pat ref, int index: int ref, - int arg: @record_field_pat ref + int arg: @record_pat_field ref ); #keyset[id] @@ -737,12 +743,6 @@ tuple_struct_pat_ellipsis_indices( int ellipsis_index: int ref ); -unary_op_exprs( - unique int id: @unary_op_expr, - int expr: @expr ref, - string op: string ref -); - underscore_exprs( unique int id: @underscore_expr ); @@ -751,8 +751,8 @@ unimplemented_declarations( unique int id: @unimplemented_declaration ); -wild_pats( - unique int id: @wild_pat +wildcard_pats( + unique int id: @wildcard_pat ); yeet_exprs( diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index c8f28a56bef5..402b15f3d6a6 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -1,8 +1,8 @@ +AsmExpr/gen_asm_expr.rs 98d1a2525501416434a087b3791268691e5420f122f6e4d6d868a4273ce89ca5 98d1a2525501416434a087b3791268691e5420f122f6e4d6d868a4273ce89ca5 AsyncBlockExpr/gen_async_block_expr.rs 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 AwaitExpr/gen_await_expr.rs 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c -BinaryOpExpr/gen_binary_op_expr.rs a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 -BindPat/gen_bind_pat.rs 38da98911aaaf5bccfafe40a116b6b1c02d1a3a4b170113129ecf4fd43cc66e4 38da98911aaaf5bccfafe40a116b6b1c02d1a3a4b170113129ecf4fd43cc66e4 +BinExpr/gen_bin_expr.rs fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 BoxPat/gen_box_pat.rs ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 @@ -17,15 +17,15 @@ ElementListExpr/gen_element_list_expr.rs 66f8a3c4e02767e96692c44ada6fe7ed2b07b1a ExprStmt/gen_expr_stmt.rs eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd6521e2481c93 FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 Function/gen_function.rs 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 -GenericArgs/gen_generic_args.rs 9c559792205357f58472fe8136cc963a2732907c9d384458c6607dff593fb81a 9c559792205357f58472fe8136cc963a2732907c9d384458c6607dff593fb81a +GenericArgList/gen_generic_arg_list.rs 428b05b7dd2c2060ac752f4d98a4d3daf44eb9f0a7cfb05bccbe284a91f4be27 428b05b7dd2c2060ac752f4d98a4d3daf44eb9f0a7cfb05bccbe284a91f4be27 +IdentPat/gen_ident_pat.rs f8cd49453ef1600542143c60ecefcf98cc1fb863735b78246017b516a0b5024d f8cd49453ef1600542143c60ecefcf98cc1fb863735b78246017b516a0b5024d IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 -InlineAsmExpr/gen_inline_asm_expr.rs b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a b5dcc6bf748fe4c314804414d4d5d3708957a774469de8bf77b5721ca3684f9a Label/gen_label.rs 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd LetExpr/gen_let_expr.rs 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb -LitPat/gen_lit_pat.rs dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 dc7f80f73290eb55515b20bf66f8fd5cd11f6fd088734fbf215c642630db0d09 -LiteralExpr/gen_literal_expr.rs 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a +Literal/gen_literal.rs 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 +LiteralPat/gen_literal_pat.rs b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 MatchArm/gen_match_arm.rs b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 MatchExpr/gen_match_expr.rs 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 @@ -38,12 +38,13 @@ OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0e Path/gen_path.rs 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a +PrefixExpr/gen_prefix_expr.rs 0fe7608d3c57813db30f36fde77a55d804e009f00d62e232fd050d5cfc5b1eaf 0fe7608d3c57813db30f36fde77a55d804e009f00d62e232fd050d5cfc5b1eaf RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 RangePat/gen_range_pat.rs f6661dd17ad104a8e80247e3c212517c6c888895edd86ac75f15ce0270eac0ce f6661dd17ad104a8e80247e3c212517c6c888895edd86ac75f15ce0270eac0ce -RecordFieldPat/gen_record_field_pat.rs 75951d23c45d8ff426c05bf4f6abb7673b713f66c97340fcbbe57520ba40011f 75951d23c45d8ff426c05bf4f6abb7673b713f66c97340fcbbe57520ba40011f -RecordLitExpr/gen_record_lit_expr.rs da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a -RecordLitField/gen_record_lit_field.rs 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a +RecordExpr/gen_record_expr.rs e0b332e4d8ce9b6830f8f29a14e422a8d4b1df18490d3082f2d98105bcf09748 e0b332e4d8ce9b6830f8f29a14e422a8d4b1df18490d3082f2d98105bcf09748 +RecordExprField/gen_record_expr_field.rs ca3335ee9a4e091f2a4ebc183bd6f8ff9cd8f37c22e3cab16d936aa4751e6608 ca3335ee9a4e091f2a4ebc183bd6f8ff9cd8f37c22e3cab16d936aa4751e6608 RecordPat/gen_record_pat.rs 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed +RecordPatField/gen_record_pat_field.rs 83f05d7acccbf792f952272bf049253100d7590ce25c3665d7bb284f88cd62d5 83f05d7acccbf792f952272bf049253100d7590ce25c3665d7bb284f88cd62d5 RefExpr/gen_ref_expr.rs b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 RefPat/gen_ref_pat.rs fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 RepeatExpr/gen_repeat_expr.rs 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 @@ -52,10 +53,9 @@ SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19 TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 TuplePat/gen_tuple_pat.rs 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf TupleStructPat/gen_tuple_struct_pat.rs 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 -TypeRef/gen_type_ref.rs 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 -UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 +Type/gen_type.rs c66f700db04fd4f2dd76ebe6fefbf5fff01e005df50ccf15885cc0ff7c138c26 c66f700db04fd4f2dd76ebe6fefbf5fff01e005df50ccf15885cc0ff7c138c26 UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 -WildPat/gen_wild_pat.rs 3a4a9e77d09a690fddca434368f33c2f009d1098e5fa7fe2b404608d24c343fd 3a4a9e77d09a690fddca434368f33c2f009d1098e5fa7fe2b404608d24c343fd +WildcardPat/gen_wildcard_pat.rs aa5a5bc28a5fabe45f3d522e1b59bdf2fa5bd2848ec1f32263ef1f39a6b0290a aa5a5bc28a5fabe45f3d522e1b59bdf2fa5bd2848ec1f32263ef1f39a6b0290a YeetExpr/gen_yeet_expr.rs 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 YieldExpr/gen_yield_expr.rs 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 3e7d2e4c05de..0e051483d630 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -1,10 +1,10 @@ /.generated_tests.list linguist-generated /.gitattributes linguist-generated +/AsmExpr/gen_asm_expr.rs linguist-generated /AsyncBlockExpr/gen_async_block_expr.rs linguist-generated /AwaitExpr/gen_await_expr.rs linguist-generated /BecomeExpr/gen_become_expr.rs linguist-generated -/BinaryOpExpr/gen_binary_op_expr.rs linguist-generated -/BindPat/gen_bind_pat.rs linguist-generated +/BinExpr/gen_bin_expr.rs linguist-generated /BlockExpr/gen_block_expr.rs linguist-generated /BoxExpr/gen_box_expr.rs linguist-generated /BoxPat/gen_box_pat.rs linguist-generated @@ -19,15 +19,15 @@ /ExprStmt/gen_expr_stmt.rs linguist-generated /FieldExpr/gen_field_expr.rs linguist-generated /Function/gen_function.rs linguist-generated -/GenericArgs/gen_generic_args.rs linguist-generated +/GenericArgList/gen_generic_arg_list.rs linguist-generated +/IdentPat/gen_ident_pat.rs linguist-generated /IfExpr/gen_if_expr.rs linguist-generated /IndexExpr/gen_index_expr.rs linguist-generated -/InlineAsmExpr/gen_inline_asm_expr.rs linguist-generated /Label/gen_label.rs linguist-generated /LetExpr/gen_let_expr.rs linguist-generated /LetStmt/gen_let_stmt.rs linguist-generated -/LitPat/gen_lit_pat.rs linguist-generated -/LiteralExpr/gen_literal_expr.rs linguist-generated +/Literal/gen_literal.rs linguist-generated +/LiteralPat/gen_literal_pat.rs linguist-generated /LoopExpr/gen_loop_expr.rs linguist-generated /MatchArm/gen_match_arm.rs linguist-generated /MatchExpr/gen_match_expr.rs linguist-generated @@ -40,12 +40,13 @@ /Path/gen_path.rs linguist-generated /PathExpr/gen_path_expr.rs linguist-generated /PathPat/gen_path_pat.rs linguist-generated +/PrefixExpr/gen_prefix_expr.rs linguist-generated /RangeExpr/gen_range_expr.rs linguist-generated /RangePat/gen_range_pat.rs linguist-generated -/RecordFieldPat/gen_record_field_pat.rs linguist-generated -/RecordLitExpr/gen_record_lit_expr.rs linguist-generated -/RecordLitField/gen_record_lit_field.rs linguist-generated +/RecordExpr/gen_record_expr.rs linguist-generated +/RecordExprField/gen_record_expr_field.rs linguist-generated /RecordPat/gen_record_pat.rs linguist-generated +/RecordPatField/gen_record_pat_field.rs linguist-generated /RefExpr/gen_ref_expr.rs linguist-generated /RefPat/gen_ref_pat.rs linguist-generated /RepeatExpr/gen_repeat_expr.rs linguist-generated @@ -54,10 +55,9 @@ /TupleExpr/gen_tuple_expr.rs linguist-generated /TuplePat/gen_tuple_pat.rs linguist-generated /TupleStructPat/gen_tuple_struct_pat.rs linguist-generated -/TypeRef/gen_type_ref.rs linguist-generated -/UnaryOpExpr/gen_unary_op_expr.rs linguist-generated +/Type/gen_type.rs linguist-generated /UnderscoreExpr/gen_underscore_expr.rs linguist-generated /UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated -/WildPat/gen_wild_pat.rs linguist-generated +/WildcardPat/gen_wildcard_pat.rs linguist-generated /YeetExpr/gen_yeet_expr.rs linguist-generated /YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql similarity index 85% rename from rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql rename to rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql index bc2f1fe11a1e..d53de6289ddc 100644 --- a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.ql +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from LitPat x, Expr getExpr +from AsmExpr x, Expr getExpr where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs b/rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs similarity index 78% rename from rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs rename to rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs index 0c791225af7e..101d003c811a 100644 --- a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/gen_inline_asm_expr.rs +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/gen_asm_expr.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_inline_asm_expr() -> () { +fn test_asm_expr() -> () { // An inline assembly expression. For example: unsafe { builtin # asm(_); diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql similarity index 82% rename from rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql rename to rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql index e74d8022c0af..f1c75d7d4c16 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from BinaryOpExpr x, Expr getLhs, Expr getRhs, string hasOp +from BinExpr x, Expr getLhs, Expr getRhs, string hasOp where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql similarity index 86% rename from rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql rename to rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql index 834e678ec82d..66c0403bbbd5 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql +++ b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from BinaryOpExpr x +from BinExpr x where toBeTested(x) and not x.isUnknown() select x, x.getOp() diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs b/rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs similarity index 80% rename from rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs rename to rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs index 8612377ff217..bc2abb8857ce 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs +++ b/rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_binary_op_expr() -> () { +fn test_bin_expr() -> () { // A binary operation expression. For example: x + y; x && y; diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql index 463f70948038..28426a900c7d 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -2,10 +2,10 @@ import codeql.rust.elements import TestUtils -from CastExpr x, Expr getExpr, TypeRef getTypeRef +from CastExpr x, Expr getExpr, Type getType where toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr() and - getTypeRef = x.getTypeRef() -select x, "getExpr:", getExpr, "getTypeRef:", getTypeRef + getType = x.getType() +select x, "getExpr:", getExpr, "getType:", getType diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql similarity index 84% rename from rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql rename to rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql index 821175b2df27..d4b2fa8beebe 100644 --- a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.ql +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from GenericArgs x +from GenericArgList x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs b/rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs similarity index 73% rename from rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs rename to rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs index ee661cadea27..a439ab96505d 100644 --- a/rust/ql/test/extractor-tests/generated/GenericArgs/gen_generic_args.rs +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/gen_generic_arg_list.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_generic_args() -> () { +fn test_generic_arg_list() -> () { // The base class for generic arguments. x.foo::(42); } diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql similarity index 83% rename from rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql rename to rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql index 7de4f5492deb..b5fe4af4f8a6 100644 --- a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.ql +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from BindPat x, string getBindingId, string hasSubpat +from IdentPat x, string getBindingId, string hasSubpat where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.ql similarity index 89% rename from rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql rename to rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.ql index 5234ee8ef83d..71302ef13674 100644 --- a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.ql +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from BindPat x +from IdentPat x where toBeTested(x) and not x.isUnknown() select x, x.getSubpat() diff --git a/rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs similarity index 87% rename from rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs rename to rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs index 9767925cc27d..7480705b3b68 100644 --- a/rust/ql/test/extractor-tests/generated/BindPat/gen_bind_pat.rs +++ b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_bind_pat() -> () { +fn test_ident_pat() -> () { // A binding pattern. For example: match x { Some(y) => y, diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql index 694e733e7696..02a624e921e4 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.ql @@ -2,13 +2,13 @@ import codeql.rust.elements import TestUtils -from LetStmt x, Pat getPat, string hasTypeRef, string hasInitializer, string hasElse +from LetStmt x, Pat getPat, string hasType, string hasInitializer, string hasElse where toBeTested(x) and not x.isUnknown() and getPat = x.getPat() and - (if x.hasTypeRef() then hasTypeRef = "yes" else hasTypeRef = "no") and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasInitializer() then hasInitializer = "yes" else hasInitializer = "no") and if x.hasElse() then hasElse = "yes" else hasElse = "no" -select x, "getPat:", getPat, "hasTypeRef:", hasTypeRef, "hasInitializer:", hasInitializer, - "hasElse:", hasElse +select x, "getPat:", getPat, "hasType:", hasType, "hasInitializer:", hasInitializer, "hasElse:", + hasElse diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.ql similarity index 83% rename from rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql rename to rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.ql index 8cd487029a12..62271f18fb00 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.ql +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.ql @@ -4,4 +4,4 @@ import TestUtils from LetStmt x where toBeTested(x) and not x.isUnknown() -select x, x.getTypeRef() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql b/rust/ql/test/extractor-tests/generated/Literal/Literal.ql similarity index 88% rename from rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql rename to rust/ql/test/extractor-tests/generated/Literal/Literal.ql index 04748b7dd043..12571e3a4759 100644 --- a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql +++ b/rust/ql/test/extractor-tests/generated/Literal/Literal.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from TypeRef x +from Literal x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs b/rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs similarity index 85% rename from rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs rename to rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs index 13e1590e8e54..d85a08be597d 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs +++ b/rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_literal_expr() -> () { +fn test_literal() -> () { // A literal expression. For example: 42; 42.0; diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql similarity index 83% rename from rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql rename to rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql index fd5eae62d581..d3c76459e49e 100644 --- a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from InlineAsmExpr x, Expr getExpr +from LiteralPat x, Expr getExpr where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs b/rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs similarity index 80% rename from rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs rename to rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs index 78f6759fe12d..f029cbb8660e 100644 --- a/rust/ql/test/extractor-tests/generated/LitPat/gen_lit_pat.rs +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/gen_literal_pat.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_lit_pat() -> () { +fn test_literal_pat() -> () { // A literal pattern. For example: match x { 42 => "ok", diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql index 7eed7c6530b2..883ed5d2ad1f 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from OffsetOfExpr x, TypeRef getContainer, int getNumberOfFields +from OffsetOfExpr x, Type getContainer, int getNumberOfFields where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql similarity index 82% rename from rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql rename to rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql index be6a0b6ebe9a..ad665f2edb8d 100644 --- a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from UnaryOpExpr x, Expr getExpr, string getOp +from PrefixExpr x, Expr getExpr, string getOp where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs b/rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs similarity index 80% rename from rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs rename to rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs index 7a185c3b6448..3f09b6ba9e6b 100644 --- a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/gen_prefix_expr.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_unary_op_expr() -> () { +fn test_prefix_expr() -> () { // A unary operation expression. For example: let x = -42 let y = !true diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql similarity index 87% rename from rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql rename to rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql index a8e24a4fa915..3b8031c8f4d2 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql @@ -3,7 +3,7 @@ import codeql.rust.elements import TestUtils from - RecordLitExpr x, string hasPath, int getNumberOfFields, string hasSpread, string hasEllipsis, + RecordExpr x, string hasPath, int getNumberOfFields, string hasSpread, string hasEllipsis, string isAssigneeExpr where toBeTested(x) and diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql similarity index 82% rename from rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql rename to rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql index 46a88b039891..dcc931bbade4 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from RecordLitExpr x, int index +from RecordExpr x, int index where toBeTested(x) and not x.isUnknown() select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql similarity index 86% rename from rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql rename to rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql index eb97f36fe3ff..0204ff893a9c 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from RecordLitExpr x +from RecordExpr x where toBeTested(x) and not x.isUnknown() select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql similarity index 86% rename from rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql rename to rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql index 2b798749d107..e5d206702d3d 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from RecordLitExpr x +from RecordExpr x where toBeTested(x) and not x.isUnknown() select x, x.getSpread() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs b/rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs similarity index 65% rename from rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs rename to rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs index 51f77e53c8a7..2b42cce4f143 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/gen_record_expr.rs @@ -1,7 +1,7 @@ // generated by codegen -fn test_record_lit_expr() -> () { - // A record literal expression. For example: +fn test_record_expr() -> () { + // A record expression. For example: let first = Foo { a: 1, b: 2 }; let second = Foo { a: 2, ..first }; Foo { a: 1, b: 2 }[2] = 10; diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql similarity index 80% rename from rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql rename to rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql index bba23ee59646..5e146165097a 100644 --- a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from RecordLitField x, string getName, Expr getExpr +from RecordExprField x, string getName, Expr getExpr where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs b/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs new file mode 100644 index 000000000000..8d9835f0b6f7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/gen_record_expr_field.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_record_expr_field() -> () { + // A field in a record expression. For example `a: 1` in: + Foo { a: 1, b: 2 }; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs b/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs deleted file mode 100644 index ecef8089af09..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs +++ /dev/null @@ -1,6 +0,0 @@ -// generated by codegen - -fn test_record_lit_field() -> () { - // A field in a record literal. For example `a: 1` in: - Foo { a: 1, b: 2 }; -} diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql similarity index 81% rename from rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql rename to rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql index 8710a49db236..370c86386914 100644 --- a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.ql +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from RecordFieldPat x, string getName, Pat getPat +from RecordPatField x, string getName, Pat getPat where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs b/rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs similarity index 77% rename from rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs rename to rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs index e1f5104e5a0e..77e7ca88985e 100644 --- a/rust/ql/test/extractor-tests/generated/RecordFieldPat/gen_record_field_pat.rs +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/gen_record_pat_field.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_record_field_pat() -> () { +fn test_record_pat_field() -> () { // A field in a record pattern. For example `a: 1` in: let Foo { a: 1, b: 2 } = foo; } diff --git a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql b/rust/ql/test/extractor-tests/generated/Type/Type.ql similarity index 88% rename from rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql rename to rust/ql/test/extractor-tests/generated/Type/Type.ql index 0bf1b45c3f7d..0689152b19f7 100644 --- a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.ql +++ b/rust/ql/test/extractor-tests/generated/Type/Type.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from WildPat x +from Type x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs b/rust/ql/test/extractor-tests/generated/Type/gen_type.rs similarity index 82% rename from rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs rename to rust/ql/test/extractor-tests/generated/Type/gen_type.rs index 1077dc2b4f5f..3242e9d25bd4 100644 --- a/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs +++ b/rust/ql/test/extractor-tests/generated/Type/gen_type.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_type_ref() -> () { +fn test_type() -> () { // The base class for type references. let x: i32; let y: Vec; diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql similarity index 86% rename from rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql rename to rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql index 48c2e1d6f00f..16a1e5936b4d 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from LiteralExpr x +from WildcardPat x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs b/rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs similarity index 72% rename from rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs rename to rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs index 153657dc96b7..97377808a6d6 100644 --- a/rust/ql/test/extractor-tests/generated/WildPat/gen_wild_pat.rs +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/gen_wildcard_pat.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_wild_pat() -> () { +fn test_wildcard_pat() -> () { // A wildcard pattern. For example: let _ = 42; } From b0939cfffaf90625b620fbf6a888d8ea98cee2fc Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 10:58:01 +0200 Subject: [PATCH 13/22] Update extractor --- rust/extractor/src/translate.rs | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 9213e11c3532..fce1f6194af7 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -117,11 +117,11 @@ impl CrateTranslator<'_> { ) -> trap::Label { match pat { ra_ap_hir_def::hir::LiteralOrConst::Literal(_literal) => { - let expr = self.trap.emit(generated::LiteralExpr { + let expr = self.trap.emit(generated::Literal { id: TrapId::Star, location: None, }); - self.trap.emit(generated::LitPat { + self.trap.emit(generated::LiteralPat { id: TrapId::Star, location, expr, @@ -196,7 +196,7 @@ impl CrateTranslator<'_> { let RecordFieldPat { name, pat } = field_pat; let location = self.emit_location_for_pat(*pat, source_map); let pat = self.emit_pat(*pat, body, source_map); - self.trap.emit(generated::RecordFieldPat { + self.trap.emit(generated::RecordPatField { id: TrapId::Star, location, name: name.as_str().into(), @@ -213,7 +213,7 @@ impl CrateTranslator<'_> { let RecordLitField { name, expr } = field_expr; let location = self.emit_location_for_expr(*expr, source_map); let expr = self.emit_expr(*expr, body, source_map); - self.trap.emit(generated::RecordLitField { + self.trap.emit(generated::RecordExprField { id: TrapId::Star, location, name: name.as_str().into(), @@ -228,7 +228,7 @@ impl CrateTranslator<'_> { id: TrapId::Star, location, }), - ra_ap_hir_def::hir::Pat::Wild => self.trap.emit(generated::WildPat { + ra_ap_hir_def::hir::Pat::Wild => self.trap.emit(generated::WildcardPat { id: TrapId::Star, location, }), @@ -320,7 +320,7 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Pat::Lit(expr) => { let expr = self.emit_expr(*expr, body, source_map); - self.trap.emit(generated::LitPat { + self.trap.emit(generated::LiteralPat { id: TrapId::Star, location, expr, @@ -328,7 +328,7 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Pat::Bind { id, subpat } => { let subpat = subpat.map(|pat| self.emit_pat(pat, body, source_map)); - self.trap.emit(generated::BindPat { + self.trap.emit(generated::IdentPat { id: TrapId::Star, location, subpat, @@ -381,7 +381,7 @@ impl CrateTranslator<'_> { } } fn emit_type_ref(&mut self, _type_ref: &TypeRef) -> trap::Label { - self.trap.emit(generated::TypeRef { + self.trap.emit(generated::Type { id: TrapId::Star, location: None, }) @@ -420,7 +420,7 @@ impl CrateTranslator<'_> { // TODO: find a way to get the location of the entire statement let location = self.emit_location_for_pat(*pat, source_map); let pat = self.emit_pat(*pat, body, source_map); - let type_ref = type_ref + let type_ = type_ref .as_ref() .map(|type_ref| self.emit_type_ref(type_ref)); let initializer = @@ -431,7 +431,7 @@ impl CrateTranslator<'_> { id: TrapId::Star, location, pat, - type_ref, + type_, initializer, else_, }) @@ -605,7 +605,7 @@ impl CrateTranslator<'_> { .map(|e| self.emit_expr(*e, body, source_map)) .collect(); let generic_args = generic_args.as_ref().map(|_args| { - self.trap.emit(generated::GenericArgs { + self.trap.emit(generated::GenericArgList { id: TrapId::Star, location: None, }) @@ -696,7 +696,7 @@ impl CrateTranslator<'_> { .map(|field| self.emit_record_lit_field(field, body, source_map)) .collect(); let spread = spread.map(|expr_id| self.emit_expr(expr_id, body, source_map)); - self.trap.emit(generated::RecordLitExpr { + self.trap.emit(generated::RecordExpr { id: TrapId::Star, location, path, @@ -725,12 +725,12 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Expr::Cast { expr, type_ref } => { let expr: trap::Label = self.emit_expr(*expr, body, source_map); - let type_ref: trap::Label = self.emit_type_ref(type_ref.as_ref()); + let type_: trap::Label = self.emit_type_ref(type_ref.as_ref()); self.trap.emit(generated::CastExpr { id: TrapId::Star, location, expr, - type_ref, + type_, }) } ra_ap_hir_def::hir::Expr::Ref { @@ -762,7 +762,7 @@ impl CrateTranslator<'_> { ra_ap_syntax::ast::UnaryOp::Not => "!", ra_ap_syntax::ast::UnaryOp::Neg => "-", }; - self.trap.emit(generated::UnaryOpExpr { + self.trap.emit(generated::PrefixExpr { id: TrapId::Star, location, expr, @@ -773,7 +773,7 @@ impl CrateTranslator<'_> { let lhs = self.emit_expr(*lhs, body, source_map); let rhs = self.emit_expr(*rhs, body, source_map); let op = op.map(|op| format!("{op}")); - self.trap.emit(generated::BinaryOpExpr { + self.trap.emit(generated::BinExpr { id: TrapId::Star, location, lhs, @@ -890,7 +890,7 @@ impl CrateTranslator<'_> { repeat, }) } - ra_ap_hir_def::hir::Expr::Literal(_literal) => self.trap.emit(generated::LiteralExpr { + ra_ap_hir_def::hir::Expr::Literal(_literal) => self.trap.emit(generated::Literal { id: TrapId::Star, location, }), @@ -910,7 +910,7 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Expr::InlineAsm(asm) => { let expr = self.emit_expr(asm.e, body, source_map); - self.trap.emit(generated::InlineAsmExpr { + self.trap.emit(generated::AsmExpr { id: TrapId::Star, location, expr, From d99c2031ac6538a42f70181eed5e54185e2b62db Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 11:06:04 +0200 Subject: [PATCH 14/22] Workaround nameclash in dbscheme generator --- rust/extractor/src/generated/.generated.list | 2 +- rust/extractor/src/generated/top.rs | 12 +++++------ rust/extractor/src/translate.rs | 8 ++++---- rust/ql/.generated.list | 16 +++++++-------- rust/ql/.gitattributes | 4 ++-- .../lib/codeql/rust/generated/ParentChild.qll | 20 +++++++++---------- rust/ql/lib/codeql/rust/generated/Raw.qll | 8 ++++---- .../lib/codeql/rust/generated/RecordExpr.qll | 14 ++++++------- .../lib/codeql/rust/generated/RecordPat.qll | 14 ++++++------- rust/ql/lib/rust.dbscheme | 8 ++++---- .../generated/RecordExpr/RecordExpr.ql | 6 +++--- ...dExpr_getField.ql => RecordExpr_getFld.ql} | 2 +- .../generated/RecordPat/RecordPat.ql | 6 +++--- ...ecordPat_getArg.ql => RecordPat_getFld.ql} | 2 +- rust/schema.py | 4 ++-- 15 files changed, 63 insertions(+), 63 deletions(-) rename rust/ql/test/extractor-tests/generated/RecordExpr/{RecordExpr_getField.ql => RecordExpr_getFld.ql} (80%) rename rust/ql/test/extractor-tests/generated/RecordPat/{RecordPat_getArg.ql => RecordPat_getFld.ql} (80%) diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index 8cf819895a0c..bfcfc64216b0 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e -top.rs c0701de6b3caad020b72b275d83209e6fff0771f84fb94a816921ae7ca7fd3df c0701de6b3caad020b72b275d83209e6fff0771f84fb94a816921ae7ca7fd3df +top.rs c5be6a0f58f3699e51761681ea97677abfc827d264d634d8069d283dd9172353 c5be6a0f58f3699e51761681ea97677abfc827d264d634d8069d283dd9172353 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index 5a215c043c0e..ea5d033206a5 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -1050,7 +1050,7 @@ pub struct RecordExpr { pub id: TrapId, pub location: Option, pub path: Option, - pub fields: Vec, + pub flds: Vec, pub spread: Option, pub has_ellipsis: bool, pub is_assignee_expr: bool, @@ -1069,8 +1069,8 @@ impl TrapEntry for RecordExpr { if let Some(v) = self.path { out.add_tuple("record_expr_paths", vec![trap::Arg::Label(id), v.into()]); } - for (i, v) in self.fields.into_iter().enumerate() { - out.add_tuple("record_expr_fields", vec![trap::Arg::Label(id), i.into(), v.into()]); + for (i, v) in self.flds.into_iter().enumerate() { + out.add_tuple("record_expr_flds", vec![trap::Arg::Label(id), i.into(), v.into()]); } if let Some(v) = self.spread { out.add_tuple("record_expr_spreads", vec![trap::Arg::Label(id), v.into()]); @@ -1089,7 +1089,7 @@ pub struct RecordPat { pub id: TrapId, pub location: Option, pub path: Option, - pub args: Vec, + pub flds: Vec, pub has_ellipsis: bool, } @@ -1106,8 +1106,8 @@ impl TrapEntry for RecordPat { if let Some(v) = self.path { out.add_tuple("record_pat_paths", vec![trap::Arg::Label(id), v.into()]); } - for (i, v) in self.args.into_iter().enumerate() { - out.add_tuple("record_pat_args", vec![trap::Arg::Label(id), i.into(), v.into()]); + for (i, v) in self.flds.into_iter().enumerate() { + out.add_tuple("record_pat_flds", vec![trap::Arg::Label(id), i.into(), v.into()]); } if self.has_ellipsis { out.add_tuple("record_pat_has_ellipsis", vec![trap::Arg::Label(id)]); diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index fce1f6194af7..f7848290ba09 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -262,7 +262,7 @@ impl CrateTranslator<'_> { ellipsis, } => { let path = path.as_ref().map(|path| self.emit_path(path, location)); - let args = args + let flds = args .into_iter() .map(|arg| self.emit_record_field_pat(arg, body, source_map)) .collect(); @@ -270,7 +270,7 @@ impl CrateTranslator<'_> { id: TrapId::Star, location, path, - args, + flds, has_ellipsis: *ellipsis, }) } @@ -691,7 +691,7 @@ impl CrateTranslator<'_> { is_assignee_expr, } => { let path = path.as_ref().map(|path| self.emit_path(path, location)); - let fields = fields + let flds = fields .into_iter() .map(|field| self.emit_record_lit_field(field, body, source_map)) .collect(); @@ -700,7 +700,7 @@ impl CrateTranslator<'_> { id: TrapId::Star, location, path, - fields, + flds, spread, has_ellipsis: *ellipsis, is_assignee_expr: *is_assignee_expr, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index e1c4cfcacd72..536570fa6be7 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -185,7 +185,7 @@ lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f0717 lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 lib/codeql/rust/generated/OffsetOfExpr.qll 5f2c1d2b5d63d2a86c02c8a20fede528403f8dd267f3026ddc420e128f53c73c d4a7eb9e533a943913aa3bdc6f57d89023a0a2075681b6aaa53d5c4dd7ad764b lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d -lib/codeql/rust/generated/ParentChild.qll ffe3bb352e1530ba64a394a70541d86dbedebd004a201b94c1b15d368b127319 1c8f74ba0bebb390ee774bfe295c9b25b466e64fd6ba4a1a4f1655885ecebce6 +lib/codeql/rust/generated/ParentChild.qll 1988b870c14148c2b23136dd00456d898a73d52a8cfb10039a0db414f5c01dbd bda2c0e7a5333206a6f7ab3a2c438be376c8b75f4d5810d91439cd10b88214a2 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f lib/codeql/rust/generated/Path.qll ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff lib/codeql/rust/generated/PathExpr.qll 5a82e07a0c641fec4e8ce29656fa4e33f420b19b2556b418769f4d899a3dfae3 21920262735114d8304c3569f884828a390b95ca039afcc3e81c75d3f23df9ca @@ -194,10 +194,10 @@ lib/codeql/rust/generated/PrefixExpr.qll a3f6cc62e5a12acd253ea59cb6957fb7157aa70 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll a6d94287077dff8af5d7d41af29589df1209cd22d996dcc41eb4c5c9084eb064 8d0159d571217c6c89b6cfd27975a9a5568051e2799e69c2d39bed9ed36822aa -lib/codeql/rust/generated/RecordExpr.qll 7099ed90ed466a3c849fa78e3c934d83e0d0fd6d8be5fb774596f5048f299478 2efb691f6f611f852253ac08be90bba6e25b695b8def83b416110ca63a790d5c +lib/codeql/rust/generated/Raw.qll c2926037fbd92b2ca637f71b91f05c48414a0e23822b324d33b74872eb28f9d1 94f35bd2248809cb3489aa7950a3e6bf5f0a0f26f4d91aa623b0589c67c9a2f8 +lib/codeql/rust/generated/RecordExpr.qll bdafc10cde139617b67cb46bb205f99bc3fc0b9fd8634d304b81b524b9592aa8 2826c453c72416237467b08cf9ad9421b03203a8593420146dad8e1e71711b8a lib/codeql/rust/generated/RecordExprField.qll eb06236fbdb856169dfe50ae1ebf59384222de6670ca91c34eed647823dda4ce 750bc7ab1e156db3927d6dd206e9d2c9388519425c0e8665afd322a6594aa5e2 -lib/codeql/rust/generated/RecordPat.qll 80ea7a231c3e33c539d0fd892b1cdca63bada265650f5eeee6d76b45b091be0d 858af1b0c992af44ed148ded54c2ce7cbfcb9e747110255bccfe8dc33ca655cf +lib/codeql/rust/generated/RecordPat.qll 20b62cfd4ee4e911ad4a2b8e5762da2abb7ff0c1d7f21cc6f72b1ebcbebbcd42 c0502e6bfc637058524cf7369c63396ca5440c58e5e91600fecd35ca5299d86c lib/codeql/rust/generated/RecordPatField.qll d862245163667ede676e407f109ad44e4ce732de59ea9025b696dd8b9803fbef 60166a21d7deee112325bc301b5893cf3072c4d8d095dbf9080cb00269b71d40 lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 lib/codeql/rust/generated/RefPat.qll 2a451553084306acc625f0433dc02546d07a1b6174a7d614379c9e8e28550118 40b845320c68283d0f6e47f17f4d4d893ef613f41422d35663582cfa3b5e7d75 @@ -295,13 +295,13 @@ test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212 test/extractor-tests/generated/RangePat/RangePat.ql 4cb48cd2a96ecaa3998f70e2ef5b117749448d9166af743d3b8cfe6f90938665 d5a894f6e56b28c1438e37191ddd623d89e4eb07d5c979ae3795119de9d01e49 test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 823307f0e43fe6c02843417d254c6584e2ead04b961158f04494eb8197b9905e 016805e6063be3846cef24a5680f4f17e68ee9714430120aa91fface3461d97c test/extractor-tests/generated/RangePat/RangePat_getStart.ql 1457a38514bf9fa7de44a4e5e3dd5218410149133074252bdf64d5eef5197d43 e9a6393aed20c710b2f19bc6482262664d8bc0245b5dfc35f636aa7966e0dba4 -test/extractor-tests/generated/RecordExpr/RecordExpr.ql f9760a715119ffa6a888c25c9d786457e1c982933524dbd5cae974c4ce36fff8 4d2b69b2f4639eb598c2642b42c2c159e00f13ceb39e6c15c5998571861f6bd0 -test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql ec56578c4110cfb348c5b0e298edfe972e26af62166a3e75fbb3c307cab83436 ef69eb85a20c9de83de98babfbf158b281200527fa71fd44cbeb1a05636ed62e +test/extractor-tests/generated/RecordExpr/RecordExpr.ql 20dcdc18d2c8edeb06945915b87c77578000a67690e234c9f96d9f5520c53159 2e8d975f70a7d6ee8e9dd1c896eb95a4de079f4f4fa1031f6276e3212386c895 +test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.ql ef36c6fb3dd9d77c58b573661834d20d8176544137cbcd8f6c2a9c9aaa335574 d9d652ae1067dda138af2211a8b5fbc67129c571cb9c1faf5048e1e372cf1dd0 test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql 6989f2b785813685e2233476abb13c0041a417d6a7e33179336739160f2569b7 fa1e08ee46ac863fdf69fc71b1823f18db6195aa66ea4a228c7c8eee3b448130 test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql d221a3847a077d3574de6ea15ccf433f1bea24baa1080eb90f9e3d104f1ba22a 97b325e5fa8bc8af4968dc96bf5930d05bb4083d7a945ab6a34a55a7016da09d test/extractor-tests/generated/RecordExprField/RecordExprField.ql c533740aecaae604d5c7d3261aa8df511d837b19fd74b4f88897373da6d932bd 037e33faf0195cb67314f7eef9571088391586366bf71a6fef3ef83845fb573c -test/extractor-tests/generated/RecordPat/RecordPat.ql 485dab5489881a9040d841999fdc9eedd5fd34ed2c0847f9e9a8343c0d24f26d fc3a104ffd48af0d26ea3f2266f0fa5acd32278f8514b6f261a5fd77e5ff90d9 -test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql c23dbde4d3c8ad1ef418e06a7552390ebbc396a218a660b103d9be08a7111960 5a10690bac5446a52f2d8b0dd2c4d7dd742c4a60e91b47a5a7f617396ce0adb0 +test/extractor-tests/generated/RecordPat/RecordPat.ql 54bae18e24900a8a6ada5f72334e3507c17156227afd908c1b7354c11c6bafe1 8613ce169564ce0ab912bd9b3340ff3a8040f8f3ccd56d6dfd3a56eb59a00bd8 +test/extractor-tests/generated/RecordPat/RecordPat_getFld.ql 4bd86be1173bf404bc6901399be7da2b6f12d989f2ad2b158002de18b534e0e0 cbca368f9196d886affce4e1ee01bb5918c1a22a17dedd367f8cd943aefe06c2 test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql d2730342a2203ad7d6385a64d53874050bd084fe74c05168df223499f7e86100 0d223ccb9c127100557b70da89f0c6ec7c559babc885bff46b97f5cb7b877e63 test/extractor-tests/generated/RecordPatField/RecordPatField.ql 70babedca815ef3a5759a398993cd20645a43d45ada0e71ba68318811274606e 24635139cc3b95bfa36921008ff1db0455257ed0a0384b10ac267dbd4a125fb9 test/extractor-tests/generated/RefExpr/RefExpr.ql e859cd59dbaa5aa5555aa13d4a75b7bfe2dbdb2d5c50675f3753adaaaabdedc2 d330ee941e9932054c32d0be5a52f38f285e4dc529821759ea38633f8ddbd517 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index ce944d9cf169..3d01a774e1c4 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -298,12 +298,12 @@ /test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated /test/extractor-tests/generated/RecordExpr/RecordExpr.ql linguist-generated -/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql linguist-generated +/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.ql linguist-generated /test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql linguist-generated /test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.ql linguist-generated /test/extractor-tests/generated/RecordExprField/RecordExprField.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated -/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql linguist-generated +/test/extractor-tests/generated/RecordPat/RecordPat_getFld.ql linguist-generated /test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated /test/extractor-tests/generated/RecordPatField/RecordPatField.ql linguist-generated /test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/generated/ParentChild.qll index a0e43cbcb18c..48ea6664dc8e 100644 --- a/rust/ql/lib/codeql/rust/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/generated/ParentChild.qll @@ -1008,13 +1008,13 @@ private module Impl { } private Element getImmediateChildOfRecordExpr(RecordExpr e, int index, string partialPredicateCall) { - exists(int b, int bExpr, int n, int nPath, int nField, int nSpread | + exists(int b, int bExpr, int n, int nPath, int nFld, int nSpread | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and n = bExpr and nPath = n + 1 and - nField = nPath + 1 + max(int i | i = -1 or exists(e.getField(i)) | i) and - nSpread = nField + 1 and + nFld = nPath + 1 + max(int i | i = -1 or exists(e.getFld(i)) | i) and + nSpread = nFld + 1 and ( none() or @@ -1022,21 +1022,21 @@ private module Impl { or index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = e.getField(index - nPath) and - partialPredicateCall = "Field(" + (index - nPath).toString() + ")" + result = e.getFld(index - nPath) and + partialPredicateCall = "Fld(" + (index - nPath).toString() + ")" or - index = nField and result = e.getSpread() and partialPredicateCall = "Spread()" + index = nFld and result = e.getSpread() and partialPredicateCall = "Spread()" ) ) } private Element getImmediateChildOfRecordPat(RecordPat e, int index, string partialPredicateCall) { - exists(int b, int bPat, int n, int nPath, int nArg | + exists(int b, int bPat, int n, int nPath, int nFld | b = 0 and bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and n = bPat and nPath = n + 1 and - nArg = nPath + 1 + max(int i | i = -1 or exists(e.getArg(i)) | i) and + nFld = nPath + 1 + max(int i | i = -1 or exists(e.getFld(i)) | i) and ( none() or @@ -1044,8 +1044,8 @@ private module Impl { or index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = e.getArg(index - nPath) and - partialPredicateCall = "Arg(" + (index - nPath).toString() + ")" + result = e.getFld(index - nPath) and + partialPredicateCall = "Fld(" + (index - nPath).toString() + ")" ) ) } diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index 74c7dc50ed9c..d29c56e26ec8 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -1174,9 +1174,9 @@ module Raw { Path getPath() { record_expr_paths(this, result) } /** - * Gets the `index`th field of this record expression (0-based). + * Gets the `index`th fld of this record expression (0-based). */ - RecordExprField getField(int index) { record_expr_fields(this, index, result) } + RecordExprField getFld(int index) { record_expr_flds(this, index, result) } /** * Gets the spread of this record expression, if it exists. @@ -1213,9 +1213,9 @@ module Raw { Path getPath() { record_pat_paths(this, result) } /** - * Gets the `index`th argument of this record pat (0-based). + * Gets the `index`th fld of this record pat (0-based). */ - RecordPatField getArg(int index) { record_pat_args(this, index, result) } + RecordPatField getFld(int index) { record_pat_flds(this, index, result) } /** * Holds if this record pat has ellipsis. diff --git a/rust/ql/lib/codeql/rust/generated/RecordExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordExpr.qll index f7b9c2194362..69724c31c721 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordExpr.qll @@ -43,24 +43,24 @@ module Generated { final predicate hasPath() { exists(this.getPath()) } /** - * Gets the `index`th field of this record expression (0-based). + * Gets the `index`th fld of this record expression (0-based). */ - RecordExprField getField(int index) { + RecordExprField getFld(int index) { result = Synth::convertRecordExprFieldFromRaw(Synth::convertRecordExprToRaw(this) .(Raw::RecordExpr) - .getField(index)) + .getFld(index)) } /** - * Gets any of the fields of this record expression. + * Gets any of the flds of this record expression. */ - final RecordExprField getAField() { result = this.getField(_) } + final RecordExprField getAFld() { result = this.getFld(_) } /** - * Gets the number of fields of this record expression. + * Gets the number of flds of this record expression. */ - final int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + final int getNumberOfFlds() { result = count(int i | exists(this.getFld(i))) } /** * Gets the spread of this record expression, if it exists. diff --git a/rust/ql/lib/codeql/rust/generated/RecordPat.qll b/rust/ql/lib/codeql/rust/generated/RecordPat.qll index 7913ab6c30b2..84d51a1da378 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordPat.qll @@ -43,24 +43,24 @@ module Generated { final predicate hasPath() { exists(this.getPath()) } /** - * Gets the `index`th argument of this record pat (0-based). + * Gets the `index`th fld of this record pat (0-based). */ - RecordPatField getArg(int index) { + RecordPatField getFld(int index) { result = Synth::convertRecordPatFieldFromRaw(Synth::convertRecordPatToRaw(this) .(Raw::RecordPat) - .getArg(index)) + .getFld(index)) } /** - * Gets any of the arguments of this record pat. + * Gets any of the flds of this record pat. */ - final RecordPatField getAnArg() { result = this.getArg(_) } + final RecordPatField getAFld() { result = this.getFld(_) } /** - * Gets the number of arguments of this record pat. + * Gets the number of flds of this record pat. */ - final int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) } + final int getNumberOfFlds() { result = count(int i | exists(this.getFld(i))) } /** * Holds if this record pat has ellipsis. diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index 84ddeeb486ba..e8d068710ab9 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -584,10 +584,10 @@ record_expr_paths( ); #keyset[id, index] -record_expr_fields( +record_expr_flds( int id: @record_expr ref, int index: int ref, - int field: @record_expr_field ref + int fld: @record_expr_field ref ); #keyset[id] @@ -617,10 +617,10 @@ record_pat_paths( ); #keyset[id, index] -record_pat_args( +record_pat_flds( int id: @record_pat ref, int index: int ref, - int arg: @record_pat_field ref + int fld: @record_pat_field ref ); #keyset[id] diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql index 3b8031c8f4d2..9b25e7667fa6 100644 --- a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql @@ -3,15 +3,15 @@ import codeql.rust.elements import TestUtils from - RecordExpr x, string hasPath, int getNumberOfFields, string hasSpread, string hasEllipsis, + RecordExpr x, string hasPath, int getNumberOfFlds, string hasSpread, string hasEllipsis, string isAssigneeExpr where toBeTested(x) and not x.isUnknown() and (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - getNumberOfFields = x.getNumberOfFields() and + getNumberOfFlds = x.getNumberOfFlds() and (if x.hasSpread() then hasSpread = "yes" else hasSpread = "no") and (if x.hasEllipsis() then hasEllipsis = "yes" else hasEllipsis = "no") and if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" -select x, "hasPath:", hasPath, "getNumberOfFields:", getNumberOfFields, "hasSpread:", hasSpread, +select x, "hasPath:", hasPath, "getNumberOfFlds:", getNumberOfFlds, "hasSpread:", hasSpread, "hasEllipsis:", hasEllipsis, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.ql similarity index 80% rename from rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql rename to rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.ql index dcc931bbade4..11bbad28dce2 100644 --- a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getField.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.ql @@ -4,4 +4,4 @@ import TestUtils from RecordExpr x, int index where toBeTested(x) and not x.isUnknown() -select x, index, x.getField(index) +select x, index, x.getFld(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql index 2a4ecedace57..67b13d341c51 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql @@ -2,11 +2,11 @@ import codeql.rust.elements import TestUtils -from RecordPat x, string hasPath, int getNumberOfArgs, string hasEllipsis +from RecordPat x, string hasPath, int getNumberOfFlds, string hasEllipsis where toBeTested(x) and not x.isUnknown() and (if x.hasPath() then hasPath = "yes" else hasPath = "no") and - getNumberOfArgs = x.getNumberOfArgs() and + getNumberOfFlds = x.getNumberOfFlds() and if x.hasEllipsis() then hasEllipsis = "yes" else hasEllipsis = "no" -select x, "hasPath:", hasPath, "getNumberOfArgs:", getNumberOfArgs, "hasEllipsis:", hasEllipsis +select x, "hasPath:", hasPath, "getNumberOfFlds:", getNumberOfFlds, "hasEllipsis:", hasEllipsis diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.ql similarity index 80% rename from rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql rename to rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.ql index 4a9650d80851..fba9c8350688 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.ql +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.ql @@ -4,4 +4,4 @@ import TestUtils from RecordPat x, int index where toBeTested(x) and not x.isUnknown() -select x, index, x.getArg(index) +select x, index, x.getFld(index) diff --git a/rust/schema.py b/rust/schema.py index 1aedeaae2c36..53fa088b0db1 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -536,7 +536,7 @@ class RecordExpr(Expr): ``` """ path: optional[Path] | child - fields: list[RecordExprField] | child + flds: list[RecordExprField] | child spread: optional[Expr] | child has_ellipsis: predicate is_assignee_expr: predicate @@ -919,7 +919,7 @@ class RecordPat(Pat): """ path: optional[Path] | child - args: list[RecordPatField] | child + flds: list[RecordPatField] | child has_ellipsis: predicate From e46ad61bb895276942204ca3a88c85291975eecf Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 11:16:25 +0200 Subject: [PATCH 15/22] Update test data --- .../generated/AsmExpr/AsmExpr.expected | 1 + .../generated/BinExpr/BinExpr.expected | 5 +++++ .../generated/BinExpr/BinExpr_getOp.expected | 5 +++++ .../BinaryOpExpr/BinaryOpExpr.expected | 5 ----- .../BinaryOpExpr/BinaryOpExpr_getOp.expected | 5 ----- .../generated/BindPat/BindPat.expected | 2 -- .../BindPat/BindPat_getSubpat.expected | 1 - .../generated/BoxExpr/BoxExpr.expected | 2 +- .../BreakExpr/BreakExpr_getExpr.expected | 2 +- .../CallExpr/CallExpr_getArg.expected | 8 ++++---- .../generated/CastExpr/CastExpr.expected | 2 +- .../ClosureExpr/ClosureExpr.expected | 4 ++-- .../ClosureExpr/ClosureExpr_getArg.expected | 12 +++++------ .../ClosureExpr_getArgType.expected | 4 ++-- .../ClosureExpr_getRetType.expected | 2 +- .../ElementListExpr_getElement.expected | 20 +++++++++---------- .../GenericArgList/GenericArgList.expected | 1 + .../GenericArgs/GenericArgs.expected | 1 - .../generated/IdentPat/IdentPat.expected | 2 ++ .../IdentPat/IdentPat_getSubpat.expected | 1 + .../generated/IfExpr/IfExpr.expected | 4 ++-- .../generated/IndexExpr/IndexExpr.expected | 4 ++-- .../InlineAsmExpr/InlineAsmExpr.expected | 1 - .../generated/LetStmt/LetStmt.expected | 12 +++++------ .../LetStmt/LetStmt_getInitializer.expected | 4 ++-- .../LetStmt/LetStmt_getType.expected | 2 ++ .../LetStmt/LetStmt_getTypeRef.expected | 2 -- .../generated/LitPat/LitPat.expected | 1 - .../generated/Literal/Literal.expected | 8 ++++++++ .../LiteralExpr/LiteralExpr.expected | 8 -------- .../generated/LiteralPat/LiteralPat.expected | 1 + .../generated/MatchArm/MatchArm.expected | 6 +++--- .../MatchArm/MatchArm_getGuard.expected | 2 +- .../MethodCallExpr_getArg.expected | 4 ++-- .../MethodCallExpr_getGenericArgs.expected | 2 +- .../OffsetOfExpr/OffsetOfExpr.expected | 2 +- .../generated/Pat/BindPat.expected | 2 -- .../generated/Pat/BindPat_getSubpat.expected | 1 - .../generated/PrefixExpr/PrefixExpr.expected | 3 +++ .../RangeExpr/RangeExpr_getLhs.expected | 6 +++--- .../RangeExpr/RangeExpr_getRhs.expected | 8 ++++---- .../RangePat/RangePat_getEnd.expected | 4 ++-- .../RangePat/RangePat_getStart.expected | 4 ++-- .../generated/RecordExpr/RecordExpr.expected | 4 ++++ .../RecordExpr/RecordExpr_getFld.expected | 5 +++++ .../RecordExpr/RecordExpr_getPath.expected | 4 ++++ .../RecordExpr/RecordExpr_getSpread.expected | 1 + .../RecordExprField/RecordExprField.expected | 2 ++ .../generated/RecordFieldPat/BoxPat.expected | 2 -- .../RecordFieldPat/RecordFieldPat.expected | 2 -- .../RecordLitExpr/RecordLitExpr.expected | 4 ---- .../RecordLitExpr_getField.expected | 5 ----- .../RecordLitExpr_getPath.expected | 4 ---- .../RecordLitExpr_getSpread.expected | 1 - .../RecordLitField/RecordLitField.expected | 2 -- .../generated/RecordPat/RecordPat.expected | 4 ++-- ...Arg.expected => RecordPat_getFld.expected} | 4 ++-- .../RecordPatField/RecordPatField.expected | 2 ++ .../generated/RepeatExpr/RepeatExpr.expected | 2 +- .../ReturnExpr/ReturnExpr_getExpr.expected | 2 +- .../SlicePat/SlicePat_getPrefix.expected | 18 ++++++++--------- .../SlicePat/SlicePat_getSuffix.expected | 4 ++-- .../TupleExpr/TupleExpr_getExpr.expected | 8 ++++---- .../TuplePat/TuplePat_getArg.expected | 10 +++++----- .../TupleStructPat_getArg.expected | 10 +++++----- .../generated/Type/Type.expected | 3 +++ .../generated/TypeRef/TypeRef.expected | 3 --- .../UnaryOpExpr/UnaryOpExpr.expected | 3 --- .../generated/WildPat/WildPat.expected | 1 - .../WildcardPat/WildcardPat.expected | 1 + .../YeetExpr/YeetExpr_getExpr.expected | 2 +- .../YieldExpr/YieldExpr_getExpr.expected | 2 +- 72 files changed, 143 insertions(+), 148 deletions(-) create mode 100644 rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected delete mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected delete mode 100644 rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected delete mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected create mode 100644 rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected delete mode 100644 rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected delete mode 100644 rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected delete mode 100644 rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/Literal/Literal.expected delete mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/Pat/BindPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected create mode 100644 rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.expected create mode 100644 rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected delete mode 100644 rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected rename rust/ql/test/extractor-tests/generated/RecordPat/{RecordPat_getArg.expected => RecordPat_getFld.expected} (68%) create mode 100644 rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected create mode 100644 rust/ql/test/extractor-tests/generated/Type/Type.expected delete mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected delete mode 100644 rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected delete mode 100644 rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected create mode 100644 rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected new file mode 100644 index 000000000000..44831a8693d1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected @@ -0,0 +1 @@ +| gen_asm_expr.rs:6:9:6:24 | AsmExpr | getExpr: | gen_asm_expr.rs:6:23:6:23 | UnderscoreExpr | diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected new file mode 100644 index 000000000000..6cc1b57ab807 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected @@ -0,0 +1,5 @@ +| gen_bin_expr.rs:5:5:5:9 | BinExpr | getLhs: | gen_bin_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_bin_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | +| gen_bin_expr.rs:6:5:6:10 | BinExpr | getLhs: | gen_bin_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_bin_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | +| gen_bin_expr.rs:7:5:7:10 | BinExpr | getLhs: | gen_bin_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_bin_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | +| gen_bin_expr.rs:8:5:8:9 | BinExpr | getLhs: | gen_bin_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_bin_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | +| gen_bin_expr.rs:9:5:9:10 | BinExpr | getLhs: | gen_bin_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_bin_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected new file mode 100644 index 000000000000..261bfc5af87c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected @@ -0,0 +1,5 @@ +| gen_bin_expr.rs:5:5:5:9 | BinExpr | + | +| gen_bin_expr.rs:6:5:6:10 | BinExpr | && | +| gen_bin_expr.rs:7:5:7:10 | BinExpr | <= | +| gen_bin_expr.rs:8:5:8:9 | BinExpr | = | +| gen_bin_expr.rs:9:5:9:10 | BinExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected deleted file mode 100644 index 1b6b562af537..000000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | -| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | -| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | -| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | -| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected deleted file mode 100644 index 8b155e5641a7..000000000000 --- a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | + | -| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | && | -| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | <= | -| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | = | -| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected b/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected deleted file mode 100644 index 84b1cd34a335..000000000000 --- a/rust/ql/test/extractor-tests/generated/BindPat/BindPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_bind_pat.rs:6:14:6:14 | BindPat | getBindingId: | y | hasSubpat: | no | -| gen_bind_pat.rs:10:9:10:17 | BindPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected deleted file mode 100644 index e3ab52b2cf2e..000000000000 --- a/rust/ql/test/extractor-tests/generated/BindPat/BindPat_getSubpat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_bind_pat.rs:10:9:10:17 | BindPat | gen_bind_pat.rs:10:11:10:17 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected index b3324e400f5d..ba6678fdacbc 100644 --- a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected @@ -1 +1 @@ -| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | LiteralExpr | +| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected index 16dfc8124590..0ca1618a7ca0 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected @@ -1 +1 @@ -| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | LiteralExpr | +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected index 6ff1a242993c..4ac5e6c1b72b 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected @@ -1,4 +1,4 @@ -| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | LiteralExpr | -| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | LiteralExpr | -| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | LiteralExpr | -| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | LiteralExpr | +| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | Literal | +| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | Literal | +| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | Literal | +| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected index 13f055c32ad6..2d43d72ad100 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -1 +1 @@ -| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getTypeRef: | file://:0:0:0:0 | TypeRef | +| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getType: | file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected index 78723fcf14bb..1c666b9bee0f 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -1,5 +1,5 @@ -| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:5:9:5:13 | BinaryOpExpr | getClosureKind: | Closure | isMove: | no | +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:5:9:5:13 | BinExpr | getClosureKind: | Closure | isMove: | no | | gen_closure_expr.rs:6:5:6:34 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | yes | getBody: | gen_closure_expr.rs:6:26:6:34 | BlockExpr | getClosureKind: | Closure | isMove: | yes | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfArgs: | 2 | hasRetType: | no | getBody: | gen_closure_expr.rs:7:23:7:27 | BinaryOpExpr | getClosureKind: | Async | isMove: | no | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfArgs: | 2 | hasRetType: | no | getBody: | gen_closure_expr.rs:7:23:7:27 | BinExpr | getClosureKind: | Async | isMove: | no | | gen_closure_expr.rs:8:6:9:15 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:9:9:9:15 | YieldExpr | getClosureKind: | Coroutine(Movable) | isMove: | no | | gen_closure_expr.rs:10:6:11:23 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:11:17:11:23 | YieldExpr | getClosureKind: | Coroutine(Static) | isMove: | no | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected index 22ad041237d0..41bbc86fb709 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.expected @@ -1,6 +1,6 @@ -| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | 0 | gen_closure_expr.rs:5:6:5:6 | BindPat | -| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | gen_closure_expr.rs:6:11:6:11 | BindPat | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | gen_closure_expr.rs:7:12:7:12 | BindPat | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 1 | gen_closure_expr.rs:7:20:7:20 | BindPat | -| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | 0 | gen_closure_expr.rs:9:6:9:6 | BindPat | -| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | 0 | gen_closure_expr.rs:11:14:11:14 | BindPat | +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | 0 | gen_closure_expr.rs:5:6:5:6 | IdentPat | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | gen_closure_expr.rs:6:11:6:11 | IdentPat | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | gen_closure_expr.rs:7:12:7:12 | IdentPat | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 1 | gen_closure_expr.rs:7:20:7:20 | IdentPat | +| gen_closure_expr.rs:8:6:9:15 | ClosureExpr | 0 | gen_closure_expr.rs:9:6:9:6 | IdentPat | +| gen_closure_expr.rs:10:6:11:23 | ClosureExpr | 0 | gen_closure_expr.rs:11:14:11:14 | IdentPat | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected index dd1f87a74c10..46e2fceec71c 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected @@ -1,2 +1,2 @@ -| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | file://:0:0:0:0 | Type | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected index 6decd91ca765..0268aa7ac80f 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected @@ -1 +1 @@ -| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | file://:0:0:0:0 | TypeRef | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected index 8bed9878b6e9..870e0efb3229 100644 --- a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected @@ -1,10 +1,10 @@ -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 0 | gen_element_list_expr.rs:5:6:5:6 | LiteralExpr | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 1 | gen_element_list_expr.rs:5:9:5:9 | LiteralExpr | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 2 | gen_element_list_expr.rs:5:12:5:12 | LiteralExpr | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 3 | gen_element_list_expr.rs:5:15:5:15 | LiteralExpr | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 4 | gen_element_list_expr.rs:5:18:5:18 | LiteralExpr | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 0 | gen_element_list_expr.rs:6:6:6:6 | LiteralExpr | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 1 | gen_element_list_expr.rs:6:9:6:9 | LiteralExpr | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 2 | gen_element_list_expr.rs:6:12:6:12 | LiteralExpr | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 3 | gen_element_list_expr.rs:6:15:6:15 | LiteralExpr | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 4 | gen_element_list_expr.rs:6:18:6:18 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 0 | gen_element_list_expr.rs:5:6:5:6 | Literal | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 1 | gen_element_list_expr.rs:5:9:5:9 | Literal | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 2 | gen_element_list_expr.rs:5:12:5:12 | Literal | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 3 | gen_element_list_expr.rs:5:15:5:15 | Literal | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 4 | gen_element_list_expr.rs:5:18:5:18 | Literal | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 0 | gen_element_list_expr.rs:6:6:6:6 | Literal | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 1 | gen_element_list_expr.rs:6:9:6:9 | Literal | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 2 | gen_element_list_expr.rs:6:12:6:12 | Literal | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 3 | gen_element_list_expr.rs:6:15:6:15 | Literal | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 4 | gen_element_list_expr.rs:6:18:6:18 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected new file mode 100644 index 000000000000..43c48a031599 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/GenericArgList/GenericArgList.expected @@ -0,0 +1 @@ +| file://:0:0:0:0 | GenericArgList | diff --git a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected b/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected deleted file mode 100644 index f49c7814ba37..000000000000 --- a/rust/ql/test/extractor-tests/generated/GenericArgs/GenericArgs.expected +++ /dev/null @@ -1 +0,0 @@ -| file://:0:0:0:0 | GenericArgs | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected new file mode 100644 index 000000000000..e0d1b3ed902b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected @@ -0,0 +1,2 @@ +| gen_ident_pat.rs:6:14:6:14 | IdentPat | getBindingId: | y | hasSubpat: | no | +| gen_ident_pat.rs:10:9:10:17 | IdentPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected new file mode 100644 index 000000000000..78b903ed5e03 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected @@ -0,0 +1 @@ +| gen_ident_pat.rs:10:9:10:17 | IdentPat | gen_ident_pat.rs:10:11:10:17 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected index fc99c3eae67c..26bb112716cc 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -1,2 +1,2 @@ -| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinaryOpExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | -| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinaryOpExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | +| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | +| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected index edbf139dfc35..83c1279e7234 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -1,2 +1,2 @@ -| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | LiteralExpr | isAssigneeExpr: | no | -| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | LiteralExpr | isAssigneeExpr: | yes | +| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | Literal | isAssigneeExpr: | no | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | Literal | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected deleted file mode 100644 index 8a90a7f5c7e9..000000000000 --- a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/InlineAsmExpr.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_inline_asm_expr.rs:6:9:6:24 | InlineAsmExpr | getExpr: | gen_inline_asm_expr.rs:6:23:6:23 | UnderscoreExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected index 432aa15362c0..a60f24798332 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt.expected @@ -1,6 +1,6 @@ -| gen_let_stmt.rs:5:9:5:9 | LetStmt | getPat: | gen_let_stmt.rs:5:9:5:9 | BindPat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | no | -| gen_let_stmt.rs:6:9:6:9 | LetStmt | getPat: | gen_let_stmt.rs:6:9:6:9 | BindPat | hasTypeRef: | yes | hasInitializer: | yes | hasElse: | no | -| gen_let_stmt.rs:7:9:7:9 | LetStmt | getPat: | gen_let_stmt.rs:7:9:7:9 | BindPat | hasTypeRef: | yes | hasInitializer: | no | hasElse: | no | -| gen_let_stmt.rs:8:9:8:9 | LetStmt | getPat: | gen_let_stmt.rs:8:9:8:9 | BindPat | hasTypeRef: | no | hasInitializer: | no | hasElse: | no | -| gen_let_stmt.rs:9:9:9:14 | LetStmt | getPat: | gen_let_stmt.rs:9:9:9:14 | TuplePat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | no | -| gen_let_stmt.rs:10:9:10:15 | LetStmt | getPat: | gen_let_stmt.rs:10:9:10:15 | TupleStructPat | hasTypeRef: | no | hasInitializer: | yes | hasElse: | yes | +| gen_let_stmt.rs:5:9:5:9 | LetStmt | getPat: | gen_let_stmt.rs:5:9:5:9 | IdentPat | hasType: | no | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | getPat: | gen_let_stmt.rs:6:9:6:9 | IdentPat | hasType: | yes | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:7:9:7:9 | LetStmt | getPat: | gen_let_stmt.rs:7:9:7:9 | IdentPat | hasType: | yes | hasInitializer: | no | hasElse: | no | +| gen_let_stmt.rs:8:9:8:9 | LetStmt | getPat: | gen_let_stmt.rs:8:9:8:9 | IdentPat | hasType: | no | hasInitializer: | no | hasElse: | no | +| gen_let_stmt.rs:9:9:9:14 | LetStmt | getPat: | gen_let_stmt.rs:9:9:9:14 | TuplePat | hasType: | no | hasInitializer: | yes | hasElse: | no | +| gen_let_stmt.rs:10:9:10:15 | LetStmt | getPat: | gen_let_stmt.rs:10:9:10:15 | TupleStructPat | hasType: | no | hasInitializer: | yes | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected index 59bffddf5453..8d95b6e7cac0 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected @@ -1,4 +1,4 @@ -| gen_let_stmt.rs:5:9:5:9 | LetStmt | gen_let_stmt.rs:5:13:5:14 | LiteralExpr | -| gen_let_stmt.rs:6:9:6:9 | LetStmt | gen_let_stmt.rs:6:18:6:19 | LiteralExpr | +| gen_let_stmt.rs:5:9:5:9 | LetStmt | gen_let_stmt.rs:5:13:5:14 | Literal | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | gen_let_stmt.rs:6:18:6:19 | Literal | | gen_let_stmt.rs:9:9:9:14 | LetStmt | gen_let_stmt.rs:9:18:9:23 | TupleExpr | | gen_let_stmt.rs:10:9:10:15 | LetStmt | gen_let_stmt.rs:10:19:10:38 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected new file mode 100644 index 000000000000..955f6b488655 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected @@ -0,0 +1,2 @@ +| gen_let_stmt.rs:6:9:6:9 | LetStmt | file://:0:0:0:0 | Type | +| gen_let_stmt.rs:7:9:7:9 | LetStmt | file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected deleted file mode 100644 index 7a67697cb653..000000000000 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getTypeRef.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_let_stmt.rs:6:9:6:9 | LetStmt | file://:0:0:0:0 | TypeRef | -| gen_let_stmt.rs:7:9:7:9 | LetStmt | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected b/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected deleted file mode 100644 index ee96c3aa516d..000000000000 --- a/rust/ql/test/extractor-tests/generated/LitPat/LitPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_lit_pat.rs:6:9:6:10 | LitPat | getExpr: | gen_lit_pat.rs:6:9:6:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/Literal/Literal.expected b/rust/ql/test/extractor-tests/generated/Literal/Literal.expected new file mode 100644 index 000000000000..3e4208518a16 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Literal/Literal.expected @@ -0,0 +1,8 @@ +| gen_literal.rs:5:5:5:6 | Literal | +| gen_literal.rs:6:5:6:8 | Literal | +| gen_literal.rs:7:5:7:19 | Literal | +| gen_literal.rs:8:5:8:20 | Literal | +| gen_literal.rs:9:5:9:7 | Literal | +| gen_literal.rs:10:5:10:8 | Literal | +| gen_literal.rs:11:5:11:20 | Literal | +| gen_literal.rs:12:5:12:8 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected deleted file mode 100644 index 4ea6107f6a81..000000000000 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected +++ /dev/null @@ -1,8 +0,0 @@ -| gen_literal_expr.rs:5:5:5:6 | LiteralExpr | -| gen_literal_expr.rs:6:5:6:8 | LiteralExpr | -| gen_literal_expr.rs:7:5:7:19 | LiteralExpr | -| gen_literal_expr.rs:8:5:8:20 | LiteralExpr | -| gen_literal_expr.rs:9:5:9:7 | LiteralExpr | -| gen_literal_expr.rs:10:5:10:8 | LiteralExpr | -| gen_literal_expr.rs:11:5:11:20 | LiteralExpr | -| gen_literal_expr.rs:12:5:12:8 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected new file mode 100644 index 000000000000..d0a4072ed162 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected @@ -0,0 +1 @@ +| gen_literal_pat.rs:6:9:6:10 | LiteralPat | getExpr: | gen_literal_pat.rs:6:9:6:10 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected index dea4efb1cc4f..36d20b495a4c 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -1,4 +1,4 @@ | gen_match_arm.rs:6:9:6:15 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:15 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:20:6:20 | PathExpr | -| gen_match_arm.rs:7:9:7:12 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:12 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:17:7:17 | LiteralExpr | -| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinaryOpExpr | -| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | LiteralExpr | +| gen_match_arm.rs:7:9:7:12 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:12 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:17:7:17 | Literal | +| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinExpr | +| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildcardPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected index 891432f91e0e..8f7502d53022 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected @@ -1 +1 @@ -| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinaryOpExpr | +| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinExpr | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected index 601b344cd0fc..692a045a33aa 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected @@ -1,2 +1,2 @@ -| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | LiteralExpr | -| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | LiteralExpr | +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | Literal | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected index b857e713823a..f4590b4f4e15 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected @@ -1 +1 @@ -| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | GenericArgs | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | GenericArgList | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected index e28c61da351d..533e0baf84f7 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -1 +1 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getContainer: | file://:0:0:0:0 | TypeRef | getNumberOfFields: | 1 | +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getContainer: | file://:0:0:0:0 | Type | getNumberOfFields: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected b/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected deleted file mode 100644 index 84b1cd34a335..000000000000 --- a/rust/ql/test/extractor-tests/generated/Pat/BindPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_bind_pat.rs:6:14:6:14 | BindPat | getBindingId: | y | hasSubpat: | no | -| gen_bind_pat.rs:10:9:10:17 | BindPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected deleted file mode 100644 index e3ab52b2cf2e..000000000000 --- a/rust/ql/test/extractor-tests/generated/Pat/BindPat_getSubpat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_bind_pat.rs:10:9:10:17 | BindPat | gen_bind_pat.rs:10:11:10:17 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected new file mode 100644 index 000000000000..680c22b3b739 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -0,0 +1,3 @@ +| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | getExpr: | gen_prefix_expr.rs:5:14:5:15 | Literal | getOp: | - | +| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | getExpr: | gen_prefix_expr.rs:6:14:6:17 | Literal | getOp: | ! | +| gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | getExpr: | gen_prefix_expr.rs:7:14:7:16 | PathExpr | getOp: | * | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected index f88c18b39c2d..235f730a8f40 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected @@ -1,3 +1,3 @@ -| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | LiteralExpr | -| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | LiteralExpr | -| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | LiteralExpr | +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | Literal | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | Literal | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected index f596145bfc9d..8cd6b27addd8 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected @@ -1,4 +1,4 @@ -| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | LiteralExpr | -| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | LiteralExpr | -| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | LiteralExpr | -| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | LiteralExpr | +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | Literal | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | Literal | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | Literal | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected index e183bce66412..bc0e1485b8c0 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getEnd.expected @@ -1,2 +1,2 @@ -| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:9:6:12 | LitPat | -| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LitPat | +| gen_range_pat.rs:6:9:6:12 | RangePat | gen_range_pat.rs:6:9:6:12 | LiteralPat | +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected index 0f9540cbbb40..fe4a876680a3 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getStart.expected @@ -1,2 +1,2 @@ -| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LitPat | -| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:12 | LitPat | +| gen_range_pat.rs:7:9:7:15 | RangePat | gen_range_pat.rs:7:9:7:15 | LiteralPat | +| gen_range_pat.rs:8:9:8:12 | RangePat | gen_range_pat.rs:8:9:8:12 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected new file mode 100644 index 000000000000..e5759d93ad86 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | hasPath: | yes | getNumberOfFlds: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | no | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | hasPath: | yes | getNumberOfFlds: | 1 | hasSpread: | yes | hasEllipsis: | yes | isAssigneeExpr: | no | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | hasPath: | yes | getNumberOfFlds: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | yes | +| gen_record_expr.rs:8:5:8:14 | RecordExpr | hasPath: | yes | getNumberOfFlds: | 0 | hasSpread: | no | hasEllipsis: | yes | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.expected new file mode 100644 index 000000000000..f020086a8f77 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getFld.expected @@ -0,0 +1,5 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | 0 | gen_record_expr.rs:5:26:5:26 | RecordExprField | +| gen_record_expr.rs:5:17:5:34 | RecordExpr | 1 | gen_record_expr.rs:5:32:5:32 | RecordExprField | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | 0 | gen_record_expr.rs:6:27:6:27 | RecordExprField | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | 0 | gen_record_expr.rs:7:14:7:14 | RecordExprField | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | 1 | gen_record_expr.rs:7:20:7:20 | RecordExprField | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected new file mode 100644 index 000000000000..e49dd014e305 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | RecordExpr | gen_record_expr.rs:5:17:5:34 | Path | +| gen_record_expr.rs:6:18:6:38 | RecordExpr | gen_record_expr.rs:6:18:6:38 | Path | +| gen_record_expr.rs:7:5:7:22 | RecordExpr | gen_record_expr.rs:7:5:7:22 | Path | +| gen_record_expr.rs:8:5:8:14 | RecordExpr | gen_record_expr.rs:8:5:8:14 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.expected new file mode 100644 index 000000000000..ae380aa5d662 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getSpread.expected @@ -0,0 +1 @@ +| gen_record_expr.rs:6:18:6:38 | RecordExpr | gen_record_expr.rs:6:32:6:36 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected new file mode 100644 index 000000000000..fabfcb47cd63 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected @@ -0,0 +1,2 @@ +| gen_record_expr_field.rs:5:14:5:14 | RecordExprField | getName: | a | getExpr: | gen_record_expr_field.rs:5:14:5:14 | Literal | +| gen_record_expr_field.rs:5:20:5:20 | RecordExprField | getName: | b | getExpr: | gen_record_expr_field.rs:5:20:5:20 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected deleted file mode 100644 index 655e3c463163..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordFieldPat/BoxPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_box_pat.rs:6:9:6:19 | BoxPat | getInner: | gen_box_pat.rs:6:13:6:19 | TupleStructPat | -| gen_box_pat.rs:7:9:7:16 | BoxPat | getInner: | gen_box_pat.rs:7:13:7:16 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected b/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected deleted file mode 100644 index c6f11b0f5986..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordFieldPat/RecordFieldPat.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_record_field_pat.rs:5:18:5:18 | RecordFieldPat | getName: | a | getPat: | gen_record_field_pat.rs:5:18:5:18 | LitPat | -| gen_record_field_pat.rs:5:24:5:24 | RecordFieldPat | getName: | b | getPat: | gen_record_field_pat.rs:5:24:5:24 | LitPat | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected deleted file mode 100644 index aaa310b00d1e..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | no | -| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 1 | hasSpread: | yes | hasEllipsis: | yes | isAssigneeExpr: | no | -| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | yes | -| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 0 | hasSpread: | no | hasEllipsis: | yes | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected deleted file mode 100644 index 2ee172341bbd..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 0 | gen_record_lit_expr.rs:5:26:5:26 | RecordLitField | -| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 1 | gen_record_lit_expr.rs:5:32:5:32 | RecordLitField | -| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | 0 | gen_record_lit_expr.rs:6:27:6:27 | RecordLitField | -| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 0 | gen_record_lit_expr.rs:7:14:7:14 | RecordLitField | -| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 1 | gen_record_lit_expr.rs:7:20:7:20 | RecordLitField | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected deleted file mode 100644 index 95e6c3d889f8..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | gen_record_lit_expr.rs:5:17:5:34 | Path | -| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:18:6:38 | Path | -| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | gen_record_lit_expr.rs:7:5:7:22 | Path | -| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | gen_record_lit_expr.rs:8:5:8:14 | Path | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected deleted file mode 100644 index 5b1ccb6b3da9..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:32:6:36 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected deleted file mode 100644 index 81acaffde034..000000000000 --- a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected +++ /dev/null @@ -1,2 +0,0 @@ -| gen_record_lit_field.rs:5:14:5:14 | RecordLitField | getName: | a | getExpr: | gen_record_lit_field.rs:5:14:5:14 | LiteralExpr | -| gen_record_lit_field.rs:5:20:5:20 | RecordLitField | getName: | b | getExpr: | gen_record_lit_field.rs:5:20:5:20 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected index 12bf255517db..c6abe134f671 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected @@ -1,2 +1,2 @@ -| gen_record_pat.rs:6:9:6:26 | RecordPat | hasPath: | yes | getNumberOfArgs: | 2 | hasEllipsis: | no | -| gen_record_pat.rs:7:9:7:18 | RecordPat | hasPath: | yes | getNumberOfArgs: | 0 | hasEllipsis: | yes | +| gen_record_pat.rs:6:9:6:26 | RecordPat | hasPath: | yes | getNumberOfFlds: | 2 | hasEllipsis: | no | +| gen_record_pat.rs:7:9:7:18 | RecordPat | hasPath: | yes | getNumberOfFlds: | 0 | hasEllipsis: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.expected similarity index 68% rename from rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected rename to rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.expected index f40505869562..d99c027de911 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getFld.expected @@ -1,2 +1,2 @@ -| gen_record_pat.rs:6:9:6:26 | RecordPat | 0 | gen_record_pat.rs:6:18:6:18 | RecordFieldPat | -| gen_record_pat.rs:6:9:6:26 | RecordPat | 1 | gen_record_pat.rs:6:24:6:24 | RecordFieldPat | +| gen_record_pat.rs:6:9:6:26 | RecordPat | 0 | gen_record_pat.rs:6:18:6:18 | RecordPatField | +| gen_record_pat.rs:6:9:6:26 | RecordPat | 1 | gen_record_pat.rs:6:24:6:24 | RecordPatField | diff --git a/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected new file mode 100644 index 000000000000..8941bd466d36 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPatField/RecordPatField.expected @@ -0,0 +1,2 @@ +| gen_record_pat_field.rs:5:18:5:18 | RecordPatField | getName: | a | getPat: | gen_record_pat_field.rs:5:18:5:18 | LiteralPat | +| gen_record_pat_field.rs:5:24:5:24 | RecordPatField | getName: | b | getPat: | gen_record_pat_field.rs:5:24:5:24 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected index 370729af71d0..e063b0974944 100644 --- a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected @@ -1 +1 @@ -| gen_repeat_expr.rs:5:5:5:11 | RepeatExpr | getInitializer: | gen_repeat_expr.rs:5:6:5:6 | LiteralExpr | getRepeat: | gen_repeat_expr.rs:5:9:5:10 | LiteralExpr | +| gen_repeat_expr.rs:5:5:5:11 | RepeatExpr | getInitializer: | gen_repeat_expr.rs:5:6:5:6 | Literal | getRepeat: | gen_repeat_expr.rs:5:9:5:10 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected index 4247069ccc25..e4fe8cabe075 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected @@ -1 +1 @@ -| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | LiteralExpr | +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected index 856034605c42..763ef8783b4e 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getPrefix.expected @@ -1,9 +1,9 @@ -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | LitPat | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | LitPat | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | LitPat | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | LitPat | -| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | LitPat | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | LitPat | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | LitPat | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | BindPat | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | BindPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 0 | gen_slice_pat.rs:6:10:6:10 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 1 | gen_slice_pat.rs:6:13:6:13 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 2 | gen_slice_pat.rs:6:16:6:16 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 3 | gen_slice_pat.rs:6:19:6:19 | LiteralPat | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | 4 | gen_slice_pat.rs:6:22:6:22 | LiteralPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 0 | gen_slice_pat.rs:7:10:7:10 | LiteralPat | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | 1 | gen_slice_pat.rs:7:13:7:13 | LiteralPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:10:8:10 | IdentPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:13:8:13 | IdentPat | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected index 76d7ffd51416..a815226345a9 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getSuffix.expected @@ -1,2 +1,2 @@ -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:20:8:20 | BindPat | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:23:8:23 | LitPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 0 | gen_slice_pat.rs:8:20:8:20 | IdentPat | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | 1 | gen_slice_pat.rs:8:23:8:23 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected index 936d2a39bb27..a87c7a175823 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected @@ -1,4 +1,4 @@ -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | LiteralExpr | -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | LiteralExpr | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | LiteralExpr | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | LiteralExpr | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | Literal | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | Literal | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | Literal | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected index 3cb4a1055fdd..993b348b4ee9 100644 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getArg.expected @@ -1,5 +1,5 @@ -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | BindPat | -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | BindPat | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | BindPat | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | BindPat | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:21:6:21 | BindPat | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 0 | gen_tuple_pat.rs:5:10:5:10 | IdentPat | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | 1 | gen_tuple_pat.rs:5:13:5:13 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 0 | gen_tuple_pat.rs:6:10:6:10 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 1 | gen_tuple_pat.rs:6:13:6:13 | IdentPat | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | 2 | gen_tuple_pat.rs:6:21:6:21 | IdentPat | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected index 2c33b82f1e72..2a1a163a5aad 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.expected @@ -1,5 +1,5 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | LitPat | -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | LitPat | -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | LitPat | -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | LitPat | -| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:7:19:7:19 | LitPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:6:15:6:17 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 1 | gen_tuple_struct_pat.rs:6:20:6:20 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 2 | gen_tuple_struct_pat.rs:6:23:6:23 | LiteralPat | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | 3 | gen_tuple_struct_pat.rs:6:26:6:26 | LiteralPat | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | 0 | gen_tuple_struct_pat.rs:7:19:7:19 | LiteralPat | diff --git a/rust/ql/test/extractor-tests/generated/Type/Type.expected b/rust/ql/test/extractor-tests/generated/Type/Type.expected new file mode 100644 index 000000000000..acdb6aab070a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Type/Type.expected @@ -0,0 +1,3 @@ +| file://:0:0:0:0 | Type | +| file://:0:0:0:0 | Type | +| file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected deleted file mode 100644 index af51fa0b6032..000000000000 --- a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected +++ /dev/null @@ -1,3 +0,0 @@ -| file://:0:0:0:0 | TypeRef | -| file://:0:0:0:0 | TypeRef | -| file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected deleted file mode 100644 index b332f6493404..000000000000 --- a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected +++ /dev/null @@ -1,3 +0,0 @@ -| gen_unary_op_expr.rs:5:13:5:15 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:5:14:5:15 | LiteralExpr | getOp: | - | -| gen_unary_op_expr.rs:6:13:6:17 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:6:14:6:17 | LiteralExpr | getOp: | ! | -| gen_unary_op_expr.rs:7:13:7:16 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:7:14:7:16 | PathExpr | getOp: | * | diff --git a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected b/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected deleted file mode 100644 index d24eafaad3c5..000000000000 --- a/rust/ql/test/extractor-tests/generated/WildPat/WildPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_wild_pat.rs:5:9:5:9 | WildPat | diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected new file mode 100644 index 000000000000..ceb155671b7f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected @@ -0,0 +1 @@ +| gen_wildcard_pat.rs:5:9:5:9 | WildcardPat | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected index 074c6fbff74c..5a038e499ef1 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected @@ -1 +1 @@ -| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | LiteralExpr | +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected index 87b88ef24196..cc9c7beb4284 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected @@ -1 +1 @@ -| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | LiteralExpr | +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | Literal | From 5c02fb4a2e6591d8df69c602d857ed81d1caef80 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 11:41:21 +0200 Subject: [PATCH 16/22] Fix CFG library --- .../internal/ControlFlowGraphImpl.qll | 4 +- .../library-tests/controlflow/Cfg.expected | 80 +++++++++---------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 1370362bf0f0..26c8a0bea53f 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -81,7 +81,7 @@ class CallExprTree extends StandardPostOrderTree instanceof CallExpr { override ControlFlowTree getChildNode(int i) { result = super.getArg(i) } } -class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryOpExpr { +class BinExprTree extends StandardPostOrderTree instanceof BinExpr { override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getLhs() or @@ -121,7 +121,7 @@ class LetExprTree extends StandardPostOrderTree instanceof LetExpr { override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getExpr() } } -class LiteralExprTree extends LeafTree instanceof LiteralExpr { } +class LiteralTree extends LeafTree instanceof Literal { } class PathExprTree extends LeafTree instanceof PathExpr { } diff --git a/rust/ql/test/library-tests/controlflow/Cfg.expected b/rust/ql/test/library-tests/controlflow/Cfg.expected index 57cbfe8c0011..138c5f29093f 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.expected +++ b/rust/ql/test/library-tests/controlflow/Cfg.expected @@ -5,15 +5,15 @@ nodes | test.rs:1:1:7:1 | main | semmle.order | 4 | | test.rs:1:18:7:1 | BlockExpr | semmle.order | 5 | | test.rs:2:5:6:5 | IfExpr | semmle.order | 6 | -| test.rs:2:8:2:12 | LiteralExpr | semmle.order | 7 | -| test.rs:2:8:2:21 | BinaryOpExpr | semmle.order | 8 | -| test.rs:2:17:2:21 | LiteralExpr | semmle.order | 9 | +| test.rs:2:8:2:12 | Literal | semmle.order | 7 | +| test.rs:2:8:2:21 | BinExpr | semmle.order | 8 | +| test.rs:2:17:2:21 | Literal | semmle.order | 9 | | test.rs:2:23:4:5 | BlockExpr | semmle.order | 10 | | test.rs:3:9:3:20 | CallExpr | semmle.order | 11 | -| test.rs:3:19:3:19 | LiteralExpr | semmle.order | 12 | +| test.rs:3:19:3:19 | Literal | semmle.order | 12 | | test.rs:4:12:6:5 | BlockExpr | semmle.order | 13 | | test.rs:5:9:5:20 | CallExpr | semmle.order | 14 | -| test.rs:5:19:5:19 | LiteralExpr | semmle.order | 15 | +| test.rs:5:19:5:19 | Literal | semmle.order | 15 | | test.rs:9:1:16:1 | decrement | semmle.order | 16 | | test.rs:9:1:16:1 | enter decrement | semmle.order | 17 | | test.rs:9:1:16:1 | exit decrement | semmle.order | 18 | @@ -21,17 +21,17 @@ nodes | test.rs:9:29:16:1 | BlockExpr | semmle.order | 20 | | test.rs:11:5:15:5 | IfExpr | semmle.order | 21 | | test.rs:11:8:11:8 | PathExpr | semmle.order | 22 | -| test.rs:11:8:11:13 | BinaryOpExpr | semmle.order | 23 | -| test.rs:11:13:11:13 | LiteralExpr | semmle.order | 24 | +| test.rs:11:8:11:13 | BinExpr | semmle.order | 23 | +| test.rs:11:13:11:13 | Literal | semmle.order | 24 | | test.rs:11:15:13:5 | BlockExpr | semmle.order | 25 | -| test.rs:12:9:12:9 | LiteralExpr | semmle.order | 26 | +| test.rs:12:9:12:9 | Literal | semmle.order | 26 | | test.rs:13:12:15:5 | BlockExpr | semmle.order | 27 | | test.rs:14:9:14:9 | PathExpr | semmle.order | 28 | -| test.rs:14:9:14:13 | BinaryOpExpr | semmle.order | 29 | -| test.rs:14:13:14:13 | LiteralExpr | semmle.order | 30 | +| test.rs:14:9:14:13 | BinExpr | semmle.order | 29 | +| test.rs:14:13:14:13 | Literal | semmle.order | 30 | edges -| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | LiteralExpr | semmle.label | | -| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | LiteralExpr | semmle.order | 1 | +| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | Literal | semmle.label | | +| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | Literal | semmle.order | 1 | | test.rs:1:1:7:1 | exit main (normal) | test.rs:1:1:7:1 | exit main | semmle.label | | | test.rs:1:1:7:1 | exit main (normal) | test.rs:1:1:7:1 | exit main | semmle.order | 1 | | test.rs:1:1:7:1 | main | test.rs:1:1:7:1 | exit main (normal) | semmle.label | | @@ -40,26 +40,26 @@ edges | test.rs:1:18:7:1 | BlockExpr | test.rs:1:1:7:1 | main | semmle.order | 1 | | test.rs:2:5:6:5 | IfExpr | test.rs:1:18:7:1 | BlockExpr | semmle.label | | | test.rs:2:5:6:5 | IfExpr | test.rs:1:18:7:1 | BlockExpr | semmle.order | 1 | -| test.rs:2:8:2:12 | LiteralExpr | test.rs:2:17:2:21 | LiteralExpr | semmle.label | | -| test.rs:2:8:2:12 | LiteralExpr | test.rs:2:17:2:21 | LiteralExpr | semmle.order | 1 | -| test.rs:2:8:2:21 | BinaryOpExpr | test.rs:3:19:3:19 | LiteralExpr | semmle.label | true | -| test.rs:2:8:2:21 | BinaryOpExpr | test.rs:3:19:3:19 | LiteralExpr | semmle.order | 1 | -| test.rs:2:8:2:21 | BinaryOpExpr | test.rs:5:19:5:19 | LiteralExpr | semmle.label | false | -| test.rs:2:8:2:21 | BinaryOpExpr | test.rs:5:19:5:19 | LiteralExpr | semmle.order | 2 | -| test.rs:2:17:2:21 | LiteralExpr | test.rs:2:8:2:21 | BinaryOpExpr | semmle.label | | -| test.rs:2:17:2:21 | LiteralExpr | test.rs:2:8:2:21 | BinaryOpExpr | semmle.order | 1 | +| test.rs:2:8:2:12 | Literal | test.rs:2:17:2:21 | Literal | semmle.label | | +| test.rs:2:8:2:12 | Literal | test.rs:2:17:2:21 | Literal | semmle.order | 1 | +| test.rs:2:8:2:21 | BinExpr | test.rs:3:19:3:19 | Literal | semmle.label | true | +| test.rs:2:8:2:21 | BinExpr | test.rs:3:19:3:19 | Literal | semmle.order | 1 | +| test.rs:2:8:2:21 | BinExpr | test.rs:5:19:5:19 | Literal | semmle.label | false | +| test.rs:2:8:2:21 | BinExpr | test.rs:5:19:5:19 | Literal | semmle.order | 2 | +| test.rs:2:17:2:21 | Literal | test.rs:2:8:2:21 | BinExpr | semmle.label | | +| test.rs:2:17:2:21 | Literal | test.rs:2:8:2:21 | BinExpr | semmle.order | 1 | | test.rs:2:23:4:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.label | | | test.rs:2:23:4:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.order | 1 | | test.rs:3:9:3:20 | CallExpr | test.rs:2:23:4:5 | BlockExpr | semmle.label | | | test.rs:3:9:3:20 | CallExpr | test.rs:2:23:4:5 | BlockExpr | semmle.order | 1 | -| test.rs:3:19:3:19 | LiteralExpr | test.rs:3:9:3:20 | CallExpr | semmle.label | | -| test.rs:3:19:3:19 | LiteralExpr | test.rs:3:9:3:20 | CallExpr | semmle.order | 1 | +| test.rs:3:19:3:19 | Literal | test.rs:3:9:3:20 | CallExpr | semmle.label | | +| test.rs:3:19:3:19 | Literal | test.rs:3:9:3:20 | CallExpr | semmle.order | 1 | | test.rs:4:12:6:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.label | | | test.rs:4:12:6:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.order | 1 | | test.rs:5:9:5:20 | CallExpr | test.rs:4:12:6:5 | BlockExpr | semmle.label | | | test.rs:5:9:5:20 | CallExpr | test.rs:4:12:6:5 | BlockExpr | semmle.order | 1 | -| test.rs:5:19:5:19 | LiteralExpr | test.rs:5:9:5:20 | CallExpr | semmle.label | | -| test.rs:5:19:5:19 | LiteralExpr | test.rs:5:9:5:20 | CallExpr | semmle.order | 1 | +| test.rs:5:19:5:19 | Literal | test.rs:5:9:5:20 | CallExpr | semmle.label | | +| test.rs:5:19:5:19 | Literal | test.rs:5:9:5:20 | CallExpr | semmle.order | 1 | | test.rs:9:1:16:1 | decrement | test.rs:9:1:16:1 | exit decrement (normal) | semmle.label | | | test.rs:9:1:16:1 | decrement | test.rs:9:1:16:1 | exit decrement (normal) | semmle.order | 1 | | test.rs:9:1:16:1 | enter decrement | test.rs:11:8:11:8 | PathExpr | semmle.label | | @@ -70,23 +70,23 @@ edges | test.rs:9:29:16:1 | BlockExpr | test.rs:9:1:16:1 | decrement | semmle.order | 1 | | test.rs:11:5:15:5 | IfExpr | test.rs:9:29:16:1 | BlockExpr | semmle.label | | | test.rs:11:5:15:5 | IfExpr | test.rs:9:29:16:1 | BlockExpr | semmle.order | 1 | -| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | LiteralExpr | semmle.label | | -| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | LiteralExpr | semmle.order | 1 | -| test.rs:11:8:11:13 | BinaryOpExpr | test.rs:12:9:12:9 | LiteralExpr | semmle.label | true | -| test.rs:11:8:11:13 | BinaryOpExpr | test.rs:12:9:12:9 | LiteralExpr | semmle.order | 1 | -| test.rs:11:8:11:13 | BinaryOpExpr | test.rs:14:9:14:9 | PathExpr | semmle.label | false | -| test.rs:11:8:11:13 | BinaryOpExpr | test.rs:14:9:14:9 | PathExpr | semmle.order | 2 | -| test.rs:11:13:11:13 | LiteralExpr | test.rs:11:8:11:13 | BinaryOpExpr | semmle.label | | -| test.rs:11:13:11:13 | LiteralExpr | test.rs:11:8:11:13 | BinaryOpExpr | semmle.order | 1 | +| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | Literal | semmle.label | | +| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | Literal | semmle.order | 1 | +| test.rs:11:8:11:13 | BinExpr | test.rs:12:9:12:9 | Literal | semmle.label | true | +| test.rs:11:8:11:13 | BinExpr | test.rs:12:9:12:9 | Literal | semmle.order | 1 | +| test.rs:11:8:11:13 | BinExpr | test.rs:14:9:14:9 | PathExpr | semmle.label | false | +| test.rs:11:8:11:13 | BinExpr | test.rs:14:9:14:9 | PathExpr | semmle.order | 2 | +| test.rs:11:13:11:13 | Literal | test.rs:11:8:11:13 | BinExpr | semmle.label | | +| test.rs:11:13:11:13 | Literal | test.rs:11:8:11:13 | BinExpr | semmle.order | 1 | | test.rs:11:15:13:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.label | | | test.rs:11:15:13:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.order | 1 | -| test.rs:12:9:12:9 | LiteralExpr | test.rs:11:15:13:5 | BlockExpr | semmle.label | | -| test.rs:12:9:12:9 | LiteralExpr | test.rs:11:15:13:5 | BlockExpr | semmle.order | 1 | +| test.rs:12:9:12:9 | Literal | test.rs:11:15:13:5 | BlockExpr | semmle.label | | +| test.rs:12:9:12:9 | Literal | test.rs:11:15:13:5 | BlockExpr | semmle.order | 1 | | test.rs:13:12:15:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.label | | | test.rs:13:12:15:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.order | 1 | -| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | LiteralExpr | semmle.label | | -| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | LiteralExpr | semmle.order | 1 | -| test.rs:14:9:14:13 | BinaryOpExpr | test.rs:13:12:15:5 | BlockExpr | semmle.label | | -| test.rs:14:9:14:13 | BinaryOpExpr | test.rs:13:12:15:5 | BlockExpr | semmle.order | 1 | -| test.rs:14:13:14:13 | LiteralExpr | test.rs:14:9:14:13 | BinaryOpExpr | semmle.label | | -| test.rs:14:13:14:13 | LiteralExpr | test.rs:14:9:14:13 | BinaryOpExpr | semmle.order | 1 | +| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | Literal | semmle.label | | +| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | Literal | semmle.order | 1 | +| test.rs:14:9:14:13 | BinExpr | test.rs:13:12:15:5 | BlockExpr | semmle.label | | +| test.rs:14:9:14:13 | BinExpr | test.rs:13:12:15:5 | BlockExpr | semmle.order | 1 | +| test.rs:14:13:14:13 | Literal | test.rs:14:9:14:13 | BinExpr | semmle.label | | +| test.rs:14:13:14:13 | Literal | test.rs:14:9:14:13 | BinExpr | semmle.order | 1 | From e68229892ebc6dde8d57ec9edeb8e7837af0badb Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 11:48:36 +0200 Subject: [PATCH 17/22] Add some more QL docs --- rust/ql/.generated.list | 14 +++++++------- rust/ql/lib/codeql/rust/elements/Declaration.qll | 3 +++ rust/ql/lib/codeql/rust/elements/Unimplemented.qll | 3 +++ .../rust/elements/UnimplementedDeclaration.qll | 3 +++ rust/ql/lib/codeql/rust/generated/Declaration.qll | 1 + rust/ql/lib/codeql/rust/generated/Raw.qll | 3 +++ .../ql/lib/codeql/rust/generated/Unimplemented.qll | 1 + .../rust/generated/UnimplementedDeclaration.qll | 1 + rust/schema.py | 9 +++++++++ 9 files changed, 31 insertions(+), 7 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 536570fa6be7..c181fcb29196 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -35,7 +35,7 @@ lib/codeql/rust/elements/DbFile.qll 056d363e1ba5ec08cacb2e90b8a7a3b47f52ded5dc22 lib/codeql/rust/elements/DbFileConstructor.qll ea93dc49b23b1c6d800ab9d0b9cacfa9dc661bfdb04b9e6efcad2bdb050fb0ab f7a891b1786604eee57a784733555b677e2580770d51d18073b59e7ca65df1d4 lib/codeql/rust/elements/DbLocation.qll 1f694594e8e4ab65a8781cd443ad4f864447ca88e2cb65504aee5a779393c84d 003ec72275406eb8f5ddd6ccc2b258fb7c906d4bb2c0ef1ba235f291624321ca lib/codeql/rust/elements/DbLocationConstructor.qll 8848abace985818a5d3a6eddfc4cb200795970146d282b037b4f22ae6230b894 44dba880e17bb1072fa12451ccaae4830fd04dcc61f7403d35510309fde6906e -lib/codeql/rust/elements/Declaration.qll d4ec5c83728f1837243caf2f27d06fd05ecdd2ca440112accff99bfd37b45e5f c1cd9b297be8b69207e75d24b29949b9f71c78406ee0ffd38d0b0810288d6140 +lib/codeql/rust/elements/Declaration.qll a902e494e43c13dafb0527a259c7244fca32cf38464d6892143d3a6856683df2 764d0db5928d4243f6c98bbc2cb9268dfad3f489a3e5382d533ddfee153b8685 lib/codeql/rust/elements/ElementListExpr.qll 64356a9bf66f0f316da659fe8046828445804dcf5ae6b19e52232aaea8744885 0822b1430e5c811e74e092cd19001dca783e8d26df140c5366cce61692eaeb2c lib/codeql/rust/elements/ElementListExprConstructor.qll 12b06597e0700cd0eac70e42cbdc1a2d410e0ffcd05c21a213812a488b5b236b 7adb2e442f1bc362c44824aaba0ab4a7fb4a4bc550a3c96f963dc03bed582d39 lib/codeql/rust/elements/Expr.qll e1932febe46ca4f1b2d0caa1f1e8b14e84904fc1b1b663a54511d8ab34d40a59 d820fbd85b938121f33da27827979dd6fd83a8331315581af5922ace13807a47 @@ -124,8 +124,8 @@ lib/codeql/rust/elements/Type.qll eac066a4d80006795d420d7000c69389eebe8fe8bfeaaa lib/codeql/rust/elements/TypeConstructor.qll 10d8f9157d864e1035a1773d8a8355e3b8671b1605377b7a8427ea8625fbba6c 02a2cd28ef2379de6fb70f5e68bbb5ceaf815defea15ed990cec46bb70efdadf lib/codeql/rust/elements/UnderscoreExpr.qll bf4c0bf76fa15b041f7ecbd492a499088bef2024b49dbdfa57232e84e72c3067 462380bac5f772c1986146d32b70deabc9f03581675f6e79f7b7f747acfb0bd5 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f -lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af0acb89883c5bc9b26d8d8d61718 9d869f83e73915bbeb5af27ea30b69f20c344cd7d7f253cb7dab74de20baa0a6 -lib/codeql/rust/elements/UnimplementedDeclaration.qll 4d55b4530ea3dfc38fb41dbfd3907db992ab893407b02a387719921d3ddc990e cb86a99f7a6b21a2b10f61f8c28b97ecf1b71269a3aee652396ea68cf6c806d3 +lib/codeql/rust/elements/Unimplemented.qll 8736c0b7ab0a5b558b47cffe579c0e56016de10017235502bbe18a6d81510a8e cdb6135c0065938892fb32020a7041eed103d97c3335cdc1bf837046f80bd8d3 +lib/codeql/rust/elements/UnimplementedDeclaration.qll ec261842f0257b4f512a92911408110e9e48f975a2bf0a56524a57a5c8e694b8 6682484339cb3b9b08f15949b37ee380ab6a15e96517be21cface664a9c1d9d5 lib/codeql/rust/elements/UnimplementedDeclarationConstructor.qll 44f4590db81e7504de0ede43eb2a33a54baa0738732e03a90721187a1cd303f3 11f27d8a9836b78d9ffac79efa3441fbfcb1dfdc1eb028d2016a1769b8a82ad5 lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 @@ -156,7 +156,7 @@ lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09 lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f lib/codeql/rust/generated/DbFile.qll 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a lib/codeql/rust/generated/DbLocation.qll 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 -lib/codeql/rust/generated/Declaration.qll bbf5ba3792797a829b0032c41fa99d22c26e4277d655099912cdbafb80f0c8cd c4666a71099b21ad5cd83ef6f991ba18f9bef03b3ffbcedfa10aec081d6501d5 +lib/codeql/rust/generated/Declaration.qll fd2401b9683a587cf1361039468c9e74666dce6c98443da63b1defea8e4e14de f1e72b51d4a411c5a74e0a78a34727dff8d20035e7d87bb1ef8657a18c9b262f lib/codeql/rust/generated/Element.qll 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7bb419a1abd787f7dc851a1 lib/codeql/rust/generated/ElementListExpr.qll fd3a6fb638a38382a356b807acbbcb0bffb70fe75b827e7b46195b060a4b53d0 24da1239e70a7d95531784260af6867c62dca271246ae2c740d03231c329371d lib/codeql/rust/generated/Expr.qll 91b1744d6b07e8549b94d19832dac9e18b70f54990b328b1872b8c73be202417 ed71e6d24ab3f0dc687bfb8a665552c05f848ce52d8e338899c1cb48783a778a @@ -194,7 +194,7 @@ lib/codeql/rust/generated/PrefixExpr.qll a3f6cc62e5a12acd253ea59cb6957fb7157aa70 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll c2926037fbd92b2ca637f71b91f05c48414a0e23822b324d33b74872eb28f9d1 94f35bd2248809cb3489aa7950a3e6bf5f0a0f26f4d91aa623b0589c67c9a2f8 +lib/codeql/rust/generated/Raw.qll 47db9ce20eece07992d6ffb61c38b1d57eca72c0e88b6d69f38a79d60aeb1787 ab32e25162b7338246b920c50318e961ba62bdb71b9680ecd6f6eaa21e460205 lib/codeql/rust/generated/RecordExpr.qll bdafc10cde139617b67cb46bb205f99bc3fc0b9fd8634d304b81b524b9592aa8 2826c453c72416237467b08cf9ad9421b03203a8593420146dad8e1e71711b8a lib/codeql/rust/generated/RecordExprField.qll eb06236fbdb856169dfe50ae1ebf59384222de6670ca91c34eed647823dda4ce 750bc7ab1e156db3927d6dd206e9d2c9388519425c0e8665afd322a6594aa5e2 lib/codeql/rust/generated/RecordPat.qll 20b62cfd4ee4e911ad4a2b8e5762da2abb7ff0c1d7f21cc6f72b1ebcbebbcd42 c0502e6bfc637058524cf7369c63396ca5440c58e5e91600fecd35ca5299d86c @@ -212,8 +212,8 @@ lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d lib/codeql/rust/generated/TupleStructPat.qll 089563349c9866f5703e9d306ba2a475d7d4002e7236dbbf2feeb89290b4d24c a77842d7262a7d19b175f239d1ee6550b3b66a4efe903c5112bb82c0abd7b05d lib/codeql/rust/generated/Type.qll abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f -lib/codeql/rust/generated/Unimplemented.qll 0bebbf22b5a6484077ceacdd4d11a14665b95cc9e68b859f2d8218290842d1ad addecc8027e14ebbcb2eff4d038c16aa1f33f100e17ffaecd5de36b9a4c719a8 -lib/codeql/rust/generated/UnimplementedDeclaration.qll ab05ff0a0fde6535e89ccb9cf197d97d722773f08bee5c0c742abeda956829d7 067be19ce1a963e59635e08f9eb7a3a7284874f45c651bdb1fe36509b5567912 +lib/codeql/rust/generated/Unimplemented.qll bcf63c2be3e0f7b88704a76ed182616101cd4b317f539ef5a65e5a4b87fb6b39 0e3e0ba85e03f327334b752c1dd1aa82b71bf1601725fcc071d93a29e40e1188 +lib/codeql/rust/generated/UnimplementedDeclaration.qll a6eb4e61be018288304be010e063b68039a97f2cfe19e7049d3d54c65c88e9ab 662da5c38f5907d1f0f9990caca2114bf5e3b179591104dde777ae67262815df lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 diff --git a/rust/ql/lib/codeql/rust/elements/Declaration.qll b/rust/ql/lib/codeql/rust/elements/Declaration.qll index b4e0971d591e..c6a4ecb8e8b3 100644 --- a/rust/ql/lib/codeql/rust/elements/Declaration.qll +++ b/rust/ql/lib/codeql/rust/elements/Declaration.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.Declaration +/** + * The base class for declarations. + */ class Declaration extends Generated::Declaration { } diff --git a/rust/ql/lib/codeql/rust/elements/Unimplemented.qll b/rust/ql/lib/codeql/rust/elements/Unimplemented.qll index 272d9538a9c5..7bd4fed7e27a 100644 --- a/rust/ql/lib/codeql/rust/elements/Unimplemented.qll +++ b/rust/ql/lib/codeql/rust/elements/Unimplemented.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.Unimplemented +/** + * The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. + */ class Unimplemented extends Generated::Unimplemented { } diff --git a/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll index 5d998f6a3ebf..4f4d309bbd5f 100644 --- a/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll +++ b/rust/ql/lib/codeql/rust/elements/UnimplementedDeclaration.qll @@ -5,4 +5,7 @@ private import codeql.rust.generated.UnimplementedDeclaration +/** + * A declaration that is not yet extracted. + */ class UnimplementedDeclaration extends Generated::UnimplementedDeclaration { } diff --git a/rust/ql/lib/codeql/rust/generated/Declaration.qll b/rust/ql/lib/codeql/rust/generated/Declaration.qll index 0cc2a30f178b..1b6a78cf8c04 100644 --- a/rust/ql/lib/codeql/rust/generated/Declaration.qll +++ b/rust/ql/lib/codeql/rust/generated/Declaration.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.AstNode */ module Generated { /** + * The base class for declarations. * INTERNAL: Do not reference the `Generated::Declaration` class directly. * Use the subclass `Declaration`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index d29c56e26ec8..c6a232c24480 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -62,6 +62,7 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. */ class Unimplemented extends @unimplemented, Element { } @@ -86,6 +87,7 @@ module Raw { /** * INTERNAL: Do not use. + * The base class for declarations. */ class Declaration extends @declaration, AstNode { } @@ -1415,6 +1417,7 @@ module Raw { /** * INTERNAL: Do not use. + * A declaration that is not yet extracted. */ class UnimplementedDeclaration extends @unimplemented_declaration, Declaration, Unimplemented { override string toString() { result = "UnimplementedDeclaration" } diff --git a/rust/ql/lib/codeql/rust/generated/Unimplemented.qll b/rust/ql/lib/codeql/rust/generated/Unimplemented.qll index 4c5d75c58bab..03c367cbcd5b 100644 --- a/rust/ql/lib/codeql/rust/generated/Unimplemented.qll +++ b/rust/ql/lib/codeql/rust/generated/Unimplemented.qll @@ -14,6 +14,7 @@ import codeql.rust.elements.Element */ module Generated { /** + * The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. * INTERNAL: Do not reference the `Generated::Unimplemented` class directly. * Use the subclass `Unimplemented`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll b/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll index 5af969e12a80..31b2301830d7 100644 --- a/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll +++ b/rust/ql/lib/codeql/rust/generated/UnimplementedDeclaration.qll @@ -15,6 +15,7 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A declaration that is not yet extracted. * INTERNAL: Do not reference the `Generated::UnimplementedDeclaration` class directly. * Use the subclass `UnimplementedDeclaration`, where the following predicates are available. */ diff --git a/rust/schema.py b/rust/schema.py index 53fa088b0db1..598786d10e9c 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -64,15 +64,24 @@ class AstNode(Locatable): @qltest.skip class Unimplemented(Element): + """ + The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. + """ pass class Declaration(AstNode): + """ + The base class for declarations. + """ pass @qltest.skip class UnimplementedDeclaration(Declaration, Unimplemented): + """ + A declaration that is not yet extracted. + """ pass From d73d90dba24b048358d21191be38e104777736a6 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 12:48:53 +0200 Subject: [PATCH 18/22] Avoid use of plain 'None' in tests For some reason the parser resolves the ambiguity between None as a PathPat or IdentPat differently on the Action runners vs local machine. --- rust/ql/.generated.list | 30 +++++++++---------- rust/ql/lib/codeql/rust/elements/BoxPat.qll | 4 +-- rust/ql/lib/codeql/rust/elements/IdentPat.qll | 8 ++--- rust/ql/lib/codeql/rust/elements/MatchArm.qll | 4 +-- .../ql/lib/codeql/rust/elements/MatchExpr.qll | 4 +-- .../lib/codeql/rust/elements/MissingPat.qll | 3 +- rust/ql/lib/codeql/rust/elements/OrPat.qll | 2 +- rust/ql/lib/codeql/rust/elements/RefPat.qll | 4 +-- rust/ql/lib/codeql/rust/generated/BoxPat.qll | 4 +-- .../ql/lib/codeql/rust/generated/IdentPat.qll | 8 ++--- .../ql/lib/codeql/rust/generated/MatchArm.qll | 4 +-- .../lib/codeql/rust/generated/MatchExpr.qll | 4 +-- .../lib/codeql/rust/generated/MissingPat.qll | 3 +- rust/ql/lib/codeql/rust/generated/OrPat.qll | 2 +- rust/ql/lib/codeql/rust/generated/Raw.qll | 29 +++++++++--------- rust/ql/lib/codeql/rust/generated/RefPat.qll | 4 +-- .../generated/.generated_tests.list | 14 ++++----- .../generated/BoxPat/BoxPat.expected | 4 +-- .../generated/BoxPat/gen_box_pat.rs | 4 +-- .../generated/IdentPat/IdentPat.expected | 4 +-- .../IdentPat/IdentPat_getSubpat.expected | 2 +- .../generated/IdentPat/gen_ident_pat.rs | 8 ++--- .../generated/MatchArm/MatchArm.expected | 4 +-- .../generated/MatchArm/gen_match_arm.rs | 4 +-- .../MatchExpr/MatchExpr_getBranch.expected | 4 +-- .../generated/MatchExpr/gen_match_expr.rs | 4 +-- .../generated/MissingPat/gen_missing_pat.rs | 3 +- .../generated/OrPat/OrPat.expected | 2 +- .../generated/OrPat/OrPat_getArg.expected | 4 +-- .../generated/OrPat/gen_or_pat.rs | 2 +- .../generated/RefPat/RefPat.expected | 4 +-- .../generated/RefPat/gen_ref_pat.rs | 4 +-- rust/schema.py | 29 +++++++++--------- 33 files changed, 106 insertions(+), 111 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index c181fcb29196..d9ccb60163ec 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -15,7 +15,7 @@ lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 lib/codeql/rust/elements/BoxExpr.qll f4727005f1b07d0d2f2230379778929351ad9fda986754b48980e8b166cd68a9 adae835238f824a48ad700310c3fce70bc9a890538cf361b4ed5b3d213fcc67a lib/codeql/rust/elements/BoxExprConstructor.qll e30e71b88978b5d0f156152acaf7eaebe26232b7a5a562cf22f1bb9659ae5deb 3ca41494c5101ef73877737420fbc468483ac7ef215d11b431dac2dd6a08ecc5 -lib/codeql/rust/elements/BoxPat.qll 37dd3362eee8ff330de6c5b27364878031500ec75150746b1e88fa16f76b44f6 a58fcecf1772f918ade434dd58ced3b68a16ee144fb0da2d4a41010cbf976dfb +lib/codeql/rust/elements/BoxPat.qll 15d63d499678417c6dd5118944fae3abc416f550acd18810651b85999bdc0d55 5360a2bef9e42e7274bfa68349a3b19020e000919358865c272338721956e384 lib/codeql/rust/elements/BoxPatConstructor.qll 20f79f18beb8b7eeec63b1e30302d9f2e514354a7b1ae077f240db3cda4ecc4c f41ca3fdafc70c6b972598a3af3434bf60687bc2f0252dd11ddd09ec874fe63c lib/codeql/rust/elements/BreakExpr.qll 526da383194cfc0600ba623182ef8e984b44da76609d335b209067b9381e2e18 6d7b6e970b69f093be5015e847512830937e79a2460a6c49d286cd5c8ebd350d lib/codeql/rust/elements/BreakExprConstructor.qll 48b71a034b7b6b0ecda47c72379696c6d4ebb9eadcd6403f9c001945855c5365 fbbccb6d1718393ad6ff3a2bd473dd51691c871db9181cb1e041b318f91d27a7 @@ -46,7 +46,7 @@ lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c lib/codeql/rust/elements/GenericArgList.qll 3db540d2cc2ee748aae2d4ed7917644e78e0016649e8a8e0d96aab78f2893564 b6b826e9a5ab14448e1ae35d5a22029050c08a18f9ef68d4731c6641c7e0f6cb lib/codeql/rust/elements/GenericArgListConstructor.qll 68e8739557bb470c04ae12f6b39d34c6fa4966bfdad1768b9e4f1a596447cd72 e0fc7e51fea925b7f21e771eca7e1bb2d506d6992c80ecd7902c9656610e545c -lib/codeql/rust/elements/IdentPat.qll a38187662d8e7db4a448f10aede36a3bfbebae3ff352758e28c951245f1c656f 3f8c5ffb92d5c2e79c98a6b19084d78215156c5fb3d86ccfccc8c5fdf3a5fffe +lib/codeql/rust/elements/IdentPat.qll 239fde12e3dcc46ca94be91c039f26e0a74b5c2e550118a03d451b30a0bfc03f 926ba7ef1dbfa8423a85771872131b1d2e7a55730e281ddb2b360cbac9781e59 lib/codeql/rust/elements/IdentPatConstructor.qll 3144353f70712a224b5e7af6c5a2cd3452d4c2e164c38092ecb5f6c668401a92 26732573959eec1690afbc1d99ddc76d1fe4936244e0108e7d7c84f69136539f lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f @@ -66,21 +66,21 @@ lib/codeql/rust/elements/LiteralPat.qll 1971f70ba0b872de28e1a168ac63d35afc123c5a lib/codeql/rust/elements/LiteralPatConstructor.qll abe137b2b8ec9dd9450fc77d2d826fe891bbb0af23b0c26ff5e2d1751988f747 e1642805588737ed98eebec1d16cb0fb9fd081db203ec725db85b02c4837bdcb lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 lib/codeql/rust/elements/LoopExprConstructor.qll 635348fe22fb47c7e59bed02a8ed6420be5a9ce92a7d9bf4475465ee170c917b 2bcfe70247c55659b3a3e09562da52fc645cc3166748f268c5a38b35fca24233 -lib/codeql/rust/elements/MatchArm.qll 2508d03a0a8f8e29483855affd08eca118ed756a18a60fc7ae6a9e5d63fae2d7 b88a33eaefe08131f7c8e80ca056c237aad9ef7c21deb2bf35a2f5ecfd320f55 +lib/codeql/rust/elements/MatchArm.qll cde6e94b3e65fe0fe35c2e5e801d9a8297a6770d4e7a26f75f433321a6e2c781 c17031a4570f712a092d629f5c347e4b9e246145e2fcc09e56baf041158aad62 lib/codeql/rust/elements/MatchArmConstructor.qll 49d134823a445a1ee995ebf5637fd0d736b9ab7f2b141026712f231ec4ed3389 f16e8adc8375e6a7334589d5732dcbe10f5ada9de7a12c549c55be3f028ec628 -lib/codeql/rust/elements/MatchExpr.qll cb38dfcdf896e8f5c429d13493f423d926c39ca928a5a8ef890e258b6ce7a048 5dc5f9e07d1021ac39f29ce6695ceab3d7bc751f33ea8b4ab463df50d3fd24e6 +lib/codeql/rust/elements/MatchExpr.qll 6938b5b9aca51f15cc0c0c6374a5845c9c298cb49d17c8111abb03001fdf5508 1e43ba73fae5fbe01645cbc762ab229f2148a53da3de1c8d083c1292d9019fff lib/codeql/rust/elements/MatchExprConstructor.qll 74df937d7d8bfbfb02bdbf095595eb3f2129ed4c0854bae6d73b5b38d4fc902d 5c388c02f02462d843945111b72de12bce33c7c332d55993d903aeb250213407 lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a629230991513326585c99dab7be1f3 ed05c7f40fb6d1c97fa0a3a631db1913b8e6abb5c2b3513d0e81a82a2e5f7f95 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e lib/codeql/rust/elements/MissingExpr.qll 618f80b813afda19783c689c67c79b2106483b559f49dc21ed713281d6b1ac87 9de89e36754a98b8caf9010690ceb8a9d32999d192e325a1a24892311f874268 lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 -lib/codeql/rust/elements/MissingPat.qll 74a84a04d0aaabb3353419bba2225e6ca3f02ada55e00d28e6cceb37cefce43a c8ee5e6c411e0955ca0a775c8b09b894e2914fe24f9d16df1f0e6d186d15ebd2 +lib/codeql/rust/elements/MissingPat.qll a2d6ee4f7bbb69b9c05026b71c0283a6b229a7eaf492894296294fbe533e40d9 c9823a3a06ff2ff25ad3f7ca573f122637571f7d351bfd1f7f339c7629404852 lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 lib/codeql/rust/elements/Module.qll a104ed007091e5361db9e6be640fba6a22b02913c16fe50cb5d348399504f7b0 7633ef24e7c9e1daca9a82d89870462482536cded234e0e1bb7da9eabc43c00d lib/codeql/rust/elements/ModuleConstructor.qll 109ed8c1b5c61cc1d3e8613aa8bb8c168dc1943c93b5b622fa79665751b78318 601526c7f56578883d261d14653fdad08329f80fea71de14a5ac5ce671a8d436 lib/codeql/rust/elements/OffsetOfExpr.qll e7490d4db7cb4dd1c711ce57934970da8c9cc61af913a62b6963667313dcb0c5 c9043c5e68483b3d4da03ab191dc56e0150ff23af361a227fe91062e10ad66b2 lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57a0235ee01bb50e1fbaa6e5601e0e232c1977d 6e3b7c20a17fe4c45d503ba32264aea8f6dfdc69ccd95905a5bfb1e8b0cc91d0 -lib/codeql/rust/elements/OrPat.qll 448ebaddc1b42fbb90e3240d990cb841d4775d9129350e8f5195904798efb27c ffb6121a0b4f0e661e1653c396d565053b9f89eb358bbaa1c218c31eac3b8221 +lib/codeql/rust/elements/OrPat.qll d5fab9f9d837d0d330ccf447cca4b079a6f48bf6b4886f0e68937444152bec97 ba6a9ddec6c49a4941e30b0a1bf68873aaf5a726368cc3ace9e7c2812b3ead48 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 lib/codeql/rust/elements/Pat.qll 79ac8430cc9047cf89fcf80cdb527166bd72e979d03e051fa2d60fa2f64f2294 914362a06ad0cac1e1777874bf4425fcc805021197f635ddd87b96d9e5c221d9 lib/codeql/rust/elements/Path.qll 3863a424a10b840f05584e17cb642859b18093b205eb9125f9aa0a0c2de6bab3 0db28b1b40218961ff8db478842b54ed7eee7660229113aca93c180aa45bb243 @@ -105,7 +105,7 @@ lib/codeql/rust/elements/RecordPatField.qll 0ef9ff7a71d938a39d2cc220ba395426198c lib/codeql/rust/elements/RecordPatFieldConstructor.qll c105362a0d1acdd69bbb3b0c1f0ae2e20f677020d15d02aa9e7416803ddb3a21 5cdd18cb9c26197eca67e162ac080b7f17dbb46061419bad07c6f6d12508f642 lib/codeql/rust/elements/RefExpr.qll 4c3176d24c52d61dc220d0ebf0c277126975a7e4189094c5f36e0d386bbd95e3 dd143ae809b9c3cd1ca20e8ccf2ed2fa79f0b75d3ce3d92de5e88dad68bf7fed lib/codeql/rust/elements/RefExprConstructor.qll 4a2b9dd4ec2638a5ccfca268ba377980aab3179b27177e34e44e0e9dc6653b36 752f6f298369b8c0f59d49ca9e729c20aceb3559df68be416c7bbf65f578489d -lib/codeql/rust/elements/RefPat.qll a273a13acefaaf366a6c9092f5a60e37bf8467e6d245384fad97a79f682cca9a 19199e218fb18920c5338e748106c53d13dd72b6b49681768b3781c93e277b46 +lib/codeql/rust/elements/RefPat.qll 44db6d9cb0b4c796027116f00f43bb3a542df2535622a7ae884c0529044d2996 1778f2bb7f6df9b99ea5f3a20633b75738fa4034afaf12d39f33b85ecfb79ab6 lib/codeql/rust/elements/RefPatConstructor.qll 98497e0ef76bec0390a23aede2fc6f80050ad2d00bb60f1d473362111a53d4dd e4fde4e3e88c33daee90ab6d90ef2e38b36faedcfe1b6d6304f4eed92980b5b1 lib/codeql/rust/elements/RepeatExpr.qll 376199e9efc3b20efd8c26a020c5e7b7f19bf9490ab9698673ae842cb4ff6721 7dcbfbf8029811657e07850a1fadfe70025881e70f474fc49378b215e65d6d43 lib/codeql/rust/elements/RepeatExprConstructor.qll 7e141ed538f1dd5debd83de045eadc74ef032acc8a64ee2e8ac760da60ede525 d20206b72b14d03f8a41571948210619ad7d7dc438ba04ae45d929776a11915d @@ -146,7 +146,7 @@ lib/codeql/rust/generated/BinExpr.qll 1e50692aa42f5b57b4644a368941b29f5941c7cd75 lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 -lib/codeql/rust/generated/BoxPat.qll 8a856d3bc45313bb67b3411fe500c4fa508f7d80abcacb8bbe0a497624282b0a 2e0c7e16f437792c3de5d66dee5562dd7955a22a3e835d723915cc296d3264ea +lib/codeql/rust/generated/BoxPat.qll 8d9fc5a784473c7bd8c76c5f4a3a5eb6912bfe8691205f311cd1008b27ff5b74 e06a16614897df217948840e084474499b05edc6249ba0115d7cde516f98e165 lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 lib/codeql/rust/generated/CastExpr.qll bda5ec9c2639325ac6ffc65ef44bad0ce7769a0618925d93e59101c3a7b6b804 a40eba5690369b55f373e2c2d724e19791f7721c50365fa6ce1ac93b387a1ea1 @@ -165,7 +165,7 @@ lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 lib/codeql/rust/generated/Function.qll 133693679cd69f0c011d6aa779b067924e8d58ea15bc3f6b749cc3aa5d5e962d 5a18e3be5c7c681cebec762b2c2d3b1cb08c5fcc11ef422bf65c9b15fc82c893 lib/codeql/rust/generated/GenericArgList.qll abc549b0a763d2f5a162794676ab8f9a2fef8a02c77dbd14467dbafccf261c29 abc549b0a763d2f5a162794676ab8f9a2fef8a02c77dbd14467dbafccf261c29 -lib/codeql/rust/generated/IdentPat.qll 981fac200aecc4fc956c7fbd68f2516b5bd66be241ddefce21863ecf582bb283 8f371c7e08013fdd641d090c4a07b51b28e64cfe7114ab910ba4e151e5894e7b +lib/codeql/rust/generated/IdentPat.qll 1acf5c9a4f20930f33339904be534c3b64dc16b06ad6c6189c3561f3f0acd244 c5f03e20dd26a21a492766dbeda8896ceb00369cff91df566b99238c3d627a26 lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 lib/codeql/rust/generated/ItemStmt.qll 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 @@ -177,14 +177,14 @@ lib/codeql/rust/generated/LiteralPat.qll 6cb250e374f6c3d2c86aaea6ad7baeaa40ee438 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c -lib/codeql/rust/generated/MatchArm.qll c82a871b33633dc5908d6abc665048b0bc3d761f134b8ceca51338c4a84a55c3 90faaed01f5e7c3ff6b9114b275c80418737c48b64082763e83cb63499fefa6a -lib/codeql/rust/generated/MatchExpr.qll cf48ca2000a1cf2b2fa05b42403bba9be94aac23a88bc88e1b97e86982ff4fe9 244960785828aa62c4c3d17251ef5a3b7dd3ce3e10fd99a364f98f760ca84e77 +lib/codeql/rust/generated/MatchArm.qll e4e129ac42537138a3f5d288113ee805b49a5c914cf44564e59be389e07d6eda 5e5ae462925501265237f06a68549d5a26e01864386d16d0e28a12305127cb71 +lib/codeql/rust/generated/MatchExpr.qll 74966bd8286aa8cd4238c5f6964b5668d3f95fd47a56fcece47fbd0abe3a8376 9afcc11f0af8e5daee2746226b2c39bec0f9cbc74d0cb1bf567a8ea122409331 lib/codeql/rust/generated/MethodCallExpr.qll 187d28d3869f5b44cca8420948266e8370ca1e3e389dc3317dc24364c8d53088 7a4744cce29b53ca04b6b2eaf4fd146b9a64e3f53151e5c6cd1085fc35d50823 lib/codeql/rust/generated/MissingExpr.qll 34cb27c927a62cc06b0fe26a085e2658abd5019e549c3e01b8273d99e9a9616f 34bf4cfbf3659b600b4aac121f7c2d6da0b00b61c3002f8fb1d554c11968c748 -lib/codeql/rust/generated/MissingPat.qll 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 9fa2685c9f8b285c6b2f470a2c482b3bd1f071707192bc963937cbb1092d6a18 +lib/codeql/rust/generated/MissingPat.qll 40fa87d446056c7263ef5843fb13fe60b644e169a65697be4ca0b5361a8267ee 40fa87d446056c7263ef5843fb13fe60b644e169a65697be4ca0b5361a8267ee lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 lib/codeql/rust/generated/OffsetOfExpr.qll 5f2c1d2b5d63d2a86c02c8a20fede528403f8dd267f3026ddc420e128f53c73c d4a7eb9e533a943913aa3bdc6f57d89023a0a2075681b6aaa53d5c4dd7ad764b -lib/codeql/rust/generated/OrPat.qll a9a606b001c9b3c6f5cb3d65a593cce043f49b1e8a237310c058f5293eec46a8 4b6ab0d2192c93c64a5f98b6083e91ac03fd040bead24831a1a88d274847c79d +lib/codeql/rust/generated/OrPat.qll 52e637c652f8caf64d2388a1829159d187d3799384cc3318e07785f518ff0c4b 598a11d067519bb7bb279d8f8a3ea85a48ae99c2974182636c157ba111b9605e lib/codeql/rust/generated/ParentChild.qll 1988b870c14148c2b23136dd00456d898a73d52a8cfb10039a0db414f5c01dbd bda2c0e7a5333206a6f7ab3a2c438be376c8b75f4d5810d91439cd10b88214a2 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f lib/codeql/rust/generated/Path.qll ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff @@ -194,13 +194,13 @@ lib/codeql/rust/generated/PrefixExpr.qll a3f6cc62e5a12acd253ea59cb6957fb7157aa70 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll 47db9ce20eece07992d6ffb61c38b1d57eca72c0e88b6d69f38a79d60aeb1787 ab32e25162b7338246b920c50318e961ba62bdb71b9680ecd6f6eaa21e460205 +lib/codeql/rust/generated/Raw.qll 965c8d9172ca1e887e7ab7e9c0177919febc40312e6a2ef720fddb054356a96c ee71ddc24f2694502d9d7649441fd5b605ca8d7360bd688da7f499994a154670 lib/codeql/rust/generated/RecordExpr.qll bdafc10cde139617b67cb46bb205f99bc3fc0b9fd8634d304b81b524b9592aa8 2826c453c72416237467b08cf9ad9421b03203a8593420146dad8e1e71711b8a lib/codeql/rust/generated/RecordExprField.qll eb06236fbdb856169dfe50ae1ebf59384222de6670ca91c34eed647823dda4ce 750bc7ab1e156db3927d6dd206e9d2c9388519425c0e8665afd322a6594aa5e2 lib/codeql/rust/generated/RecordPat.qll 20b62cfd4ee4e911ad4a2b8e5762da2abb7ff0c1d7f21cc6f72b1ebcbebbcd42 c0502e6bfc637058524cf7369c63396ca5440c58e5e91600fecd35ca5299d86c lib/codeql/rust/generated/RecordPatField.qll d862245163667ede676e407f109ad44e4ce732de59ea9025b696dd8b9803fbef 60166a21d7deee112325bc301b5893cf3072c4d8d095dbf9080cb00269b71d40 lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 -lib/codeql/rust/generated/RefPat.qll 2a451553084306acc625f0433dc02546d07a1b6174a7d614379c9e8e28550118 40b845320c68283d0f6e47f17f4d4d893ef613f41422d35663582cfa3b5e7d75 +lib/codeql/rust/generated/RefPat.qll 1a0322f152758edb6650c530073cc6aead3d81ee51310e2d99936e10b56dac6d 5201f6455665c655daf6b9f686c66e14f9994b4d83624f0a478837a9a420cb0f lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb6f88638826dc37a712c05afaa c2cea180b7c068a3483cbda73168effe762ab2aa56bb8c590c8a15b6e54961ce lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll 73dce5e310068357eb41e8c51923ff5c4054548db27987cde85735ddf071fc44 67fa0c285c110f18446689d1eaad9e82896df79d62999ad3f788fc295fa1d2c3 diff --git a/rust/ql/lib/codeql/rust/elements/BoxPat.qll b/rust/ql/lib/codeql/rust/elements/BoxPat.qll index b0f977aa4520..ba0d1d732ffc 100644 --- a/rust/ql/lib/codeql/rust/elements/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/elements/BoxPat.qll @@ -9,8 +9,8 @@ private import codeql.rust.generated.BoxPat * A box pattern. For example: * ``` * match x { - * box Some(y) => y, - * box None => 0, + * box Option::Some(y) => y, + * box Option::None => 0, * }; * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/IdentPat.qll b/rust/ql/lib/codeql/rust/elements/IdentPat.qll index 7c38db53b8be..4668ecdb853f 100644 --- a/rust/ql/lib/codeql/rust/elements/IdentPat.qll +++ b/rust/ql/lib/codeql/rust/elements/IdentPat.qll @@ -9,14 +9,14 @@ private import codeql.rust.generated.IdentPat * A binding pattern. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` * match x { - * y@Some(_) => y, - * None => 0, + * y@Option::Some(_) => y, + * Option::None => 0, * }; * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/MatchArm.qll index a1c38456276e..9a83487cd225 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArm.qll @@ -9,8 +9,8 @@ private import codeql.rust.generated.MatchArm * A match arm. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` diff --git a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll index 1b5f7b51e968..752b795e5e0b 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll @@ -9,8 +9,8 @@ private import codeql.rust.generated.MatchExpr * A match expression. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * } * ``` * ``` diff --git a/rust/ql/lib/codeql/rust/elements/MissingPat.qll b/rust/ql/lib/codeql/rust/elements/MissingPat.qll index ce6ad1c144c6..c1d875555e3a 100644 --- a/rust/ql/lib/codeql/rust/elements/MissingPat.qll +++ b/rust/ql/lib/codeql/rust/elements/MissingPat.qll @@ -9,8 +9,7 @@ private import codeql.rust.generated.MissingPat * A missing pattern, used as a place holder for incomplete syntax. * ``` * match Some(42) { - * .. => "ok", - * _ => "fail", + * .. => "bad use of .. syntax", * }; * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/OrPat.qll b/rust/ql/lib/codeql/rust/elements/OrPat.qll index 5dd45a01cc48..d07bfe004769 100644 --- a/rust/ql/lib/codeql/rust/elements/OrPat.qll +++ b/rust/ql/lib/codeql/rust/elements/OrPat.qll @@ -9,7 +9,7 @@ private import codeql.rust.generated.OrPat * An or pattern. For example: * ``` * match x { - * Some(y) | None => 0, + * Option::Some(y) | Option::None => 0, * } * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/RefPat.qll b/rust/ql/lib/codeql/rust/elements/RefPat.qll index a34c7a4d7213..91aa06c50145 100644 --- a/rust/ql/lib/codeql/rust/elements/RefPat.qll +++ b/rust/ql/lib/codeql/rust/elements/RefPat.qll @@ -9,8 +9,8 @@ private import codeql.rust.generated.RefPat * A reference pattern. For example: * ``` * match x { - * &mut Some(y) => y, - * &None => 0, + * &mut Option::Some(y) => y, + * &Option::None => 0, * }; * ``` */ diff --git a/rust/ql/lib/codeql/rust/generated/BoxPat.qll b/rust/ql/lib/codeql/rust/generated/BoxPat.qll index bf9f175d95c6..c6b7e4c22bff 100644 --- a/rust/ql/lib/codeql/rust/generated/BoxPat.qll +++ b/rust/ql/lib/codeql/rust/generated/BoxPat.qll @@ -17,8 +17,8 @@ module Generated { * A box pattern. For example: * ``` * match x { - * box Some(y) => y, - * box None => 0, + * box Option::Some(y) => y, + * box Option::None => 0, * }; * ``` * INTERNAL: Do not reference the `Generated::BoxPat` class directly. diff --git a/rust/ql/lib/codeql/rust/generated/IdentPat.qll b/rust/ql/lib/codeql/rust/generated/IdentPat.qll index 857795ce3156..9ebabc254ad9 100644 --- a/rust/ql/lib/codeql/rust/generated/IdentPat.qll +++ b/rust/ql/lib/codeql/rust/generated/IdentPat.qll @@ -17,14 +17,14 @@ module Generated { * A binding pattern. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` * match x { - * y@Some(_) => y, - * None => 0, + * y@Option::Some(_) => y, + * Option::None => 0, * }; * ``` * INTERNAL: Do not reference the `Generated::IdentPat` class directly. diff --git a/rust/ql/lib/codeql/rust/generated/MatchArm.qll b/rust/ql/lib/codeql/rust/generated/MatchArm.qll index f21c9b3550c4..5198bf908a9e 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchArm.qll @@ -19,8 +19,8 @@ module Generated { * A match arm. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` diff --git a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll index 7a7368027fae..bf2eb004981e 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll @@ -18,8 +18,8 @@ module Generated { * A match expression. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * } * ``` * ``` diff --git a/rust/ql/lib/codeql/rust/generated/MissingPat.qll b/rust/ql/lib/codeql/rust/generated/MissingPat.qll index 0444917903c6..ac1c7f349a9c 100644 --- a/rust/ql/lib/codeql/rust/generated/MissingPat.qll +++ b/rust/ql/lib/codeql/rust/generated/MissingPat.qll @@ -17,8 +17,7 @@ module Generated { * A missing pattern, used as a place holder for incomplete syntax. * ``` * match Some(42) { - * .. => "ok", - * _ => "fail", + * .. => "bad use of .. syntax", * }; * ``` * INTERNAL: Do not reference the `Generated::MissingPat` class directly. diff --git a/rust/ql/lib/codeql/rust/generated/OrPat.qll b/rust/ql/lib/codeql/rust/generated/OrPat.qll index 5efcc9bf641a..946e7679af05 100644 --- a/rust/ql/lib/codeql/rust/generated/OrPat.qll +++ b/rust/ql/lib/codeql/rust/generated/OrPat.qll @@ -17,7 +17,7 @@ module Generated { * An or pattern. For example: * ``` * match x { - * Some(y) | None => 0, + * Option::Some(y) | Option::None => 0, * } * ``` * INTERNAL: Do not reference the `Generated::OrPat` class directly. diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index c6a232c24480..2e28e9a2e182 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -132,8 +132,8 @@ module Raw { * A match arm. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` @@ -374,8 +374,8 @@ module Raw { * A box pattern. For example: * ``` * match x { - * box Some(y) => y, - * box None => 0, + * box Option::Some(y) => y, + * box Option::None => 0, * }; * ``` */ @@ -657,14 +657,14 @@ module Raw { * A binding pattern. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * }; * ``` * ``` * match x { - * y@Some(_) => y, - * None => 0, + * y@Option::Some(_) => y, + * Option::None => 0, * }; * ``` */ @@ -898,8 +898,8 @@ module Raw { * A match expression. For example: * ``` * match x { - * Some(y) => y, - * None => 0, + * Option::Some(y) => y, + * Option::None => 0, * } * ``` * ``` @@ -971,8 +971,7 @@ module Raw { * A missing pattern, used as a place holder for incomplete syntax. * ``` * match Some(42) { - * .. => "ok", - * _ => "fail", + * .. => "bad use of .. syntax", * }; * ``` */ @@ -1027,7 +1026,7 @@ module Raw { * An or pattern. For example: * ``` * match x { - * Some(y) | None => 0, + * Option::Some(y) | Option::None => 0, * } * ``` */ @@ -1259,8 +1258,8 @@ module Raw { * A reference pattern. For example: * ``` * match x { - * &mut Some(y) => y, - * &None => 0, + * &mut Option::Some(y) => y, + * &Option::None => 0, * }; * ``` */ diff --git a/rust/ql/lib/codeql/rust/generated/RefPat.qll b/rust/ql/lib/codeql/rust/generated/RefPat.qll index 38680ae4946e..a13e517a3c87 100644 --- a/rust/ql/lib/codeql/rust/generated/RefPat.qll +++ b/rust/ql/lib/codeql/rust/generated/RefPat.qll @@ -17,8 +17,8 @@ module Generated { * A reference pattern. For example: * ``` * match x { - * &mut Some(y) => y, - * &None => 0, + * &mut Option::Some(y) => y, + * &Option::None => 0, * }; * ``` * INTERNAL: Do not reference the `Generated::RefPat` class directly. diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index 402b15f3d6a6..f70375a20103 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -5,7 +5,7 @@ BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab0 BinExpr/gen_bin_expr.rs fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 -BoxPat/gen_box_pat.rs ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 ba50537d68f9a635fc64ecd23955ef478e106e497c85ec2500b869673446ee67 +BoxPat/gen_box_pat.rs 4f6c7ea95d49a350bcfe8bc381229b89c08eb44580d98c853cf6b2ab6649b3a6 4f6c7ea95d49a350bcfe8bc381229b89c08eb44580d98c853cf6b2ab6649b3a6 BreakExpr/gen_break_expr.rs 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 CallExpr/gen_call_expr.rs 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 CastExpr/gen_cast_expr.rs 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 @@ -18,7 +18,7 @@ ExprStmt/gen_expr_stmt.rs eedad804b2fbd49385c284ece44ecddf18eb56b61ff54607dfdd65 FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 Function/gen_function.rs 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 1048512614569eaf818e16a30df256556e25f3b7fb97eee2a8df4b0036b10e99 GenericArgList/gen_generic_arg_list.rs 428b05b7dd2c2060ac752f4d98a4d3daf44eb9f0a7cfb05bccbe284a91f4be27 428b05b7dd2c2060ac752f4d98a4d3daf44eb9f0a7cfb05bccbe284a91f4be27 -IdentPat/gen_ident_pat.rs f8cd49453ef1600542143c60ecefcf98cc1fb863735b78246017b516a0b5024d f8cd49453ef1600542143c60ecefcf98cc1fb863735b78246017b516a0b5024d +IdentPat/gen_ident_pat.rs 719807aae94b372b489cac7e9ae00d91c2df6e2de7bae9b24e5f6f9aaf8f1b64 719807aae94b372b489cac7e9ae00d91c2df6e2de7bae9b24e5f6f9aaf8f1b64 IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 Label/gen_label.rs 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd @@ -27,14 +27,14 @@ LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403 Literal/gen_literal.rs 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 LiteralPat/gen_literal_pat.rs b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 -MatchArm/gen_match_arm.rs b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 b3d7fc8be0f739787415a4fc9788e462f3ea9f46fc2e734198745aaa62c0d0f4 -MatchExpr/gen_match_expr.rs 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 7b20fb5bd04d5c93021d7daf3be9f30c13c854fac088835d9d7d9d16c0d963c5 +MatchArm/gen_match_arm.rs cad136c0d9ffd9fb4250e1e26ccaa7a2920b614d004c25296b819b8d33e87cf9 cad136c0d9ffd9fb4250e1e26ccaa7a2920b614d004c25296b819b8d33e87cf9 +MatchExpr/gen_match_expr.rs 5c444ccc272acd26aabed0462d0527096dbb52a783f8353e6385335314f1035f 5c444ccc272acd26aabed0462d0527096dbb52a783f8353e6385335314f1035f MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 MissingExpr/gen_missing_expr.rs 24bed82f1e2a4bc18c00d59bc06ad0aa59371d5fab71e67a8b4eb1a5f59c61cb 24bed82f1e2a4bc18c00d59bc06ad0aa59371d5fab71e67a8b4eb1a5f59c61cb -MissingPat/gen_missing_pat.rs 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 0d31993464689611846dfea19ae856f71294aa5620b7248625ca273e7d840e87 +MissingPat/gen_missing_pat.rs a4e05c03a08074e332ae5bf18edabb87950119ff938d825efa18e4362ccd4c12 a4e05c03a08074e332ae5bf18edabb87950119ff938d825efa18e4362ccd4c12 Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a75120 OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 -OrPat/gen_or_pat.rs a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 a59e67d5481bb3c21b10eddb99d5dce1de4321dc584c91d72bd3ddb00a0edd06 +OrPat/gen_or_pat.rs 5b27d1397060dab0aba02ce35b7d182394d8b0a84a42984d2508868673d36b2c 5b27d1397060dab0aba02ce35b7d182394d8b0a84a42984d2508868673d36b2c Path/gen_path.rs 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a @@ -46,7 +46,7 @@ RecordExprField/gen_record_expr_field.rs ca3335ee9a4e091f2a4ebc183bd6f8ff9cd8f37 RecordPat/gen_record_pat.rs 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed 4df648cfb7babf7f3b610499f279681b20840b63eb6ebbdda996298d8ff28aed RecordPatField/gen_record_pat_field.rs 83f05d7acccbf792f952272bf049253100d7590ce25c3665d7bb284f88cd62d5 83f05d7acccbf792f952272bf049253100d7590ce25c3665d7bb284f88cd62d5 RefExpr/gen_ref_expr.rs b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 -RefPat/gen_ref_pat.rs fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 fe7a990172263730e412649f446cf9976633fb8f21fee1b5134f00f695bf5823 +RefPat/gen_ref_pat.rs e12a9380919d62f8910efd09ce6883b7bb53257879eef0aaeaa9f1870af29ad5 e12a9380919d62f8910efd09ce6883b7bb53257879eef0aaeaa9f1870af29ad5 RepeatExpr/gen_repeat_expr.rs 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 98e06e5b9d1750a6ec64513d451b7a46eb215e2f2a6d482eaeeb07dec6dc8564 ReturnExpr/gen_return_expr.rs ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19f437431568 fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19f437431568 diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected index 655e3c463163..41597634b951 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected @@ -1,2 +1,2 @@ -| gen_box_pat.rs:6:9:6:19 | BoxPat | getInner: | gen_box_pat.rs:6:13:6:19 | TupleStructPat | -| gen_box_pat.rs:7:9:7:16 | BoxPat | getInner: | gen_box_pat.rs:7:13:7:16 | PathPat | +| gen_box_pat.rs:6:9:6:27 | BoxPat | getInner: | gen_box_pat.rs:6:13:6:27 | TupleStructPat | +| gen_box_pat.rs:7:9:7:24 | BoxPat | getInner: | gen_box_pat.rs:7:13:7:24 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs index 291e7d67c54d..a8e16c413476 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs +++ b/rust/ql/test/extractor-tests/generated/BoxPat/gen_box_pat.rs @@ -3,7 +3,7 @@ fn test_box_pat() -> () { // A box pattern. For example: match x { - box Some(y) => y, - box None => 0, + box Option::Some(y) => y, + box Option::None => 0, }; } diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected index e0d1b3ed902b..6973ca9aba2e 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected @@ -1,2 +1,2 @@ -| gen_ident_pat.rs:6:14:6:14 | IdentPat | getBindingId: | y | hasSubpat: | no | -| gen_ident_pat.rs:10:9:10:17 | IdentPat | getBindingId: | y | hasSubpat: | yes | +| gen_ident_pat.rs:6:22:6:22 | IdentPat | getBindingId: | y | hasSubpat: | no | +| gen_ident_pat.rs:10:9:10:25 | IdentPat | getBindingId: | y | hasSubpat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected index 78b903ed5e03..705456753b9c 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getSubpat.expected @@ -1 +1 @@ -| gen_ident_pat.rs:10:9:10:17 | IdentPat | gen_ident_pat.rs:10:11:10:17 | TupleStructPat | +| gen_ident_pat.rs:10:9:10:25 | IdentPat | gen_ident_pat.rs:10:11:10:25 | TupleStructPat | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs index 7480705b3b68..0b8111cc1072 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs +++ b/rust/ql/test/extractor-tests/generated/IdentPat/gen_ident_pat.rs @@ -3,11 +3,11 @@ fn test_ident_pat() -> () { // A binding pattern. For example: match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, }; match x { - y@Some(_) => y, - None => 0, + y@Option::Some(_) => y, + Option::None => 0, }; } diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected index 36d20b495a4c..3f55c28f585d 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -1,4 +1,4 @@ -| gen_match_arm.rs:6:9:6:15 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:15 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:20:6:20 | PathExpr | -| gen_match_arm.rs:7:9:7:12 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:12 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:17:7:17 | Literal | +| gen_match_arm.rs:6:9:6:23 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:23 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:28:6:28 | PathExpr | +| gen_match_arm.rs:7:9:7:20 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:20 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:25:7:25 | Literal | | gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinExpr | | gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildcardPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs index 5fe2f9c6e8e2..bda762f694bf 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs +++ b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs @@ -3,8 +3,8 @@ fn test_match_arm(x: i32) -> i32 { // A match arm. For example: match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, }; match x { Some(y) if y != 0 => 1 / y, diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected index 75da7cef94d4..ff70602e20dd 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.expected @@ -1,4 +1,4 @@ -| gen_match_expr.rs:5:5:8:5 | MatchExpr | 0 | gen_match_expr.rs:6:9:6:15 | MatchArm | -| gen_match_expr.rs:5:5:8:5 | MatchExpr | 1 | gen_match_expr.rs:7:9:7:12 | MatchArm | +| gen_match_expr.rs:5:5:8:5 | MatchExpr | 0 | gen_match_expr.rs:6:9:6:23 | MatchArm | +| gen_match_expr.rs:5:5:8:5 | MatchExpr | 1 | gen_match_expr.rs:7:9:7:20 | MatchArm | | gen_match_expr.rs:9:5:12:5 | MatchExpr | 0 | gen_match_expr.rs:10:9:10:15 | MatchArm | | gen_match_expr.rs:9:5:12:5 | MatchExpr | 1 | gen_match_expr.rs:11:9:11:9 | MatchArm | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs index efae3774aadc..2e50514cc552 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs @@ -3,8 +3,8 @@ fn test_match_expr(x: i32) -> i32 { // A match expression. For example: match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, } match x { Some(y) if y != 0 => 1 / y, diff --git a/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs b/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs index bed70f4d7ff9..4a76319568a9 100644 --- a/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs +++ b/rust/ql/test/extractor-tests/generated/MissingPat/gen_missing_pat.rs @@ -3,7 +3,6 @@ fn test_missing_pat() -> () { // A missing pattern, used as a place holder for incomplete syntax. match Some(42) { - .. => "ok", - _ => "fail", + .. => "bad use of .. syntax", }; } diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected index 73e937f56e73..bca61721ca45 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected @@ -1 +1 @@ -| gen_or_pat.rs:6:9:6:22 | OrPat | getNumberOfArgs: | 2 | +| gen_or_pat.rs:6:9:6:38 | OrPat | getNumberOfArgs: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected index a80d9a19e8f5..a701548b2345 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getArg.expected @@ -1,2 +1,2 @@ -| gen_or_pat.rs:6:9:6:22 | OrPat | 0 | gen_or_pat.rs:6:9:6:15 | TupleStructPat | -| gen_or_pat.rs:6:9:6:22 | OrPat | 1 | gen_or_pat.rs:6:19:6:22 | PathPat | +| gen_or_pat.rs:6:9:6:38 | OrPat | 0 | gen_or_pat.rs:6:9:6:23 | TupleStructPat | +| gen_or_pat.rs:6:9:6:38 | OrPat | 1 | gen_or_pat.rs:6:27:6:38 | PathPat | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs index 2409c4e41794..2ad139d6e374 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs +++ b/rust/ql/test/extractor-tests/generated/OrPat/gen_or_pat.rs @@ -3,6 +3,6 @@ fn test_or_pat() -> () { // An or pattern. For example: match x { - Some(y) | None => 0, + Option::Some(y) | Option::None => 0, } } diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected index d45f05245203..095e9af1d6f0 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected @@ -1,2 +1,2 @@ -| gen_ref_pat.rs:6:9:6:20 | RefPat | getPat: | gen_ref_pat.rs:6:14:6:20 | TupleStructPat | isMut: | yes | -| gen_ref_pat.rs:7:9:7:13 | RefPat | getPat: | gen_ref_pat.rs:7:10:7:13 | PathPat | isMut: | no | +| gen_ref_pat.rs:6:9:6:28 | RefPat | getPat: | gen_ref_pat.rs:6:14:6:28 | TupleStructPat | isMut: | yes | +| gen_ref_pat.rs:7:9:7:21 | RefPat | getPat: | gen_ref_pat.rs:7:10:7:21 | PathPat | isMut: | no | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs index 58b24ddfbf5a..cf5d7375b06f 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs +++ b/rust/ql/test/extractor-tests/generated/RefPat/gen_ref_pat.rs @@ -3,7 +3,7 @@ fn test_ref_pat() -> () { // A reference pattern. For example: match x { - &mut Some(y) => y, - &None => 0, + &mut Option::Some(y) => y, + &Option::None => 0, }; } diff --git a/rust/schema.py b/rust/schema.py index 598786d10e9c..ba132c8bc233 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -380,8 +380,8 @@ class MatchArm(AstNode): A match arm. For example: ``` match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, }; ``` ``` @@ -402,8 +402,8 @@ class MatchExpr(Expr): A match expression. For example: ``` match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, } ``` ``` @@ -858,8 +858,7 @@ class MissingPat(Pat): A missing pattern, used as a place holder for incomplete syntax. ``` match Some(42) { - .. => "ok", - _ => "fail", + .. => "bad use of .. syntax", }; ``` """ @@ -896,7 +895,7 @@ class OrPat(Pat): An or pattern. For example: ``` match x { - Some(y) | None => 0, + Option::Some(y) | Option::None => 0, } ``` """ @@ -998,14 +997,14 @@ class IdentPat(Pat): A binding pattern. For example: ``` match x { - Some(y) => y, - None => 0, + Option::Some(y) => y, + Option::None => 0, }; ``` ``` match x { - y@Some(_) => y, - None => 0, + y@Option::Some(_) => y, + Option::None => 0, }; ``` """ @@ -1036,8 +1035,8 @@ class RefPat(Pat): A reference pattern. For example: ``` match x { - &mut Some(y) => y, - &None => 0, + &mut Option::Some(y) => y, + &Option::None => 0, }; ``` """ @@ -1051,8 +1050,8 @@ class BoxPat(Pat): A box pattern. For example: ``` match x { - box Some(y) => y, - box None => 0, + box Option::Some(y) => y, + box Option::None => 0, }; ``` """ From ebe1e5e0d2b8fc72d1e8b5ab9b5749aeee963b82 Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 18:23:39 +0200 Subject: [PATCH 19/22] Fix locations for Path and LiteralOrConstPat --- rust/extractor/src/translate.rs | 34 ++++++++++++++----- .../generated/Module/Module.expected | 6 ++-- .../Module/Module_getDeclaration.expected | 6 ++++ 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 6d29b2e78d3f..68eb9f914781 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -113,14 +113,17 @@ impl CrateTranslator<'_> { pat: &ra_ap_hir_def::hir::LiteralOrConst, body: &Body, source_map: &BodySourceMap, + mut emit_location: impl FnMut(&mut CrateTranslator<'_>, trap::Label) -> (), ) -> trap::Label { match pat { ra_ap_hir_def::hir::LiteralOrConst::Literal(_literal) => { let expr = self.trap.emit(generated::Literal { id: TrapId::Star }); - self.trap.emit(generated::LiteralPat { + let label = self.trap.emit(generated::LiteralPat { id: TrapId::Star, expr, - }) + }); + emit_location(self, label); + label } ra_ap_hir_def::hir::LiteralOrConst::Const(inner) => { self.emit_pat(*inner, body, source_map) @@ -257,6 +260,7 @@ impl CrateTranslator<'_> { ellipsis, } => { let path = path.as_ref().map(|path| self.emit_path(path)); + path.map(|p| self.emit_location_for_pat(p, pat_id, source_map)); let flds = args .into_iter() .map(|arg| self.emit_record_field_pat(arg, body, source_map)) @@ -269,12 +273,16 @@ impl CrateTranslator<'_> { }) } ra_ap_hir_def::hir::Pat::Range { start, end } => { - let start = start - .as_ref() - .map(|x| self.emit_literal_or_const_pat(x, body, source_map)); - let end = end - .as_ref() - .map(|x| self.emit_literal_or_const_pat(x, body, source_map)); + let emit_location_for_const = |trans: &mut CrateTranslator<'_>, label| { + trans.emit_location_for_pat(label, pat_id, source_map) + }; + let start = start.as_ref().map(|x| { + self.emit_literal_or_const_pat(x, body, source_map, emit_location_for_const) + }); + + let end = end.as_ref().map(|x| { + self.emit_literal_or_const_pat(x, body, source_map, emit_location_for_const) + }); self.trap.emit(generated::RangePat { id: TrapId::Star, start, @@ -304,6 +312,8 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Pat::Path(path) => { let path = self.emit_path(path); + self.emit_location_for_pat(path, pat_id, source_map); + self.trap.emit(generated::PathPat { id: TrapId::Star, path, @@ -330,6 +340,8 @@ impl CrateTranslator<'_> { ellipsis, } => { let path = path.as_ref().map(|path| self.emit_path(path)); + path.map(|p| self.emit_location_for_pat(p, pat_id, source_map)); + let args = args .into_iter() .map(|arg| self.emit_pat(*arg, body, source_map)) @@ -447,6 +459,8 @@ impl CrateTranslator<'_> { } ra_ap_hir_def::hir::Expr::Path(path) => { let path = self.emit_path(path); + self.emit_location_for_expr(path, expr_id, source_map); + self.trap.emit(generated::PathExpr { id: TrapId::Star, path, @@ -652,6 +666,8 @@ impl CrateTranslator<'_> { is_assignee_expr, } => { let path = path.as_ref().map(|path| self.emit_path(path)); + path.map(|p| self.emit_location_for_expr(p, expr_id, source_map)); + let flds = fields .into_iter() .map(|field| self.emit_record_lit_field(field, body, source_map)) @@ -871,7 +887,7 @@ impl CrateTranslator<'_> { labels: &mut Vec, ) { let label = match id { - ModuleDef::Module(_) => self + ModuleDef::Module(_module) => self .trap .emit(generated::UnimplementedDeclaration { id: TrapId::Star }), ModuleDef::Function(function) => { diff --git a/rust/ql/test/extractor-tests/generated/Module/Module.expected b/rust/ql/test/extractor-tests/generated/Module/Module.expected index b534a491b841..7198e7b0f23f 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module.expected @@ -1,7 +1,7 @@ | file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | | file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | | file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | -| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | -| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | -| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 0 | | file://:0:0:0:0 | Module | getNumberOfDeclarations: | 1 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 2 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 2 | +| file://:0:0:0:0 | Module | getNumberOfDeclarations: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected index 4ac81a948267..1441501f34e4 100644 --- a/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected +++ b/rust/ql/test/extractor-tests/generated/Module/Module_getDeclaration.expected @@ -1 +1,7 @@ +| file://:0:0:0:0 | Module | 0 | file://:0:0:0:0 | UnimplementedDeclaration | +| file://:0:0:0:0 | Module | 0 | file://:0:0:0:0 | UnimplementedDeclaration | +| file://:0:0:0:0 | Module | 0 | file://:0:0:0:0 | UnimplementedDeclaration | | file://:0:0:0:0 | Module | 0 | gen_module.rs:6:5:6:19 | baz | +| file://:0:0:0:0 | Module | 1 | file://:0:0:0:0 | UnimplementedDeclaration | +| file://:0:0:0:0 | Module | 1 | file://:0:0:0:0 | UnimplementedDeclaration | +| file://:0:0:0:0 | Module | 1 | file://:0:0:0:0 | UnimplementedDeclaration | From 3fdc49c4cb399e3e2062d858c8791847906c010b Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 18:33:55 +0200 Subject: [PATCH 20/22] Rename Literal, Type, and BinExpr --- rust/extractor/src/generated/.generated.list | 2 +- rust/extractor/src/generated/top.rs | 20 +++--- rust/extractor/src/translate.rs | 8 +-- rust/ql/.generated.list | 52 ++++++++-------- rust/ql/.gitattributes | 26 ++++---- rust/ql/lib/codeql/rust/elements.qll | 6 +- .../elements/{BinExpr.qll => BinaryExpr.qll} | 6 +- ...structor.qll => BinaryExprConstructor.qll} | 6 +- .../elements/{Literal.qll => LiteralExpr.qll} | 6 +- ...tructor.qll => LiteralExprConstructor.qll} | 6 +- rust/ql/lib/codeql/rust/elements/PathExpr.qll | 2 +- .../rust/elements/{Type.qll => TypeRef.qll} | 6 +- ...Constructor.qll => TypeRefConstructor.qll} | 6 +- rust/ql/lib/codeql/rust/generated/BinExpr.qll | 55 ---------------- .../lib/codeql/rust/generated/BinaryExpr.qll | 57 +++++++++++++++++ .../ql/lib/codeql/rust/generated/CastExpr.qll | 6 +- .../lib/codeql/rust/generated/ClosureExpr.qll | 12 ++-- rust/ql/lib/codeql/rust/generated/LetStmt.qll | 7 ++- .../{Literal.qll => LiteralExpr.qll} | 12 ++-- .../codeql/rust/generated/OffsetOfExpr.qll | 6 +- .../lib/codeql/rust/generated/ParentChild.qll | 14 +++-- .../ql/lib/codeql/rust/generated/PathExpr.qll | 2 +- rust/ql/lib/codeql/rust/generated/Raw.qll | 36 +++++------ rust/ql/lib/codeql/rust/generated/Synth.qll | 62 +++++++++---------- .../rust/generated/SynthConstructors.qll | 6 +- .../rust/generated/{Type.qll => TypeRef.qll} | 12 ++-- rust/ql/lib/rust.dbscheme | 34 +++++----- .../generated/.generated_tests.list | 8 +-- .../extractor-tests/generated/.gitattributes | 6 +- .../generated/BinExpr/BinExpr.expected | 5 -- .../generated/BinExpr/BinExpr_getOp.expected | 5 -- .../generated/BinaryExpr/BinaryExpr.expected | 5 ++ .../BinExpr.ql => BinaryExpr/BinaryExpr.ql} | 2 +- .../BinaryExpr/BinaryExpr_getOp.expected | 5 ++ .../BinaryExpr_getOp.ql} | 2 +- .../gen_binary_expr.rs} | 2 +- .../generated/BoxExpr/BoxExpr.expected | 2 +- .../BreakExpr/BreakExpr_getExpr.expected | 2 +- .../CallExpr/CallExpr_getArg.expected | 8 +-- .../generated/CastExpr/CastExpr.expected | 2 +- .../generated/CastExpr/CastExpr.ql | 2 +- .../ClosureExpr/ClosureExpr.expected | 4 +- .../ClosureExpr_getArgType.expected | 4 +- .../ClosureExpr_getRetType.expected | 2 +- .../ElementListExpr_getElement.expected | 20 +++--- .../generated/File/File.expected | 3 - .../generated/IfExpr/IfExpr.expected | 4 +- .../generated/IndexExpr/IndexExpr.expected | 4 +- .../LetStmt/LetStmt_getInitializer.expected | 4 +- .../LetStmt/LetStmt_getType.expected | 4 +- .../generated/Literal/Literal.expected | 8 --- .../LiteralExpr/LiteralExpr.expected | 8 +++ .../Type.ql => LiteralExpr/LiteralExpr.ql} | 2 +- .../gen_literal_expr.rs} | 2 +- .../generated/LiteralPat/LiteralPat.expected | 2 +- .../generated/MatchArm/MatchArm.expected | 6 +- .../MatchArm/MatchArm_getGuard.expected | 2 +- .../MethodCallExpr_getArg.expected | 4 +- .../OffsetOfExpr/OffsetOfExpr.expected | 2 +- .../generated/OffsetOfExpr/OffsetOfExpr.ql | 2 +- .../generated/PathExpr/PathExpr.expected | 2 +- .../generated/PathExpr/gen_path_expr.rs | 2 +- .../generated/PrefixExpr/PrefixExpr.expected | 4 +- .../RangeExpr/RangeExpr_getLhs.expected | 6 +- .../RangeExpr/RangeExpr_getRhs.expected | 8 +-- .../RecordExprField/RecordExprField.expected | 4 +- .../generated/RepeatExpr/RepeatExpr.expected | 2 +- .../ReturnExpr/ReturnExpr_getExpr.expected | 2 +- .../TupleExpr/TupleExpr_getExpr.expected | 8 +-- .../generated/Type/Type.expected | 3 - .../generated/TypeRef/TypeRef.expected | 3 + .../Literal.ql => TypeRef/TypeRef.ql} | 2 +- .../gen_type.rs => TypeRef/gen_type_ref.rs} | 2 +- .../YeetExpr/YeetExpr_getExpr.expected | 2 +- .../YieldExpr/YieldExpr_getExpr.expected | 2 +- rust/schema.py | 19 +++--- 76 files changed, 345 insertions(+), 342 deletions(-) rename rust/ql/lib/codeql/rust/elements/{BinExpr.qll => BinaryExpr.qll} (68%) rename rust/ql/lib/codeql/rust/elements/{TypeConstructor.qll => BinaryExprConstructor.qll} (61%) rename rust/ql/lib/codeql/rust/elements/{Literal.qll => LiteralExpr.qll} (70%) rename rust/ql/lib/codeql/rust/elements/{LiteralConstructor.qll => LiteralExprConstructor.qll} (61%) rename rust/ql/lib/codeql/rust/elements/{Type.qll => TypeRef.qll} (70%) rename rust/ql/lib/codeql/rust/elements/{BinExprConstructor.qll => TypeRefConstructor.qll} (64%) delete mode 100644 rust/ql/lib/codeql/rust/generated/BinExpr.qll create mode 100644 rust/ql/lib/codeql/rust/generated/BinaryExpr.qll rename rust/ql/lib/codeql/rust/generated/{Literal.qll => LiteralExpr.qll} (56%) rename rust/ql/lib/codeql/rust/generated/{Type.qll => TypeRef.qll} (56%) delete mode 100644 rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected delete mode 100644 rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected rename rust/ql/test/extractor-tests/generated/{BinExpr/BinExpr.ql => BinaryExpr/BinaryExpr.ql} (83%) create mode 100644 rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.expected rename rust/ql/test/extractor-tests/generated/{BinExpr/BinExpr_getOp.ql => BinaryExpr/BinaryExpr_getOp.ql} (88%) rename rust/ql/test/extractor-tests/generated/{BinExpr/gen_bin_expr.rs => BinaryExpr/gen_binary_expr.rs} (81%) delete mode 100644 rust/ql/test/extractor-tests/generated/File/File.expected delete mode 100644 rust/ql/test/extractor-tests/generated/Literal/Literal.expected create mode 100644 rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected rename rust/ql/test/extractor-tests/generated/{Type/Type.ql => LiteralExpr/LiteralExpr.ql} (86%) rename rust/ql/test/extractor-tests/generated/{Literal/gen_literal.rs => LiteralExpr/gen_literal_expr.rs} (85%) delete mode 100644 rust/ql/test/extractor-tests/generated/Type/Type.expected create mode 100644 rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected rename rust/ql/test/extractor-tests/generated/{Literal/Literal.ql => TypeRef/TypeRef.ql} (88%) rename rust/ql/test/extractor-tests/generated/{Type/gen_type.rs => TypeRef/gen_type_ref.rs} (82%) diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index c9f61c9be559..91107f6e045f 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e 7cdfedcd68cf8e41134daf810c1af78624082b0c3e8be6570339b1a69a5d457e -top.rs 812d576622151c716ea439746dbdcd8d742badbe2c47cfb2e17750fba1cc256e 812d576622151c716ea439746dbdcd8d742badbe2c47cfb2e17750fba1cc256e +top.rs d15c72bcdaa924633a725a2324446686e0f4caaa6a4ae759a101ef31174131a5 d15c72bcdaa924633a725a2324446686e0f4caaa6a4ae759a101ef31174131a5 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index dd8abe72ac63..7304c89bab2a 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -107,17 +107,17 @@ impl TrapEntry for RecordPatField { } #[derive(Debug)] -pub struct Type { +pub struct TypeRef { pub id: TrapId, } -impl TrapEntry for Type { +impl TrapEntry for TypeRef { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("types", vec![trap::Arg::Label(id)]); + out.add_tuple("type_refs", vec![trap::Arg::Label(id)]); } } @@ -170,22 +170,22 @@ impl TrapEntry for BecomeExpr { } #[derive(Debug)] -pub struct BinExpr { +pub struct BinaryExpr { pub id: TrapId, pub lhs: trap::Label, pub rhs: trap::Label, pub op: Option, } -impl TrapEntry for BinExpr { +impl TrapEntry for BinaryExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("bin_exprs", vec![trap::Arg::Label(id), self.lhs.into(), self.rhs.into()]); + out.add_tuple("binary_exprs", vec![trap::Arg::Label(id), self.lhs.into(), self.rhs.into()]); if let Some(v) = self.op { - out.add_tuple("bin_expr_ops", vec![trap::Arg::Label(id), v.into()]); + out.add_tuple("binary_expr_ops", vec![trap::Arg::Label(id), v.into()]); } } } @@ -549,17 +549,17 @@ impl TrapEntry for LetStmt { } #[derive(Debug)] -pub struct Literal { +pub struct LiteralExpr { pub id: TrapId, } -impl TrapEntry for Literal { +impl TrapEntry for LiteralExpr { fn extract_id(&mut self) -> TrapId { std::mem::replace(&mut self.id, TrapId::Star) } fn emit(self, id: trap::Label, out: &mut trap::Writer) { - out.add_tuple("literals", vec![trap::Arg::Label(id)]); + out.add_tuple("literal_exprs", vec![trap::Arg::Label(id)]); } } diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 68eb9f914781..ef8e1e91f3ae 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -117,7 +117,7 @@ impl CrateTranslator<'_> { ) -> trap::Label { match pat { ra_ap_hir_def::hir::LiteralOrConst::Literal(_literal) => { - let expr = self.trap.emit(generated::Literal { id: TrapId::Star }); + let expr = self.trap.emit(generated::LiteralExpr { id: TrapId::Star }); let label = self.trap.emit(generated::LiteralPat { id: TrapId::Star, expr, @@ -380,7 +380,7 @@ impl CrateTranslator<'_> { ret } fn emit_type_ref(&mut self, _type_ref: &TypeRef) -> trap::Label { - self.trap.emit(generated::Type { id: TrapId::Star }) + self.trap.emit(generated::TypeRef { id: TrapId::Star }) } fn emit_match_arm( &mut self, @@ -743,7 +743,7 @@ impl CrateTranslator<'_> { let lhs = self.emit_expr(*lhs, body, source_map); let rhs = self.emit_expr(*rhs, body, source_map); let op = op.map(|op| format!("{op}")); - self.trap.emit(generated::BinExpr { + self.trap.emit(generated::BinaryExpr { id: TrapId::Star, lhs, rhs, @@ -854,7 +854,7 @@ impl CrateTranslator<'_> { }) } ra_ap_hir_def::hir::Expr::Literal(_literal) => { - self.trap.emit(generated::Literal { id: TrapId::Star }) + self.trap.emit(generated::LiteralExpr { id: TrapId::Star }) } ra_ap_hir_def::hir::Expr::Underscore => self .trap diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 5ddf42299431..3c6334648d55 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -8,8 +8,8 @@ lib/codeql/rust/elements/AwaitExpr.qll da0f5928cfee39223c48b74b1921d18c39cc4f8ce lib/codeql/rust/elements/AwaitExprConstructor.qll af0dfdf36b300d412a7b8668f68e6594fe3338216cdf1aa420c9a58608aa86f5 cfa115902ccf070e34ee451bc2f89295c97e8418501359a8cdc646d16c4cc7cd lib/codeql/rust/elements/BecomeExpr.qll cf7d219b639e8e93f6a44bb14be14740b17bdb789f7299863560b2b5d4bfc7f7 26511c65fbdbb9352b6628a813e3f00be8495f2a34abdfae5a5ece8dd59cb04f lib/codeql/rust/elements/BecomeExprConstructor.qll 0c206e657417066415850672a804a69e5fccc605c309bb8755737ae01e332f18 e70bd0c411ffc23c37b22a459455c95ff75a72fa2d179f751bff99866eeef2bc -lib/codeql/rust/elements/BinExpr.qll 201798bde3e0f8e2c6b40e1771c8de21c7a962da4c18f69773fb6fb7f59bba36 e8134215b75065bd8acb3d2b11a0c4129615e333a5dac48ab4b588f7463afc3f -lib/codeql/rust/elements/BinExprConstructor.qll 29d27d66a269ef84a4d6f9ff4785d9aa44225a109886294670828f0e0fa56a35 4da4fec6432c73880eff119a4cc7dbef5816c433a7d25ab3e5818283a0e28944 +lib/codeql/rust/elements/BinaryExpr.qll 2c59bac9aecb4a0a3495b9e2a3294ff9d6aef3204acfcb05d278c10427269e81 e0b99b8be24214d0eed80ce81d38e7770afd1a9d515622d5f1d51a0df1e553ac +lib/codeql/rust/elements/BinaryExprConstructor.qll 1cae8104dc9860a7e445594465fbffeb7cb73534887d9766eaabe2bda8e62957 3d347cff129b9bbe8b66cee0e55596c02b8c11fe7c78b5a47e11e5c7ac57bbf4 lib/codeql/rust/elements/BlockExpr.qll b699906fba2dee34699e110b8759419079a5ce3dc1fab207001c9c9b612dac5e 429016df600e3905bd235d0e707c50ecdbf12b3ceddedcbf48944ea76e60f915 lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e8c704f6ce26503ddbd65c6f5282 d2e05a51d3840caf4de4cca6cdab9551f396df317c8ad1da661205aa822646cc lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 @@ -56,8 +56,8 @@ lib/codeql/rust/elements/LetExpr.qll 49a9ba97471d04d52bee73f9b5651bec09fae40c577 lib/codeql/rust/elements/LetExprConstructor.qll 8904b25d70fd0e6f3db74d2e09bb3e3fee407282ee45030fdaeac31b6111db70 36dcc877f6c1810228d593d914cffa7b04ecf0afe13c4c122aca72f33d03f566 lib/codeql/rust/elements/LetStmt.qll 542dacce4a4991f0250b45a6c3b28829117e6e5692320494819244a155d05e8d b3e50baeb3534a4352d6bf898ace88e250d84aa05ba0c0debdae5c18c446f3c7 lib/codeql/rust/elements/LetStmtConstructor.qll 5882f0e4379d07e8281a955c9eed7dd907b610750887de3dd6451cd1c8d104d4 68b0890d8a493dcca74190904b00f05b0e58aacfe5a2aa63e5ead1ba366d3c38 -lib/codeql/rust/elements/Literal.qll 5088223cfb4625a191c86f7c45d6b0c3b689f165f84d213e666f25828847b293 c76d8f97ed23b1c8f19d290d5cf367cf6e7820f1c7f7fd3dd6924fcdcd94ad2d -lib/codeql/rust/elements/LiteralConstructor.qll 6a80cc2175b6f7ceeedab2c06ca7f980ccbf64f6a7dda8c779fc92cecf91f7bc 177eee9c8214f2a776df18fc02754a6685f116aefe00d1444643eea954436739 +lib/codeql/rust/elements/LiteralExpr.qll 031edbbd52d2107a3a7149a4dde306f5fcce9a32b7f4c5f7398b013c06ef37fe 7c18930dc7514f5fbe0a4248242430ee06f403b4e301c4e594355fc5b2fc8941 +lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 lib/codeql/rust/elements/LiteralPat.qll 1971f70ba0b872de28e1a168ac63d35afc123c5a710efe83b78e88cf949ff20a 1d00573dcffe4d4cfd444baafed38ec693035057d6b825e76e47d436fd08d02a lib/codeql/rust/elements/LiteralPatConstructor.qll abe137b2b8ec9dd9450fc77d2d826fe891bbb0af23b0c26ff5e2d1751988f747 e1642805588737ed98eebec1d16cb0fb9fd081db203ec725db85b02c4837bdcb lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 @@ -81,7 +81,7 @@ lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0 lib/codeql/rust/elements/Pat.qll 79ac8430cc9047cf89fcf80cdb527166bd72e979d03e051fa2d60fa2f64f2294 914362a06ad0cac1e1777874bf4425fcc805021197f635ddd87b96d9e5c221d9 lib/codeql/rust/elements/Path.qll 3863a424a10b840f05584e17cb642859b18093b205eb9125f9aa0a0c2de6bab3 0db28b1b40218961ff8db478842b54ed7eee7660229113aca93c180aa45bb243 lib/codeql/rust/elements/PathConstructor.qll 97243db75d6337cf68a22ea68569fdddf4c3bc1b8875bb4bb66faeeba8846a53 03c8c665e2f3b103148fd38eb7a4d0459c8189b2f6160dc08ee1d6d2807e01b6 -lib/codeql/rust/elements/PathExpr.qll 861b1d9e6246588fcb0b6d8560c7807a4209941a8cbc93779b80e494561af706 c6da0b2e8ace1c30a7cd468406353a457440aafacf8e31c32618fd9781c69113 +lib/codeql/rust/elements/PathExpr.qll 088ca8090fc5fde84a3b39549099d1e1150a547ce9294d5d83984c9449fe964d 4e1e692bb6ab8cb887fc3fa0bb251e82f0b68e90e4e2ea68f5704b8b85db33fe lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 lib/codeql/rust/elements/PathPat.qll 748a43d1c25c4fd20eaf78f381e4680207557bb696a28d74a9eaa1887bc966c1 186c947b0bbed3111c9bdc564c3ce39432c1a3bbdbb15ebb503629625ffe1dea lib/codeql/rust/elements/PathPatConstructor.qll 476a38723c63bbfa2565946725c90f1224ac2c5283fde79bf14dcefce6f500ca e9e9b000cac44851772bd9ca519edc89e8518e89a0930df21af14a69f5b0e864 @@ -116,8 +116,8 @@ lib/codeql/rust/elements/TuplePat.qll d9161426edabc199d206a3a1c2994bbda9430d7418 lib/codeql/rust/elements/TuplePatConstructor.qll 505c4f440b47da576acd7e3fc69d6b49e8287f981a21e79919ded374200f2578 b295526303bcae982ddd8c6b544288c0b8b8d62984d6986319e7f17baeb7a19b lib/codeql/rust/elements/TupleStructPat.qll ed443440791cf0868183c5e5304a855058ce78c1b3735507b5c35f269604022b f02c9481ea471b198eec0909d01bd3db03830bd98f10bcc3a2ca4f37b1466b79 lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb -lib/codeql/rust/elements/Type.qll eac066a4d80006795d420d7000c69389eebe8fe8bfeaaac384a03c1cd829eb51 03549e3b3bbcc89cd8b9f81d30e8b567c846660824aa906fad846d1aa717659a -lib/codeql/rust/elements/TypeConstructor.qll 10d8f9157d864e1035a1773d8a8355e3b8671b1605377b7a8427ea8625fbba6c 02a2cd28ef2379de6fb70f5e68bbb5ceaf815defea15ed990cec46bb70efdadf +lib/codeql/rust/elements/TypeRef.qll 13824c88938542cc554bc9ead335136a4eb115ec07ced03e140c9a88f49afdb6 4d265a4fa37a9df406d4bbbad03a69bcb3b5edd3152482fdb90676466283194e +lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 lib/codeql/rust/elements/UnderscoreExpr.qll bf4c0bf76fa15b041f7ecbd492a499088bef2024b49dbdfa57232e84e72c3067 462380bac5f772c1986146d32b70deabc9f03581675f6e79f7b7f747acfb0bd5 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f lib/codeql/rust/elements/Unimplemented.qll 8736c0b7ab0a5b558b47cffe579c0e56016de10017235502bbe18a6d81510a8e cdb6135c0065938892fb32020a7041eed103d97c3335cdc1bf837046f80bd8d3 @@ -131,22 +131,22 @@ lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 lib/codeql/rust/elements/YieldExpr.qll 72682ae19d37abd6ec26569ae8f575979ebba1e0d373898211a9af4fad4979a1 ef0193011ee5f94cebbac5c007d652568f560685a213bf8be96cd0c0983a3880 lib/codeql/rust/elements/YieldExprConstructor.qll ff46ba17cc24abfcb0e310c7458d0539b704e7a771ad00853bd3a1844e4e6f82 1c13662ef01c88f1cf057d099eb46524036133e51a0e36ddf947f727ac6046bb -lib/codeql/rust/elements.qll e84f037bfcf04c0c38710f5c52b8d4aa842179f024cf19e29e54af775682980c e84f037bfcf04c0c38710f5c52b8d4aa842179f024cf19e29e54af775682980c +lib/codeql/rust/elements.qll 1d92fc19e7660d9874f0dc26a85a7021aaffa05a4c84dd847a82606e7235b944 1d92fc19e7660d9874f0dc26a85a7021aaffa05a4c84dd847a82606e7235b944 lib/codeql/rust/generated/ArrayExpr.qll 3fd7465da22e1eb810ae28ffab7b14e9ccceaab0082aa665f14b73d4221128b8 6e9edb5846656aad90283406a496aaae485d38854075a4443817b5098b72b427 lib/codeql/rust/generated/AsmExpr.qll 66f1a4bfb4d32d99b4dab1918a1aac75e0903c499d65a18105e3c837c1aa314d cd5c8ed300b5f5d19e404cd2e5f9dcbcee1081c5538f1840359eb491eb6ecaa2 lib/codeql/rust/generated/AstNode.qll 0598fac7859906f4103124270dfb2fbdb838387b1c45000bf50a4b62c797ec41 f47c84878c7c9676109e358073bddab92a1dbeb4d977d236ecc1eae44d81c894 lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 lib/codeql/rust/generated/AwaitExpr.qll 5a6d94ba4083e00dd971f41be7f32693812cdd7f8efb9dc7ef0fc18296ed560c 7af5433b8e945932a453eededcdc931a62d85d1505c0b4e417291c694ac6cc5b lib/codeql/rust/generated/BecomeExpr.qll 62daf23501554f0b786adbee8e1d430323c6dac79afb8fdbc28d19dc10bdb3bc b17eac6c775fc38bca90a65caffe1294678aeab92d456fb9b9f555e1ac59a0b7 -lib/codeql/rust/generated/BinExpr.qll 1e50692aa42f5b57b4644a368941b29f5941c7cd753be79be0f79340cda583eb 99ef64567805b97d83d31d55df728be74dab07af8252b9edad74b87bdd5019cf +lib/codeql/rust/generated/BinaryExpr.qll 688465914b9601decb2181c0f09e93f6763eff35477444c68e38d80d8208ed36 3c0a276e59c55c6d7837c442ea9101c9c4b1a8e0e6695b3966309b5f9019ce0a lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 lib/codeql/rust/generated/BoxPat.qll 8d9fc5a784473c7bd8c76c5f4a3a5eb6912bfe8691205f311cd1008b27ff5b74 e06a16614897df217948840e084474499b05edc6249ba0115d7cde516f98e165 lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 -lib/codeql/rust/generated/CastExpr.qll bda5ec9c2639325ac6ffc65ef44bad0ce7769a0618925d93e59101c3a7b6b804 a40eba5690369b55f373e2c2d724e19791f7721c50365fa6ce1ac93b387a1ea1 -lib/codeql/rust/generated/ClosureExpr.qll 326e2de4da089a078861f5b67fe1c4f4afb7dc295e983fb13c08ffce1d88e577 7e39547d367be795891668e5fcb8a694689beaee3eae63293af1d7c9c6961875 +lib/codeql/rust/generated/CastExpr.qll c1e44783781539fa064717d360c5340668281eedf325543aaeebc3db67ba1243 db94f17538b220e60ee30bd2313f0dc5642fb6143e6c8609bfcce075efef0520 +lib/codeql/rust/generated/ClosureExpr.qll 43d9ff09c156f1ce000c77bcf5ecc02c8fb569c0ca7f042a1aae9d311e18b13e 07e1461269e1f07144468ef7b64b927f29053fa6de71afef334732c33a797f33 lib/codeql/rust/generated/ConstBlockPat.qll 05141706ad963e1d9c41b004c73c9569fd0ba2f353da8c19629a153bfb17b769 786fa7db63ea7a8106162fd05e01b52c8338d22b9502d3638880bc6f6d678344 lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f @@ -164,8 +164,8 @@ lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a2879648 lib/codeql/rust/generated/ItemStmt.qll 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 7ac07a294031523ae83b1600a2327bab26c7ebda5c41f040485f9b978a50e159 lib/codeql/rust/generated/Label.qll 25121c47ad829d209bbd6b4388a8878b9ded1f25e5b9c0f992e88427b3eaecae 216e68ad49218a21466597afe2a6aec20982715642aca726235cb4075cbc1cb5 lib/codeql/rust/generated/LetExpr.qll 377099647451717af698677ca7119436982354d4e038a2097bffe8f34ac5686e 6bd51c497bcf2a684c1e6a2515e67228b0146b47a65e8d922cab54faf48b0d73 -lib/codeql/rust/generated/LetStmt.qll 5d347ca3dbc1b6801de1b339a7694cf6fb4e4b30731356321ccab865d5ab6599 506c4a9745d0e014c600d23a2eb7862a069902b1ebe79dc5bd346147e3a08bdb -lib/codeql/rust/generated/Literal.qll 66f362fb7e464f1d1350ce13465b029ae14673c84dd8ba7db1bc66083c3da4e7 66f362fb7e464f1d1350ce13465b029ae14673c84dd8ba7db1bc66083c3da4e7 +lib/codeql/rust/generated/LetStmt.qll fe3513e2ea6191deaee4a237adb97bf968ebf30503f95595da097efa18e871ea 67f80fb6c44d775d1bc97a0305a0bfaec57f652015d1e15a11785f57cb16bb24 +lib/codeql/rust/generated/LiteralExpr.qll 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 70684629cd017f32c220993f57ee4ebea0b9f6267fb61200e97a14a026a8b0e1 lib/codeql/rust/generated/LiteralPat.qll 6cb250e374f6c3d2c86aaea6ad7baeaa40ee438b42ac6987d823edb91b757d4c f8cf9ef6bb6cd39d65c6eb905f11f79c65daf3d493e1240c0781be29c3fe9202 lib/codeql/rust/generated/Locatable.qll 2d2b9a7cf26d6134b1e4a2047dfe99f09deb9231a05047d37b697c11ea91d0d2 dae7e0c66024d7f03a58d71ffef93cf23aeb629d7a21d36901c443fb29ff4d3d lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c @@ -175,18 +175,18 @@ lib/codeql/rust/generated/MethodCallExpr.qll 187d28d3869f5b44cca8420948266e8370c lib/codeql/rust/generated/MissingExpr.qll 34cb27c927a62cc06b0fe26a085e2658abd5019e549c3e01b8273d99e9a9616f 34bf4cfbf3659b600b4aac121f7c2d6da0b00b61c3002f8fb1d554c11968c748 lib/codeql/rust/generated/MissingPat.qll 40fa87d446056c7263ef5843fb13fe60b644e169a65697be4ca0b5361a8267ee 40fa87d446056c7263ef5843fb13fe60b644e169a65697be4ca0b5361a8267ee lib/codeql/rust/generated/Module.qll c6007444c796654fb48fbe4a4596580f08feec2aac13932043062a170dd73f0b 0560c738dbee3937baf0f2ab661c8e4dacd69eb886635241b1ff90f2c0f4bd67 -lib/codeql/rust/generated/OffsetOfExpr.qll 5f2c1d2b5d63d2a86c02c8a20fede528403f8dd267f3026ddc420e128f53c73c d4a7eb9e533a943913aa3bdc6f57d89023a0a2075681b6aaa53d5c4dd7ad764b +lib/codeql/rust/generated/OffsetOfExpr.qll 03afe5637df806f4649fb2c67fdc4f048a2faab47f00e8320f85025d4a2fa933 4e5c0c98b0397f1388ac0c27ea415f594ebd591e980dd70590ed043856beb156 lib/codeql/rust/generated/OrPat.qll 52e637c652f8caf64d2388a1829159d187d3799384cc3318e07785f518ff0c4b 598a11d067519bb7bb279d8f8a3ea85a48ae99c2974182636c157ba111b9605e -lib/codeql/rust/generated/ParentChild.qll 8ab9e1929ef96817cee929c9c66b6d71bbfb3e5c5f9e44152850e0e9a1ebf29a bca5dd83c47ae5fb7b24e49cabec4d01a59213344b9578bad5d35880ba60a2ff +lib/codeql/rust/generated/ParentChild.qll 98033de64e7d2db6f3574e0220aad773d04170aed7bf2b97ed4d97278f5837c5 5d9cd7f051f89df726af0fad1ccf8e2a456def82418397155a33858c58962364 lib/codeql/rust/generated/Pat.qll b035e7866ea500232421ef9f79e7e60b90b9c27dbe47d25758548e94750d2965 adf701ad35559ea7d0284d6718ad507518778dc78100f48063e6a6bf3705c91f lib/codeql/rust/generated/Path.qll ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff ffd26e9e5e3878f374bc1163d6ccb47072cc1d3abd937d0206bf1a7c62c843ff -lib/codeql/rust/generated/PathExpr.qll 5a82e07a0c641fec4e8ce29656fa4e33f420b19b2556b418769f4d899a3dfae3 21920262735114d8304c3569f884828a390b95ca039afcc3e81c75d3f23df9ca +lib/codeql/rust/generated/PathExpr.qll c27d872e3351d92f8f105c6a4ae2f8f447209a4a139e00576986e641340d9e7d bb5bd1fed0d5caeac3c14d57ca8ee5d3ece8938aab753d488ff475bda8393229 lib/codeql/rust/generated/PathPat.qll 8aaa7fd5f3439ce567f4d6f729e3ba1e98ab24255070b7d4ba7bbde6506d97f5 10bd82ea0e846c96afa34cc6e467101a490a1191b4edc29a7154a6d93a467f1c lib/codeql/rust/generated/PrefixExpr.qll a3f6cc62e5a12acd253ea59cb6957fb7157aa709b888eed3cd974eb88e1346f3 830a5c729ed770df6247dff8adacce5dcf7f3a06649177ec9542e032cd4993ce lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 2e96aece5ff2300659c2729c7037f7334790456d86160dc1e16ae99545c6ed0d eae4f95f9eaacbc2319ee67556dcc164527d82a6eaa5af59f6efce9caf3cba3b -lib/codeql/rust/generated/Raw.qll 4b2faf8b23ff72bb606378893aa9235861e5f35cd69f4f49893e5832ac9fd454 b9144c583f9bd0cb6110d52e3ccc6d5559de735e5d0a0075e8a4ad8ca8f48848 +lib/codeql/rust/generated/Raw.qll 358a5b315ed73e67446de7d4c32a6430832fa7cbf62f2be3ee0100c494ff3764 6b9628a5e9a8d6d953f87d332520652654292932225abc4d60c6a1dba1cd369c lib/codeql/rust/generated/RecordExpr.qll bdafc10cde139617b67cb46bb205f99bc3fc0b9fd8634d304b81b524b9592aa8 2826c453c72416237467b08cf9ad9421b03203a8593420146dad8e1e71711b8a lib/codeql/rust/generated/RecordExprField.qll eb06236fbdb856169dfe50ae1ebf59384222de6670ca91c34eed647823dda4ce 750bc7ab1e156db3927d6dd206e9d2c9388519425c0e8665afd322a6594aa5e2 lib/codeql/rust/generated/RecordPat.qll 20b62cfd4ee4e911ad4a2b8e5762da2abb7ff0c1d7f21cc6f72b1ebcbebbcd42 c0502e6bfc637058524cf7369c63396ca5440c58e5e91600fecd35ca5299d86c @@ -197,12 +197,12 @@ lib/codeql/rust/generated/RepeatExpr.qll 5a33101a5e2ba973beafe0d933ad5ca238050eb lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll 73dce5e310068357eb41e8c51923ff5c4054548db27987cde85735ddf071fc44 67fa0c285c110f18446689d1eaad9e82896df79d62999ad3f788fc295fa1d2c3 lib/codeql/rust/generated/Stmt.qll 58b010f32956f2736a7b9ebb43467ecd03308a1f27c99e2b09bb925c349ac859 9859da4a4aa29b4f7ab47313b2dfe8baf9717a162fcd8bd62a7cbab4afd1886e -lib/codeql/rust/generated/Synth.qll c47c641625abd6c964dd75d35e4906292ec015458dc6294018f7db75b2891987 1e54a00ef3e83299e36c9ff6cefcae8258c3ca9b5e7440f576f837920ce69c09 -lib/codeql/rust/generated/SynthConstructors.qll 38a59a0baffdf538c363f80680e6647e0096a78dda515054a031959856975752 38a59a0baffdf538c363f80680e6647e0096a78dda515054a031959856975752 +lib/codeql/rust/generated/Synth.qll 69415291e37195836bcc6810cccfdbacad4e1528bb125e26d2cc6b53daf1666b 6c79ab425ea2e132a2bc0eeea4f9f62cf3e259e911deb0c02c9fbdd56957e291 +lib/codeql/rust/generated/SynthConstructors.qll ff41f7bac5ae52e0eb4db378ddd389d65209d927046743852071650b86b4066a ff41f7bac5ae52e0eb4db378ddd389d65209d927046743852071650b86b4066a lib/codeql/rust/generated/TupleExpr.qll 0828181e2f1f1f233598eab367688615356f6b91451a40f8d812d247d93467fc 2473c52d3dfbec6c8cd66bd439c85959e854f617edf5afe545252a24304f2f2e lib/codeql/rust/generated/TuplePat.qll a1b22c20ca02497e9be8c6edaeaff214a669ecb0d2493890e79c28c485f512a1 5cc082ea99de61662b2d4c8b59f7a833236e7e448943e8ee894ab6066cc761c4 lib/codeql/rust/generated/TupleStructPat.qll 089563349c9866f5703e9d306ba2a475d7d4002e7236dbbf2feeb89290b4d24c a77842d7262a7d19b175f239d1ee6550b3b66a4efe903c5112bb82c0abd7b05d -lib/codeql/rust/generated/Type.qll abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f abe5ef4f20ca98dfc300fdae2ecbf37faf70381feab4e2df4f2b39b193a4cc5f +lib/codeql/rust/generated/TypeRef.qll 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 62cda2a3bd01a8c8356f11e5deb38ead4a8af630df27d88b8f60b5458d263527 lib/codeql/rust/generated/UnderscoreExpr.qll 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f 964b77ddae265ad51fd03fcb7ef008fcb34eb5ea1a7ac0cd06ed84c1922fc07f lib/codeql/rust/generated/Unimplemented.qll bcf63c2be3e0f7b88704a76ed182616101cd4b317f539ef5a65e5a4b87fb6b39 0e3e0ba85e03f327334b752c1dd1aa82b71bf1601725fcc071d93a29e40e1188 lib/codeql/rust/generated/UnimplementedDeclaration.qll a6eb4e61be018288304be010e063b68039a97f2cfe19e7049d3d54c65c88e9ab 662da5c38f5907d1f0f9990caca2114bf5e3b179591104dde777ae67262815df @@ -216,8 +216,8 @@ test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql de0 test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql 75f59d680d0f559dfc586306af2748c59c15789514a4ebca9f908ccc1fd63674 1a9f952485846fb93fc0afeabeb07845fa5c026520a0542302f971cb6b4d8e3e test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql bd2a401989b0f452b448fadd8d456dac9c46ca5ffe3775e5ac46e755782a4f20 c1922cdd6995a9c63eb841abf09f575bc78ec0be222062034b89ff63649a875e test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 5661cb0d7b2285af31207232de2b685e851e4d70224cb16045bc0221c107de43 1fd41642343791d9b69e0c633ea3318c0a855f51f50062cb58225820a7540d50 -test/extractor-tests/generated/BinExpr/BinExpr.ql bb749e937074759573200bbb343398b6f4ecabb35fb3b35f8adcddadb0266c21 5e0b4d8d200ec43345775da8daa173ef79934d0e8259174823ba019fbc36db7d -test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql b50642b0c85f18bc96ef26f13251a3a34ef5bde2007092194324023c447446b2 8cfeba7f4bb76db88db4c4524f1840905f8c77a97212110dface353cfd6e2a11 +test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 3db360cb56d154f060175aceb5d14b14f51855b6b28ef3d67fb76b20ad239c01 4f4ff1915cc7f705d1ab5d6e507b28989f7ea19a7f76fc5ae6fb9dc11b31fcda +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.ql 44e0664654d91130933e9c17909dc780866dc6e63b241079751f0356b8951ab9 97032408c8efea44a635b487365ada5d0564ec34c9d79901b6bc64c43a4962a6 test/extractor-tests/generated/BlockExpr/BlockExpr.ql fd1bc52af4bad96423cb86b1eed02595e139e533f48533299e32b7b45360b47f 021b58c6e6cad40cc0707d0a78fd8c4ddbc529422d3bb9ac62c490b2abc1bb00 test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b02c87bba8bdbeffab05632133a17d36b355624d7521083cc6c0b02f88b2ba46 91141e01393ec04f4bb1f86373f5f25c837b13865ab540419050e6c547cc2690 test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql 4de30a1e3c9de174688b8f9af57f72dfa6d9a2e3b3ab1b972ee69342ebd7ecad a6948240014d27fa9af7f56859cff2f8f7b44097f0bc47fbbb91b5be35e11d91 @@ -229,7 +229,7 @@ test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql dd9b5ac06b3677eea0 test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql e338d2582b191d4ae1640504262d5a0d5ed23ddf850b5adfffb679a057f55e5e f57e618dac8c79d70e520d1508e70032662db8e4fc43b319365e195efcbdc847 test/extractor-tests/generated/CallExpr/CallExpr.ql 2b91a02ad6f2ba6e200b2797dabda4dbcea08c7c2836d0a1be4bf47a7e7d786c 6830905e8993836f258c84b557f0f044dd5ebb32dad8d74089a903ca0d820eb5 test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 0c7e6eb1bab788050c51ae36b954925c48618c5d6fb3129522eada6d911288be 251ae5a7119a2cfe427650c38e7df5d3c0a1711aa7a2ced21f5022798a5088d0 -test/extractor-tests/generated/CastExpr/CastExpr.ql 302ed396ea5889cfb7d36d307055cb81965534c55ea00a8dcc2a4949de1f230b a32fd4ef4f6d0410a8d57a150d5bec8bc0df9aaf8fbab74d17b52a0665e7c488 +test/extractor-tests/generated/CastExpr/CastExpr.ql 6028e49e8788d424ac83f7e70aca394c72834789d61517a26b9d6901f40ef734 a3fe7712c8d97fee8aa7505c3a2be03f296f8032207a24dd44f6dd91a463a068 test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 75fd05fb47e90426745d6c8ffff35cbcba3fb0792317155d0a139b7a4b87dd14 865a776a3312ef5e93a9a857a6ad7d66233e58547c4fa3ce924dbb320a324e2c test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArg.ql 48fb8656a350ba16cc3cd291692b542dca137587ee971999c439700c74e6dcba 5ff21525959142237ee1a32c9feacf331083fb40502df6ddf78dfb8d93caed66 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.ql 34f8b8fc82e0c798f3cddc7ad1bb80a361c95da9d8a768fb787d6ffc3be1c755 9c14ee19cf74f516d201b8be72fe3496e425cfd42db223fb537cc92515e2b021 @@ -255,7 +255,7 @@ test/extractor-tests/generated/LetStmt/LetStmt.ql 842f58d8d744a567c44bf3742e4a91 test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql 88bd37786d0a738d2cb0c861a2411236d9dce09b98ff050b5f03b0888ed2f521 622d96d1e99fd174c284b7a3f05eddf30faf667cddff2eb942e01128488b398d test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6e9a36a2a226ea0df1f01886bbd4e14997eb91f5b9422e37ce4985fd15a80622 ffbc3d9278e10aa78304cbc8876d96fe678a1d2f52ad170f651f842d1787156b test/extractor-tests/generated/LetStmt/LetStmt_getType.ql 3326644b606a846afbd2eaf8ed4223eadb0061e23e953d085d2a3df0935ef534 c414e5a1f927779249a26c370ba07c82c99d489cb65f984003674b288a690109 -test/extractor-tests/generated/Literal/Literal.ql fac18e7ec3d9a78223be0de6f318eb93e9986fd7cb353a68fa853c96db4bd0b9 048ad873316f227ea289533d2bb6f4bafab4625f270b109e29dde28b0c3828e6 +test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql 9fb9c6336d1e3a657d988ffb53a43ce66b8403e46bea05d73d546ae774a647bc 708e2878eca3e9661e8b0d54180b4a6f512d9233178e9ad5683a1f72fa9656aa test/extractor-tests/generated/LiteralPat/LiteralPat.ql b7636712d6a5e0b76c0195444514284b9d81ea948d42f19e683e134fe61f8a9a 9836c86f457b967ee9f5dd06f3c3206131d41bc838df60b5bd0ee8369a9a88fc test/extractor-tests/generated/LoopExpr/LoopExpr.ql 58dabe29df959b265fa568cdde1b589d65ca8649c8aae0f30079565c1106ad72 929fd3c5c4f01f47f926c49f1a519d415063ff23d5e1fb2f2e8f72bb5aa7fdd6 test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 1febfb8cff9b4f7ba1a658a2832238d2355f0f609778af33a3877e977aaf1805 6b9c008b041beb1c0a7e249b7f4a1bd5cea0885f82543a8909a23a7068f1f837 @@ -270,7 +270,7 @@ test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd9 test/extractor-tests/generated/MissingPat/MissingPat.ql 7a9ee46a40f6bfd31336beb6d9f6256fb8099cb6c052ba3131a95a45716224a4 619375e7dc6d95b8f1d1c958217350fc1553882f0f41ebd9f7a071d6947232d8 test/extractor-tests/generated/Module/Module.ql 0afd07f619ee68a7f7270ebf9a4a6b7d6849448924083369c4101650854e1e77 b3239a1ebdde858179f4eba19e6c0cb3ea28b823f423fdff90f7b870b7fbf003 test/extractor-tests/generated/Module/Module_getDeclaration.ql 8343f2b4be470a502c4bfdba9ef74173a440f45b7300aa9d517c2bd68ccac36a fc7666228fd1d3fe4fc63466aa04ee8adf62e9fe0008fd92ea337c8585a7fef5 -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql cff3a4a196eeee98e812ae7c8bbab4a381cc3f0462566b699fd7011e84925476 60c002bb0686b853e72b12f092433ab6f5ada0f556629e0711ce8b23b260fa89 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 579e667797cb071784fa4c8e4e79bffd8b7a797bc70a68054ab51950dbebf4f0 dd92801d8909d83be1f824a2dfc599551c11b63ad1e96593e22d3b43464d7cf1 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql f18b39caeb2d9410cd1c4b472c31477da8dcff27ad43837e57c679a8eda0ca76 bb30037b5001d78585df9d23d9c4c73d1f864bb8b3778f402838f18acacfadc6 test/extractor-tests/generated/OrPat/OrPat.ql 51d9a0f5993510542a2cca353c1ca48ba1e5fb97a65bee7f02398cd90debaa41 06e0936b80a07a16e22fad3a3a541000f170fd5ad301a3170b98a91f51d09144 test/extractor-tests/generated/OrPat/OrPat_getArg.ql 693d62aa9817ce7661b4698c2948bca6567c1376b2ae832f3020462e8ab8d2ee 1fd9809826c6f2dece3014299f1d70210c9f23e5eefbd04b1d6024e1ecd46209 @@ -311,7 +311,7 @@ test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 2d14109d39c7519a test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql f308a61384af5feebc58028a95d26499b6a666c7599b30aed33efbaca86c06b2 f298af5a861410281dee6cf22d3ceaa286a5be4d27968750321f2d016c34a0dd test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql 47e84e7db2d1cc23aca4c28b5bba2826eeeaba07377eb8c8de5141bcb9c36ab8 a5c1d23e2521c38b12c0942c88403bea5a0d77a4763f273ffdf48eaa000a00ff test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 5f19a261ade6e3249029d7268cc0385092234a896e72ccdf8376a592be1d545e bb4fefecefaa2d9634f31026e5ec8bff561bacf55a4105727032bab08fdbdea3 -test/extractor-tests/generated/Type/Type.ql e4e62ad1209870ec39455fbcf3b2e6fcb8c46e7b6fed9b9054cc4a7c0999529d 42ee022e1811b81fb3912fef9f6b55b15fc2ed99f3e48d2a8ca9375c7c6d71bd +test/extractor-tests/generated/TypeRef/TypeRef.ql 73283955206c7e1ef71009969826e34c7f37624547c2ef39c80a23583cb37216 fedf7995b69805ce7ccc4e29aa592043cff2f7ac6730a70d27ed883d922b4684 test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 54cc3f7e6e9b9ac58922842dcd1960250e8bbb7ede5a63134ae622abc447be1e 1d5558d4ec9e4a1a510f37206772af3bf41015a99f1e9b83cc530db496dc2a5f test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql a743dbb15736b809e30769e1ea136afc9f0226885139150d6d1a5d353b6cb6fb 09849f178208406742007009da7f9b359b814477190d9d95370b94378e60be17 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index b76572ffc8d0..753ae9b6790d 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -10,8 +10,8 @@ /lib/codeql/rust/elements/AwaitExprConstructor.qll linguist-generated /lib/codeql/rust/elements/BecomeExpr.qll linguist-generated /lib/codeql/rust/elements/BecomeExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/BinExpr.qll linguist-generated -/lib/codeql/rust/elements/BinExprConstructor.qll linguist-generated +/lib/codeql/rust/elements/BinaryExpr.qll linguist-generated +/lib/codeql/rust/elements/BinaryExprConstructor.qll linguist-generated /lib/codeql/rust/elements/BlockExpr.qll linguist-generated /lib/codeql/rust/elements/BlockExprBase.qll linguist-generated /lib/codeql/rust/elements/BlockExprConstructor.qll linguist-generated @@ -58,8 +58,8 @@ /lib/codeql/rust/elements/LetExprConstructor.qll linguist-generated /lib/codeql/rust/elements/LetStmt.qll linguist-generated /lib/codeql/rust/elements/LetStmtConstructor.qll linguist-generated -/lib/codeql/rust/elements/Literal.qll linguist-generated -/lib/codeql/rust/elements/LiteralConstructor.qll linguist-generated +/lib/codeql/rust/elements/LiteralExpr.qll linguist-generated +/lib/codeql/rust/elements/LiteralExprConstructor.qll linguist-generated /lib/codeql/rust/elements/LiteralPat.qll linguist-generated /lib/codeql/rust/elements/LiteralPatConstructor.qll linguist-generated /lib/codeql/rust/elements/LoopExpr.qll linguist-generated @@ -118,8 +118,8 @@ /lib/codeql/rust/elements/TuplePatConstructor.qll linguist-generated /lib/codeql/rust/elements/TupleStructPat.qll linguist-generated /lib/codeql/rust/elements/TupleStructPatConstructor.qll linguist-generated -/lib/codeql/rust/elements/Type.qll linguist-generated -/lib/codeql/rust/elements/TypeConstructor.qll linguist-generated +/lib/codeql/rust/elements/TypeRef.qll linguist-generated +/lib/codeql/rust/elements/TypeRefConstructor.qll linguist-generated /lib/codeql/rust/elements/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/elements/UnderscoreExprConstructor.qll linguist-generated /lib/codeql/rust/elements/Unimplemented.qll linguist-generated @@ -140,7 +140,7 @@ /lib/codeql/rust/generated/AsyncBlockExpr.qll linguist-generated /lib/codeql/rust/generated/AwaitExpr.qll linguist-generated /lib/codeql/rust/generated/BecomeExpr.qll linguist-generated -/lib/codeql/rust/generated/BinExpr.qll linguist-generated +/lib/codeql/rust/generated/BinaryExpr.qll linguist-generated /lib/codeql/rust/generated/BlockExpr.qll linguist-generated /lib/codeql/rust/generated/BlockExprBase.qll linguist-generated /lib/codeql/rust/generated/BoxExpr.qll linguist-generated @@ -167,7 +167,7 @@ /lib/codeql/rust/generated/Label.qll linguist-generated /lib/codeql/rust/generated/LetExpr.qll linguist-generated /lib/codeql/rust/generated/LetStmt.qll linguist-generated -/lib/codeql/rust/generated/Literal.qll linguist-generated +/lib/codeql/rust/generated/LiteralExpr.qll linguist-generated /lib/codeql/rust/generated/LiteralPat.qll linguist-generated /lib/codeql/rust/generated/Locatable.qll linguist-generated /lib/codeql/rust/generated/LoopExpr.qll linguist-generated @@ -204,7 +204,7 @@ /lib/codeql/rust/generated/TupleExpr.qll linguist-generated /lib/codeql/rust/generated/TuplePat.qll linguist-generated /lib/codeql/rust/generated/TupleStructPat.qll linguist-generated -/lib/codeql/rust/generated/Type.qll linguist-generated +/lib/codeql/rust/generated/TypeRef.qll linguist-generated /lib/codeql/rust/generated/UnderscoreExpr.qll linguist-generated /lib/codeql/rust/generated/Unimplemented.qll linguist-generated /lib/codeql/rust/generated/UnimplementedDeclaration.qll linguist-generated @@ -218,8 +218,8 @@ /test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated -/test/extractor-tests/generated/BinExpr/BinExpr.ql linguist-generated -/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql linguist-generated @@ -257,7 +257,7 @@ /test/extractor-tests/generated/LetStmt/LetStmt_getElse.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getType.ql linguist-generated -/test/extractor-tests/generated/Literal/Literal.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated /test/extractor-tests/generated/LiteralPat/LiteralPat.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated @@ -313,7 +313,7 @@ /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getArg.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getEllipsisIndex.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated -/test/extractor-tests/generated/Type/Type.ql linguist-generated +/test/extractor-tests/generated/TypeRef/TypeRef.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated /test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements.qll b/rust/ql/lib/codeql/rust/elements.qll index ad9f32080ebd..64342d92af2c 100644 --- a/rust/ql/lib/codeql/rust/elements.qll +++ b/rust/ql/lib/codeql/rust/elements.qll @@ -9,7 +9,7 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.AsyncBlockExpr import codeql.rust.elements.AwaitExpr import codeql.rust.elements.BecomeExpr -import codeql.rust.elements.BinExpr +import codeql.rust.elements.BinaryExpr import codeql.rust.elements.BlockExpr import codeql.rust.elements.BlockExprBase import codeql.rust.elements.BoxExpr @@ -36,7 +36,7 @@ import codeql.rust.elements.ItemStmt import codeql.rust.elements.Label import codeql.rust.elements.LetExpr import codeql.rust.elements.LetStmt -import codeql.rust.elements.Literal +import codeql.rust.elements.LiteralExpr import codeql.rust.elements.LiteralPat import codeql.rust.elements.Locatable import codeql.rust.elements.LoopExpr @@ -68,7 +68,7 @@ import codeql.rust.elements.Stmt import codeql.rust.elements.TupleExpr import codeql.rust.elements.TuplePat import codeql.rust.elements.TupleStructPat -import codeql.rust.elements.Type +import codeql.rust.elements.TypeRef import codeql.rust.elements.UnderscoreExpr import codeql.rust.elements.Unimplemented import codeql.rust.elements.UnimplementedDeclaration diff --git a/rust/ql/lib/codeql/rust/elements/BinExpr.qll b/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll similarity index 68% rename from rust/ql/lib/codeql/rust/elements/BinExpr.qll rename to rust/ql/lib/codeql/rust/elements/BinaryExpr.qll index 31f35c13da22..b2d251d79208 100644 --- a/rust/ql/lib/codeql/rust/elements/BinExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BinaryExpr.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `BinExpr`. + * This module provides a hand-modifiable wrapper around the generated class `BinaryExpr`. */ -private import codeql.rust.generated.BinExpr +private import codeql.rust.generated.BinaryExpr /** * A binary operation expression. For example: @@ -15,4 +15,4 @@ private import codeql.rust.generated.BinExpr * x += y; * ``` */ -class BinExpr extends Generated::BinExpr { } +class BinaryExpr extends Generated::BinaryExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/TypeConstructor.qll b/rust/ql/lib/codeql/rust/elements/BinaryExprConstructor.qll similarity index 61% rename from rust/ql/lib/codeql/rust/elements/TypeConstructor.qll rename to rust/ql/lib/codeql/rust/elements/BinaryExprConstructor.qll index fa8f0c00c503..46c40c87be77 100644 --- a/rust/ql/lib/codeql/rust/elements/TypeConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/BinaryExprConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `Type` synthesized instances. + * `BinaryExpr` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `Type` synthesized instances. + * The characteristic predicate of `BinaryExpr` synthesized instances. * INTERNAL: Do not use. */ -predicate constructType(Raw::Type id) { any() } +predicate constructBinaryExpr(Raw::BinaryExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/Literal.qll b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll similarity index 70% rename from rust/ql/lib/codeql/rust/elements/Literal.qll rename to rust/ql/lib/codeql/rust/elements/LiteralExpr.qll index 7fd9d8c7ef41..bf892ed395cf 100644 --- a/rust/ql/lib/codeql/rust/elements/Literal.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralExpr.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `Literal`. + * This module provides a hand-modifiable wrapper around the generated class `LiteralExpr`. */ -private import codeql.rust.generated.Literal +private import codeql.rust.generated.LiteralExpr /** * A literal expression. For example: @@ -17,4 +17,4 @@ private import codeql.rust.generated.Literal * r"Hello, world!"; * true; */ -class Literal extends Generated::Literal { } +class LiteralExpr extends Generated::LiteralExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll b/rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll similarity index 61% rename from rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll rename to rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll index fb21ea5b9f6e..9363a2f628b9 100644 --- a/rust/ql/lib/codeql/rust/elements/LiteralConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/LiteralExprConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `Literal` synthesized instances. + * `LiteralExpr` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `Literal` synthesized instances. + * The characteristic predicate of `LiteralExpr` synthesized instances. * INTERNAL: Do not use. */ -predicate constructLiteral(Raw::Literal id) { any() } +predicate constructLiteralExpr(Raw::LiteralExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/PathExpr.qll b/rust/ql/lib/codeql/rust/elements/PathExpr.qll index cab08ea0014a..9919e62afac6 100644 --- a/rust/ql/lib/codeql/rust/elements/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PathExpr.qll @@ -11,7 +11,7 @@ private import codeql.rust.generated.PathExpr * let x = variable; * let x = foo::bar; * let y = ::foo; - * let z = ::foo; + * let z = ::foo; * ``` */ class PathExpr extends Generated::PathExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/Type.qll b/rust/ql/lib/codeql/rust/elements/TypeRef.qll similarity index 70% rename from rust/ql/lib/codeql/rust/elements/Type.qll rename to rust/ql/lib/codeql/rust/elements/TypeRef.qll index a2d0a08b3b14..296e3d4a40be 100644 --- a/rust/ql/lib/codeql/rust/elements/Type.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeRef.qll @@ -1,9 +1,9 @@ // generated by codegen, remove this comment if you wish to edit this file /** - * This module provides a hand-modifiable wrapper around the generated class `Type`. + * This module provides a hand-modifiable wrapper around the generated class `TypeRef`. */ -private import codeql.rust.generated.Type +private import codeql.rust.generated.TypeRef /** * The base class for type references. @@ -13,4 +13,4 @@ private import codeql.rust.generated.Type * let z: Option; * ``` */ -class Type extends Generated::Type { } +class TypeRef extends Generated::TypeRef { } diff --git a/rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll similarity index 64% rename from rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll rename to rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll index 4eb31bd7cb14..20b97fae70d2 100644 --- a/rust/ql/lib/codeql/rust/elements/BinExprConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/TypeRefConstructor.qll @@ -1,14 +1,14 @@ // generated by codegen, remove this comment if you wish to edit this file /** * This module defines the hook used internally to tweak the characteristic predicate of - * `BinExpr` synthesized instances. + * `TypeRef` synthesized instances. * INTERNAL: Do not use. */ private import codeql.rust.generated.Raw /** - * The characteristic predicate of `BinExpr` synthesized instances. + * The characteristic predicate of `TypeRef` synthesized instances. * INTERNAL: Do not use. */ -predicate constructBinExpr(Raw::BinExpr id) { any() } +predicate constructTypeRef(Raw::TypeRef id) { any() } diff --git a/rust/ql/lib/codeql/rust/generated/BinExpr.qll b/rust/ql/lib/codeql/rust/generated/BinExpr.qll deleted file mode 100644 index 37c8d69911ac..000000000000 --- a/rust/ql/lib/codeql/rust/generated/BinExpr.qll +++ /dev/null @@ -1,55 +0,0 @@ -// generated by codegen -/** - * This module provides the generated definition of `BinExpr`. - * INTERNAL: Do not import directly. - */ - -private import codeql.rust.generated.Synth -private import codeql.rust.generated.Raw -import codeql.rust.elements.Expr - -/** - * INTERNAL: This module contains the fully generated definition of `BinExpr` and should not - * be referenced directly. - */ -module Generated { - /** - * A binary operation expression. For example: - * ``` - * x + y; - * x && y; - * x <= y; - * x = y; - * x += y; - * ``` - * INTERNAL: Do not reference the `Generated::BinExpr` class directly. - * Use the subclass `BinExpr`, where the following predicates are available. - */ - class BinExpr extends Synth::TBinExpr, Expr { - override string getAPrimaryQlClass() { result = "BinExpr" } - - /** - * Gets the lhs of this bin expression. - */ - Expr getLhs() { - result = Synth::convertExprFromRaw(Synth::convertBinExprToRaw(this).(Raw::BinExpr).getLhs()) - } - - /** - * Gets the rhs of this bin expression. - */ - Expr getRhs() { - result = Synth::convertExprFromRaw(Synth::convertBinExprToRaw(this).(Raw::BinExpr).getRhs()) - } - - /** - * Gets the op of this bin expression, if it exists. - */ - string getOp() { result = Synth::convertBinExprToRaw(this).(Raw::BinExpr).getOp() } - - /** - * Holds if `getOp()` exists. - */ - final predicate hasOp() { exists(this.getOp()) } - } -} diff --git a/rust/ql/lib/codeql/rust/generated/BinaryExpr.qll b/rust/ql/lib/codeql/rust/generated/BinaryExpr.qll new file mode 100644 index 000000000000..1c9c331c4494 --- /dev/null +++ b/rust/ql/lib/codeql/rust/generated/BinaryExpr.qll @@ -0,0 +1,57 @@ +// generated by codegen +/** + * This module provides the generated definition of `BinaryExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.generated.Synth +private import codeql.rust.generated.Raw +import codeql.rust.elements.Expr + +/** + * INTERNAL: This module contains the fully generated definition of `BinaryExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + * INTERNAL: Do not reference the `Generated::BinaryExpr` class directly. + * Use the subclass `BinaryExpr`, where the following predicates are available. + */ + class BinaryExpr extends Synth::TBinaryExpr, Expr { + override string getAPrimaryQlClass() { result = "BinaryExpr" } + + /** + * Gets the lhs of this binary expression. + */ + Expr getLhs() { + result = + Synth::convertExprFromRaw(Synth::convertBinaryExprToRaw(this).(Raw::BinaryExpr).getLhs()) + } + + /** + * Gets the rhs of this binary expression. + */ + Expr getRhs() { + result = + Synth::convertExprFromRaw(Synth::convertBinaryExprToRaw(this).(Raw::BinaryExpr).getRhs()) + } + + /** + * Gets the op of this binary expression, if it exists. + */ + string getOp() { result = Synth::convertBinaryExprToRaw(this).(Raw::BinaryExpr).getOp() } + + /** + * Holds if `getOp()` exists. + */ + final predicate hasOp() { exists(this.getOp()) } + } +} diff --git a/rust/ql/lib/codeql/rust/generated/CastExpr.qll b/rust/ql/lib/codeql/rust/generated/CastExpr.qll index a7669a824fd1..01f880f106cc 100644 --- a/rust/ql/lib/codeql/rust/generated/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CastExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.Type +import codeql.rust.elements.TypeRef /** * INTERNAL: This module contains the fully generated definition of `CastExpr` and should not @@ -36,9 +36,9 @@ module Generated { /** * Gets the type of this cast expression. */ - Type getType() { + TypeRef getType() { result = - Synth::convertTypeFromRaw(Synth::convertCastExprToRaw(this).(Raw::CastExpr).getType()) + Synth::convertTypeRefFromRaw(Synth::convertCastExprToRaw(this).(Raw::CastExpr).getType()) } } } diff --git a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll index 97e9530a27bc..822fbdcc6772 100644 --- a/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ClosureExpr.qll @@ -8,7 +8,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr import codeql.rust.elements.Pat -import codeql.rust.elements.Type +import codeql.rust.elements.TypeRef /** * INTERNAL: This module contains the fully generated definition of `ClosureExpr` and should not @@ -55,9 +55,9 @@ module Generated { /** * Gets the `index`th argument type of this closure expression (0-based), if it exists. */ - Type getArgType(int index) { + TypeRef getArgType(int index) { result = - Synth::convertTypeFromRaw(Synth::convertClosureExprToRaw(this) + Synth::convertTypeRefFromRaw(Synth::convertClosureExprToRaw(this) .(Raw::ClosureExpr) .getArgType(index)) } @@ -70,14 +70,14 @@ module Generated { /** * Gets any of the argument types of this closure expression. */ - final Type getAnArgType() { result = this.getArgType(_) } + final TypeRef getAnArgType() { result = this.getArgType(_) } /** * Gets the ret type of this closure expression, if it exists. */ - Type getRetType() { + TypeRef getRetType() { result = - Synth::convertTypeFromRaw(Synth::convertClosureExprToRaw(this) + Synth::convertTypeRefFromRaw(Synth::convertClosureExprToRaw(this) .(Raw::ClosureExpr) .getRetType()) } diff --git a/rust/ql/lib/codeql/rust/generated/LetStmt.qll b/rust/ql/lib/codeql/rust/generated/LetStmt.qll index 1bae00962a90..d4d70aff0fb9 100644 --- a/rust/ql/lib/codeql/rust/generated/LetStmt.qll +++ b/rust/ql/lib/codeql/rust/generated/LetStmt.qll @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Expr import codeql.rust.elements.Pat import codeql.rust.elements.Stmt -import codeql.rust.elements.Type +import codeql.rust.elements.TypeRef /** * INTERNAL: This module contains the fully generated definition of `LetStmt` and should not @@ -43,8 +43,9 @@ module Generated { /** * Gets the type of this let statement, if it exists. */ - Type getType() { - result = Synth::convertTypeFromRaw(Synth::convertLetStmtToRaw(this).(Raw::LetStmt).getType()) + TypeRef getType() { + result = + Synth::convertTypeRefFromRaw(Synth::convertLetStmtToRaw(this).(Raw::LetStmt).getType()) } /** diff --git a/rust/ql/lib/codeql/rust/generated/Literal.qll b/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll similarity index 56% rename from rust/ql/lib/codeql/rust/generated/Literal.qll rename to rust/ql/lib/codeql/rust/generated/LiteralExpr.qll index 825ab6024075..7c9ee19e3217 100644 --- a/rust/ql/lib/codeql/rust/generated/Literal.qll +++ b/rust/ql/lib/codeql/rust/generated/LiteralExpr.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `Literal`. + * This module provides the generated definition of `LiteralExpr`. * INTERNAL: Do not import directly. */ @@ -9,7 +9,7 @@ private import codeql.rust.generated.Raw import codeql.rust.elements.Expr /** - * INTERNAL: This module contains the fully generated definition of `Literal` and should not + * INTERNAL: This module contains the fully generated definition of `LiteralExpr` and should not * be referenced directly. */ module Generated { @@ -24,10 +24,10 @@ module Generated { * b'x'; * r"Hello, world!"; * true; - * INTERNAL: Do not reference the `Generated::Literal` class directly. - * Use the subclass `Literal`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::LiteralExpr` class directly. + * Use the subclass `LiteralExpr`, where the following predicates are available. */ - class Literal extends Synth::TLiteral, Expr { - override string getAPrimaryQlClass() { result = "Literal" } + class LiteralExpr extends Synth::TLiteralExpr, Expr { + override string getAPrimaryQlClass() { result = "LiteralExpr" } } } diff --git a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll index a151c19e5507..109a63775e66 100644 --- a/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/OffsetOfExpr.qll @@ -7,7 +7,7 @@ private import codeql.rust.generated.Synth private import codeql.rust.generated.Raw import codeql.rust.elements.Expr -import codeql.rust.elements.Type +import codeql.rust.elements.TypeRef /** * INTERNAL: This module contains the fully generated definition of `OffsetOfExpr` and should not @@ -28,9 +28,9 @@ module Generated { /** * Gets the container of this offset of expression. */ - Type getContainer() { + TypeRef getContainer() { result = - Synth::convertTypeFromRaw(Synth::convertOffsetOfExprToRaw(this) + Synth::convertTypeRefFromRaw(Synth::convertOffsetOfExprToRaw(this) .(Raw::OffsetOfExpr) .getContainer()) } diff --git a/rust/ql/lib/codeql/rust/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/generated/ParentChild.qll index f7c00daf5631..f2bc4668f794 100644 --- a/rust/ql/lib/codeql/rust/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/generated/ParentChild.qll @@ -212,7 +212,7 @@ private module Impl { ) } - private Element getImmediateChildOfType(Type e, int index, string partialPredicateCall) { + private Element getImmediateChildOfTypeRef(TypeRef e, int index, string partialPredicateCall) { exists(int b, int bAstNode, int bUnimplemented, int n | b = 0 and bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and @@ -290,7 +290,7 @@ private module Impl { ) } - private Element getImmediateChildOfBinExpr(BinExpr e, int index, string partialPredicateCall) { + private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index, string partialPredicateCall) { exists(int b, int bExpr, int n, int nLhs, int nRhs | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and @@ -665,7 +665,9 @@ private module Impl { ) } - private Element getImmediateChildOfLiteral(Literal e, int index, string partialPredicateCall) { + private Element getImmediateChildOfLiteralExpr( + LiteralExpr e, int index, string partialPredicateCall + ) { exists(int b, int bExpr, int n | b = 0 and bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and @@ -1284,7 +1286,7 @@ private module Impl { or result = getImmediateChildOfRecordPatField(e, index, partialAccessor) or - result = getImmediateChildOfType(e, index, partialAccessor) + result = getImmediateChildOfTypeRef(e, index, partialAccessor) or result = getImmediateChildOfAsmExpr(e, index, partialAccessor) or @@ -1292,7 +1294,7 @@ private module Impl { or result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) or - result = getImmediateChildOfBinExpr(e, index, partialAccessor) + result = getImmediateChildOfBinaryExpr(e, index, partialAccessor) or result = getImmediateChildOfBoxExpr(e, index, partialAccessor) or @@ -1330,7 +1332,7 @@ private module Impl { or result = getImmediateChildOfLetStmt(e, index, partialAccessor) or - result = getImmediateChildOfLiteral(e, index, partialAccessor) + result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) or result = getImmediateChildOfLiteralPat(e, index, partialAccessor) or diff --git a/rust/ql/lib/codeql/rust/generated/PathExpr.qll b/rust/ql/lib/codeql/rust/generated/PathExpr.qll index 577ed92cf1e3..6002e6b42dea 100644 --- a/rust/ql/lib/codeql/rust/generated/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/PathExpr.qll @@ -20,7 +20,7 @@ module Generated { * let x = variable; * let x = foo::bar; * let y = ::foo; - * let z = ::foo; + * let z = ::foo; * ``` * INTERNAL: Do not reference the `Generated::PathExpr` class directly. * Use the subclass `PathExpr`, where the following predicates are available. diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index 3a415dd25a91..7bd0d5058f57 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -177,8 +177,8 @@ module Raw { * let z: Option; * ``` */ - class Type extends @type, AstNode, Unimplemented { - override string toString() { result = "Type" } + class TypeRef extends @type_ref, AstNode, Unimplemented { + override string toString() { result = "TypeRef" } } /** @@ -260,23 +260,23 @@ module Raw { * x += y; * ``` */ - class BinExpr extends @bin_expr, Expr { - override string toString() { result = "BinExpr" } + class BinaryExpr extends @binary_expr, Expr { + override string toString() { result = "BinaryExpr" } /** - * Gets the lhs of this bin expression. + * Gets the lhs of this binary expression. */ - Expr getLhs() { bin_exprs(this, result, _) } + Expr getLhs() { binary_exprs(this, result, _) } /** - * Gets the rhs of this bin expression. + * Gets the rhs of this binary expression. */ - Expr getRhs() { bin_exprs(this, _, result) } + Expr getRhs() { binary_exprs(this, _, result) } /** - * Gets the op of this bin expression, if it exists. + * Gets the op of this binary expression, if it exists. */ - string getOp() { bin_expr_ops(this, result) } + string getOp() { binary_expr_ops(this, result) } } /** @@ -408,7 +408,7 @@ module Raw { /** * Gets the type of this cast expression. */ - Type getType() { cast_exprs(this, _, result) } + TypeRef getType() { cast_exprs(this, _, result) } } /** @@ -435,12 +435,12 @@ module Raw { /** * Gets the `index`th argument type of this closure expression (0-based), if it exists. */ - Type getArgType(int index) { closure_expr_arg_types(this, index, result) } + TypeRef getArgType(int index) { closure_expr_arg_types(this, index, result) } /** * Gets the ret type of this closure expression, if it exists. */ - Type getRetType() { closure_expr_ret_types(this, result) } + TypeRef getRetType() { closure_expr_ret_types(this, result) } /** * Gets the body of this closure expression. @@ -746,7 +746,7 @@ module Raw { /** * Gets the type of this let statement, if it exists. */ - Type getType() { let_stmt_types(this, result) } + TypeRef getType() { let_stmt_types(this, result) } /** * Gets the initializer of this let statement, if it exists. @@ -772,8 +772,8 @@ module Raw { * r"Hello, world!"; * true; */ - class Literal extends @literal, Expr { - override string toString() { result = "Literal" } + class LiteralExpr extends @literal_expr, Expr { + override string toString() { result = "LiteralExpr" } } /** @@ -954,7 +954,7 @@ module Raw { /** * Gets the container of this offset of expression. */ - Type getContainer() { offset_of_exprs(this, result) } + TypeRef getContainer() { offset_of_exprs(this, result) } /** * Gets the `index`th field of this offset of expression (0-based). @@ -987,7 +987,7 @@ module Raw { * let x = variable; * let x = foo::bar; * let y = ::foo; - * let z = ::foo; + * let z = ::foo; * ``` */ class PathExpr extends @path_expr, Expr { diff --git a/rust/ql/lib/codeql/rust/generated/Synth.qll b/rust/ql/lib/codeql/rust/generated/Synth.qll index fa01cb96cba1..d3599fc21461 100644 --- a/rust/ql/lib/codeql/rust/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/generated/Synth.qll @@ -34,7 +34,7 @@ module Synth { /** * INTERNAL: Do not use. */ - TBinExpr(Raw::BinExpr id) { constructBinExpr(id) } or + TBinaryExpr(Raw::BinaryExpr id) { constructBinaryExpr(id) } or /** * INTERNAL: Do not use. */ @@ -126,7 +126,7 @@ module Synth { /** * INTERNAL: Do not use. */ - TLiteral(Raw::Literal id) { constructLiteral(id) } or + TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } or /** * INTERNAL: Do not use. */ @@ -242,7 +242,7 @@ module Synth { /** * INTERNAL: Do not use. */ - TType(Raw::Type id) { constructType(id) } or + TTypeRef(Raw::TypeRef id) { constructTypeRef(id) } or /** * INTERNAL: Do not use. */ @@ -280,7 +280,7 @@ module Synth { */ class TAstNode = TDeclaration or TExpr or TGenericArgList or TLabel or TMatchArm or TPat or TPath or - TRecordExprField or TRecordPatField or TStmt or TType; + TRecordExprField or TRecordPatField or TStmt or TTypeRef; /** * INTERNAL: Do not use. @@ -296,12 +296,12 @@ module Synth { * INTERNAL: Do not use. */ class TExpr = - TArrayExpr or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinExpr or TBlockExprBase or TBoxExpr or - TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TConstExpr or TContinueExpr or - TFieldExpr or TIfExpr or TIndexExpr or TLetExpr or TLiteral or TLoopExpr or TMatchExpr or - TMethodCallExpr or TMissingExpr or TOffsetOfExpr or TPathExpr or TPrefixExpr or - TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or TTupleExpr or TUnderscoreExpr or - TYeetExpr or TYieldExpr; + TArrayExpr or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or TBlockExprBase or + TBoxExpr or TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TConstExpr or + TContinueExpr or TFieldExpr or TIfExpr or TIndexExpr or TLetExpr or TLiteralExpr or + TLoopExpr or TMatchExpr or TMethodCallExpr or TMissingExpr or TOffsetOfExpr or TPathExpr or + TPrefixExpr or TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or TTupleExpr or + TUnderscoreExpr or TYeetExpr or TYieldExpr; /** * INTERNAL: Do not use. @@ -324,7 +324,7 @@ module Synth { /** * INTERNAL: Do not use. */ - class TUnimplemented = TGenericArgList or TPath or TType or TUnimplementedDeclaration; + class TUnimplemented = TGenericArgList or TPath or TTypeRef or TUnimplementedDeclaration; /** * INTERNAL: Do not use. @@ -356,10 +356,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TBinExpr`, if possible. + * Converts a raw element to a synthesized `TBinaryExpr`, if possible. */ cached - TBinExpr convertBinExprFromRaw(Raw::Element e) { result = TBinExpr(e) } + TBinaryExpr convertBinaryExprFromRaw(Raw::Element e) { result = TBinaryExpr(e) } /** * INTERNAL: Do not use. @@ -517,10 +517,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TLiteral`, if possible. + * Converts a raw element to a synthesized `TLiteralExpr`, if possible. */ cached - TLiteral convertLiteralFromRaw(Raw::Element e) { result = TLiteral(e) } + TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { result = TLiteralExpr(e) } /** * INTERNAL: Do not use. @@ -720,10 +720,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a raw element to a synthesized `TType`, if possible. + * Converts a raw element to a synthesized `TTypeRef`, if possible. */ cached - TType convertTypeFromRaw(Raw::Element e) { result = TType(e) } + TTypeRef convertTypeRefFromRaw(Raw::Element e) { result = TTypeRef(e) } /** * INTERNAL: Do not use. @@ -806,7 +806,7 @@ module Synth { or result = convertStmtFromRaw(e) or - result = convertTypeFromRaw(e) + result = convertTypeRefFromRaw(e) } /** @@ -860,7 +860,7 @@ module Synth { or result = convertBecomeExprFromRaw(e) or - result = convertBinExprFromRaw(e) + result = convertBinaryExprFromRaw(e) or result = convertBlockExprBaseFromRaw(e) or @@ -886,7 +886,7 @@ module Synth { or result = convertLetExprFromRaw(e) or - result = convertLiteralFromRaw(e) + result = convertLiteralExprFromRaw(e) or result = convertLoopExprFromRaw(e) or @@ -984,7 +984,7 @@ module Synth { or result = convertPathFromRaw(e) or - result = convertTypeFromRaw(e) + result = convertTypeRefFromRaw(e) or result = convertUnimplementedDeclarationFromRaw(e) } @@ -1019,10 +1019,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TBinExpr` to a raw DB element, if possible. + * Converts a synthesized `TBinaryExpr` to a raw DB element, if possible. */ cached - Raw::Element convertBinExprToRaw(TBinExpr e) { e = TBinExpr(result) } + Raw::Element convertBinaryExprToRaw(TBinaryExpr e) { e = TBinaryExpr(result) } /** * INTERNAL: Do not use. @@ -1180,10 +1180,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TLiteral` to a raw DB element, if possible. + * Converts a synthesized `TLiteralExpr` to a raw DB element, if possible. */ cached - Raw::Element convertLiteralToRaw(TLiteral e) { e = TLiteral(result) } + Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { e = TLiteralExpr(result) } /** * INTERNAL: Do not use. @@ -1383,10 +1383,10 @@ module Synth { /** * INTERNAL: Do not use. - * Converts a synthesized `TType` to a raw DB element, if possible. + * Converts a synthesized `TTypeRef` to a raw DB element, if possible. */ cached - Raw::Element convertTypeToRaw(TType e) { e = TType(result) } + Raw::Element convertTypeRefToRaw(TTypeRef e) { e = TTypeRef(result) } /** * INTERNAL: Do not use. @@ -1469,7 +1469,7 @@ module Synth { or result = convertStmtToRaw(e) or - result = convertTypeToRaw(e) + result = convertTypeRefToRaw(e) } /** @@ -1523,7 +1523,7 @@ module Synth { or result = convertBecomeExprToRaw(e) or - result = convertBinExprToRaw(e) + result = convertBinaryExprToRaw(e) or result = convertBlockExprBaseToRaw(e) or @@ -1549,7 +1549,7 @@ module Synth { or result = convertLetExprToRaw(e) or - result = convertLiteralToRaw(e) + result = convertLiteralExprToRaw(e) or result = convertLoopExprToRaw(e) or @@ -1647,7 +1647,7 @@ module Synth { or result = convertPathToRaw(e) or - result = convertTypeToRaw(e) + result = convertTypeRefToRaw(e) or result = convertUnimplementedDeclarationToRaw(e) } diff --git a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll index 93561ef3d966..ef7922f1af88 100644 --- a/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll +++ b/rust/ql/lib/codeql/rust/generated/SynthConstructors.qll @@ -7,7 +7,7 @@ import codeql.rust.elements.AsmExprConstructor import codeql.rust.elements.AsyncBlockExprConstructor import codeql.rust.elements.AwaitExprConstructor import codeql.rust.elements.BecomeExprConstructor -import codeql.rust.elements.BinExprConstructor +import codeql.rust.elements.BinaryExprConstructor import codeql.rust.elements.BlockExprConstructor import codeql.rust.elements.BoxExprConstructor import codeql.rust.elements.BoxPatConstructor @@ -30,7 +30,7 @@ import codeql.rust.elements.ItemStmtConstructor import codeql.rust.elements.LabelConstructor import codeql.rust.elements.LetExprConstructor import codeql.rust.elements.LetStmtConstructor -import codeql.rust.elements.LiteralConstructor +import codeql.rust.elements.LiteralExprConstructor import codeql.rust.elements.LiteralPatConstructor import codeql.rust.elements.LoopExprConstructor import codeql.rust.elements.MatchArmConstructor @@ -59,7 +59,7 @@ import codeql.rust.elements.SlicePatConstructor import codeql.rust.elements.TupleExprConstructor import codeql.rust.elements.TuplePatConstructor import codeql.rust.elements.TupleStructPatConstructor -import codeql.rust.elements.TypeConstructor +import codeql.rust.elements.TypeRefConstructor import codeql.rust.elements.UnderscoreExprConstructor import codeql.rust.elements.UnimplementedDeclarationConstructor import codeql.rust.elements.UnsafeBlockExprConstructor diff --git a/rust/ql/lib/codeql/rust/generated/Type.qll b/rust/ql/lib/codeql/rust/generated/TypeRef.qll similarity index 56% rename from rust/ql/lib/codeql/rust/generated/Type.qll rename to rust/ql/lib/codeql/rust/generated/TypeRef.qll index 4b7208324911..f6c45fcbad5f 100644 --- a/rust/ql/lib/codeql/rust/generated/Type.qll +++ b/rust/ql/lib/codeql/rust/generated/TypeRef.qll @@ -1,6 +1,6 @@ // generated by codegen /** - * This module provides the generated definition of `Type`. + * This module provides the generated definition of `TypeRef`. * INTERNAL: Do not import directly. */ @@ -10,7 +10,7 @@ import codeql.rust.elements.AstNode import codeql.rust.elements.Unimplemented /** - * INTERNAL: This module contains the fully generated definition of `Type` and should not + * INTERNAL: This module contains the fully generated definition of `TypeRef` and should not * be referenced directly. */ module Generated { @@ -21,10 +21,10 @@ module Generated { * let y: Vec; * let z: Option; * ``` - * INTERNAL: Do not reference the `Generated::Type` class directly. - * Use the subclass `Type`, where the following predicates are available. + * INTERNAL: Do not reference the `Generated::TypeRef` class directly. + * Use the subclass `TypeRef`, where the following predicates are available. */ - class Type extends Synth::TType, AstNode, Unimplemented { - override string getAPrimaryQlClass() { result = "Type" } + class TypeRef extends Synth::TTypeRef, AstNode, Unimplemented { + override string getAPrimaryQlClass() { result = "TypeRef" } } } diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index a4ad951c7671..10a0c4c37922 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -131,7 +131,7 @@ locatable_locations( @unimplemented = @generic_arg_list | @path -| @type +| @type_ref | @unimplemented_declaration ; @@ -146,7 +146,7 @@ locatable_locations( | @record_expr_field | @record_pat_field | @stmt -| @type +| @type_ref ; @declaration = @@ -160,7 +160,7 @@ locatable_locations( | @asm_expr | @await_expr | @become_expr -| @bin_expr +| @binary_expr | @block_expr_base | @box_expr | @break_expr @@ -173,7 +173,7 @@ locatable_locations( | @if_expr | @index_expr | @let_expr -| @literal +| @literal_expr | @loop_expr | @match_expr | @method_call_expr @@ -251,8 +251,8 @@ record_pat_fields( | @let_stmt ; -types( - unique int id: @type +type_refs( + unique int id: @type_ref ); @array_expr = @@ -275,15 +275,15 @@ become_exprs( int expr: @expr ref ); -bin_exprs( - unique int id: @bin_expr, +binary_exprs( + unique int id: @binary_expr, int lhs: @expr ref, int rhs: @expr ref ); #keyset[id] -bin_expr_ops( - int id: @bin_expr ref, +binary_expr_ops( + int id: @binary_expr ref, string op: string ref ); @@ -352,7 +352,7 @@ call_expr_is_assignee_expr( cast_exprs( unique int id: @cast_expr, int expr: @expr ref, - int type_: @type ref + int type_: @type_ref ref ); closure_exprs( @@ -372,13 +372,13 @@ closure_expr_args( closure_expr_arg_types( int id: @closure_expr ref, int index: int ref, - int arg_type: @type ref + int arg_type: @type_ref ref ); #keyset[id] closure_expr_ret_types( int id: @closure_expr ref, - int ret_type: @type ref + int ret_type: @type_ref ref ); #keyset[id] @@ -480,7 +480,7 @@ let_stmts( #keyset[id] let_stmt_types( int id: @let_stmt ref, - int type_: @type ref + int type_: @type_ref ref ); #keyset[id] @@ -495,8 +495,8 @@ let_stmt_elses( int else: @expr ref ); -literals( - unique int id: @literal +literal_exprs( + unique int id: @literal_expr ); literal_pats( @@ -567,7 +567,7 @@ module_declarations( offset_of_exprs( unique int id: @offset_of_expr, - int container: @type ref + int container: @type_ref ref ); #keyset[id, index] diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index f70375a20103..4bc99d18d264 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -2,7 +2,7 @@ AsmExpr/gen_asm_expr.rs 98d1a2525501416434a087b3791268691e5420f122f6e4d6d868a427 AsyncBlockExpr/gen_async_block_expr.rs 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 AwaitExpr/gen_await_expr.rs 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c -BinExpr/gen_bin_expr.rs fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d fcfdfa8cc35f12c9a1114cdbc00b06e9759abae9ee8a4a3fed19f979dc6fed4d +BinaryExpr/gen_binary_expr.rs f763732714ef056e9d8aaaab69398c37dffdcf96eaf63e9f35d27e7868d78863 f763732714ef056e9d8aaaab69398c37dffdcf96eaf63e9f35d27e7868d78863 BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 BoxPat/gen_box_pat.rs 4f6c7ea95d49a350bcfe8bc381229b89c08eb44580d98c853cf6b2ab6649b3a6 4f6c7ea95d49a350bcfe8bc381229b89c08eb44580d98c853cf6b2ab6649b3a6 @@ -24,7 +24,7 @@ IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c Label/gen_label.rs 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd 463ae5ff89ef1222896d7c2009fb8ae7f437c51bc767415e37f6a50b76b9edbd LetExpr/gen_let_expr.rs 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d LetStmt/gen_let_stmt.rs d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb d22098db07cbdd4e4616c24bc9738f989e553336c7ce1a5391e1b403adb10dbb -Literal/gen_literal.rs 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 5d0091bb686fb8d9b9115f9bb7a66d4d79dde7b0d66cc8e4df2ef00adaed25f1 +LiteralExpr/gen_literal_expr.rs 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a 302ebc81012fd46ccf8d960fe6ae691747bdec1c7cd52b0d47ed1273b4d8dc3a LiteralPat/gen_literal_pat.rs b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 b97dfb678d9e78d8b1673862e6d88593cfccb648fd5915a5849eb20fdc5d2165 LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 MatchArm/gen_match_arm.rs cad136c0d9ffd9fb4250e1e26ccaa7a2920b614d004c25296b819b8d33e87cf9 cad136c0d9ffd9fb4250e1e26ccaa7a2920b614d004c25296b819b8d33e87cf9 @@ -36,7 +36,7 @@ Module/gen_module.rs 6ef553f0782cacf198efe10885a7784e208bbe8da27a65f7f004b49581a OffsetOfExpr/gen_offset_of_expr.rs 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 3744346b0e37fd18193f41e45b74ba9a5dca8ae3dc6a30381272358e6ec8e495 OrPat/gen_or_pat.rs 5b27d1397060dab0aba02ce35b7d182394d8b0a84a42984d2508868673d36b2c 5b27d1397060dab0aba02ce35b7d182394d8b0a84a42984d2508868673d36b2c Path/gen_path.rs 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 9c70415477de7f794bc1b43eb5cc62a9d8280e312c0aa2039c7bf1f8d6760fb2 -PathExpr/gen_path_expr.rs b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d b29cc007c4a158fb2bc464db02464614f1664a80c67a81696978e2715ce2652d +PathExpr/gen_path_expr.rs 5df9c18f835d840d95a9cf1d6dfd2870dd97947d7df5ba01d987e66ed9afbb38 5df9c18f835d840d95a9cf1d6dfd2870dd97947d7df5ba01d987e66ed9afbb38 PathPat/gen_path_pat.rs a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a a858875ccc5baffb04c46127e1f4cd41e5fcc7843eebbdf791c20ba2efe78e5a PrefixExpr/gen_prefix_expr.rs 0fe7608d3c57813db30f36fde77a55d804e009f00d62e232fd050d5cfc5b1eaf 0fe7608d3c57813db30f36fde77a55d804e009f00d62e232fd050d5cfc5b1eaf RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 @@ -53,7 +53,7 @@ SlicePat/gen_slice_pat.rs fbbd5568cbadef51a7970fdbb8d99bf591e29d06987fe3c53b7c19 TupleExpr/gen_tuple_expr.rs 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 3c51f3f94092fb1992e09a096f66304cdc6dbd34b205aa5a4a47216484f3c3e8 TuplePat/gen_tuple_pat.rs 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf 344d309368c28aba203483f96a8f5456e76a92d35df672313ec88262e036d4cf TupleStructPat/gen_tuple_struct_pat.rs 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 0d3f1ec362bd31cb690b4894a0d6fd695c0b1d80a931b609ad876590c0159f83 -Type/gen_type.rs c66f700db04fd4f2dd76ebe6fefbf5fff01e005df50ccf15885cc0ff7c138c26 c66f700db04fd4f2dd76ebe6fefbf5fff01e005df50ccf15885cc0ff7c138c26 +TypeRef/gen_type_ref.rs 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 86362efc37ef9d8383854ac831ba576982e6676d037a85b45a5f7f4a3e8ff1e3 UnderscoreExpr/gen_underscore_expr.rs 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a 34bfcf5e4a865e882aa40fdfdb93237a4ccfb0c1fb053ae184a38719b3727b7a UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 WildcardPat/gen_wildcard_pat.rs aa5a5bc28a5fabe45f3d522e1b59bdf2fa5bd2848ec1f32263ef1f39a6b0290a aa5a5bc28a5fabe45f3d522e1b59bdf2fa5bd2848ec1f32263ef1f39a6b0290a diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 0e051483d630..1c0da518b29e 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -4,7 +4,7 @@ /AsyncBlockExpr/gen_async_block_expr.rs linguist-generated /AwaitExpr/gen_await_expr.rs linguist-generated /BecomeExpr/gen_become_expr.rs linguist-generated -/BinExpr/gen_bin_expr.rs linguist-generated +/BinaryExpr/gen_binary_expr.rs linguist-generated /BlockExpr/gen_block_expr.rs linguist-generated /BoxExpr/gen_box_expr.rs linguist-generated /BoxPat/gen_box_pat.rs linguist-generated @@ -26,7 +26,7 @@ /Label/gen_label.rs linguist-generated /LetExpr/gen_let_expr.rs linguist-generated /LetStmt/gen_let_stmt.rs linguist-generated -/Literal/gen_literal.rs linguist-generated +/LiteralExpr/gen_literal_expr.rs linguist-generated /LiteralPat/gen_literal_pat.rs linguist-generated /LoopExpr/gen_loop_expr.rs linguist-generated /MatchArm/gen_match_arm.rs linguist-generated @@ -55,7 +55,7 @@ /TupleExpr/gen_tuple_expr.rs linguist-generated /TuplePat/gen_tuple_pat.rs linguist-generated /TupleStructPat/gen_tuple_struct_pat.rs linguist-generated -/Type/gen_type.rs linguist-generated +/TypeRef/gen_type_ref.rs linguist-generated /UnderscoreExpr/gen_underscore_expr.rs linguist-generated /UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated /WildcardPat/gen_wildcard_pat.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected deleted file mode 100644 index 6cc1b57ab807..000000000000 --- a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_bin_expr.rs:5:5:5:9 | BinExpr | getLhs: | gen_bin_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_bin_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | -| gen_bin_expr.rs:6:5:6:10 | BinExpr | getLhs: | gen_bin_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_bin_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | -| gen_bin_expr.rs:7:5:7:10 | BinExpr | getLhs: | gen_bin_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_bin_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | -| gen_bin_expr.rs:8:5:8:9 | BinExpr | getLhs: | gen_bin_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_bin_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | -| gen_bin_expr.rs:9:5:9:10 | BinExpr | getLhs: | gen_bin_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_bin_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected deleted file mode 100644 index 261bfc5af87c..000000000000 --- a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.expected +++ /dev/null @@ -1,5 +0,0 @@ -| gen_bin_expr.rs:5:5:5:9 | BinExpr | + | -| gen_bin_expr.rs:6:5:6:10 | BinExpr | && | -| gen_bin_expr.rs:7:5:7:10 | BinExpr | <= | -| gen_bin_expr.rs:8:5:8:9 | BinExpr | = | -| gen_bin_expr.rs:9:5:9:10 | BinExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected new file mode 100644 index 000000000000..7523e3df01c9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | getLhs: | gen_binary_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_binary_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | getLhs: | gen_binary_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_binary_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | getLhs: | gen_binary_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_binary_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | getLhs: | gen_binary_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_binary_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | getLhs: | gen_binary_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_binary_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql similarity index 83% rename from rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql rename to rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql index f1c75d7d4c16..91f358f258ec 100644 --- a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from BinExpr x, Expr getLhs, Expr getRhs, string hasOp +from BinaryExpr x, Expr getLhs, Expr getRhs, string hasOp where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.expected new file mode 100644 index 000000000000..9f9e191f660a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | BinaryExpr | + | +| gen_binary_expr.rs:6:5:6:10 | BinaryExpr | && | +| gen_binary_expr.rs:7:5:7:10 | BinaryExpr | <= | +| gen_binary_expr.rs:8:5:8:9 | BinaryExpr | = | +| gen_binary_expr.rs:9:5:9:10 | BinaryExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.ql similarity index 88% rename from rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql rename to rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.ql index 66c0403bbbd5..9fc20d407369 100644 --- a/rust/ql/test/extractor-tests/generated/BinExpr/BinExpr_getOp.ql +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOp.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from BinExpr x +from BinaryExpr x where toBeTested(x) and not x.isUnknown() select x, x.getOp() diff --git a/rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs b/rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs similarity index 81% rename from rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs rename to rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs index bc2abb8857ce..17f8c74c4b63 100644 --- a/rust/ql/test/extractor-tests/generated/BinExpr/gen_bin_expr.rs +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/gen_binary_expr.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_bin_expr() -> () { +fn test_binary_expr() -> () { // A binary operation expression. For example: x + y; x && y; diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected index ba6678fdacbc..b3324e400f5d 100644 --- a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected @@ -1 +1 @@ -| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | Literal | +| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected index 0ca1618a7ca0..16dfc8124590 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected @@ -1 +1 @@ -| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | Literal | +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected index 4ac5e6c1b72b..6ff1a242993c 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected @@ -1,4 +1,4 @@ -| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | Literal | -| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | Literal | -| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | Literal | -| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | Literal | +| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | LiteralExpr | +| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | LiteralExpr | +| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | LiteralExpr | +| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected index 2d43d72ad100..b06efc92f75b 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -1 +1 @@ -| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getType: | file://:0:0:0:0 | Type | +| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getType: | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql index 28426a900c7d..0b724a6f3ac7 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from CastExpr x, Expr getExpr, Type getType +from CastExpr x, Expr getExpr, TypeRef getType where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected index 1c666b9bee0f..0d9c025ea4a6 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -1,5 +1,5 @@ -| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:5:9:5:13 | BinExpr | getClosureKind: | Closure | isMove: | no | +| gen_closure_expr.rs:5:5:5:13 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:5:9:5:13 | BinaryExpr | getClosureKind: | Closure | isMove: | no | | gen_closure_expr.rs:6:5:6:34 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | yes | getBody: | gen_closure_expr.rs:6:26:6:34 | BlockExpr | getClosureKind: | Closure | isMove: | yes | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfArgs: | 2 | hasRetType: | no | getBody: | gen_closure_expr.rs:7:23:7:27 | BinExpr | getClosureKind: | Async | isMove: | no | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | getNumberOfArgs: | 2 | hasRetType: | no | getBody: | gen_closure_expr.rs:7:23:7:27 | BinaryExpr | getClosureKind: | Async | isMove: | no | | gen_closure_expr.rs:8:6:9:15 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:9:9:9:15 | YieldExpr | getClosureKind: | Coroutine(Movable) | isMove: | no | | gen_closure_expr.rs:10:6:11:23 | ClosureExpr | getNumberOfArgs: | 1 | hasRetType: | no | getBody: | gen_closure_expr.rs:11:17:11:23 | YieldExpr | getClosureKind: | Coroutine(Static) | isMove: | no | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected index 46e2fceec71c..dd1f87a74c10 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getArgType.expected @@ -1,2 +1,2 @@ -| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | file://:0:0:0:0 | Type | -| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | file://:0:0:0:0 | Type | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | +| gen_closure_expr.rs:7:5:7:27 | ClosureExpr | 0 | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected index 0268aa7ac80f..6decd91ca765 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.expected @@ -1 +1 @@ -| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | file://:0:0:0:0 | Type | +| gen_closure_expr.rs:6:5:6:34 | ClosureExpr | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected index 870e0efb3229..8bed9878b6e9 100644 --- a/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected +++ b/rust/ql/test/extractor-tests/generated/ElementListExpr/ElementListExpr_getElement.expected @@ -1,10 +1,10 @@ -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 0 | gen_element_list_expr.rs:5:6:5:6 | Literal | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 1 | gen_element_list_expr.rs:5:9:5:9 | Literal | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 2 | gen_element_list_expr.rs:5:12:5:12 | Literal | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 3 | gen_element_list_expr.rs:5:15:5:15 | Literal | -| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 4 | gen_element_list_expr.rs:5:18:5:18 | Literal | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 0 | gen_element_list_expr.rs:6:6:6:6 | Literal | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 1 | gen_element_list_expr.rs:6:9:6:9 | Literal | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 2 | gen_element_list_expr.rs:6:12:6:12 | Literal | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 3 | gen_element_list_expr.rs:6:15:6:15 | Literal | -| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 4 | gen_element_list_expr.rs:6:18:6:18 | Literal | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 0 | gen_element_list_expr.rs:5:6:5:6 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 1 | gen_element_list_expr.rs:5:9:5:9 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 2 | gen_element_list_expr.rs:5:12:5:12 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 3 | gen_element_list_expr.rs:5:15:5:15 | LiteralExpr | +| gen_element_list_expr.rs:5:5:5:19 | ElementListExpr | 4 | gen_element_list_expr.rs:5:18:5:18 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 0 | gen_element_list_expr.rs:6:6:6:6 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 1 | gen_element_list_expr.rs:6:9:6:9 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 2 | gen_element_list_expr.rs:6:12:6:12 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 3 | gen_element_list_expr.rs:6:15:6:15 | LiteralExpr | +| gen_element_list_expr.rs:6:5:6:19 | ElementListExpr | 4 | gen_element_list_expr.rs:6:18:6:18 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/File/File.expected b/rust/ql/test/extractor-tests/generated/File/File.expected deleted file mode 100644 index a22ae29c91b5..000000000000 --- a/rust/ql/test/extractor-tests/generated/File/File.expected +++ /dev/null @@ -1,3 +0,0 @@ -| file://:0:0:0:0 | | UnknownFile | getName: | | -| lib.rs:0:0:0:0 | lib.rs | DbFile | getName: | lib.rs | -| test.rs:0:0:0:0 | test.rs | DbFile | getName: | test.rs | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected index 26bb112716cc..44dff354b047 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -1,2 +1,2 @@ -| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | -| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | +| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinaryExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | +| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinaryExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected index 83c1279e7234..edbf139dfc35 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -1,2 +1,2 @@ -| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | Literal | isAssigneeExpr: | no | -| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | Literal | isAssigneeExpr: | yes | +| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | LiteralExpr | isAssigneeExpr: | no | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | LiteralExpr | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected index 8d95b6e7cac0..59bffddf5453 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.expected @@ -1,4 +1,4 @@ -| gen_let_stmt.rs:5:9:5:9 | LetStmt | gen_let_stmt.rs:5:13:5:14 | Literal | -| gen_let_stmt.rs:6:9:6:9 | LetStmt | gen_let_stmt.rs:6:18:6:19 | Literal | +| gen_let_stmt.rs:5:9:5:9 | LetStmt | gen_let_stmt.rs:5:13:5:14 | LiteralExpr | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | gen_let_stmt.rs:6:18:6:19 | LiteralExpr | | gen_let_stmt.rs:9:9:9:14 | LetStmt | gen_let_stmt.rs:9:18:9:23 | TupleExpr | | gen_let_stmt.rs:10:9:10:15 | LetStmt | gen_let_stmt.rs:10:19:10:38 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected index 955f6b488655..7a67697cb653 100644 --- a/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected +++ b/rust/ql/test/extractor-tests/generated/LetStmt/LetStmt_getType.expected @@ -1,2 +1,2 @@ -| gen_let_stmt.rs:6:9:6:9 | LetStmt | file://:0:0:0:0 | Type | -| gen_let_stmt.rs:7:9:7:9 | LetStmt | file://:0:0:0:0 | Type | +| gen_let_stmt.rs:6:9:6:9 | LetStmt | file://:0:0:0:0 | TypeRef | +| gen_let_stmt.rs:7:9:7:9 | LetStmt | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/Literal/Literal.expected b/rust/ql/test/extractor-tests/generated/Literal/Literal.expected deleted file mode 100644 index 3e4208518a16..000000000000 --- a/rust/ql/test/extractor-tests/generated/Literal/Literal.expected +++ /dev/null @@ -1,8 +0,0 @@ -| gen_literal.rs:5:5:5:6 | Literal | -| gen_literal.rs:6:5:6:8 | Literal | -| gen_literal.rs:7:5:7:19 | Literal | -| gen_literal.rs:8:5:8:20 | Literal | -| gen_literal.rs:9:5:9:7 | Literal | -| gen_literal.rs:10:5:10:8 | Literal | -| gen_literal.rs:11:5:11:20 | Literal | -| gen_literal.rs:12:5:12:8 | Literal | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected new file mode 100644 index 000000000000..4ea6107f6a81 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected @@ -0,0 +1,8 @@ +| gen_literal_expr.rs:5:5:5:6 | LiteralExpr | +| gen_literal_expr.rs:6:5:6:8 | LiteralExpr | +| gen_literal_expr.rs:7:5:7:19 | LiteralExpr | +| gen_literal_expr.rs:8:5:8:20 | LiteralExpr | +| gen_literal_expr.rs:9:5:9:7 | LiteralExpr | +| gen_literal_expr.rs:10:5:10:8 | LiteralExpr | +| gen_literal_expr.rs:11:5:11:20 | LiteralExpr | +| gen_literal_expr.rs:12:5:12:8 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/Type/Type.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql similarity index 86% rename from rust/ql/test/extractor-tests/generated/Type/Type.ql rename to rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql index 0689152b19f7..48c2e1d6f00f 100644 --- a/rust/ql/test/extractor-tests/generated/Type/Type.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from Type x +from LiteralExpr x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs similarity index 85% rename from rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs rename to rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs index d85a08be597d..13e1590e8e54 100644 --- a/rust/ql/test/extractor-tests/generated/Literal/gen_literal.rs +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/gen_literal_expr.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_literal() -> () { +fn test_literal_expr() -> () { // A literal expression. For example: 42; 42.0; diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected index d0a4072ed162..ebde9562c6da 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected @@ -1 +1 @@ -| gen_literal_pat.rs:6:9:6:10 | LiteralPat | getExpr: | gen_literal_pat.rs:6:9:6:10 | Literal | +| gen_literal_pat.rs:6:9:6:10 | LiteralPat | getExpr: | gen_literal_pat.rs:6:9:6:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected index 3f55c28f585d..97b049e6f540 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -1,4 +1,4 @@ | gen_match_arm.rs:6:9:6:23 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:23 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:28:6:28 | PathExpr | -| gen_match_arm.rs:7:9:7:20 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:20 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:25:7:25 | Literal | -| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinExpr | -| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildcardPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | Literal | +| gen_match_arm.rs:7:9:7:20 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:20 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:25:7:25 | LiteralExpr | +| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinaryExpr | +| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildcardPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected index 8f7502d53022..7430f1179eb7 100644 --- a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected @@ -1 +1 @@ -| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinExpr | +| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinaryExpr | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected index 692a045a33aa..601b344cd0fc 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected @@ -1,2 +1,2 @@ -| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | Literal | -| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | Literal | +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | LiteralExpr | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected index 533e0baf84f7..e28c61da351d 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -1 +1 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getContainer: | file://:0:0:0:0 | Type | getNumberOfFields: | 1 | +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getContainer: | file://:0:0:0:0 | TypeRef | getNumberOfFields: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql index 883ed5d2ad1f..7eed7c6530b2 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -2,7 +2,7 @@ import codeql.rust.elements import TestUtils -from OffsetOfExpr x, Type getContainer, int getNumberOfFields +from OffsetOfExpr x, TypeRef getContainer, int getNumberOfFields where toBeTested(x) and not x.isUnknown() and diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected index 572d269aaa7d..7f24b432aa23 100644 --- a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -1,4 +1,4 @@ | gen_path_expr.rs:5:13:5:20 | PathExpr | getPath: | gen_path_expr.rs:5:13:5:20 | Path | | gen_path_expr.rs:6:13:6:20 | PathExpr | getPath: | gen_path_expr.rs:6:13:6:20 | Path | | gen_path_expr.rs:7:13:7:20 | PathExpr | getPath: | gen_path_expr.rs:7:13:7:20 | Path | -| gen_path_expr.rs:8:13:8:32 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:32 | Path | +| gen_path_expr.rs:8:13:8:35 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:35 | Path | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs index 0c1e4b4a7d16..6ccbd7f80e58 100644 --- a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs +++ b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs @@ -5,5 +5,5 @@ fn test_path_expr() -> () { let x = variable; let x = foo::bar; let y = ::foo; - let z = ::foo; + let z = ::foo; } diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected index 680c22b3b739..151eb7e17453 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -1,3 +1,3 @@ -| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | getExpr: | gen_prefix_expr.rs:5:14:5:15 | Literal | getOp: | - | -| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | getExpr: | gen_prefix_expr.rs:6:14:6:17 | Literal | getOp: | ! | +| gen_prefix_expr.rs:5:13:5:15 | PrefixExpr | getExpr: | gen_prefix_expr.rs:5:14:5:15 | LiteralExpr | getOp: | - | +| gen_prefix_expr.rs:6:13:6:17 | PrefixExpr | getExpr: | gen_prefix_expr.rs:6:14:6:17 | LiteralExpr | getOp: | ! | | gen_prefix_expr.rs:7:13:7:16 | PrefixExpr | getExpr: | gen_prefix_expr.rs:7:14:7:16 | PathExpr | getOp: | * | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected index 235f730a8f40..f88c18b39c2d 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected @@ -1,3 +1,3 @@ -| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | Literal | -| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | Literal | -| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | Literal | +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | LiteralExpr | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected index 8cd6b27addd8..f596145bfc9d 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected @@ -1,4 +1,4 @@ -| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | Literal | -| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | Literal | -| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | Literal | -| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | Literal | +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | LiteralExpr | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | LiteralExpr | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected index fabfcb47cd63..10165f69cfda 100644 --- a/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected +++ b/rust/ql/test/extractor-tests/generated/RecordExprField/RecordExprField.expected @@ -1,2 +1,2 @@ -| gen_record_expr_field.rs:5:14:5:14 | RecordExprField | getName: | a | getExpr: | gen_record_expr_field.rs:5:14:5:14 | Literal | -| gen_record_expr_field.rs:5:20:5:20 | RecordExprField | getName: | b | getExpr: | gen_record_expr_field.rs:5:20:5:20 | Literal | +| gen_record_expr_field.rs:5:14:5:14 | RecordExprField | getName: | a | getExpr: | gen_record_expr_field.rs:5:14:5:14 | LiteralExpr | +| gen_record_expr_field.rs:5:20:5:20 | RecordExprField | getName: | b | getExpr: | gen_record_expr_field.rs:5:20:5:20 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected index e063b0974944..370729af71d0 100644 --- a/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/RepeatExpr.expected @@ -1 +1 @@ -| gen_repeat_expr.rs:5:5:5:11 | RepeatExpr | getInitializer: | gen_repeat_expr.rs:5:6:5:6 | Literal | getRepeat: | gen_repeat_expr.rs:5:9:5:10 | Literal | +| gen_repeat_expr.rs:5:5:5:11 | RepeatExpr | getInitializer: | gen_repeat_expr.rs:5:6:5:6 | LiteralExpr | getRepeat: | gen_repeat_expr.rs:5:9:5:10 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected index e4fe8cabe075..4247069ccc25 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected @@ -1 +1 @@ -| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | Literal | +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected index a87c7a175823..936d2a39bb27 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getExpr.expected @@ -1,4 +1,4 @@ -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | Literal | -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | Literal | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | Literal | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | Literal | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 0 | gen_tuple_expr.rs:5:6:5:6 | LiteralExpr | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | 1 | gen_tuple_expr.rs:5:9:5:13 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 0 | gen_tuple_expr.rs:6:6:6:6 | LiteralExpr | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | 1 | gen_tuple_expr.rs:6:9:6:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/Type/Type.expected b/rust/ql/test/extractor-tests/generated/Type/Type.expected deleted file mode 100644 index acdb6aab070a..000000000000 --- a/rust/ql/test/extractor-tests/generated/Type/Type.expected +++ /dev/null @@ -1,3 +0,0 @@ -| file://:0:0:0:0 | Type | -| file://:0:0:0:0 | Type | -| file://:0:0:0:0 | Type | diff --git a/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected new file mode 100644 index 000000000000..af51fa0b6032 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.expected @@ -0,0 +1,3 @@ +| file://:0:0:0:0 | TypeRef | +| file://:0:0:0:0 | TypeRef | +| file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/Literal/Literal.ql b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql similarity index 88% rename from rust/ql/test/extractor-tests/generated/Literal/Literal.ql rename to rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql index 12571e3a4759..04748b7dd043 100644 --- a/rust/ql/test/extractor-tests/generated/Literal/Literal.ql +++ b/rust/ql/test/extractor-tests/generated/TypeRef/TypeRef.ql @@ -2,6 +2,6 @@ import codeql.rust.elements import TestUtils -from Literal x +from TypeRef x where toBeTested(x) and not x.isUnknown() select x diff --git a/rust/ql/test/extractor-tests/generated/Type/gen_type.rs b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs similarity index 82% rename from rust/ql/test/extractor-tests/generated/Type/gen_type.rs rename to rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs index 3242e9d25bd4..1077dc2b4f5f 100644 --- a/rust/ql/test/extractor-tests/generated/Type/gen_type.rs +++ b/rust/ql/test/extractor-tests/generated/TypeRef/gen_type_ref.rs @@ -1,6 +1,6 @@ // generated by codegen -fn test_type() -> () { +fn test_type_ref() -> () { // The base class for type references. let x: i32; let y: Vec; diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected index 5a038e499ef1..074c6fbff74c 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected @@ -1 +1 @@ -| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | Literal | +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected index cc9c7beb4284..87b88ef24196 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected @@ -1 +1 @@ -| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | Literal | +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | LiteralExpr | diff --git a/rust/schema.py b/rust/schema.py index c828c489a622..1924c530cfe1 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -24,6 +24,7 @@ class Element: class Locatable(Element): pass + @qltest.skip class AstNode(Locatable): pass @@ -103,7 +104,7 @@ class Stmt(AstNode): @rust.doc_test_signature("() -> ()") -class Type(AstNode, Unimplemented): +class TypeRef(AstNode, Unimplemented): """ The base class for type references. ``` @@ -174,7 +175,7 @@ class PathExpr(Expr): let x = variable; let x = foo::bar; let y = ::foo; - let z = ::foo; + let z = ::foo; ``` """ path: Path | child @@ -553,7 +554,7 @@ class CastExpr(Expr): ``` """ expr: Expr | child - type: Type | child + type: TypeRef | child @rust.doc_test_signature("() -> ()") @@ -598,7 +599,7 @@ class PrefixExpr(Expr): @rust.doc_test_signature("() -> ()") -class BinExpr(Expr): +class BinaryExpr(Expr): """ A binary operation expression. For example: ``` @@ -661,8 +662,8 @@ class ClosureExpr(Expr): ``` """ args: list[Pat] | child - arg_types: list[optional[Type]] | child - ret_type: optional[Type] | child + arg_types: list[optional[TypeRef]] | child + ret_type: optional[TypeRef] | child body: Expr | child closure_kind: string is_move: predicate @@ -717,7 +718,7 @@ class RepeatExpr(ArrayExpr): @rust.doc_test_signature("() -> ()") -class Literal(Expr): +class LiteralExpr(Expr): """ A literal expression. For example: ``` @@ -752,7 +753,7 @@ class OffsetOfExpr(Expr): builtin # offset_of(Struct, field); ``` """ - container: Type | child + container: TypeRef | child fields: list[string] @@ -785,7 +786,7 @@ class LetStmt(Stmt): """ pat: Pat | child - type: optional[Type] | child + type: optional[TypeRef] | child initializer: optional[Expr] | child else_: optional[Expr] | child From 90537f9132e6d7c8e103e3f70ba0b2740025e02b Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 18:39:15 +0200 Subject: [PATCH 21/22] Fix other QL code This reverts commit 5c02fb4a2e6591d8df69c602d857ed81d1caef80. --- .../internal/ControlFlowGraphImpl.qll | 4 +- rust/ql/test/extractor-tests/File/File.ql | 3 +- .../library-tests/controlflow/Cfg.expected | 80 +++++++++---------- 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll index 26c8a0bea53f..5f49d7177546 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll @@ -81,7 +81,7 @@ class CallExprTree extends StandardPostOrderTree instanceof CallExpr { override ControlFlowTree getChildNode(int i) { result = super.getArg(i) } } -class BinExprTree extends StandardPostOrderTree instanceof BinExpr { +class BinaryOpExprTree extends StandardPostOrderTree instanceof BinaryExpr { override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getLhs() or @@ -121,7 +121,7 @@ class LetExprTree extends StandardPostOrderTree instanceof LetExpr { override ControlFlowTree getChildNode(int i) { i = 0 and result = super.getExpr() } } -class LiteralTree extends LeafTree instanceof Literal { } +class LiteralExprTree extends LeafTree instanceof LiteralExpr { } class PathExprTree extends LeafTree instanceof PathExpr { } diff --git a/rust/ql/test/extractor-tests/File/File.ql b/rust/ql/test/extractor-tests/File/File.ql index c562e2587fe6..fcb2b274e781 100644 --- a/rust/ql/test/extractor-tests/File/File.ql +++ b/rust/ql/test/extractor-tests/File/File.ql @@ -1,6 +1,5 @@ import rust -import TestUtils from File f -where fileIsInTest(f) +where exists(f.getRelativePath()) select f diff --git a/rust/ql/test/library-tests/controlflow/Cfg.expected b/rust/ql/test/library-tests/controlflow/Cfg.expected index 138c5f29093f..6b660ee661f7 100644 --- a/rust/ql/test/library-tests/controlflow/Cfg.expected +++ b/rust/ql/test/library-tests/controlflow/Cfg.expected @@ -5,15 +5,15 @@ nodes | test.rs:1:1:7:1 | main | semmle.order | 4 | | test.rs:1:18:7:1 | BlockExpr | semmle.order | 5 | | test.rs:2:5:6:5 | IfExpr | semmle.order | 6 | -| test.rs:2:8:2:12 | Literal | semmle.order | 7 | -| test.rs:2:8:2:21 | BinExpr | semmle.order | 8 | -| test.rs:2:17:2:21 | Literal | semmle.order | 9 | +| test.rs:2:8:2:12 | LiteralExpr | semmle.order | 7 | +| test.rs:2:8:2:21 | BinaryExpr | semmle.order | 8 | +| test.rs:2:17:2:21 | LiteralExpr | semmle.order | 9 | | test.rs:2:23:4:5 | BlockExpr | semmle.order | 10 | | test.rs:3:9:3:20 | CallExpr | semmle.order | 11 | -| test.rs:3:19:3:19 | Literal | semmle.order | 12 | +| test.rs:3:19:3:19 | LiteralExpr | semmle.order | 12 | | test.rs:4:12:6:5 | BlockExpr | semmle.order | 13 | | test.rs:5:9:5:20 | CallExpr | semmle.order | 14 | -| test.rs:5:19:5:19 | Literal | semmle.order | 15 | +| test.rs:5:19:5:19 | LiteralExpr | semmle.order | 15 | | test.rs:9:1:16:1 | decrement | semmle.order | 16 | | test.rs:9:1:16:1 | enter decrement | semmle.order | 17 | | test.rs:9:1:16:1 | exit decrement | semmle.order | 18 | @@ -21,17 +21,17 @@ nodes | test.rs:9:29:16:1 | BlockExpr | semmle.order | 20 | | test.rs:11:5:15:5 | IfExpr | semmle.order | 21 | | test.rs:11:8:11:8 | PathExpr | semmle.order | 22 | -| test.rs:11:8:11:13 | BinExpr | semmle.order | 23 | -| test.rs:11:13:11:13 | Literal | semmle.order | 24 | +| test.rs:11:8:11:13 | BinaryExpr | semmle.order | 23 | +| test.rs:11:13:11:13 | LiteralExpr | semmle.order | 24 | | test.rs:11:15:13:5 | BlockExpr | semmle.order | 25 | -| test.rs:12:9:12:9 | Literal | semmle.order | 26 | +| test.rs:12:9:12:9 | LiteralExpr | semmle.order | 26 | | test.rs:13:12:15:5 | BlockExpr | semmle.order | 27 | | test.rs:14:9:14:9 | PathExpr | semmle.order | 28 | -| test.rs:14:9:14:13 | BinExpr | semmle.order | 29 | -| test.rs:14:13:14:13 | Literal | semmle.order | 30 | +| test.rs:14:9:14:13 | BinaryExpr | semmle.order | 29 | +| test.rs:14:13:14:13 | LiteralExpr | semmle.order | 30 | edges -| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | Literal | semmle.label | | -| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | Literal | semmle.order | 1 | +| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | LiteralExpr | semmle.label | | +| test.rs:1:1:7:1 | enter main | test.rs:2:8:2:12 | LiteralExpr | semmle.order | 1 | | test.rs:1:1:7:1 | exit main (normal) | test.rs:1:1:7:1 | exit main | semmle.label | | | test.rs:1:1:7:1 | exit main (normal) | test.rs:1:1:7:1 | exit main | semmle.order | 1 | | test.rs:1:1:7:1 | main | test.rs:1:1:7:1 | exit main (normal) | semmle.label | | @@ -40,26 +40,26 @@ edges | test.rs:1:18:7:1 | BlockExpr | test.rs:1:1:7:1 | main | semmle.order | 1 | | test.rs:2:5:6:5 | IfExpr | test.rs:1:18:7:1 | BlockExpr | semmle.label | | | test.rs:2:5:6:5 | IfExpr | test.rs:1:18:7:1 | BlockExpr | semmle.order | 1 | -| test.rs:2:8:2:12 | Literal | test.rs:2:17:2:21 | Literal | semmle.label | | -| test.rs:2:8:2:12 | Literal | test.rs:2:17:2:21 | Literal | semmle.order | 1 | -| test.rs:2:8:2:21 | BinExpr | test.rs:3:19:3:19 | Literal | semmle.label | true | -| test.rs:2:8:2:21 | BinExpr | test.rs:3:19:3:19 | Literal | semmle.order | 1 | -| test.rs:2:8:2:21 | BinExpr | test.rs:5:19:5:19 | Literal | semmle.label | false | -| test.rs:2:8:2:21 | BinExpr | test.rs:5:19:5:19 | Literal | semmle.order | 2 | -| test.rs:2:17:2:21 | Literal | test.rs:2:8:2:21 | BinExpr | semmle.label | | -| test.rs:2:17:2:21 | Literal | test.rs:2:8:2:21 | BinExpr | semmle.order | 1 | +| test.rs:2:8:2:12 | LiteralExpr | test.rs:2:17:2:21 | LiteralExpr | semmle.label | | +| test.rs:2:8:2:12 | LiteralExpr | test.rs:2:17:2:21 | LiteralExpr | semmle.order | 1 | +| test.rs:2:8:2:21 | BinaryExpr | test.rs:3:19:3:19 | LiteralExpr | semmle.label | true | +| test.rs:2:8:2:21 | BinaryExpr | test.rs:3:19:3:19 | LiteralExpr | semmle.order | 1 | +| test.rs:2:8:2:21 | BinaryExpr | test.rs:5:19:5:19 | LiteralExpr | semmle.label | false | +| test.rs:2:8:2:21 | BinaryExpr | test.rs:5:19:5:19 | LiteralExpr | semmle.order | 2 | +| test.rs:2:17:2:21 | LiteralExpr | test.rs:2:8:2:21 | BinaryExpr | semmle.label | | +| test.rs:2:17:2:21 | LiteralExpr | test.rs:2:8:2:21 | BinaryExpr | semmle.order | 1 | | test.rs:2:23:4:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.label | | | test.rs:2:23:4:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.order | 1 | | test.rs:3:9:3:20 | CallExpr | test.rs:2:23:4:5 | BlockExpr | semmle.label | | | test.rs:3:9:3:20 | CallExpr | test.rs:2:23:4:5 | BlockExpr | semmle.order | 1 | -| test.rs:3:19:3:19 | Literal | test.rs:3:9:3:20 | CallExpr | semmle.label | | -| test.rs:3:19:3:19 | Literal | test.rs:3:9:3:20 | CallExpr | semmle.order | 1 | +| test.rs:3:19:3:19 | LiteralExpr | test.rs:3:9:3:20 | CallExpr | semmle.label | | +| test.rs:3:19:3:19 | LiteralExpr | test.rs:3:9:3:20 | CallExpr | semmle.order | 1 | | test.rs:4:12:6:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.label | | | test.rs:4:12:6:5 | BlockExpr | test.rs:2:5:6:5 | IfExpr | semmle.order | 1 | | test.rs:5:9:5:20 | CallExpr | test.rs:4:12:6:5 | BlockExpr | semmle.label | | | test.rs:5:9:5:20 | CallExpr | test.rs:4:12:6:5 | BlockExpr | semmle.order | 1 | -| test.rs:5:19:5:19 | Literal | test.rs:5:9:5:20 | CallExpr | semmle.label | | -| test.rs:5:19:5:19 | Literal | test.rs:5:9:5:20 | CallExpr | semmle.order | 1 | +| test.rs:5:19:5:19 | LiteralExpr | test.rs:5:9:5:20 | CallExpr | semmle.label | | +| test.rs:5:19:5:19 | LiteralExpr | test.rs:5:9:5:20 | CallExpr | semmle.order | 1 | | test.rs:9:1:16:1 | decrement | test.rs:9:1:16:1 | exit decrement (normal) | semmle.label | | | test.rs:9:1:16:1 | decrement | test.rs:9:1:16:1 | exit decrement (normal) | semmle.order | 1 | | test.rs:9:1:16:1 | enter decrement | test.rs:11:8:11:8 | PathExpr | semmle.label | | @@ -70,23 +70,23 @@ edges | test.rs:9:29:16:1 | BlockExpr | test.rs:9:1:16:1 | decrement | semmle.order | 1 | | test.rs:11:5:15:5 | IfExpr | test.rs:9:29:16:1 | BlockExpr | semmle.label | | | test.rs:11:5:15:5 | IfExpr | test.rs:9:29:16:1 | BlockExpr | semmle.order | 1 | -| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | Literal | semmle.label | | -| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | Literal | semmle.order | 1 | -| test.rs:11:8:11:13 | BinExpr | test.rs:12:9:12:9 | Literal | semmle.label | true | -| test.rs:11:8:11:13 | BinExpr | test.rs:12:9:12:9 | Literal | semmle.order | 1 | -| test.rs:11:8:11:13 | BinExpr | test.rs:14:9:14:9 | PathExpr | semmle.label | false | -| test.rs:11:8:11:13 | BinExpr | test.rs:14:9:14:9 | PathExpr | semmle.order | 2 | -| test.rs:11:13:11:13 | Literal | test.rs:11:8:11:13 | BinExpr | semmle.label | | -| test.rs:11:13:11:13 | Literal | test.rs:11:8:11:13 | BinExpr | semmle.order | 1 | +| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | LiteralExpr | semmle.label | | +| test.rs:11:8:11:8 | PathExpr | test.rs:11:13:11:13 | LiteralExpr | semmle.order | 1 | +| test.rs:11:8:11:13 | BinaryExpr | test.rs:12:9:12:9 | LiteralExpr | semmle.label | true | +| test.rs:11:8:11:13 | BinaryExpr | test.rs:12:9:12:9 | LiteralExpr | semmle.order | 1 | +| test.rs:11:8:11:13 | BinaryExpr | test.rs:14:9:14:9 | PathExpr | semmle.label | false | +| test.rs:11:8:11:13 | BinaryExpr | test.rs:14:9:14:9 | PathExpr | semmle.order | 2 | +| test.rs:11:13:11:13 | LiteralExpr | test.rs:11:8:11:13 | BinaryExpr | semmle.label | | +| test.rs:11:13:11:13 | LiteralExpr | test.rs:11:8:11:13 | BinaryExpr | semmle.order | 1 | | test.rs:11:15:13:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.label | | | test.rs:11:15:13:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.order | 1 | -| test.rs:12:9:12:9 | Literal | test.rs:11:15:13:5 | BlockExpr | semmle.label | | -| test.rs:12:9:12:9 | Literal | test.rs:11:15:13:5 | BlockExpr | semmle.order | 1 | +| test.rs:12:9:12:9 | LiteralExpr | test.rs:11:15:13:5 | BlockExpr | semmle.label | | +| test.rs:12:9:12:9 | LiteralExpr | test.rs:11:15:13:5 | BlockExpr | semmle.order | 1 | | test.rs:13:12:15:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.label | | | test.rs:13:12:15:5 | BlockExpr | test.rs:11:5:15:5 | IfExpr | semmle.order | 1 | -| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | Literal | semmle.label | | -| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | Literal | semmle.order | 1 | -| test.rs:14:9:14:13 | BinExpr | test.rs:13:12:15:5 | BlockExpr | semmle.label | | -| test.rs:14:9:14:13 | BinExpr | test.rs:13:12:15:5 | BlockExpr | semmle.order | 1 | -| test.rs:14:13:14:13 | Literal | test.rs:14:9:14:13 | BinExpr | semmle.label | | -| test.rs:14:13:14:13 | Literal | test.rs:14:9:14:13 | BinExpr | semmle.order | 1 | +| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | LiteralExpr | semmle.label | | +| test.rs:14:9:14:9 | PathExpr | test.rs:14:13:14:13 | LiteralExpr | semmle.order | 1 | +| test.rs:14:9:14:13 | BinaryExpr | test.rs:13:12:15:5 | BlockExpr | semmle.label | | +| test.rs:14:9:14:13 | BinaryExpr | test.rs:13:12:15:5 | BlockExpr | semmle.order | 1 | +| test.rs:14:13:14:13 | LiteralExpr | test.rs:14:9:14:13 | BinaryExpr | semmle.label | | +| test.rs:14:13:14:13 | LiteralExpr | test.rs:14:9:14:13 | BinaryExpr | semmle.order | 1 | From 7f8bb7e85938de860f8bba53e3104e0fc923c7ee Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Fri, 13 Sep 2024 18:49:29 +0200 Subject: [PATCH 22/22] Apply clippy fixes --- rust/extractor/src/translate.rs | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index ef8e1e91f3ae..94232fdd7936 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -75,15 +75,15 @@ impl CrateTranslator<'_> { ) where T: AstNode, { - source + if let Some(data) = source .file_id .file_id() .map(|f| f.file_id()) .and_then(|file_id| self.emit_file(file_id)) - .map(|data| { - let range = source.value.text_range(); - self.emit_location_for_textrange(label, data, range) - }); + { + let range = source.value.text_range(); + self.emit_location_for_textrange(label, data, range) + } } fn emit_location_for_expr( @@ -113,7 +113,7 @@ impl CrateTranslator<'_> { pat: &ra_ap_hir_def::hir::LiteralOrConst, body: &Body, source_map: &BodySourceMap, - mut emit_location: impl FnMut(&mut CrateTranslator<'_>, trap::Label) -> (), + mut emit_location: impl FnMut(&mut CrateTranslator<'_>, trap::Label), ) -> trap::Label { match pat { ra_ap_hir_def::hir::LiteralOrConst::Literal(_literal) => { @@ -147,14 +147,14 @@ impl CrateTranslator<'_> { where T::Ast: AstNode, { - entity + if let Some((data, source)) = entity .source(self.db) .and_then(|source| source.file_id.file_id().map(|f| (f.file_id(), source))) .and_then(|(file_id, source)| self.emit_file(file_id).map(|data| (data, source))) - .map(|(data, source)| { - let range = source.value.syntax().text_range(); - self.emit_location_for_textrange(label, data, range); - }); + { + let range = source.value.syntax().text_range(); + self.emit_location_for_textrange(label, data, range); + } } fn emit_location_for_textrange( &mut self, @@ -260,7 +260,9 @@ impl CrateTranslator<'_> { ellipsis, } => { let path = path.as_ref().map(|path| self.emit_path(path)); - path.map(|p| self.emit_location_for_pat(p, pat_id, source_map)); + if let Some(p) = path { + self.emit_location_for_pat(p, pat_id, source_map) + } let flds = args .into_iter() .map(|arg| self.emit_record_field_pat(arg, body, source_map)) @@ -340,7 +342,9 @@ impl CrateTranslator<'_> { ellipsis, } => { let path = path.as_ref().map(|path| self.emit_path(path)); - path.map(|p| self.emit_location_for_pat(p, pat_id, source_map)); + if let Some(p) = path { + self.emit_location_for_pat(p, pat_id, source_map) + } let args = args .into_iter() @@ -666,7 +670,9 @@ impl CrateTranslator<'_> { is_assignee_expr, } => { let path = path.as_ref().map(|path| self.emit_path(path)); - path.map(|p| self.emit_location_for_expr(p, expr_id, source_map)); + if let Some(p) = path { + self.emit_location_for_expr(p, expr_id, source_map) + } let flds = fields .into_iter()