mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Merge branch 'main' into redsun82/rust-extract-libs
This commit is contained in:
24
rust/bulk_generation_targets.yml
Normal file
24
rust/bulk_generation_targets.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
strategy: dca
|
||||
language: rust
|
||||
destination: rust/ql/lib/ext/generated
|
||||
# targets must have name specified and corresponding to the name in the DCA suite
|
||||
# they can optionally specify any of
|
||||
# with-sinks: false
|
||||
# with-sources: false
|
||||
# with-summaries: false
|
||||
# if a target has a dependency in this same list, it should be listed after that dependency
|
||||
targets:
|
||||
- name: rust
|
||||
- name: libc
|
||||
- name: log
|
||||
- name: memchr
|
||||
- name: once_cell
|
||||
- name: rand
|
||||
- name: smallvec
|
||||
- name: serde
|
||||
- name: tokio
|
||||
- name: reqwest
|
||||
- name: rocket
|
||||
- name: actix-web
|
||||
- name: hyper
|
||||
- name: clap
|
||||
@@ -1,75 +0,0 @@
|
||||
{
|
||||
"strategy": "repo",
|
||||
"language": "rust",
|
||||
"targets": [
|
||||
{
|
||||
"name": "libc",
|
||||
"git_repo": "https://github.com/rust-lang/libc",
|
||||
"git_tag": "0.2.172"
|
||||
},
|
||||
{
|
||||
"name": "log",
|
||||
"git_repo": "https://github.com/rust-lang/log",
|
||||
"git_tag": "0.4.27"
|
||||
},
|
||||
{
|
||||
"name": "memchr",
|
||||
"git_repo": "https://github.com/BurntSushi/memchr",
|
||||
"git_tag": "2.7.4"
|
||||
},
|
||||
{
|
||||
"name": "once_cell",
|
||||
"git_repo": "https://github.com/matklad/once_cell",
|
||||
"git_tag": "v1.21.3"
|
||||
},
|
||||
{
|
||||
"name": "rand",
|
||||
"git_repo": "https://github.com/rust-random/rand",
|
||||
"git_tag": "0.9.1"
|
||||
},
|
||||
{
|
||||
"name": "smallvec",
|
||||
"git_repo": "https://github.com/servo/rust-smallvec",
|
||||
"git_tag": "v1.15.0"
|
||||
},
|
||||
{
|
||||
"name": "serde",
|
||||
"git_repo": "https://github.com/serde-rs/serde",
|
||||
"git_tag": "v1.0.219"
|
||||
},
|
||||
{
|
||||
"name": "tokio",
|
||||
"git_repo": "https://github.com/tokio-rs/tokio",
|
||||
"git_tag": "tokio-1.45.0"
|
||||
},
|
||||
{
|
||||
"name": "reqwest",
|
||||
"git_repo": "https://github.com/seanmonstar/reqwest",
|
||||
"git_tag": "v0.12.15"
|
||||
},
|
||||
{
|
||||
"name": "rocket",
|
||||
"git_repo": "https://github.com/SergioBenitez/Rocket",
|
||||
"git_tag": "v0.5.1"
|
||||
},
|
||||
{
|
||||
"name": "actix-web",
|
||||
"git_repo": "https://github.com/actix/actix-web",
|
||||
"git_tag": "web-v4.11.0"
|
||||
},
|
||||
{
|
||||
"name": "hyper",
|
||||
"git_repo": "https://github.com/hyperium/hyper",
|
||||
"git_tag": "v1.6.0"
|
||||
},
|
||||
{
|
||||
"name": "clap",
|
||||
"git_repo": "https://github.com/clap-rs/clap",
|
||||
"git_tag": "v4.5.38"
|
||||
}
|
||||
],
|
||||
"destination": "rust/ql/lib/ext/generated",
|
||||
"extractor_options": [
|
||||
"cargo_features='*'"
|
||||
]
|
||||
}
|
||||
607
rust/ql/.generated.list
generated
607
rust/ql/.generated.list
generated
File diff suppressed because it is too large
Load Diff
45
rust/ql/.gitattributes
generated
vendored
45
rust/ql/.gitattributes
generated
vendored
@@ -242,7 +242,6 @@
|
||||
/lib/codeql/rust/elements/internal/BoxPatConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/BreakExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/CallExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/CallableImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/CastExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ClosureBinderConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ClosureBinderImpl.qll linguist-generated
|
||||
@@ -673,21 +672,33 @@
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmClobberAbi/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmConst/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmDirSpec/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmClobberAbi/AsmClobberAbi.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmConst/AsmConst.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmConst/AsmConst_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmDirSpec/AsmDirSpec.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmExpr/AsmExpr_getAsmPiece.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmExpr/AsmExpr_getTemplate.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmLabel/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandExpr/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandNamed/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmOption/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmOptionsList/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegOperand/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegSpec/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmSym/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/AsmLabel/AsmLabel.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmLabel/AsmLabel_getBlockExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getInExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandExpr/AsmOperandExpr_getOutExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getAsmOperand.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOperandNamed/AsmOperandNamed_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOption/AsmOption.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmOptionsList/AsmOptionsList_getAsmOption.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmDirSpec.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmOperandExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegOperand/AsmRegOperand_getAsmRegSpec.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmRegSpec/AsmRegSpec_getIdentifier.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmSym/AsmSym.ql linguist-generated
|
||||
/test/extractor-tests/generated/AsmSym/AsmSym_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql linguist-generated
|
||||
@@ -721,6 +732,7 @@
|
||||
/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.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/CallExpr/CallExpr_getArgList.ql linguist-generated
|
||||
/test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/CallExpr/CallExpr_getFunction.ql linguist-generated
|
||||
@@ -734,6 +746,7 @@
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql linguist-generated
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParam.ql linguist-generated
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated
|
||||
/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated
|
||||
/test/extractor-tests/generated/Comment/Comment.ql linguist-generated
|
||||
@@ -832,6 +845,7 @@
|
||||
/test/extractor-tests/generated/Function/Function_getExtendedCanonicalPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getGenericParamList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getParam.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getParamList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getRetType.ql linguist-generated
|
||||
/test/extractor-tests/generated/Function/Function_getVisibility.ql linguist-generated
|
||||
@@ -956,6 +970,7 @@
|
||||
/test/extractor-tests/generated/Meta/Meta_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/Meta/Meta_getTokenTree.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_getArgList.ql linguist-generated
|
||||
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql linguist-generated
|
||||
@@ -996,7 +1011,8 @@
|
||||
/test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ParenTypeRepr/ParenTypeRepr_getTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ParenthesizedArgList/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList.ql linguist-generated
|
||||
/test/extractor-tests/generated/ParenthesizedArgList/ParenthesizedArgList_getTypeArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/Path/Path.ql linguist-generated
|
||||
/test/extractor-tests/generated/Path/PathExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/Path/PathExpr_getAttr.ql linguist-generated
|
||||
@@ -1209,7 +1225,8 @@
|
||||
/test/extractor-tests/generated/Use/Use_getExtendedCanonicalPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/Use/Use_getUseTree.ql linguist-generated
|
||||
/test/extractor-tests/generated/Use/Use_getVisibility.ql linguist-generated
|
||||
/test/extractor-tests/generated/UseBoundGenericArgs/MISSING_SOURCE.txt linguist-generated
|
||||
/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs.ql linguist-generated
|
||||
/test/extractor-tests/generated/UseBoundGenericArgs/UseBoundGenericArgs_getUseBoundGenericArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/UseTree/UseTree.ql linguist-generated
|
||||
/test/extractor-tests/generated/UseTree/UseTree_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/UseTree/UseTree_getRename.ql linguist-generated
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
## 0.1.10
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 0.1.9
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
## 0.1.8
|
||||
|
||||
No user-facing changes.
|
||||
|
||||
3
rust/ql/lib/change-notes/released/0.1.10.md
Normal file
3
rust/ql/lib/change-notes/released/0.1.10.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.1.10
|
||||
|
||||
No user-facing changes.
|
||||
3
rust/ql/lib/change-notes/released/0.1.9.md
Normal file
3
rust/ql/lib/change-notes/released/0.1.9.md
Normal file
@@ -0,0 +1,3 @@
|
||||
## 0.1.9
|
||||
|
||||
No user-facing changes.
|
||||
@@ -1,2 +1,2 @@
|
||||
---
|
||||
lastReleaseVersion: 0.1.8
|
||||
lastReleaseVersion: 0.1.10
|
||||
|
||||
@@ -59,7 +59,7 @@ class BreakExprTargetChildMapping extends ParentAstNode, Expr {
|
||||
}
|
||||
|
||||
class CallExprBaseChildMapping extends ParentAstNode, CallExprBase {
|
||||
override predicate relevantChild(AstNode child) { child = this.getArgList().getAnArg() }
|
||||
override predicate relevantChild(AstNode child) { child = this.getAnArg() }
|
||||
}
|
||||
|
||||
class StructExprChildMapping extends ParentAstNode, StructExpr {
|
||||
|
||||
@@ -87,7 +87,7 @@ class CallableScopeTree extends StandardTree, PreOrderTree, PostOrderTree, Scope
|
||||
i = 0 and
|
||||
result = this.getParamList().getSelfParam()
|
||||
or
|
||||
result = this.getParamList().getParam(i - 1)
|
||||
result = this.getParam(i - 1)
|
||||
or
|
||||
i = this.getParamList().getNumberOfParams() + 1 and
|
||||
result = this.getBody()
|
||||
@@ -143,6 +143,8 @@ class LetStmtTree extends PreOrderTree, LetStmt {
|
||||
}
|
||||
|
||||
class MacroCallTree extends StandardPostOrderTree, MacroCall {
|
||||
MacroCallTree() { not this.getParentNode() instanceof MacroPat }
|
||||
|
||||
override AstNode getChildNode(int i) { i = 0 and result = this.getMacroCallExpansion() }
|
||||
}
|
||||
|
||||
@@ -541,7 +543,7 @@ module ExprTrees {
|
||||
|
||||
class MethodCallExprTree extends StandardPostOrderTree, MethodCallExpr {
|
||||
override AstNode getChildNode(int i) {
|
||||
if i = 0 then result = this.getReceiver() else result = this.getArgList().getArg(i - 1)
|
||||
if i = 0 then result = this.getReceiver() else result = this.getArg(i - 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -198,7 +198,8 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
* An inline assembly expression. For example:
|
||||
* ```rust
|
||||
* unsafe {
|
||||
* builtin # asm(_);
|
||||
* #[inline(always)]
|
||||
* builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@@ -721,6 +722,21 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
* Gets the number of attrs of this call expression base.
|
||||
*/
|
||||
int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th argument of this call expression base (0-based).
|
||||
*/
|
||||
Expr getArg(int index) { result = node.getArg(index) }
|
||||
|
||||
/**
|
||||
* Gets any of the arguments of this call expression base.
|
||||
*/
|
||||
Expr getAnArg() { result = this.getArg(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of arguments of this call expression base.
|
||||
*/
|
||||
int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) }
|
||||
}
|
||||
|
||||
final private class ParentCastExpr extends ParentAstNode, CastExpr {
|
||||
@@ -968,9 +984,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 +1843,11 @@ 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 +1913,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 +1950,20 @@ 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!()
|
||||
* macro_rules! my_macro {
|
||||
* () => {
|
||||
* Ok(_)
|
||||
* };
|
||||
* }
|
||||
* match x {
|
||||
* my_macro!() => "matched",
|
||||
* // ^^^^^^^^^^^
|
||||
* _ => "not matched",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class MacroPatCfgNode extends CfgNodeFinal, PatCfgNode {
|
||||
@@ -2082,9 +2117,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 +2734,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 +3002,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 +3230,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;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmClobberAbi.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmClobberAbi.qll
generated
@@ -6,4 +6,14 @@
|
||||
private import internal.AsmClobberAbiImpl
|
||||
import codeql.rust.elements.AsmPiece
|
||||
|
||||
/**
|
||||
* A clobbered ABI in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* use core::arch::asm;
|
||||
* asm!("", clobber_abi("C"));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmClobberAbi = Impl::AsmClobberAbi;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmConst.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmConst.qll
generated
@@ -7,4 +7,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("mov eax, {const}", const 42);
|
||||
* // ^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmConst = Impl::AsmConst;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmDirSpec.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmDirSpec.qll
generated
@@ -6,4 +6,14 @@
|
||||
private import internal.AsmDirSpecImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* An inline assembly direction specifier.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* use core::arch::asm;
|
||||
* asm!("mov {input:x}, {input:x}", output = out(reg) x, input = in(reg) y);
|
||||
* // ^^^ ^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmDirSpec = Impl::AsmDirSpec;
|
||||
|
||||
3
rust/ql/lib/codeql/rust/elements/AsmExpr.qll
generated
3
rust/ql/lib/codeql/rust/elements/AsmExpr.qll
generated
@@ -12,7 +12,8 @@ import codeql.rust.elements.Expr
|
||||
* An inline assembly expression. For example:
|
||||
* ```rust
|
||||
* unsafe {
|
||||
* builtin # asm(_);
|
||||
* #[inline(always)]
|
||||
* builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
|
||||
13
rust/ql/lib/codeql/rust/elements/AsmLabel.qll
generated
13
rust/ql/lib/codeql/rust/elements/AsmLabel.qll
generated
@@ -7,4 +7,17 @@ private import internal.AsmLabelImpl
|
||||
import codeql.rust.elements.AsmOperand
|
||||
import codeql.rust.elements.BlockExpr
|
||||
|
||||
/**
|
||||
* A label in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* use core::arch::asm;
|
||||
* asm!(
|
||||
* "jmp {}",
|
||||
* label { println!("Jumped from asm!"); }
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* );
|
||||
* ```
|
||||
*/
|
||||
final class AsmLabel = Impl::AsmLabel;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmOperandExpr.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmOperandExpr.qll
generated
@@ -7,4 +7,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("mov {0}, {1}", out(reg) x, in(reg) y);
|
||||
* // ^ ^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOperandExpr = Impl::AsmOperandExpr;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmOperandNamed.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmOperandNamed.qll
generated
@@ -8,4 +8,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("mov {0:x}, {input:x}", out(reg) x, input = in(reg) y);
|
||||
* // ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOperandNamed = Impl::AsmOperandNamed;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmOption.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmOption.qll
generated
@@ -6,4 +6,14 @@
|
||||
private import internal.AsmOptionImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* An option in an inline assembly block.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* use core::arch::asm;
|
||||
* asm!("", options(nostack, nomem));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOption = Impl::AsmOption;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmOptionsList.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmOptionsList.qll
generated
@@ -7,4 +7,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("", options(nostack, nomem));
|
||||
* // ^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmOptionsList = Impl::AsmOptionsList;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmRegOperand.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmRegOperand.qll
generated
@@ -9,4 +9,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("mov {0}, {1}", out(reg) x, in(reg) y);
|
||||
* // ^ ^
|
||||
* ```
|
||||
*/
|
||||
final class AsmRegOperand = Impl::AsmRegOperand;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmRegSpec.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmRegSpec.qll
generated
@@ -7,4 +7,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* asm!("mov {0}, {1}", out("eax") x, in(EBX) y);
|
||||
* // ^^^ ^^^
|
||||
* ```
|
||||
*/
|
||||
final class AsmRegSpec = Impl::AsmRegSpec;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/AsmSym.qll
generated
10
rust/ql/lib/codeql/rust/elements/AsmSym.qll
generated
@@ -7,4 +7,14 @@ 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
|
||||
* use core::arch::asm;
|
||||
* 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;
|
||||
|
||||
12
rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll
generated
12
rust/ql/lib/codeql/rust/elements/AssocTypeArg.qll
generated
@@ -15,9 +15,17 @@ 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!()
|
||||
* fn process_cloneable<T>(iter: T)
|
||||
* where
|
||||
* T: Iterator<Item: Clone>
|
||||
* // ^^^^^^^^^^^
|
||||
* {
|
||||
* // ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
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;
|
||||
|
||||
1
rust/ql/lib/codeql/rust/elements/Callable.qll
generated
1
rust/ql/lib/codeql/rust/elements/Callable.qll
generated
@@ -6,6 +6,7 @@
|
||||
private import internal.CallableImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Param
|
||||
import codeql.rust.elements.ParamList
|
||||
|
||||
/**
|
||||
|
||||
12
rust/ql/lib/codeql/rust/elements/ClosureBinder.qll
generated
12
rust/ql/lib/codeql/rust/elements/ClosureBinder.qll
generated
@@ -8,9 +8,17 @@ 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!()
|
||||
* let print_any = for<T: std::fmt::Debug> |x: T| {
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* println!("{:?}", x);
|
||||
* };
|
||||
*
|
||||
* print_any(42);
|
||||
* print_any("hello");
|
||||
* ```
|
||||
*/
|
||||
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;
|
||||
|
||||
12
rust/ql/lib/codeql/rust/elements/ForTypeRepr.qll
generated
12
rust/ql/lib/codeql/rust/elements/ForTypeRepr.qll
generated
@@ -8,9 +8,17 @@ import codeql.rust.elements.GenericParamList
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A ForTypeRepr. For example:
|
||||
* A higher-ranked trait bound.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* fn foo<T>(value: T)
|
||||
* where
|
||||
* T: for<'a> Fn(&'a str) -> &'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!()
|
||||
* let text: Text<'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;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/MacroCall.qll
generated
6
rust/ql/lib/codeql/rust/elements/MacroCall.qll
generated
@@ -13,9 +13,11 @@ 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;
|
||||
|
||||
8
rust/ql/lib/codeql/rust/elements/MacroDef.qll
generated
8
rust/ql/lib/codeql/rust/elements/MacroDef.qll
generated
@@ -11,9 +11,13 @@ import codeql.rust.elements.TokenTree
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A MacroDef. For example:
|
||||
* A Rust 2.0 style declarative macro definition.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* pub macro vec_of_two($element:expr) {
|
||||
* vec![$element, $element]
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
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;
|
||||
|
||||
15
rust/ql/lib/codeql/rust/elements/MacroPat.qll
generated
15
rust/ql/lib/codeql/rust/elements/MacroPat.qll
generated
@@ -8,9 +8,20 @@ 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!()
|
||||
* macro_rules! my_macro {
|
||||
* () => {
|
||||
* Ok(_)
|
||||
* };
|
||||
* }
|
||||
* 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;
|
||||
|
||||
10
rust/ql/lib/codeql/rust/elements/MacroTypeRepr.qll
generated
10
rust/ql/lib/codeql/rust/elements/MacroTypeRepr.qll
generated
@@ -8,9 +8,15 @@ import codeql.rust.elements.MacroCall
|
||||
import codeql.rust.elements.TypeRepr
|
||||
|
||||
/**
|
||||
* A MacroTypeRepr. For example:
|
||||
* A type produced by a macro.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* macro_rules! macro_type {
|
||||
* () => { i32 };
|
||||
* }
|
||||
* 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;
|
||||
|
||||
12
rust/ql/lib/codeql/rust/elements/Meta.qll
generated
12
rust/ql/lib/codeql/rust/elements/Meta.qll
generated
@@ -10,9 +10,17 @@ import codeql.rust.elements.Path
|
||||
import codeql.rust.elements.TokenTree
|
||||
|
||||
/**
|
||||
* A Meta. For example:
|
||||
* A meta item in an attribute.
|
||||
*
|
||||
* For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* #[unsafe(lint::name = "reason_for_bypass")]
|
||||
* //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* #[deprecated(since = "1.2.0", note = "Use bar instead", unsafe=true)]
|
||||
* //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* fn 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;
|
||||
|
||||
6
rust/ql/lib/codeql/rust/elements/ParenExpr.qll
generated
6
rust/ql/lib/codeql/rust/elements/ParenExpr.qll
generated
@@ -8,9 +8,11 @@ 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,7 +8,7 @@ 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;
|
||||
|
||||
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");
|
||||
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* ```
|
||||
* ```rust
|
||||
* 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;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user