mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Rust: run codegen
This commit is contained in:
@@ -968,9 +968,13 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A ForExpr. For example:
|
||||
* A for loop expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* for x in 0..10 {
|
||||
* println!("{}", x);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ForExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode {
|
||||
@@ -1823,9 +1827,12 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A MacroCall. For example:
|
||||
* A macro invocation.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* println!("Hello, world!");
|
||||
* //^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class MacroCallCfgNode extends CfgNodeFinal {
|
||||
@@ -1891,9 +1898,11 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A MacroExpr. For example:
|
||||
* A macro expression, representing the invocation of a macro that produces an expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let y = vec![1, 2, 3];
|
||||
* ```
|
||||
*/
|
||||
final class MacroExprCfgNode extends CfgNodeFinal, ExprCfgNode {
|
||||
@@ -1926,9 +1935,14 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A MacroPat. For example:
|
||||
* A macro pattern, representing the invocation of a macro that produces a pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* match x {
|
||||
* my_macro!() => "matched",
|
||||
* _ => "not matched",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MacroPatCfgNode extends CfgNodeFinal, PatCfgNode {
|
||||
@@ -2082,9 +2096,12 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A Name. For example:
|
||||
* An identifier name.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let foo = 1;
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class NameCfgNode extends CfgNodeFinal {
|
||||
@@ -2696,9 +2713,12 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A RestPat. For example:
|
||||
* A rest pattern (`..`) in a tuple, slice, or struct pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let (a, .., z) = (1, 2, 3);
|
||||
* // ^^
|
||||
* ```
|
||||
*/
|
||||
final class RestPatCfgNode extends CfgNodeFinal, PatCfgNode {
|
||||
@@ -2961,9 +2981,12 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A TryExpr. For example:
|
||||
* A try expression using the `?` operator.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let x = foo()?;
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class TryExprCfgNode extends CfgNodeFinal, ExprCfgNode {
|
||||
@@ -3186,9 +3209,13 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* A WhileExpr. For example:
|
||||
* A while loop expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* while x < 10 {
|
||||
* x += 1;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class WhileExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode {
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Abi.qll
generated
7
rust/ql/lib/codeql/rust/elements/Abi.qll
generated
@@ -7,9 +7,12 @@ private import internal.AbiImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A Abi. For example:
|
||||
* An ABI specification for an extern function or block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern "C" fn foo() {}
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class Abi = Impl::Abi;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ArgList.qll
generated
7
rust/ql/lib/codeql/rust/elements/ArgList.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A ArgList. For example:
|
||||
* A list of arguments in a function or method call.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* foo(1, 2, 3);
|
||||
* // ^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ArgList = Impl::ArgList;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.ConstArg
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ArrayTypeRepr. For example:
|
||||
* An array type representation.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let arr: [i32; 4];
|
||||
* // ^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ArrayTypeRepr = Impl::ArrayTypeRepr;
|
||||
|
||||
@@ -6,4 +6,13 @@
|
||||
private import internal.AsmClobberAbiImpl
|
||||
import codeql.rust.elements.AsmPiece
|
||||
|
||||
/**
|
||||
* A clobbered ABI in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("", clobber_abi("C"));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmClobberAbi = Impl::AsmClobberAbi;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmConst.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmConst.qll
generated
@@ -7,4 +7,13 @@ private import internal.AsmConstImpl
|
||||
import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A constant operand in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("mov eax, {const}", const 42);
|
||||
* // ^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmConst = Impl::AsmConst;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmDirSpec.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmDirSpec.qll
generated
@@ -6,4 +6,13 @@
|
||||
private import internal.AsmDirSpecImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* An inline assembly directive specification.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("nop");
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmDirSpec = Impl::AsmDirSpec;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmLabel.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmLabel.qll
generated
@@ -7,4 +7,13 @@ private import internal.AsmLabelImpl
|
||||
import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.BlockExpr
|
||||
|
||||
/**
|
||||
* A label in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("jmp {label}", label = sym my_label);
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmLabel = Impl::AsmLabel;
|
||||
|
||||
@@ -7,4 +7,13 @@ private import internal.AsmOperandExprImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* An operand expression in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("mov {0}, {1}", out(reg) x, in(reg) y);
|
||||
* // ^ ^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOperandExpr = Impl::AsmOperandExpr;
|
||||
|
||||
@@ -8,4 +8,13 @@ import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.AsmPiece
|
||||
import codeql.rust.elements.Name
|
||||
|
||||
/**
|
||||
* A named operand in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("mov {out}, {in}", out = out(reg) x, in = in(reg) y);
|
||||
* // ^^^^^ ^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOperandNamed = Impl::AsmOperandNamed;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmOption.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmOption.qll
generated
@@ -6,4 +6,13 @@
|
||||
private import internal.AsmOptionImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* An option in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("", options(nostack, nomem));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOption = Impl::AsmOption;
|
||||
|
||||
@@ -7,4 +7,13 @@ private import internal.AsmOptionsListImpl
|
||||
import codeql.rust.elements.AsmOption
|
||||
import codeql.rust.elements.AsmPiece
|
||||
|
||||
/**
|
||||
* A list of options in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("", options(nostack, nomem));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOptionsList = Impl::AsmOptionsList;
|
||||
|
||||
@@ -9,4 +9,13 @@ import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.AsmOperandExpr
|
||||
import codeql.rust.elements.AsmRegSpec
|
||||
|
||||
/**
|
||||
* A register operand in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("mov {0}, {1}", out(reg) x, in(reg) y);
|
||||
* // ^ ^
|
||||
* ```
|
||||
*/
|
||||
final class AsmRegOperand = Impl::AsmRegOperand;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmRegSpec.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmRegSpec.qll
generated
@@ -7,4 +7,13 @@ private import internal.AsmRegSpecImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.NameRef
|
||||
|
||||
/**
|
||||
* A register specification in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("mov {0}, {1}", out("eax") x, in("ebx") y);
|
||||
* // ^^^ ^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmRegSpec = Impl::AsmRegSpec;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/AsmSym.qll
generated
9
rust/ql/lib/codeql/rust/elements/AsmSym.qll
generated
@@ -7,4 +7,13 @@ private import internal.AsmSymImpl
|
||||
import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.Path
|
||||
|
||||
/**
|
||||
* A symbol operand in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* asm!("call {sym}", sym = sym my_function);
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmSym = Impl::AsmSym;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/AssocItem.qll
generated
7
rust/ql/lib/codeql/rust/elements/AssocItem.qll
generated
@@ -7,9 +7,12 @@ private import internal.AssocItemImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A AssocItem. For example:
|
||||
* An associated item in a `Trait` or `Impl`.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* trait T {fn foo(&self);}
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AssocItem = Impl::AssocItem;
|
||||
|
||||
@@ -9,6 +9,6 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
|
||||
/**
|
||||
* A list of `AssocItem` elements, as appearing for example in a `Trait`.
|
||||
* A list of `AssocItem` elements, as appearing in a `Trait` or `Impl`.
|
||||
*/
|
||||
final class AssocItemList = Impl::AssocItemList;
|
||||
|
||||
@@ -15,9 +15,12 @@ import codeql.rust.elements.TypeBoundList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A AssocTypeArg. For example:
|
||||
* An associated type argument in a path.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* <T as Iterator>::Item
|
||||
* // ^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AssocTypeArg = Impl::AssocTypeArg;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/Attr.qll
generated
8
rust/ql/lib/codeql/rust/elements/Attr.qll
generated
@@ -8,9 +8,13 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Meta
|
||||
|
||||
/**
|
||||
* A Attr. For example:
|
||||
* An attribute applied to an item.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* #[derive(Debug)]
|
||||
* //^^^^^^^^^^^^^
|
||||
* struct S;
|
||||
* ```
|
||||
*/
|
||||
final class Attr = Impl::Attr;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.GenericParamList
|
||||
|
||||
/**
|
||||
* A ClosureBinder. For example:
|
||||
* A closure binder, specifying lifetime or type parameters for a closure.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* for <'a> |x: &'a u32 | x
|
||||
* // ^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ClosureBinder = Impl::ClosureBinder;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/Const.qll
generated
6
rust/ql/lib/codeql/rust/elements/Const.qll
generated
@@ -13,9 +13,11 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A Const. For example:
|
||||
* A constant item declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* const X: i32 = 42;
|
||||
* ```
|
||||
*/
|
||||
final class Const = Impl::Const;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ConstArg.qll
generated
7
rust/ql/lib/codeql/rust/elements/ConstArg.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.GenericArg
|
||||
|
||||
/**
|
||||
* A ConstArg. For example:
|
||||
* A constant argument in a generic argument list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* Foo::<3>
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class ConstArg = Impl::ConstArg;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ConstParam.qll
generated
7
rust/ql/lib/codeql/rust/elements/ConstParam.qll
generated
@@ -11,9 +11,12 @@ import codeql.rust.elements.Name
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ConstParam. For example:
|
||||
* A constant parameter in a generic parameter list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct Foo <const N: usize>;
|
||||
* // ^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ConstParam = Impl::ConstParam;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.TypeBoundList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A DynTraitTypeRepr. For example:
|
||||
* A dynamic trait object type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let x: &dyn Debug;
|
||||
* // ^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class DynTraitTypeRepr = Impl::DynTraitTypeRepr;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/Enum.qll
generated
6
rust/ql/lib/codeql/rust/elements/Enum.qll
generated
@@ -13,9 +13,11 @@ import codeql.rust.elements.Visibility
|
||||
import codeql.rust.elements.WhereClause
|
||||
|
||||
/**
|
||||
* A Enum. For example:
|
||||
* An enum declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* enum E {A, B(i32), C {x: i32}}
|
||||
* ```
|
||||
*/
|
||||
final class Enum = Impl::Enum;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/ExternBlock.qll
generated
8
rust/ql/lib/codeql/rust/elements/ExternBlock.qll
generated
@@ -10,9 +10,13 @@ import codeql.rust.elements.ExternItemList
|
||||
import codeql.rust.elements.Item
|
||||
|
||||
/**
|
||||
* A ExternBlock. For example:
|
||||
* An extern block containing foreign function declarations.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern "C" {
|
||||
* fn foo();
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ExternBlock = Impl::ExternBlock;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/ExternCrate.qll
generated
6
rust/ql/lib/codeql/rust/elements/ExternCrate.qll
generated
@@ -11,9 +11,11 @@ import codeql.rust.elements.Rename
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A ExternCrate. For example:
|
||||
* An extern crate declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern crate serde;
|
||||
* ```
|
||||
*/
|
||||
final class ExternCrate = Impl::ExternCrate;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/ExternItem.qll
generated
9
rust/ql/lib/codeql/rust/elements/ExternItem.qll
generated
@@ -7,9 +7,14 @@ private import internal.ExternItemImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A ExternItem. For example:
|
||||
* An item inside an extern block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern "C" {
|
||||
* fn foo();
|
||||
* static BAR: i32;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ExternItem = Impl::ExternItem;
|
||||
|
||||
@@ -9,9 +9,14 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.ExternItem
|
||||
|
||||
/**
|
||||
* A ExternItemList. For example:
|
||||
* A list of items inside an extern block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern "C" {
|
||||
* fn foo();
|
||||
* static BAR: i32;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ExternItemList = Impl::ExternItemList;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/FieldList.qll
generated
9
rust/ql/lib/codeql/rust/elements/FieldList.qll
generated
@@ -7,9 +7,14 @@ private import internal.FieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A field of a variant. For example:
|
||||
* A list of fields in a struct or enum variant.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct S {x: i32, y: i32}
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* enum E {A(i32, i32)}
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class FieldList = Impl::FieldList;
|
||||
|
||||
@@ -10,9 +10,12 @@ import codeql.rust.elements.RetTypeRepr
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A FnPtrTypeRepr. For example:
|
||||
* A function pointer type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let f: fn(i32) -> i32;
|
||||
* // ^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class FnPtrTypeRepr = Impl::FnPtrTypeRepr;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/ForExpr.qll
generated
8
rust/ql/lib/codeql/rust/elements/ForExpr.qll
generated
@@ -10,9 +10,13 @@ import codeql.rust.elements.LoopingExpr
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* A ForExpr. For example:
|
||||
* A for loop expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* for x in 0..10 {
|
||||
* println!("{}", x);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ForExpr = Impl::ForExpr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ForTypeRepr.qll
generated
7
rust/ql/lib/codeql/rust/elements/ForTypeRepr.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.GenericParamList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ForTypeRepr. For example:
|
||||
* A higher-ranked trait bound(HRTB) type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* for <'a> fn(&'a str)
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ForTypeRepr = Impl::ForTypeRepr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/GenericArg.qll
generated
7
rust/ql/lib/codeql/rust/elements/GenericArg.qll
generated
@@ -7,9 +7,12 @@ private import internal.GenericArgImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A GenericArg. For example:
|
||||
* A generic argument in a generic argument list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* Foo:: <u32, 3, 'a>
|
||||
* // ^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class GenericArg = Impl::GenericArg;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.GenericParamImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A GenericParam. For example:
|
||||
* A generic parameter in a generic parameter list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T, U>(t: T, u: U) {}
|
||||
* // ^ ^
|
||||
* ```
|
||||
*/
|
||||
final class GenericParam = Impl::GenericParam;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/Impl.qll
generated
8
rust/ql/lib/codeql/rust/elements/Impl.qll
generated
@@ -13,9 +13,13 @@ import codeql.rust.elements.Visibility
|
||||
import codeql.rust.elements.WhereClause
|
||||
|
||||
/**
|
||||
* A Impl. For example:
|
||||
* An `impl`` block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* impl MyTrait for MyType {
|
||||
* fn foo(&self) {}
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class Impl = Impl::Impl;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.TypeBoundList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ImplTraitTypeRepr. For example:
|
||||
* An `impl Trait` type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo() -> impl Iterator<Item = i32> { 0..10 }
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ImplTraitTypeRepr = Impl::ImplTraitTypeRepr;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.InferTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A InferTypeRepr. For example:
|
||||
* An inferred type (`_`).
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let x: _ = 42;
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class InferTypeRepr = Impl::InferTypeRepr;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/Item.qll
generated
8
rust/ql/lib/codeql/rust/elements/Item.qll
generated
@@ -9,9 +9,13 @@ import codeql.rust.elements.MacroItems
|
||||
import codeql.rust.elements.Stmt
|
||||
|
||||
/**
|
||||
* A Item. For example:
|
||||
* An item such as a function, struct, enum, etc.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo() {}
|
||||
* struct S;
|
||||
* enum E {}
|
||||
* ```
|
||||
*/
|
||||
final class Item = Impl::Item;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/ItemList.qll
generated
9
rust/ql/lib/codeql/rust/elements/ItemList.qll
generated
@@ -9,9 +9,14 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Item
|
||||
|
||||
/**
|
||||
* A ItemList. For example:
|
||||
* A list of items in a module or block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* mod m {
|
||||
* fn foo() {}
|
||||
* struct S;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ItemList = Impl::ItemList;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/LetElse.qll
generated
9
rust/ql/lib/codeql/rust/elements/LetElse.qll
generated
@@ -8,9 +8,14 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.BlockExpr
|
||||
|
||||
/**
|
||||
* A LetElse. For example:
|
||||
* An else block in a let-else statement.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let Some(x) = opt else {
|
||||
* return;
|
||||
* };
|
||||
* // ^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class LetElse = Impl::LetElse;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Lifetime.qll
generated
7
rust/ql/lib/codeql/rust/elements/Lifetime.qll
generated
@@ -7,9 +7,12 @@ private import internal.LifetimeImpl
|
||||
import codeql.rust.elements.UseBoundGenericArg
|
||||
|
||||
/**
|
||||
* A Lifetime. For example:
|
||||
* A lifetime annotation.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<'a>(x: &'a str) {}
|
||||
* // ^^ ^^
|
||||
* ```
|
||||
*/
|
||||
final class Lifetime = Impl::Lifetime;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/LifetimeArg.qll
generated
7
rust/ql/lib/codeql/rust/elements/LifetimeArg.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.GenericArg
|
||||
import codeql.rust.elements.Lifetime
|
||||
|
||||
/**
|
||||
* A LifetimeArg. For example:
|
||||
* A lifetime argument in a generic argument list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* Foo<'a>
|
||||
* // ^^
|
||||
* ```
|
||||
*/
|
||||
final class LifetimeArg = Impl::LifetimeArg;
|
||||
|
||||
@@ -10,9 +10,12 @@ import codeql.rust.elements.Lifetime
|
||||
import codeql.rust.elements.TypeBoundList
|
||||
|
||||
/**
|
||||
* A LifetimeParam. For example:
|
||||
* A lifetime parameter in a generic parameter list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<'a>(x: &'a str) {}
|
||||
* // ^^
|
||||
* ```
|
||||
*/
|
||||
final class LifetimeParam = Impl::LifetimeParam;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/MacroCall.qll
generated
7
rust/ql/lib/codeql/rust/elements/MacroCall.qll
generated
@@ -13,9 +13,12 @@ import codeql.rust.elements.Path
|
||||
import codeql.rust.elements.TokenTree
|
||||
|
||||
/**
|
||||
* A MacroCall. For example:
|
||||
* A macro invocation.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* println!("Hello, world!");
|
||||
* //^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class MacroCall = Impl::MacroCall;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/MacroDef.qll
generated
10
rust/ql/lib/codeql/rust/elements/MacroDef.qll
generated
@@ -11,9 +11,15 @@ import codeql.rust.elements.TokenTree
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A MacroDef. For example:
|
||||
* A macro definition using the `macro_rules!` or similar syntax.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* macro_rules! my_macro {
|
||||
* () => {
|
||||
* println!("This is a macro!");
|
||||
* };
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MacroDef = Impl::MacroDef;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/MacroExpr.qll
generated
6
rust/ql/lib/codeql/rust/elements/MacroExpr.qll
generated
@@ -8,9 +8,11 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.MacroCall
|
||||
|
||||
/**
|
||||
* A MacroExpr. For example:
|
||||
* A macro expression, representing the invocation of a macro that produces an expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let y = vec![1, 2, 3];
|
||||
* ```
|
||||
*/
|
||||
final class MacroExpr = Impl::MacroExpr;
|
||||
|
||||
9
rust/ql/lib/codeql/rust/elements/MacroPat.qll
generated
9
rust/ql/lib/codeql/rust/elements/MacroPat.qll
generated
@@ -8,9 +8,14 @@ import codeql.rust.elements.MacroCall
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* A MacroPat. For example:
|
||||
* A macro pattern, representing the invocation of a macro that produces a pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* match x {
|
||||
* my_macro!() => "matched",
|
||||
* _ => "not matched",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MacroPat = Impl::MacroPat;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/MacroRules.qll
generated
8
rust/ql/lib/codeql/rust/elements/MacroRules.qll
generated
@@ -11,9 +11,13 @@ import codeql.rust.elements.TokenTree
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A MacroRules. For example:
|
||||
* A macro definition using the `macro_rules!` syntax.
|
||||
* ```rust
|
||||
* todo!()
|
||||
* macro_rules! my_macro {
|
||||
* () => {
|
||||
* println!("This is a macro!");
|
||||
* };
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MacroRules = Impl::MacroRules;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.MacroCall
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A MacroTypeRepr. For example:
|
||||
* A type produced by a macro.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* type T = macro_type!();
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class MacroTypeRepr = Impl::MacroTypeRepr;
|
||||
|
||||
11
rust/ql/lib/codeql/rust/elements/MatchArmList.qll
generated
11
rust/ql/lib/codeql/rust/elements/MatchArmList.qll
generated
@@ -9,9 +9,16 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.MatchArm
|
||||
|
||||
/**
|
||||
* A MatchArmList. For example:
|
||||
* A list of arms in a match expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* match x {
|
||||
* 1 => "one",
|
||||
* 2 => "two",
|
||||
* _ => "other",
|
||||
* }
|
||||
* // ^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class MatchArmList = Impl::MatchArmList;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/MatchGuard.qll
generated
10
rust/ql/lib/codeql/rust/elements/MatchGuard.qll
generated
@@ -8,9 +8,15 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A MatchGuard. For example:
|
||||
* A guard condition in a match arm.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* match x {
|
||||
* y if y > 0 => "positive",
|
||||
* // ^^^^^^^
|
||||
* _ => "non-positive",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MatchGuard = Impl::MatchGuard;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Meta.qll
generated
7
rust/ql/lib/codeql/rust/elements/Meta.qll
generated
@@ -10,9 +10,12 @@ import codeql.rust.elements.Path
|
||||
import codeql.rust.elements.TokenTree
|
||||
|
||||
/**
|
||||
* A Meta. For example:
|
||||
* A meta item in an attribute.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* #[cfg(feature = "foo")]
|
||||
* // ^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class Meta = Impl::Meta;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Name.qll
generated
7
rust/ql/lib/codeql/rust/elements/Name.qll
generated
@@ -7,9 +7,12 @@ private import internal.NameImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A Name. For example:
|
||||
* An identifier name.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let foo = 1;
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class Name = Impl::Name;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/NameRef.qll
generated
7
rust/ql/lib/codeql/rust/elements/NameRef.qll
generated
@@ -7,9 +7,12 @@ private import internal.NameRefImpl
|
||||
import codeql.rust.elements.UseBoundGenericArg
|
||||
|
||||
/**
|
||||
* A NameRef. For example:
|
||||
* A reference to a name.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* foo();
|
||||
* //^^^
|
||||
* ```
|
||||
*/
|
||||
final class NameRef = Impl::NameRef;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.NeverTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A NeverTypeRepr. For example:
|
||||
* The never type `!`.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo() -> ! { panic!() }
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class NeverTypeRepr = Impl::NeverTypeRepr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ParamList.qll
generated
7
rust/ql/lib/codeql/rust/elements/ParamList.qll
generated
@@ -9,9 +9,12 @@ import codeql.rust.elements.Param
|
||||
import codeql.rust.elements.SelfParam
|
||||
|
||||
/**
|
||||
* A ParamList. For example:
|
||||
* A list of parameters in a function, method, or closure declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo(x: i32, y: i32) {}
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ParamList = Impl::ParamList;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ParenExpr.qll
generated
7
rust/ql/lib/codeql/rust/elements/ParenExpr.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A ParenExpr. For example:
|
||||
* A parenthesized expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* (x + y)
|
||||
* //^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ParenExpr = Impl::ParenExpr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/ParenPat.qll
generated
7
rust/ql/lib/codeql/rust/elements/ParenPat.qll
generated
@@ -7,9 +7,12 @@ private import internal.ParenPatImpl
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* A ParenPat. For example:
|
||||
* A parenthesized pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let (x) = 1;
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class ParenPat = Impl::ParenPat;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.ParenTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ParenTypeRepr. For example:
|
||||
* A parenthesized type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let x: (i32);
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class ParenTypeRepr = Impl::ParenTypeRepr;
|
||||
|
||||
@@ -7,4 +7,18 @@ private import internal.ParenthesizedArgListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.TypeArg
|
||||
|
||||
/**
|
||||
* A parenthesized argument list as used in function traits.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* fn call_with_42<F>(f: F) -> i32
|
||||
* where
|
||||
* F: Fn(i32, String) -> i32,
|
||||
* // ^^^^^^^^^^^
|
||||
* {
|
||||
* f(42, "Don't panic".to_string())
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ParenthesizedArgList = Impl::ParenthesizedArgList;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/PathSegment.qll
generated
6
rust/ql/lib/codeql/rust/elements/PathSegment.qll
generated
@@ -15,5 +15,11 @@ import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A path segment, which is one part of a whole path.
|
||||
* For example:
|
||||
* - `HashMap`
|
||||
* - `HashMap<K, V>`
|
||||
* - `Fn(i32) -> i32`
|
||||
* - `widgets(..)`
|
||||
* - `<T as Iterator>`
|
||||
*/
|
||||
final class PathSegment = Impl::PathSegment;
|
||||
|
||||
@@ -8,10 +8,10 @@ import codeql.rust.elements.Path
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A type referring to a path. For example:
|
||||
* A path referring to a type. For example:
|
||||
* ```rust
|
||||
* type X = std::collections::HashMap<i32, i32>;
|
||||
* type Y = X::Item;
|
||||
* let x: (i32);
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class PathTypeRepr = Impl::PathTypeRepr;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/PtrTypeRepr.qll
generated
8
rust/ql/lib/codeql/rust/elements/PtrTypeRepr.qll
generated
@@ -7,9 +7,13 @@ private import internal.PtrTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A PtrTypeRepr. For example:
|
||||
* A pointer type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let p: *const i32;
|
||||
* let q: *mut i32;
|
||||
* // ^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class PtrTypeRepr = Impl::PtrTypeRepr;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/RefTypeRepr.qll
generated
8
rust/ql/lib/codeql/rust/elements/RefTypeRepr.qll
generated
@@ -8,9 +8,13 @@ import codeql.rust.elements.Lifetime
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A RefTypeRepr. For example:
|
||||
* A reference type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let r: &i32;
|
||||
* let m: &mut i32;
|
||||
* // ^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class RefTypeRepr = Impl::RefTypeRepr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Rename.qll
generated
7
rust/ql/lib/codeql/rust/elements/Rename.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Name
|
||||
|
||||
/**
|
||||
* A Rename. For example:
|
||||
* A rename in a use declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* use foo as bar;
|
||||
* // ^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class Rename = Impl::Rename;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/RestPat.qll
generated
7
rust/ql/lib/codeql/rust/elements/RestPat.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* A RestPat. For example:
|
||||
* A rest pattern (`..`) in a tuple, slice, or struct pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let (a, .., z) = (1, 2, 3);
|
||||
* // ^^
|
||||
* ```
|
||||
*/
|
||||
final class RestPat = Impl::RestPat;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/RetTypeRepr.qll
generated
7
rust/ql/lib/codeql/rust/elements/RetTypeRepr.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A RetTypeRepr. For example:
|
||||
* A return type in a function signature.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo() -> i32 {}
|
||||
* // ^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class RetTypeRepr = Impl::RetTypeRepr;
|
||||
|
||||
@@ -7,9 +7,22 @@ private import internal.ReturnTypeSyntaxImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A ReturnTypeSyntax. For example:
|
||||
* A return type notation `(..)` to reference or bound the type returned by a trait method
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct ReverseWidgets<F: Factory<widgets(..): DoubleEndedIterator>> {
|
||||
* factory: F,
|
||||
* }
|
||||
*
|
||||
* impl<F> Factory for ReverseWidgets<F>
|
||||
* where
|
||||
* F: Factory<widgets(..): DoubleEndedIterator>,
|
||||
* {
|
||||
* fn widgets(&self) -> impl Iterator<Item = Widget> {
|
||||
* self.factory.widgets().rev()
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class ReturnTypeSyntax = Impl::ReturnTypeSyntax;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.SliceTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A SliceTypeRepr. For example:
|
||||
* A slice type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let s: &[i32];
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class SliceTypeRepr = Impl::SliceTypeRepr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/SourceFile.qll
generated
7
rust/ql/lib/codeql/rust/elements/SourceFile.qll
generated
@@ -9,9 +9,12 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Item
|
||||
|
||||
/**
|
||||
* A SourceFile. For example:
|
||||
* A source file.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* // main.rs
|
||||
* fn main() {}
|
||||
* ```
|
||||
*/
|
||||
final class SourceFile = Impl::SourceFile;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/Static.qll
generated
6
rust/ql/lib/codeql/rust/elements/Static.qll
generated
@@ -13,9 +13,11 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A Static. For example:
|
||||
* A static item declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* static X: i32 = 42;
|
||||
* ```
|
||||
*/
|
||||
final class Static = Impl::Static;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/StmtList.qll
generated
10
rust/ql/lib/codeql/rust/elements/StmtList.qll
generated
@@ -10,9 +10,15 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.Stmt
|
||||
|
||||
/**
|
||||
* A StmtList. For example:
|
||||
* A list of statements in a block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* {
|
||||
* let x = 1;
|
||||
* let y = 2;
|
||||
* }
|
||||
* // ^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class StmtList = Impl::StmtList;
|
||||
|
||||
5
rust/ql/lib/codeql/rust/elements/Struct.qll
generated
5
rust/ql/lib/codeql/rust/elements/Struct.qll
generated
@@ -16,7 +16,10 @@ import codeql.rust.elements.WhereClause
|
||||
/**
|
||||
* A Struct. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct Point {
|
||||
* x: i32,
|
||||
* y: i32,
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class Struct = Impl::Struct;
|
||||
|
||||
@@ -10,9 +10,12 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.StructExprField
|
||||
|
||||
/**
|
||||
* A StructExprFieldList. For example:
|
||||
* A list of fields in a struct expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* Foo { a: 1, b: 2 }
|
||||
* // ^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class StructExprFieldList = Impl::StructExprFieldList;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/StructField.qll
generated
7
rust/ql/lib/codeql/rust/elements/StructField.qll
generated
@@ -12,9 +12,12 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A StructField. For example:
|
||||
* A field in a struct declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct S { x: i32 }
|
||||
* // ^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class StructField = Impl::StructField;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.FieldList
|
||||
import codeql.rust.elements.StructField
|
||||
|
||||
/**
|
||||
* A field list of a struct expression. For example:
|
||||
* A list of fields in a struct declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct S { x: i32, y: i32 }
|
||||
* // ^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class StructFieldList = Impl::StructFieldList;
|
||||
|
||||
@@ -9,9 +9,12 @@ import codeql.rust.elements.RestPat
|
||||
import codeql.rust.elements.StructPatField
|
||||
|
||||
/**
|
||||
* A StructPatFieldList. For example:
|
||||
* A list of fields in a struct pattern.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let Foo { a, b } = foo;
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class StructPatFieldList = Impl::StructPatFieldList;
|
||||
|
||||
11
rust/ql/lib/codeql/rust/elements/TokenTree.qll
generated
11
rust/ql/lib/codeql/rust/elements/TokenTree.qll
generated
@@ -7,9 +7,16 @@ private import internal.TokenTreeImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A TokenTree. For example:
|
||||
* A token tree in a macro definition or invocation.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* println!("{} {}!", "Hello", "world");
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
* ```
|
||||
* macro_rules! foo { ($x:expr) => { $x + 1 }; }
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TokenTree = Impl::TokenTree;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/TraitAlias.qll
generated
6
rust/ql/lib/codeql/rust/elements/TraitAlias.qll
generated
@@ -13,9 +13,11 @@ import codeql.rust.elements.Visibility
|
||||
import codeql.rust.elements.WhereClause
|
||||
|
||||
/**
|
||||
* A TraitAlias. For example:
|
||||
* A trait alias.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* trait Foo = Bar + Baz;
|
||||
* ```
|
||||
*/
|
||||
final class TraitAlias = Impl::TraitAlias;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/TryExpr.qll
generated
7
rust/ql/lib/codeql/rust/elements/TryExpr.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A TryExpr. For example:
|
||||
* A try expression using the `?` operator.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let x = foo()?;
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class TryExpr = Impl::TryExpr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/TupleField.qll
generated
7
rust/ql/lib/codeql/rust/elements/TupleField.qll
generated
@@ -10,9 +10,12 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A TupleField. For example:
|
||||
* A field in a tuple struct or tuple enum variant.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct S(i32, String);
|
||||
* // ^^^ ^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TupleField = Impl::TupleField;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.FieldList
|
||||
import codeql.rust.elements.TupleField
|
||||
|
||||
/**
|
||||
* A TupleFieldList. For example:
|
||||
* A list of fields in a tuple struct or tuple enum variant.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* struct S(i32, String);
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TupleFieldList = Impl::TupleFieldList;
|
||||
|
||||
@@ -7,9 +7,12 @@ private import internal.TupleTypeReprImpl
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A TupleTypeRepr. For example:
|
||||
* A tuple type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* let t: (i32, String);
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TupleTypeRepr = Impl::TupleTypeRepr;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/TypeArg.qll
generated
7
rust/ql/lib/codeql/rust/elements/TypeArg.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.GenericArg
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A TypeArg. For example:
|
||||
* A type argument in a generic argument list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* Foo::<u32>
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
final class TypeArg = Impl::TypeArg;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/TypeBound.qll
generated
7
rust/ql/lib/codeql/rust/elements/TypeBound.qll
generated
@@ -10,9 +10,12 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.UseBoundGenericArgs
|
||||
|
||||
/**
|
||||
* A TypeBound. For example:
|
||||
* A type bound in a trait or generic parameter.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T: Debug>(t: T) {}
|
||||
* // ^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TypeBound = Impl::TypeBound;
|
||||
|
||||
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.TypeBound
|
||||
|
||||
/**
|
||||
* A TypeBoundList. For example:
|
||||
* A list of type bounds.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T: Debug + Clone>(t: T) {}
|
||||
* // ^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class TypeBoundList = Impl::TypeBoundList;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/TypeParam.qll
generated
7
rust/ql/lib/codeql/rust/elements/TypeParam.qll
generated
@@ -11,9 +11,12 @@ import codeql.rust.elements.TypeBoundList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A TypeParam. For example:
|
||||
* A type parameter in a generic parameter list.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T>(t: T) {}
|
||||
* // ^
|
||||
* ```
|
||||
*/
|
||||
final class TypeParam = Impl::TypeParam;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/Union.qll
generated
6
rust/ql/lib/codeql/rust/elements/Union.qll
generated
@@ -14,9 +14,11 @@ import codeql.rust.elements.Visibility
|
||||
import codeql.rust.elements.WhereClause
|
||||
|
||||
/**
|
||||
* A Union. For example:
|
||||
* A union declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* union U { f1: u32, f2: f32 }
|
||||
* ```
|
||||
*/
|
||||
final class Union = Impl::Union;
|
||||
|
||||
4
rust/ql/lib/codeql/rust/elements/Use.qll
generated
4
rust/ql/lib/codeql/rust/elements/Use.qll
generated
@@ -10,9 +10,9 @@ import codeql.rust.elements.UseTree
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A Use. For example:
|
||||
* A `use` statement. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* use std::collections::HashMap;
|
||||
* ```
|
||||
*/
|
||||
final class Use = Impl::Use;
|
||||
|
||||
@@ -7,4 +7,13 @@ private import internal.UseBoundGenericArgsImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.UseBoundGenericArg
|
||||
|
||||
/**
|
||||
* A use<..> bound to control which generic parameters are captured by an impl Trait return type.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {}
|
||||
* // ^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class UseBoundGenericArgs = Impl::UseBoundGenericArgs;
|
||||
|
||||
2
rust/ql/lib/codeql/rust/elements/UseTree.qll
generated
2
rust/ql/lib/codeql/rust/elements/UseTree.qll
generated
@@ -10,7 +10,7 @@ import codeql.rust.elements.Rename
|
||||
import codeql.rust.elements.UseTreeList
|
||||
|
||||
/**
|
||||
* A UseTree. For example:
|
||||
* A `use` tree, ie the part after the `use` keyword in a `use` statement. For example:
|
||||
* ```rust
|
||||
* use std::collections::HashMap;
|
||||
* use std::collections::*;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/UseTreeList.qll
generated
7
rust/ql/lib/codeql/rust/elements/UseTreeList.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.UseTree
|
||||
|
||||
/**
|
||||
* A UseTreeList. For example:
|
||||
* A list of use trees in a use declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* use std::{fs, io};
|
||||
* // ^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class UseTreeList = Impl::UseTreeList;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Variant.qll
generated
7
rust/ql/lib/codeql/rust/elements/Variant.qll
generated
@@ -13,9 +13,12 @@ import codeql.rust.elements.VariantDef
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A Variant. For example:
|
||||
* A variant in an enum declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* enum E { A, B(i32), C { x: i32 } }
|
||||
* // ^ ^^^^^^ ^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class Variant = Impl::Variant;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/VariantList.qll
generated
7
rust/ql/lib/codeql/rust/elements/VariantList.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Variant
|
||||
|
||||
/**
|
||||
* A VariantList. For example:
|
||||
* A list of variants in an enum declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* enum E { A, B, C }
|
||||
* // ^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class VariantList = Impl::VariantList;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/Visibility.qll
generated
7
rust/ql/lib/codeql/rust/elements/Visibility.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Path
|
||||
|
||||
/**
|
||||
* A Visibility. For example:
|
||||
* A visibility modifier.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* pub struct S;
|
||||
* //^^^
|
||||
* ```
|
||||
*/
|
||||
final class Visibility = Impl::Visibility;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/WhereClause.qll
generated
7
rust/ql/lib/codeql/rust/elements/WhereClause.qll
generated
@@ -8,9 +8,12 @@ import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.WherePred
|
||||
|
||||
/**
|
||||
* A WhereClause. For example:
|
||||
* A where clause in a generic declaration.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T>(t: T) where T: Debug {}
|
||||
* // ^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class WhereClause = Impl::WhereClause;
|
||||
|
||||
7
rust/ql/lib/codeql/rust/elements/WherePred.qll
generated
7
rust/ql/lib/codeql/rust/elements/WherePred.qll
generated
@@ -11,9 +11,12 @@ import codeql.rust.elements.TypeBoundList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A WherePred. For example:
|
||||
* A predicate in a where clause.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T, U>(t: T, u: U) where T: Debug, U: Clone {}
|
||||
* // ^^^^^^^^ ^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class WherePred = Impl::WherePred;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/WhileExpr.qll
generated
8
rust/ql/lib/codeql/rust/elements/WhileExpr.qll
generated
@@ -9,9 +9,13 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.LoopingExpr
|
||||
|
||||
/**
|
||||
* A WhileExpr. For example:
|
||||
* A while loop expression.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* while x < 10 {
|
||||
* x += 1;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class WhileExpr = Impl::WhileExpr;
|
||||
|
||||
@@ -13,9 +13,12 @@ private import codeql.rust.elements.internal.generated.Abi
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A Abi. For example:
|
||||
* An ABI specification for an extern function or block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* extern "C" fn foo() {}
|
||||
* // ^^^
|
||||
* ```
|
||||
*/
|
||||
class Abi extends Generated::Abi { }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user