CodeQL library for Rust
codeql/rust-all 0.2.13 (changelog, source)
Search

Module Raw

INTERNAL: Do not use. This module holds thin fully generated class definitions around DB entities.

Import path

import codeql.rust.elements.internal.generated.Raw

Predicates

getImmediateChild

Gets the immediate child indexed at index. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct.

Classes

Abi

INTERNAL: Do not use. An ABI specification for an extern function or block.

Addressable

INTERNAL: Do not use. Something that can be addressed by a path.

ArgList

INTERNAL: Do not use. A list of arguments in a function or method call.

ArrayExprInternal

INTERNAL: Do not use.

ArrayTypeRepr

INTERNAL: Do not use. An array type representation.

AsmClobberAbi

INTERNAL: Do not use. A clobbered ABI in an inline assembly block.

AsmConst

INTERNAL: Do not use. A constant operand in an inline assembly block.

AsmDirSpec

INTERNAL: Do not use. An inline assembly direction specifier.

AsmExpr

INTERNAL: Do not use. An inline assembly expression. For example: rust unsafe { #[inline(always)] builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b); }

AsmLabel

INTERNAL: Do not use. A label in an inline assembly block.

AsmOperand

INTERNAL: Do not use.

AsmOperandExpr

INTERNAL: Do not use. An operand expression in an inline assembly block.

AsmOperandNamed

INTERNAL: Do not use. A named operand in an inline assembly block.

AsmOption

INTERNAL: Do not use. An option in an inline assembly block.

AsmOptionsList

INTERNAL: Do not use. A list of options in an inline assembly block.

AsmPiece

INTERNAL: Do not use.

AsmRegOperand

INTERNAL: Do not use. A register operand in an inline assembly block.

AsmRegSpec

INTERNAL: Do not use. A register specification in an inline assembly block.

AsmSym

INTERNAL: Do not use. A symbol operand in an inline assembly block.

AssocItem

INTERNAL: Do not use. An associated item in a Trait or Impl.

AssocItemList

INTERNAL: Do not use. A list of AssocItem elements, as appearing in a Trait or Impl.

AssocTypeArg

INTERNAL: Do not use. An associated type argument in a path.

AstNode

INTERNAL: Do not use.

Attr

INTERNAL: Do not use. An attribute applied to an item.

AwaitExpr

INTERNAL: Do not use. An await expression. For example: rust async { let x = foo().await; x }

BecomeExpr

INTERNAL: Do not use. A become expression. For example: rust fn fact_a(n: i32, a: i32) -> i32 { if n == 0 { a } else { become fact_a(n - 1, n * a) } }

BinaryExpr

INTERNAL: Do not use. A binary operation expression. For example: rust x + y; x && y; x <= y; x = y; x += y;

BlockExpr

INTERNAL: Do not use. A block expression. For example: rust { let x = 42; } rust 'label: { let x = 42; x }

BoxPat

INTERNAL: Do not use. A box pattern. For example: rust match x { box Option::Some(y) => y, box Option::None => 0, };

BreakExpr

INTERNAL: Do not use. A break expression. For example: rust loop { if not_ready() { break; } } rust let x = 'label: loop { if done() { break 'label 42; } }; rust let x = 'label: { if exit() { break 'label 42; } 0; };

CallExpr

INTERNAL: Do not use. NOTE: Consider using Call instead, as that excludes call expressions that are instantiations of tuple structs and tuple variants.

Callable

INTERNAL: Do not use. A callable. Either a Function or a ClosureExpr.

CastExpr

INTERNAL: Do not use. A type cast expression. For example: rust value as u64;

ClosureExpr

INTERNAL: Do not use. A closure expression. For example: rust |x| x + 1; move |x: i32| -> i32 { x + 1 }; async |x: i32, y| x + y; #[coroutine] |x| yield x; #[coroutine] static |x| yield x; for<T: std::fmt::Debug> |x: T| { println!("{:?}", x); };

Comment

INTERNAL: Do not use. A comment. For example: rust // this is a comment /// This is a doc comment

Const

INTERNAL: Do not use. A constant item declaration.

ConstArg

INTERNAL: Do not use. A constant argument in a generic argument list.

ConstBlockPat

INTERNAL: Do not use. A const block pattern. For example: rust match x { const { 1 + 2 + 3 } => "ok", _ => "fail", };

ConstParam

INTERNAL: Do not use. A constant parameter in a generic parameter list.

ContinueExpr

INTERNAL: Do not use. A continue expression. For example: rust loop { if not_ready() { continue; } } rust 'label: loop { if not_ready() { continue 'label; } }

Crate

INTERNAL: Do not use.

DynTraitTypeRepr

INTERNAL: Do not use. A dynamic trait object type.

Element

INTERNAL: Do not use.

Enum

INTERNAL: Do not use. An enum declaration.

Expr

INTERNAL: Do not use. The base class for expressions.

ExprStmt

INTERNAL: Do not use. An expression statement. For example: rust start(); finish(); use std::env;

ExternBlock

INTERNAL: Do not use. An extern block containing foreign function declarations.

ExternCrate

INTERNAL: Do not use. An extern crate declaration.

ExternItem

INTERNAL: Do not use. An item inside an extern block.

ExternItemList

INTERNAL: Do not use. A list of items inside an extern block.

ExtractorStep

INTERNAL: Do not use.

FieldExpr

INTERNAL: Do not use. A field access expression. For example: rust x.foo

FieldList

INTERNAL: Do not use. A list of fields in a struct or enum variant.

FnPtrTypeRepr

INTERNAL: Do not use. A function pointer type.

ForBinder

INTERNAL: Do not use. A for binder, specifying lifetime or type parameters for a closure or a type.

ForExpr

INTERNAL: Do not use. A for loop expression.

ForTypeRepr

INTERNAL: Do not use. A function pointer type with a for modifier.

FormatArgsArg

INTERNAL: Do not use. A FormatArgsArg. For example the "world" in: rust format_args!("Hello, {}!", "world")

FormatArgsExpr

INTERNAL: Do not use. A FormatArgsExpr. For example: rust format_args!("no args"); format_args!("{} foo {:?}", 1, 2); format_args!("{b} foo {a:?}", a=1, b=2); let (x, y) = (1, 42); format_args!("{x}, {y}");

Function

INTERNAL: Do not use. A function declaration. For example rust fn foo(x: u32) -> u64 {(x + 1).into()} A function declaration within a trait might not have a body: rust trait Trait { fn bar(); }

GenericArg

INTERNAL: Do not use. A generic argument in a generic argument list.

GenericArgList

INTERNAL: Do not use. The base class for generic arguments. rust x.foo::<u32, u64>(42);

GenericParam

INTERNAL: Do not use. A generic parameter in a generic parameter list.

GenericParamList

INTERNAL: Do not use. A list of generic parameters. For example: rust fn f<A, B>(a: A, b: B) {} // ^^^^^^ type Foo<T1, T2> = (T1, T2); // ^^^^^^^^

IdentPat

INTERNAL: Do not use. A binding pattern. For example: rust match x { Option::Some(y) => y, Option::None => 0, }; rust match x { y@Option::Some(_) => y, Option::None => 0, };

IfExpr

INTERNAL: Do not use. An if expression. For example: rust if x == 42 { println!("that's the answer"); } rust let y = if x > 0 { 1 } else { 0 };

Impl

INTERNAL: Do not use. An `impl`` block.

ImplTraitTypeRepr

INTERNAL: Do not use. An impl Trait type.

IndexExpr

INTERNAL: Do not use. An index expression. For example: rust list[42]; list[42] = 1;

InferTypeRepr

INTERNAL: Do not use. An inferred type (_).

Item

INTERNAL: Do not use. An item such as a function, struct, enum, etc.

ItemList

INTERNAL: Do not use. A list of items in a module or block.

Label

INTERNAL: Do not use. A label. For example: rust 'label: loop { println!("Hello, world (once)!"); break 'label; };

LabelableExpr

INTERNAL: Do not use. The base class for expressions that can be labeled (LoopExpr, ForExpr, WhileExpr or BlockExpr).

LetElse

INTERNAL: Do not use. An else block in a let-else statement.

LetExpr

INTERNAL: Do not use. A let expression. For example: rust if let Some(x) = maybe_some { println!("{}", x); }

LetStmt

INTERNAL: Do not use. A let statement. For example: rust let x = 42; let x: i32 = 42; let x: i32; let x; let (x, y) = (1, 2); let Some(x) = std::env::var("FOO") else { return; };

Lifetime

INTERNAL: Do not use. A lifetime annotation.

LifetimeArg

INTERNAL: Do not use. A lifetime argument in a generic argument list.

LifetimeParam

INTERNAL: Do not use. A lifetime parameter in a generic parameter list.

LiteralExpr

INTERNAL: Do not use. A literal expression. For example: rust 42; 42.0; "Hello, world!"; b"Hello, world!"; 'x'; b'x'; r"Hello, world!"; true;

LiteralPat

INTERNAL: Do not use. A literal pattern. For example: rust match x { 42 => "ok", _ => "fail", }

Locatable

INTERNAL: Do not use.

LoopExpr

INTERNAL: Do not use. A loop expression. For example: rust loop { println!("Hello, world (again)!"); }; rust 'label: loop { println!("Hello, world (once)!"); break 'label; }; rust let mut x = 0; loop { if x < 10 { x += 1; } else { break; } };

LoopingExpr

INTERNAL: Do not use. The base class for expressions that loop (LoopExpr, ForExpr or WhileExpr).

MacroCall

INTERNAL: Do not use. A macro invocation.

MacroDef

INTERNAL: Do not use. A Rust 2.0 style declarative macro definition.

MacroExpr

INTERNAL: Do not use. A macro expression, representing the invocation of a macro that produces an expression.

MacroItems

INTERNAL: Do not use. A sequence of items generated by a macro. For example:

MacroPat

INTERNAL: Do not use. A macro pattern, representing the invocation of a macro that produces a pattern.

MacroRules

INTERNAL: Do not use. A macro definition using the macro_rules! syntax. rust macro_rules! my_macro { () => { println!("This is a macro!"); }; }

MacroTypeRepr

INTERNAL: Do not use. A type produced by a macro.

MatchArm

INTERNAL: Do not use. A match arm. For example: rust match x { Option::Some(y) => y, Option::None => 0, }; rust match x { Some(y) if y != 0 => 1 / y, _ => 0, };

MatchArmList

INTERNAL: Do not use. A list of arms in a match expression.

MatchExpr

INTERNAL: Do not use. A match expression. For example: rust match x { Option::Some(y) => y, Option::None => 0, } rust match x { Some(y) if y != 0 => 1 / y, _ => 0, }

MatchGuard

INTERNAL: Do not use. A guard condition in a match arm.

Meta

INTERNAL: Do not use. A meta item in an attribute.

MethodCallExpr

INTERNAL: Do not use. NOTE: Consider using MethodCall instead, as that also includes calls to methods using call syntax (such as Foo::method(x)), operation syntax (such as x + y), and indexing syntax (such as x[y]).

Missing

INTERNAL: Do not use. The base class marking errors during parsing or resolution.

Module

INTERNAL: Do not use. A module declaration. For example: rust mod foo; rust mod bar { pub fn baz() {} }

Name

INTERNAL: Do not use. An identifier name.

NameRef

INTERNAL: Do not use. A reference to a name.

NamedCrate

INTERNAL: Do not use.

NeverTypeRepr

INTERNAL: Do not use. The never type !.

OffsetOfExpr

INTERNAL: Do not use. An offset_of expression. For example: rust builtin # offset_of(Struct, field);

OrPat

INTERNAL: Do not use. An or pattern. For example: rust match x { Option::Some(y) | Option::None => 0, }

Param

INTERNAL: Do not use. A parameter in a function or method. For example x in: rust fn new(x: T) -> Foo<T> { // ... }

ParamBase

INTERNAL: Do not use. A normal parameter, Param, or a self parameter SelfParam.

ParamList

INTERNAL: Do not use. A list of parameters in a function, method, or closure declaration.

ParenExpr

INTERNAL: Do not use. A parenthesized expression.

ParenPat

INTERNAL: Do not use. A parenthesized pattern.

ParenTypeRepr

INTERNAL: Do not use. A parenthesized type.

ParenthesizedArgList

INTERNAL: Do not use. A parenthesized argument list as used in function traits.

Pat

INTERNAL: Do not use. The base class for patterns.

Path

INTERNAL: Do not use. A path. For example: rust use some_crate::some_module::some_item; foo::bar;

PathAstNode

INTERNAL: Do not use. An AST element wrapping a path (PathExpr, RecordExpr, PathPat, RecordPat, TupleStructPat).

PathExpr

INTERNAL: Do not use. A path expression. For example: rust let x = variable; let x = foo::bar; let y = <T>::foo; let z = <TypeRepr as Trait>::foo;

PathExprBase

INTERNAL: Do not use. A path expression or a variable access in a formatting template. See PathExpr and FormatTemplateVariableAccess for further details.

PathPat

INTERNAL: Do not use. A path pattern. For example: rust match x { Foo::Bar => "ok", _ => "fail", }

PathSegment

INTERNAL: Do not use. A path segment, which is one part of a whole path. For example: - HashMap - HashMap<K, V> - Fn(i32) -> i32 - widgets(..) - <T as Iterator>

PathTypeRepr

INTERNAL: Do not use. A path referring to a type. For example: rust type X = std::collections::HashMap<i32, i32>; type Y = X::Item;

PrefixExpr

INTERNAL: Do not use. A unary operation expression. For example: rust let x = -42; let y = !true; let z = *ptr;

PtrTypeRepr

INTERNAL: Do not use. A pointer type.

RangeExpr

INTERNAL: Do not use. A range expression. For example: rust let x = 1..=10; let x = 1..10; let x = 10..; let x = ..10; let x = ..=10; let x = ..;

RangePat

INTERNAL: Do not use. A range pattern. For example: rust match x { ..15 => "too cold", 16..=25 => "just right", 26.. => "too hot", }

RefExpr

INTERNAL: Do not use. A reference expression. For example: rust let ref_const = &foo; let ref_mut = &mut foo; let raw_const: &mut i32 = &raw const foo; let raw_mut: &mut i32 = &raw mut foo;

RefPat

INTERNAL: Do not use. A reference pattern. For example: rust match x { &mut Option::Some(y) => y, &Option::None => 0, };

RefTypeRepr

INTERNAL: Do not use. A reference type.

Rename

INTERNAL: Do not use. A rename in a use declaration.

RestPat

INTERNAL: Do not use. A rest pattern (..) in a tuple, slice, or struct pattern.

RetTypeRepr

INTERNAL: Do not use. A return type in a function signature.

ReturnExpr

INTERNAL: Do not use. A return expression. For example: rust fn some_value() -> i32 { return 42; } rust fn no_value() -> () { return; }

ReturnTypeSyntax

INTERNAL: Do not use. A return type notation (..) to reference or bound the type returned by a trait method

SelfParam

INTERNAL: Do not use. A self parameter. For example self in: rust struct X; impl X { fn one(&self) {} fn two(&mut self) {} fn three(self) {} fn four(mut self) {} fn five<'a>(&'a self) {} }

SlicePat

INTERNAL: Do not use. A slice pattern. For example: rust match x { [1, 2, 3, 4, 5] => "ok", [1, 2, ..] => "fail", [x, y, .., z, 7] => "fail", }

SliceTypeRepr

INTERNAL: Do not use. A slice type.

SourceFile

INTERNAL: Do not use. A source file.

Static

INTERNAL: Do not use. A static item declaration.

Stmt

INTERNAL: Do not use. The base class for statements.

StmtList

INTERNAL: Do not use. A list of statements in a block, with an optional tail expression at the end that determines the block’s value.

Struct

INTERNAL: Do not use. A Struct. For example: rust struct Point { x: i32, y: i32, }

StructExpr

INTERNAL: Do not use. A struct expression. For example: rust let first = Foo { a: 1, b: 2 }; let second = Foo { a: 2, ..first }; let n = Foo { a: 1, b: 2 }.b; Foo { a: m, .. } = second;

StructExprField

INTERNAL: Do not use. A field in a struct expression. For example a: 1 in: rust Foo { a: 1, b: 2 };

StructExprFieldList

INTERNAL: Do not use. A list of fields in a struct expression.

StructField

INTERNAL: Do not use. A field in a struct declaration.

StructFieldList

INTERNAL: Do not use. A list of fields in a struct declaration.

StructPat

INTERNAL: Do not use. A struct pattern. For example: rust match x { Foo { a: 1, b: 2 } => "ok", Foo { .. } => "fail", }

StructPatField

INTERNAL: Do not use. A field in a struct pattern. For example a: 1 in: rust let Foo { a: 1, b: 2 } = foo;

StructPatFieldList

INTERNAL: Do not use. A list of fields in a struct pattern.

Token

INTERNAL: Do not use. The base class for all tokens.

TokenTree

INTERNAL: Do not use. A token tree in a macro definition or invocation.

Trait

INTERNAL: Do not use. A Trait. For example:

TraitAlias

INTERNAL: Do not use. A trait alias.

TryExpr

INTERNAL: Do not use. A try expression using the ? operator.

TupleExpr

INTERNAL: Do not use. A tuple expression. For example: rust let tuple = (1, "one"); let n = (2, "two").0; let (a, b) = tuple;

TupleField

INTERNAL: Do not use. A field in a tuple struct or tuple variant.

TupleFieldList

INTERNAL: Do not use. A list of fields in a tuple struct or tuple variant.

TuplePat

INTERNAL: Do not use. A tuple pattern. For example: rust let (x, y) = (1, 2); let (a, b, .., z) = (1, 2, 3, 4, 5);

TupleStructPat

INTERNAL: Do not use. A tuple struct pattern. For example: rust match x { Tuple("a", 1, 2, 3) => "great", Tuple(.., 3) => "fine", Tuple(..) => "fail", };

TupleTypeRepr

INTERNAL: Do not use. A tuple type.

TypeAlias

INTERNAL: Do not use. A type alias. For example:

TypeArg

INTERNAL: Do not use. A type argument in a generic argument list.

TypeBound

INTERNAL: Do not use. A type bound in a trait or generic parameter.

TypeBoundList

INTERNAL: Do not use. A list of type bounds.

TypeItem

INTERNAL: Do not use. An item that defines a type. Either a Struct, Enum, or Union.

TypeParam

INTERNAL: Do not use. A type parameter in a generic parameter list.

TypeRepr

INTERNAL: Do not use. The base class for type references. rust let x: i32; let y: Vec<i32>; let z: Option<i32>;

UnderscoreExpr

INTERNAL: Do not use. An underscore expression. For example: rust _ = 42;

Unextracted

INTERNAL: Do not use. The base class marking everything that was not properly extracted for some reason, such as: * syntax errors * insufficient context information * yet unimplemented parts of the extractor

Unimplemented

INTERNAL: Do not use. The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted.

Union

INTERNAL: Do not use. A union declaration.

Use

INTERNAL: Do not use. A use statement. For example: rust use std::collections::HashMap;

UseBoundGenericArg

INTERNAL: Do not use.

UseBoundGenericArgs

INTERNAL: Do not use. A use<..> bound to control which generic parameters are captured by an impl Trait return type.

UseTree

INTERNAL: Do not use. A use tree, that is, the part after the use keyword in a use statement. For example: rust use std::collections::HashMap; use std::collections::*; use std::collections::HashMap as MyHashMap; use std::collections::{self, HashMap, HashSet};

UseTreeList

INTERNAL: Do not use. A list of use trees in a use declaration.

Variant

INTERNAL: Do not use. A variant in an enum declaration.

VariantList

INTERNAL: Do not use. A list of variants in an enum declaration.

Visibility

INTERNAL: Do not use. A visibility modifier.

WhereClause

INTERNAL: Do not use. A where clause in a generic declaration.

WherePred

INTERNAL: Do not use. A predicate in a where clause.

WhileExpr

INTERNAL: Do not use. A while loop expression.

WildcardPat

INTERNAL: Do not use. A wildcard pattern. For example: rust let _ = 42;

YeetExpr

INTERNAL: Do not use. A yeet expression. For example: rust if x < size { do yeet "index out of bounds"; }

YieldExpr

INTERNAL: Do not use. A yield expression. For example: rust let one = #[coroutine] || { yield 1; };