mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge remote-tracking branch 'upstream/main' into rust/dependency-renaming
This commit is contained in:
@@ -23,6 +23,9 @@ fn class_name(type_name: &str) -> String {
|
||||
"Literal" => "LiteralExpr".to_owned(),
|
||||
"ArrayExpr" => "ArrayExprInternal".to_owned(),
|
||||
"AsmOptions" => "AsmOptionsList".to_owned(),
|
||||
_ if type_name.starts_with("Record") && type_name != "RecordFieldList" => {
|
||||
type_name.replacen("Record", "Struct", 1)
|
||||
}
|
||||
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
|
||||
_ => type_name.to_owned(),
|
||||
}
|
||||
@@ -40,6 +43,7 @@ fn property_name(type_name: &str, field_name: &str) -> String {
|
||||
("SelfParam", "is_amp") => "is_ref",
|
||||
("UseTree", "is_star") => "is_glob",
|
||||
(_, "ty") => "type_repr",
|
||||
_ if field_name.contains("record") => &field_name.replacen("record", "struct", 1),
|
||||
_ => field_name,
|
||||
};
|
||||
name.to_owned()
|
||||
|
||||
@@ -451,7 +451,7 @@ fn emit_adt(
|
||||
id: trap::TrapId::Star,
|
||||
text: Some(name.to_owned()),
|
||||
}));
|
||||
let record_field_list =
|
||||
let struct_field_list =
|
||||
emit_variant_data(trap, crate_graph, db, union_id.into()).into();
|
||||
let visibility = emit_visibility(crate_graph, db, trap, visibility);
|
||||
items.push(
|
||||
@@ -459,7 +459,7 @@ fn emit_adt(
|
||||
id: trap::TrapId::Star,
|
||||
name,
|
||||
attrs: vec![],
|
||||
record_field_list,
|
||||
struct_field_list,
|
||||
generic_param_list: None,
|
||||
visibility,
|
||||
where_clause: None,
|
||||
@@ -1254,7 +1254,7 @@ fn emit_variant_data(
|
||||
.visibility
|
||||
.resolve(db.upcast(), &variant_id.resolver(db.upcast())),
|
||||
);
|
||||
trap.emit(generated::RecordField {
|
||||
trap.emit(generated::StructField {
|
||||
id: trap::TrapId::Star,
|
||||
attrs: vec![],
|
||||
name,
|
||||
|
||||
2
rust/extractor/src/generated/.generated.list
generated
2
rust/extractor/src/generated/.generated.list
generated
@@ -1,2 +1,2 @@
|
||||
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
||||
top.rs b8d7b2a61083b08e42a2cc490ee8f2f4b931103513f4c6a9bb5ce077a6b1a854 b8d7b2a61083b08e42a2cc490ee8f2f4b931103513f4c6a9bb5ce077a6b1a854
|
||||
top.rs 36b202b412b08876b658a14a15f5b7e6ce3d2d9388bba9cd6fe75265855adfe6 36b202b412b08876b658a14a15f5b7e6ce3d2d9388bba9cd6fe75265855adfe6
|
||||
|
||||
920
rust/extractor/src/generated/top.rs
generated
920
rust/extractor/src/generated/top.rs
generated
@@ -2152,300 +2152,6 @@ impl From<trap::Label<PathSegment>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordExprField {
|
||||
pub id: trap::TrapId<RecordExprField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordExprField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_expr_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("record_expr_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("record_expr_field_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("record_expr_field_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordExprField {
|
||||
fn class_name() -> &'static str { "RecordExprField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordExprFieldList {
|
||||
pub id: trap::TrapId<RecordExprFieldList>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub fields: Vec<trap::Label<RecordExprField>>,
|
||||
pub spread: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordExprFieldList {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_expr_field_lists", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("record_expr_field_list_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.fields.into_iter().enumerate() {
|
||||
out.add_tuple("record_expr_field_list_fields", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.spread {
|
||||
out.add_tuple("record_expr_field_list_spreads", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordExprFieldList {
|
||||
fn class_name() -> &'static str { "RecordExprFieldList" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprFieldList>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprFieldList is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprFieldList>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprFieldList is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExprFieldList>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExprFieldList is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordField {
|
||||
pub id: trap::TrapId<RecordField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub name: Option<trap::Label<Name>>,
|
||||
pub type_repr: Option<trap::Label<TypeRepr>>,
|
||||
pub visibility: Option<trap::Label<Visibility>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("record_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("record_field_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name {
|
||||
out.add_tuple("record_field_names", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.type_repr {
|
||||
out.add_tuple("record_field_type_reprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.visibility {
|
||||
out.add_tuple("record_field_visibilities", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordField {
|
||||
fn class_name() -> &'static str { "RecordField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordPatField {
|
||||
pub id: trap::TrapId<RecordPatField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
pub pat: Option<trap::Label<Pat>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordPatField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_pat_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("record_pat_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("record_pat_field_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.pat {
|
||||
out.add_tuple("record_pat_field_pats", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordPatField {
|
||||
fn class_name() -> &'static str { "RecordPatField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordPatFieldList {
|
||||
pub id: trap::TrapId<RecordPatFieldList>,
|
||||
pub fields: Vec<trap::Label<RecordPatField>>,
|
||||
pub rest_pat: Option<trap::Label<RestPat>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordPatFieldList {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_pat_field_lists", vec![id.into()]);
|
||||
for (i, v) in self.fields.into_iter().enumerate() {
|
||||
out.add_tuple("record_pat_field_list_fields", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.rest_pat {
|
||||
out.add_tuple("record_pat_field_list_rest_pats", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordPatFieldList {
|
||||
fn class_name() -> &'static str { "RecordPatFieldList" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatFieldList>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatFieldList is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatFieldList>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatFieldList is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPatFieldList>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPatFieldList is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Rename {
|
||||
pub id: trap::TrapId<Rename>,
|
||||
@@ -2785,6 +2491,300 @@ impl From<trap::Label<StmtList>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructExprField {
|
||||
pub id: trap::TrapId<StructExprField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructExprField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_expr_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("struct_expr_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("struct_expr_field_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("struct_expr_field_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructExprField {
|
||||
fn class_name() -> &'static str { "StructExprField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructExprField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructExprFieldList {
|
||||
pub id: trap::TrapId<StructExprFieldList>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub fields: Vec<trap::Label<StructExprField>>,
|
||||
pub spread: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructExprFieldList {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_expr_field_lists", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("struct_expr_field_list_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.fields.into_iter().enumerate() {
|
||||
out.add_tuple("struct_expr_field_list_fields", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.spread {
|
||||
out.add_tuple("struct_expr_field_list_spreads", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructExprFieldList {
|
||||
fn class_name() -> &'static str { "StructExprFieldList" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprFieldList>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprFieldList is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprFieldList>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprFieldList is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExprFieldList>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructExprFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExprFieldList is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructField {
|
||||
pub id: trap::TrapId<StructField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
pub name: Option<trap::Label<Name>>,
|
||||
pub type_repr: Option<trap::Label<TypeRepr>>,
|
||||
pub visibility: Option<trap::Label<Visibility>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("struct_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("struct_field_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name {
|
||||
out.add_tuple("struct_field_names", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.type_repr {
|
||||
out.add_tuple("struct_field_type_reprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.visibility {
|
||||
out.add_tuple("struct_field_visibilities", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructField {
|
||||
fn class_name() -> &'static str { "StructField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructPatField {
|
||||
pub id: trap::TrapId<StructPatField>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
pub pat: Option<trap::Label<Pat>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructPatField {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_pat_fields", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("struct_pat_field_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("struct_pat_field_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.pat {
|
||||
out.add_tuple("struct_pat_field_pats", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructPatField {
|
||||
fn class_name() -> &'static str { "StructPatField" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatField>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatField is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatField>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatField is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatField>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructPatField>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatField is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructPatFieldList {
|
||||
pub id: trap::TrapId<StructPatFieldList>,
|
||||
pub fields: Vec<trap::Label<StructPatField>>,
|
||||
pub rest_pat: Option<trap::Label<RestPat>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructPatFieldList {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_pat_field_lists", vec![id.into()]);
|
||||
for (i, v) in self.fields.into_iter().enumerate() {
|
||||
out.add_tuple("struct_pat_field_list_fields", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.rest_pat {
|
||||
out.add_tuple("struct_pat_field_list_rest_pats", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructPatFieldList {
|
||||
fn class_name() -> &'static str { "StructPatFieldList" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatFieldList>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatFieldList is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatFieldList>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatFieldList is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPatFieldList>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructPatFieldList>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPatFieldList is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Token {
|
||||
_unused: ()
|
||||
@@ -7477,7 +7477,7 @@ impl From<trap::Label<RangePat>> for trap::Label<Pat> {
|
||||
#[derive(Debug)]
|
||||
pub struct RecordFieldList {
|
||||
pub id: trap::TrapId<RecordFieldList>,
|
||||
pub fields: Vec<trap::Label<RecordField>>,
|
||||
pub fields: Vec<trap::Label<StructField>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordFieldList {
|
||||
@@ -10329,168 +10329,6 @@ impl From<trap::Label<PathPat>> for trap::Label<Resolvable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordExpr {
|
||||
pub id: trap::TrapId<RecordExpr>,
|
||||
pub path: Option<trap::Label<Path>>,
|
||||
pub record_expr_field_list: Option<trap::Label<RecordExprFieldList>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.path {
|
||||
out.add_tuple("path_ast_node_paths", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.record_expr_field_list {
|
||||
out.add_tuple("record_expr_record_expr_field_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordExpr {
|
||||
fn class_name() -> &'static str { "RecordExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<PathAstNode> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of PathAstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordExpr>> for trap::Label<Resolvable> {
|
||||
fn from(value: trap::Label<RecordExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordExpr is a subclass of Resolvable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RecordPat {
|
||||
pub id: trap::TrapId<RecordPat>,
|
||||
pub path: Option<trap::Label<Path>>,
|
||||
pub record_pat_field_list: Option<trap::Label<RecordPatFieldList>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for RecordPat {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("record_pats", vec![id.into()]);
|
||||
if let Some(v) = self.path {
|
||||
out.add_tuple("path_ast_node_paths", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.record_pat_field_list {
|
||||
out.add_tuple("record_pat_record_pat_field_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for RecordPat {
|
||||
fn class_name() -> &'static str { "RecordPat" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<Pat> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of Pat
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<PathAstNode> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of PathAstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<RecordPat>> for trap::Label<Resolvable> {
|
||||
fn from(value: trap::Label<RecordPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme RecordPat is a subclass of Resolvable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Static {
|
||||
pub id: trap::TrapId<Static>,
|
||||
@@ -10702,6 +10540,168 @@ impl From<trap::Label<Struct>> for trap::Label<Stmt> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructExpr {
|
||||
pub id: trap::TrapId<StructExpr>,
|
||||
pub path: Option<trap::Label<Path>>,
|
||||
pub struct_expr_field_list: Option<trap::Label<StructExprFieldList>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.path {
|
||||
out.add_tuple("path_ast_node_paths", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.struct_expr_field_list {
|
||||
out.add_tuple("struct_expr_struct_expr_field_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructExpr {
|
||||
fn class_name() -> &'static str { "StructExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<PathAstNode> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of PathAstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructExpr>> for trap::Label<Resolvable> {
|
||||
fn from(value: trap::Label<StructExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructExpr is a subclass of Resolvable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StructPat {
|
||||
pub id: trap::TrapId<StructPat>,
|
||||
pub path: Option<trap::Label<Path>>,
|
||||
pub struct_pat_field_list: Option<trap::Label<StructPatFieldList>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for StructPat {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("struct_pats", vec![id.into()]);
|
||||
if let Some(v) = self.path {
|
||||
out.add_tuple("path_ast_node_paths", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.struct_pat_field_list {
|
||||
out.add_tuple("struct_pat_struct_pat_field_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for StructPat {
|
||||
fn class_name() -> &'static str { "StructPat" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<Pat> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of Pat
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<PathAstNode> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of PathAstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<StructPat>> for trap::Label<Resolvable> {
|
||||
fn from(value: trap::Label<StructPat>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme StructPat is a subclass of Resolvable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Trait {
|
||||
pub id: trap::TrapId<Trait>,
|
||||
@@ -11118,7 +11118,7 @@ pub struct Union {
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub generic_param_list: Option<trap::Label<GenericParamList>>,
|
||||
pub name: Option<trap::Label<Name>>,
|
||||
pub record_field_list: Option<trap::Label<RecordFieldList>>,
|
||||
pub struct_field_list: Option<trap::Label<RecordFieldList>>,
|
||||
pub visibility: Option<trap::Label<Visibility>>,
|
||||
pub where_clause: Option<trap::Label<WhereClause>>,
|
||||
}
|
||||
@@ -11139,8 +11139,8 @@ impl trap::TrapEntry for Union {
|
||||
if let Some(v) = self.name {
|
||||
out.add_tuple("union_names", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.record_field_list {
|
||||
out.add_tuple("union_record_field_lists", vec![id.into(), v.into()]);
|
||||
if let Some(v) = self.struct_field_list {
|
||||
out.add_tuple("union_struct_field_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.visibility {
|
||||
out.add_tuple("union_visibilities", vec![id.into(), v.into()]);
|
||||
|
||||
54
rust/extractor/src/translate/generated.rs
generated
54
rust/extractor/src/translate/generated.rs
generated
@@ -1798,62 +1798,62 @@ impl Translator<'_> {
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_expr(&mut self, node: ast::RecordExpr) -> Option<Label<generated::RecordExpr>> {
|
||||
pub(crate) fn emit_record_expr(&mut self, node: ast::RecordExpr) -> Option<Label<generated::StructExpr>> {
|
||||
let path = node.path().and_then(|x| self.emit_path(x));
|
||||
let record_expr_field_list = node.record_expr_field_list().and_then(|x| self.emit_record_expr_field_list(x));
|
||||
let label = self.trap.emit(generated::RecordExpr {
|
||||
let struct_expr_field_list = node.record_expr_field_list().and_then(|x| self.emit_record_expr_field_list(x));
|
||||
let label = self.trap.emit(generated::StructExpr {
|
||||
id: TrapId::Star,
|
||||
path,
|
||||
record_expr_field_list,
|
||||
struct_expr_field_list,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordExpr, self, node, label);
|
||||
emit_detached!(StructExpr, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_expr_field(&mut self, node: ast::RecordExprField) -> Option<Label<generated::RecordExprField>> {
|
||||
pub(crate) fn emit_record_expr_field(&mut self, node: ast::RecordExprField) -> Option<Label<generated::StructExprField>> {
|
||||
if self.should_be_excluded(&node) { return None; }
|
||||
let attrs = node.attrs().filter_map(|x| self.emit_attr(x)).collect();
|
||||
let expr = node.expr().and_then(|x| self.emit_expr(x));
|
||||
let name_ref = node.name_ref().and_then(|x| self.emit_name_ref(x));
|
||||
let label = self.trap.emit(generated::RecordExprField {
|
||||
let label = self.trap.emit(generated::StructExprField {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
expr,
|
||||
name_ref,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordExprField, self, node, label);
|
||||
emit_detached!(StructExprField, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_expr_field_list(&mut self, node: ast::RecordExprFieldList) -> Option<Label<generated::RecordExprFieldList>> {
|
||||
pub(crate) fn emit_record_expr_field_list(&mut self, node: ast::RecordExprFieldList) -> Option<Label<generated::StructExprFieldList>> {
|
||||
if self.should_be_excluded(&node) { return None; }
|
||||
let attrs = node.attrs().filter_map(|x| self.emit_attr(x)).collect();
|
||||
let fields = node.fields().filter_map(|x| self.emit_record_expr_field(x)).collect();
|
||||
let spread = node.spread().and_then(|x| self.emit_expr(x));
|
||||
let label = self.trap.emit(generated::RecordExprFieldList {
|
||||
let label = self.trap.emit(generated::StructExprFieldList {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
fields,
|
||||
spread,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordExprFieldList, self, node, label);
|
||||
emit_detached!(StructExprFieldList, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_field(&mut self, node: ast::RecordField) -> Option<Label<generated::RecordField>> {
|
||||
pub(crate) fn emit_record_field(&mut self, node: ast::RecordField) -> Option<Label<generated::StructField>> {
|
||||
if self.should_be_excluded(&node) { return None; }
|
||||
let attrs = node.attrs().filter_map(|x| self.emit_attr(x)).collect();
|
||||
let expr = node.expr().and_then(|x| self.emit_expr(x));
|
||||
let name = node.name().and_then(|x| self.emit_name(x));
|
||||
let type_repr = node.ty().and_then(|x| self.emit_type(x));
|
||||
let visibility = node.visibility().and_then(|x| self.emit_visibility(x));
|
||||
let label = self.trap.emit(generated::RecordField {
|
||||
let label = self.trap.emit(generated::StructField {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
expr,
|
||||
@@ -1862,7 +1862,7 @@ impl Translator<'_> {
|
||||
visibility,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordField, self, node, label);
|
||||
emit_detached!(StructField, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
@@ -1879,47 +1879,47 @@ impl Translator<'_> {
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_pat(&mut self, node: ast::RecordPat) -> Option<Label<generated::RecordPat>> {
|
||||
pub(crate) fn emit_record_pat(&mut self, node: ast::RecordPat) -> Option<Label<generated::StructPat>> {
|
||||
let path = node.path().and_then(|x| self.emit_path(x));
|
||||
let record_pat_field_list = node.record_pat_field_list().and_then(|x| self.emit_record_pat_field_list(x));
|
||||
let label = self.trap.emit(generated::RecordPat {
|
||||
let struct_pat_field_list = node.record_pat_field_list().and_then(|x| self.emit_record_pat_field_list(x));
|
||||
let label = self.trap.emit(generated::StructPat {
|
||||
id: TrapId::Star,
|
||||
path,
|
||||
record_pat_field_list,
|
||||
struct_pat_field_list,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordPat, self, node, label);
|
||||
emit_detached!(StructPat, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_pat_field(&mut self, node: ast::RecordPatField) -> Option<Label<generated::RecordPatField>> {
|
||||
pub(crate) fn emit_record_pat_field(&mut self, node: ast::RecordPatField) -> Option<Label<generated::StructPatField>> {
|
||||
if self.should_be_excluded(&node) { return None; }
|
||||
let attrs = node.attrs().filter_map(|x| self.emit_attr(x)).collect();
|
||||
let name_ref = node.name_ref().and_then(|x| self.emit_name_ref(x));
|
||||
let pat = node.pat().and_then(|x| self.emit_pat(x));
|
||||
let label = self.trap.emit(generated::RecordPatField {
|
||||
let label = self.trap.emit(generated::StructPatField {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
name_ref,
|
||||
pat,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordPatField, self, node, label);
|
||||
emit_detached!(StructPatField, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
|
||||
pub(crate) fn emit_record_pat_field_list(&mut self, node: ast::RecordPatFieldList) -> Option<Label<generated::RecordPatFieldList>> {
|
||||
pub(crate) fn emit_record_pat_field_list(&mut self, node: ast::RecordPatFieldList) -> Option<Label<generated::StructPatFieldList>> {
|
||||
let fields = node.fields().filter_map(|x| self.emit_record_pat_field(x)).collect();
|
||||
let rest_pat = node.rest_pat().and_then(|x| self.emit_rest_pat(x));
|
||||
let label = self.trap.emit(generated::RecordPatFieldList {
|
||||
let label = self.trap.emit(generated::StructPatFieldList {
|
||||
id: TrapId::Star,
|
||||
fields,
|
||||
rest_pat,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(RecordPatFieldList, self, node, label);
|
||||
emit_detached!(StructPatFieldList, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
Some(label)
|
||||
}
|
||||
@@ -2433,7 +2433,7 @@ impl Translator<'_> {
|
||||
let attrs = node.attrs().filter_map(|x| self.emit_attr(x)).collect();
|
||||
let generic_param_list = node.generic_param_list().and_then(|x| self.emit_generic_param_list(x));
|
||||
let name = node.name().and_then(|x| self.emit_name(x));
|
||||
let record_field_list = node.record_field_list().and_then(|x| self.emit_record_field_list(x));
|
||||
let struct_field_list = node.record_field_list().and_then(|x| self.emit_record_field_list(x));
|
||||
let visibility = node.visibility().and_then(|x| self.emit_visibility(x));
|
||||
let where_clause = node.where_clause().and_then(|x| self.emit_where_clause(x));
|
||||
let label = self.trap.emit(generated::Union {
|
||||
@@ -2441,7 +2441,7 @@ impl Translator<'_> {
|
||||
attrs,
|
||||
generic_param_list,
|
||||
name,
|
||||
record_field_list,
|
||||
struct_field_list,
|
||||
visibility,
|
||||
where_clause,
|
||||
});
|
||||
|
||||
138
rust/ql/.generated.list
generated
138
rust/ql/.generated.list
generated
@@ -1,4 +1,4 @@
|
||||
lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 8ae91a389c7f4b080b1031c003c00c84f479438990be69035d8175ea97a47814 7dc9f38a3d04b6be54e39cf4ea0eac1d8f2a293982be76aaf1cd1649bd54aea0
|
||||
lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 2fc9c20eb37521ebf57fc755b6d4f3725ea74e790f21944c8f24acd64f8504ed 118451f6047dd5c9400ea318878c769f4d85912a04973d175bdc35870285dd50
|
||||
lib/codeql/rust/elements/Abi.qll 4c973d28b6d628f5959d1f1cc793704572fd0acaae9a97dfce82ff9d73f73476 250f68350180af080f904cd34cb2af481c5c688dc93edf7365fd0ae99855e893
|
||||
lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be
|
||||
lib/codeql/rust/elements/ArgList.qll 661f5100f5d3ef8351452d9058b663a2a5c720eea8cf11bedd628969741486a2 28e424aac01a90fb58cd6f9f83c7e4cf379eea39e636bc0ba07efc818be71c71
|
||||
@@ -54,7 +54,7 @@ lib/codeql/rust/elements/ExternCrate.qll 54e93a9ec560d72dc0f0269b42b237f21abbf37
|
||||
lib/codeql/rust/elements/ExternItem.qll c39bbae40fa569d3d84a10045d7eeced3db85e6cb7147f7a7065c5b484f890a1 bc56d6db3d05dbc552927d004328fbe399960711c920ef6b47f6faaa1a541183
|
||||
lib/codeql/rust/elements/ExternItemList.qll bc96f188970e8dc0cd1e77dea3e49b715edf6392539add5744cb1b396064a3b0 d1270d50448b36947372e86337a3efb5ed416c77aac709f6421d4d2f06999a7a
|
||||
lib/codeql/rust/elements/FieldExpr.qll 8102cd659f9059cf6af2a22033cfcd2aae9c35204b86f7d219a05f1f8de54b3b f818169dddf5102095ae1410583615f80031376a08b5307d0c464e79953c3975
|
||||
lib/codeql/rust/elements/FieldList.qll bd243adc4696c60f636055a1c2da28039fe2028476c9247eb6a68003b849b757 ab63cdf410afd1e515f873b49f46bb5c2bf27e6c78fd206ccbdba064c4c0a4b2
|
||||
lib/codeql/rust/elements/FieldList.qll 7c0a34860ed0929e93ced5486045a0573b90a8b7603558fe098e03c105fba92f 6e81a2004e3dca49942c889a7f49c8b3ce3061546fbdc21aa536a8a18e1151f0
|
||||
lib/codeql/rust/elements/FnPtrTypeRepr.qll 25a88a8445b4abfaf7c95fcef03db5328aa81e35cebe56516bdda01380f0a69e 0a77d08b6b2d63e7a037f366b6dffd5006e975a8af2424af60a4f9ad74d441ba
|
||||
lib/codeql/rust/elements/ForExpr.qll 0cc8bfe10b8baf62a1ff65c8463cfb17ab64b41c30c9e1edb962a227df2036d9 b1be73294e6da0f49fd32177ad0b05fecf26081d5ce424f288be99a4bd59cc84
|
||||
lib/codeql/rust/elements/ForTypeRepr.qll dc4e00cd23606df93d753f2ca6862b55a10c722a7e952bb2e11b494738d2a3d2 ca169d2faca3baab3720086f7b2de5c26f55faf2dbab958298377ad65f73949b
|
||||
@@ -129,14 +129,7 @@ lib/codeql/rust/elements/PrefixExpr.qll 107e7bd111b637fd6d76026062d54c2780760b96
|
||||
lib/codeql/rust/elements/PtrTypeRepr.qll 2eb2b6f6e5858a10fa1b10d85400ed6db781339bf152162a2fd33213c1ce083b bb99c2da04c80d3c14f47cda1feb9719af801d209becb3d9b20746a2a3b8fc02
|
||||
lib/codeql/rust/elements/RangeExpr.qll 43785bea08a6a537010db1138e68ae92eed7e481744188dfb3bad119425ff740 5e81cfbdf4617372a73d662a248a0b380c1f40988a5daefb7f00057cae10d3d4
|
||||
lib/codeql/rust/elements/RangePat.qll b5c0cfc84b8a767d58593fa7102dcf4be3ff8b02ba2f5360c384fa8af4aac830 cc28399dd99630bfa50c54e641a3833abe6643137d010a0a25749d1d70e8c911
|
||||
lib/codeql/rust/elements/RecordExpr.qll b8541a33ef408f2070103c1db8b6ec845bc6b1d8c810f5d8d208e5eeb9f86b30 a6d9602a64c9acf48f033f06fe7e1d86382512fd378ee3044f1126726847f696
|
||||
lib/codeql/rust/elements/RecordExprField.qll edac04146849e2aeca27e7bbb896c21aa2e2b15736b1e8a06ac51ab01433b3ac 7c062bd6d5dd5b1d972450fb0b3272cd9b45f94ccd668c3bd4347e2dce3279ed
|
||||
lib/codeql/rust/elements/RecordExprFieldList.qll 672c3854cb84090c8a2e9311c43448016dc2614ecbf86dbe404156304674e38f 01ae0ffca0bf640c61120e36fcf2c560555f4aabbd49ddce6f5c1a3561dbfc31
|
||||
lib/codeql/rust/elements/RecordField.qll 5d23e25985857e37ab7d699a6298d842751da9fb46da341378e17fd7cef66cc8 59272d720dbbad02094f98bf8cf3372974eb449843522b5f510c1f1b01bd2834
|
||||
lib/codeql/rust/elements/RecordFieldList.qll cebab3fba41221e61cda801070a7f414b62b4fbcf2206e35462c0da35ad75c3f db092d47eea871d61541b9711d7139a99394e0ed83901a8ae60f03dfa8ed722f
|
||||
lib/codeql/rust/elements/RecordPat.qll 3e31af707f72e9af42142e54b7251da8cbc88a9d5f448a4e6b3ca578f92f5680 0b459d751c26a062608ef0b6f3859e9ed1342e129b004ec218694d011955cfbd
|
||||
lib/codeql/rust/elements/RecordPatField.qll 7487461887e82bcf224b02628dfc64457121ab17e731e2dc7aa7e731ab16c02f f2018e55722245eb4273fb067242aaa503c43f91671a55b3a4bb51fe7bc0a03c
|
||||
lib/codeql/rust/elements/RecordPatFieldList.qll c3198c997f389ce95db377ca40ac69a1448f120093f37ab1c92a5a3f1f6aa0d4 9db36d274f1ec77c442ae7e38f940a65c9a92f1541f66140188b226965851535
|
||||
lib/codeql/rust/elements/RecordFieldList.qll e067a0111ef4eb442236a265b6e492ffe17886a18650324a52cc0f9fe98aae50 816d98a3c6b387b5b40cbe221f53f676ea5107e1ddbea628f02b5f9e3b5ddf0c
|
||||
lib/codeql/rust/elements/RefExpr.qll 91a0d3a86002289dc01ffbe8daca13e34e92e522fbb508241a9d51faf1d4a9d2 b6e63d8e6f8956d2501706d129a6f5f24b410ea6539839757c76ba950c410582
|
||||
lib/codeql/rust/elements/RefPat.qll fe076bdccb454111b38f360837d180274ba8a003b4cffe910b5197cd74188089 2604c8bb2b0b47091d5fc4aa276de46fe3561e346bd98f291c3783cef402ba06
|
||||
lib/codeql/rust/elements/RefTypeRepr.qll ac41d8b4132f273d65873ea3c59631bc1718b3266ae08075346e6cb1bfe2f17c b7e34851d37008806d4519105a5e3405dda07b999294c6656a0c447ac1635b2a
|
||||
@@ -154,6 +147,13 @@ lib/codeql/rust/elements/Static.qll 439550ae01b4975dc08867ecdc1f8a4da0127321af95
|
||||
lib/codeql/rust/elements/Stmt.qll 532b12973037301246daf7d8c0177f734202f43d9261c7a4ca6f5080eea8ca64 b838643c4f2b4623d2c816cddad0e68ca3e11f2879ab7beaece46f489ec4b1f3
|
||||
lib/codeql/rust/elements/StmtList.qll 6f990782d5a5307d6d8a3256eb510aedfdaf7bd0e45f3dff35388842ab487b8c b412a27dea0c67307ab79104d45c5b4848c3191cc983e8b0d8dfa739a1b65d9c
|
||||
lib/codeql/rust/elements/Struct.qll 96b7020c7670d5ea7effa6e390d3a163dba05ca5206cfdd1284f4a41e5664c6a 3fea0d13b8da0f210f3ad9004189efc3c56bcc90e67d6ef7817c6767f6aff273
|
||||
lib/codeql/rust/elements/StructExpr.qll af9059c01a97755e94f1a8b60c66d9c7663ed0705b2845b086b8953f16019fab 2d33d86b035a15c1b31c3e07e0e74c4bbe57a71c5a55d60e720827814e73b7ba
|
||||
lib/codeql/rust/elements/StructExprField.qll 3eb9f17ecd1ad38679689eb4ecc169d3a0b5b7a3fc597ae5a957a7aea2f74e4f 8fcd26f266f203004899a60447ba16e7eae4e3a654fbec7f54e26857730ede93
|
||||
lib/codeql/rust/elements/StructExprFieldList.qll 6f77363f93ce4e55d91cc93cef4451b93b9714a4aec91c5416d488191340a079 4da6b070125150f2d28028e29095df93e0bbdb5bc4bd4c672e060492f36367c4
|
||||
lib/codeql/rust/elements/StructField.qll cd6ebb8927eb2614aa1241f03702b1db06e6c581acc368966c2809adb62a3cff 792a2040847a5e6ef3efcc33eeffa9df0bf720a5c39204ac5533bf85b2f9e9bd
|
||||
lib/codeql/rust/elements/StructPat.qll cdd1e8417d1c8cb3d14356390d71eb2916a295d95f240f48d4c2fb21bf4398cb 69c3456a13ef3e978a9a145b9e232198a30360f771feb41a917e507410611f6c
|
||||
lib/codeql/rust/elements/StructPatField.qll 856aa7d7c6d9b3c17514cbd12a36164e6e9d5923245770d0af3afb759a15204a 1bd1a294d84ad5e4da24e03b4882b215c50473875014859dbf26555d1f4ec2d5
|
||||
lib/codeql/rust/elements/StructPatFieldList.qll e32d5adc36dc9800454920c784098680b22d3c1c31754bbb65db1a226105b3b0 0ecfd969411a56ebf04f6a4950219b9128b66151c115fcd734d89687f3f5e524
|
||||
lib/codeql/rust/elements/Token.qll e2de97c32e12c7ac9369f8dccabc22d89bfcbf7f6acd99f1aa7faa38eb4ac2b2 888d7e1743e802790e78bae694fedb4aba361b600fb9d9ecf022436f2138e13c
|
||||
lib/codeql/rust/elements/TokenTree.qll 68e579812960d855a8a7a370ce55566a0df5adc62b7e6ba19d775fff961ea67b af2520f272e937c898c51693c1157a61caac9c25826918981803b12b5a9cb246
|
||||
lib/codeql/rust/elements/Trait.qll f78a917c2f2e5a0dfcd7c36e95ad67b1fa218484ee509610db8ca38453bebd4c 2a12f03870ebf86e104bdc3b61aae8512bfafbbf79a0cff5c3c27a04635926af
|
||||
@@ -272,7 +272,7 @@ lib/codeql/rust/elements/internal/ExternItemListImpl.qll e89d0cf938f6e137ba1ce79
|
||||
lib/codeql/rust/elements/internal/ExtractorStep.qll 1c65668007ea71d05333e44132eccc01dc2a2b4908fb37d0a73995119d3ed5f0 8cbe1eeb35bc2bc95c1b7765070d1ff58aae03fd28dc94896b091858eea40efe
|
||||
lib/codeql/rust/elements/internal/ExtractorStepConstructor.qll 00c527a3139ad399ea1efd0ebe4656372d70f6c4e79136bc497a6cb84becae8e 93817f3dddeaf2c0964ab31c2df451dcee0aeba7cb6520803d8ce42cefcb3703
|
||||
lib/codeql/rust/elements/internal/FieldExprConstructor.qll b3be2c4ccaf2c8a1283f3d5349d7f4f49f87b35e310ef33491023c5ab6f3abc5 645d0d4073b032f6b7284fc36a10a6ec85596fb95c68f30c09504f2c5a6f789f
|
||||
lib/codeql/rust/elements/internal/FieldListImpl.qll 02a09d1d146030c68cead4614f4eef75854f19e55ed1eda60b34c4858a8d4a88 9b9f5e77546434c771d2f785119577ec46569a18473daa4169fb84a097369493
|
||||
lib/codeql/rust/elements/internal/FieldListImpl.qll 8dd0eb184826656f5123ac7b64c35a5e9d121b7b6288b0cc823076180f370979 73406e8057a1a1882b1c44bd272c65d4c7e2dee598382c7f2e074b847f4b7944
|
||||
lib/codeql/rust/elements/internal/FnPtrTypeReprConstructor.qll 61d8808ea027a6e04d5304c880974332a0195451f6b4474f84b3695ec907d865 0916c63a02b01a839fe23ec8b189d37dc1b8bc4e1ba753cbf6d6f5067a46965a
|
||||
lib/codeql/rust/elements/internal/FnPtrTypeReprImpl.qll 23b1309f267b640efe9458429feea986fc66a15ce1496883c292d8700637bbc3 b8785911a504d6d48be3e9dd1a150cb2611bd70ac420433e1f78ce1310c284f1
|
||||
lib/codeql/rust/elements/internal/ForExprConstructor.qll d79b88dac19256300b758ba0f37ce3f07e9f848d6ae0c1fdb87bd348e760aa3e 62123b11858293429aa609ea77d2f45cb8c8eebae80a1d81da6f3ad7d1dbc19b
|
||||
@@ -366,17 +366,8 @@ lib/codeql/rust/elements/internal/PtrTypeReprImpl.qll 82bb14c7c5764aa6c829d463ed
|
||||
lib/codeql/rust/elements/internal/RangeExprConstructor.qll a0aa90a1c38c5deea56475399016afae2a00a858b961fbbab8ddeb3bc6a08103 0ddf1bcf28aafc56d7334e6138fb268f9b36a429e4cbdd982cd8384e0644076b
|
||||
lib/codeql/rust/elements/internal/RangePatConstructor.qll fe4345cb41d970ab64196ca37eccb26e5b9cf85fab4253cacfd2b31de03bd070 1d09d5ec8203d76aed2dfb7e7f14c0c07d6559c8f589e11860fff8a2c682c1a6
|
||||
lib/codeql/rust/elements/internal/RangePatImpl.qll ef11ab2c002896036553231741a7cf896fafa09e22e920e15661b9cbe4393cae 24ac2dcce3055a77f3a5e0b38cf13aebefd2eeaefa53674ff144a6225634ac0d
|
||||
lib/codeql/rust/elements/internal/RecordExprConstructor.qll 742198bd8223902b5625b4a574a9e3539a8b6cf8e48eecc57cc2de4e980fba6e 0a99e454e234e8b7b59dc11b167172a5fcd31b8a5282349956d6fd861ec735df
|
||||
lib/codeql/rust/elements/internal/RecordExprFieldConstructor.qll 11620bc4e2dc7b3903be764cd9510a8e002892722b502876cf3467994aa7a63c e42e50747dd9453a44705b2d6a05e7a4a8c6debed988a0335a774a547d8f7157
|
||||
lib/codeql/rust/elements/internal/RecordExprFieldListConstructor.qll 3a0d6ec872792c400d3a0a5ed1c5051b248a597a4b17ada1a078ea5d972b6721 52bae8222e7aa5bc89b73bec3fd1c3c1de0fe11bf30ccf5668454f63fbfc9b83
|
||||
lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll 1210c23c0495f5d1a72409afc8c559f8da2b8c71340ff2944af9d1f684d0a856 fea96b053cad4135ab09b1c070a4c9f26507dd890a62c30772cf3e2358686640
|
||||
lib/codeql/rust/elements/internal/RecordFieldConstructor.qll 9fc05f5101e48a45a028c479b35ec3d2f1a3cc33f0938667fcb813c5a4ab9526 98791dcf7f3209524f6132f9c26980e499cbcf94c1559e95c67544732245f05b
|
||||
lib/codeql/rust/elements/internal/RecordFieldListConstructor.qll 9f1d916f3784092dcbff7224451c8f4f0daf6f8293a466b0a30ec9b92cd41358 8aafe377714a134287362c4b96439c1c6baa5a31c2c36a544bd5f73e9213477a
|
||||
lib/codeql/rust/elements/internal/RecordFieldListImpl.qll 1fa89578a1e27a7d6dd84c1cabbff08b38a3160ea0864c7be660984cf96fda1e 9fa6a775f0609f557548168424f02d068abb3978ba20a716c21619e904bd99f3
|
||||
lib/codeql/rust/elements/internal/RecordPatConstructor.qll a5507e0db7cb297c74faa9d571e613799d7b3327584e4696d1d5c219d1ea84ba aa5c8042a88e99dca09a6ea7775bd6963825a3c2dd5d61f118dbbc57a336c4a1
|
||||
lib/codeql/rust/elements/internal/RecordPatFieldConstructor.qll 6e1880ed05401b39c1e5e1a4eedb0a8a18c857aeb79c44c812cdc879eb3af1f4 1f7a5a2d4df22f7d7479fe348665d8a1411de47f8cc5b95b30ba4c3490ed8f61
|
||||
lib/codeql/rust/elements/internal/RecordPatFieldListConstructor.qll b8f0ef9b75ffe6be6ce7e601d528f0a1b871123c63e39cead3fd13b8bd4f54b7 166f07c708ab8b3de6bfaf193bac93081b2aacad046aa86de7441085dd20a8c5
|
||||
lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll 2d1dd9910480eb65c59fcef2e1576ce639be85c35d90e4bce721ce22ec742ba3 1e788a2d7d00e9f96dbf7e93d3a18d5bfb4d7749194ff8e9810e9053fa88a94b
|
||||
lib/codeql/rust/elements/internal/RecordFieldListImpl.qll 9446404c45f0dc4473a63eab64669d9a2d25ac67ae230960dd0edd749ba2b9f0 7548d4c7b07c974035da36d83579a0b8a538e088fe834aec50d32591be9766e1
|
||||
lib/codeql/rust/elements/internal/RefExprConstructor.qll 9ad08c0f3d980a56a2af8857cb84db589941d20ab3ae5c8ece004ccaccaaf950 4cac3ace31b7ed77a72e989fce9cdbae2247f03c28a3f0c50d67385d02c7f193
|
||||
lib/codeql/rust/elements/internal/RefPatConstructor.qll d8b88c2c468b08072f6f853306eb61eb88ee1e6c5cfb63958f115a64a9715bb3 0c1d6a8af6a66912698acce47e89d4e3239e67f89c228a36a141f9c685c36394
|
||||
lib/codeql/rust/elements/internal/RefTypeReprConstructor.qll 8e7012b456ebf1cc7a2c50892c0fffd51f0d5d83e417e1d4cabd4d409e3dddc0 4f3c6368bcea5e8c3f0b83591336f01331dc6dabf9c1e8b67de0fc4d640f65f0
|
||||
@@ -403,6 +394,15 @@ lib/codeql/rust/elements/internal/StmtImpl.qll ea99d261f32592ff368cc3a1960864989
|
||||
lib/codeql/rust/elements/internal/StmtListConstructor.qll 435d59019e17a6279110a23d3d5dfbc1d1e16fc358a93a1d688484d22a754866 23fcb60a5cbb66174e459bc10bd7c28ed532fd1ab46f10b9f0c8a6291d3e343f
|
||||
lib/codeql/rust/elements/internal/StmtListImpl.qll fc16097d08124bcc39c998b07023710e0152baed165fb134cac2ee27e22a9f7a a4eceb42720593d8d0ce031016465de0bb61d40f31b2cc2718626ef8348ac900
|
||||
lib/codeql/rust/elements/internal/StructConstructor.qll 52921ea6e70421fd08884dc061d0c2dfbbb8dd83d98f1f3c70572cfe57b2a173 dcb3ea8e45ee875525c645fe5d08e6db9013b86bd351c77df4590d0c1439ab9f
|
||||
lib/codeql/rust/elements/internal/StructExprConstructor.qll 69761fa65a4bedf2893fdfc49753fd1289d9eb64cf405227458161b95fa550cb 72ed5f32dcf6a462d9d3cadfc57395a40ee6f4e294a88dbda78761b4a0759ece
|
||||
lib/codeql/rust/elements/internal/StructExprFieldConstructor.qll 6766d7941963904b3a704e64381a478d410c2ef88e8facbc82efca4e781dac96 a14ce465f0f4e43dea5c21c269d803b0ad452d2eb03f4342ea7a9f5d0b357d60
|
||||
lib/codeql/rust/elements/internal/StructExprFieldListConstructor.qll fda308db380c608d5df1dc48b30bccb32bce31eabff807d0e623b812000a2a2c 84fb7cb24bf61aec602956f867c722d10907b3edfd4dd6946f1349cf6240b4f1
|
||||
lib/codeql/rust/elements/internal/StructExprFieldListImpl.qll 73aa0a61c2fe5c3cb345b98c1d0bc60474734068ff405061c87406f252ef29ba 66c75d1a449dd9c11db36492f24de13baa98f99d41284ef69298e7b9beb470dc
|
||||
lib/codeql/rust/elements/internal/StructFieldConstructor.qll 07c7ca8cd5666a0d022573e8d4f9a2e8b237c629c729b9563d783f5e34f232ce 82de0f502272ebdc4f3b15aa314611dd20e82f78ad629e79b5459fdcacf44f9e
|
||||
lib/codeql/rust/elements/internal/StructPatConstructor.qll 4289608942b7ca73d5a7760232ef23cd9a1baf63cc1d0dc64e7dfea146194fe4 189aec3a5c376addd75b17a79729837fb4185de4abf45008df3956a2d9cdadb8
|
||||
lib/codeql/rust/elements/internal/StructPatFieldConstructor.qll 780294d2bbad2062a7c66a0dca370e12551d94dd97540936864cf26cbafd7d0e aa9c717f3ec13927be9c598af06ae0b785fb6645a409acf4eaedf07b0b765079
|
||||
lib/codeql/rust/elements/internal/StructPatFieldListConstructor.qll f67090a3738f2dc89874325c1ec2d4b4d975a5fdef505f0008a016f33868bebb 1c10b9ae42ed78758f59902c44c3eeebb0bd862c04783f83aa4db5653f12bf0e
|
||||
lib/codeql/rust/elements/internal/StructPatFieldListImpl.qll 6f7b9e72ffc874852d76e0a7859d19ea2a96dc2925e961f1eb772328b03b399e 9bb9380a1c447a8509b1ccf9be19ee25561eb9c5e0d627f5f4b76b1b2706ba18
|
||||
lib/codeql/rust/elements/internal/TokenImpl.qll 87629ffee74cacc6e8af5e96e18e62fb0fa4043d3ba1e7360daa880e628f8530 d54e213e39ae2b9bb92ab377dc72d72ba5bca88b72d29032507cdcbef201a215
|
||||
lib/codeql/rust/elements/internal/TokenTreeConstructor.qll 0be1f838b04ff944560aa477cbe4ab1ad0b3f4ae982de84773faac5902fcae45 254b387adc2e1e3c355651ab958785d0b8babbc0030194234698a1219e9497b3
|
||||
lib/codeql/rust/elements/internal/TokenTreeImpl.qll c61574f2b551db24640258117e0c8653196ba91392ce81da71a3a528ee07b1ad 489a1c8f550725e28871ae99c41d03b719c3099b8f73ae7422f497430f616267
|
||||
@@ -517,7 +517,7 @@ lib/codeql/rust/elements/internal/generated/ExternItem.qll 749b064ad60f32197d5b8
|
||||
lib/codeql/rust/elements/internal/generated/ExternItemList.qll 6bc97fdae6c411cab5c501129c1d6c2321c1011cccb119515d75d07dc55c253b 6b5aa808025c0a4270cac540c07ba6faede1b3c70b8db5fd89ec5d46df9041b2
|
||||
lib/codeql/rust/elements/internal/generated/ExtractorStep.qll 61cd504a1aab98b1c977ee8cff661258351d11ca1fec77038c0a17d359f5810e 5e57b50f3e8e3114a55159fb11a524c6944363f5f8a380abccc8b220dedc70ca
|
||||
lib/codeql/rust/elements/internal/generated/FieldExpr.qll 3e506b5cb93793ec30f56bb637a600db869fcba6181b068516a671d55c362739 7bbf953696d763ad6b210f378f487ba85b875fa115b22c0c0508599a63633502
|
||||
lib/codeql/rust/elements/internal/generated/FieldList.qll 43c13c6e3c9ba75a7a4cb870fc4f18752001584d48b9df0734055a6ebb789331 7c51b0b13eb02f1286d3365e53a976ba2655c4dbd8e735bc11c8b205c829e1ee
|
||||
lib/codeql/rust/elements/internal/generated/FieldList.qll 575cfd2705113ad5eaf5885cfbcae8b4cb74c4f1192c9905ceb63992187061ad d6571e4238527e93681be4182cc8da35b002e768fbb727b36860c91557e3f430
|
||||
lib/codeql/rust/elements/internal/generated/FnPtrTypeRepr.qll d490ab9f2e3654d9abde18a06e534abd99ca62f518ca08670b696a97e9d5c592 01500319820f66cb4bbda6fe7c26270f76ea934efff4bb3cbf88e9b1e07e8be2
|
||||
lib/codeql/rust/elements/internal/generated/ForExpr.qll 6c1838d952be65acaa9744736e73d9bfdcf58d7b392394223bf6fbfdcc172906 44237a248a5aa326a2544e84bc77f536f118f57a98c51562b71ddc81edfcccb8
|
||||
lib/codeql/rust/elements/internal/generated/ForTypeRepr.qll 3027879795a6be5bfb370b8c2231b579f9df8afde54345416c6ce2c64bd3dfec f871d73b36f079f473915db298951020e5a05bb5e8e4d570822063afb4807559
|
||||
@@ -580,7 +580,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll c808c9d84dd7800573832b
|
||||
lib/codeql/rust/elements/internal/generated/ParenExpr.qll bc0731505bfe88516205ec360582a4222d2681d11342c93e15258590ddee82f2 d4bd6e0c80cf1d63746c88d4bcb3a01d4c75732e5da09e3ebd9437ced227fb60
|
||||
lib/codeql/rust/elements/internal/generated/ParenPat.qll 4f168ef5d5bb87a903251cc31b2e44a759b099ec69c90af31783fbb15778c940 0e34f94a45a13396fd57d94c245dc64d1adde2ab0e22b56946f7e94c04e297fc
|
||||
lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 40ab5c592e7699c621787793743e33988de71ff42ca27599f5ab3ddb70e3f7d8 12c0a6eed2202ee3e892f61da3b3ce77ac3190854cdf3097e8d2be98aa3cb91d
|
||||
lib/codeql/rust/elements/internal/generated/ParentChild.qll f3def94b776cb89394dfeac1fe5c4d7112821968874eaaf086b9179301edf6e7 c93fcd7714c9c6b63481820bb947ed1a07dbb9859ad32e61dea4007173a58145
|
||||
lib/codeql/rust/elements/internal/generated/ParentChild.qll 0e80d85aa8ddb203edca90c9b68f88340231ab5415933f622bad18f639ff6190 9ebbfdf48f0a3c06658b53a9fd987530b34c9c40ae2c3d6ef6ebdf2721fdbf83
|
||||
lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll c5fa328ea60d3a3333d7c7bb3480969c1873166c7ac8ebb9d0afad7a8099d1a8 2dbbb6200d96f7db7dea4a55bdeab8d67b14d39a43e0bd54ada019f7e466f163
|
||||
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
|
||||
lib/codeql/rust/elements/internal/generated/Path.qll 8e47e91aff3f8c60f1ee8cb3887b8e4936c38e4665d052f2c92a939a969aac29 2c28beb89cabd7c7c91a5bc65c874f414cb96bbefde37b25811b61089a8a0053
|
||||
@@ -595,15 +595,8 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 51d1e9e683fc79dddbff
|
||||
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f
|
||||
lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9
|
||||
lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9
|
||||
lib/codeql/rust/elements/internal/generated/Raw.qll ea8c9eba40d40767b9dc39dee8836c7b5be5cc5762edfe44b08e453cf7690b11 3401c2fc482e00bd1d2c039ae9a32d814902fe67a0b36a920ed5243a6c028d90
|
||||
lib/codeql/rust/elements/internal/generated/RecordExpr.qll 2131b2cb336caa76170082e69776011bf02576bbfdd34ba68ca84af24209250a 39a2e3ec32352b594c43cc1295e0e8b3f9808173322d3d73cb7d48ef969d5565
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0
|
||||
lib/codeql/rust/elements/internal/generated/RecordField.qll 7a6fd6a8362ea1671560eeb96abcaf9ae412ec9800fcf9c9fbda1849253912af 0e72e067475c20d72aeae2f10589e3f25806b44ac60b6b7289ba860de98a7c92
|
||||
lib/codeql/rust/elements/internal/generated/RecordFieldList.qll d7bb2677338cf420b0d6371aeec781aacc2272c73413ea96b7418177ad149fb9 5ef52074b9f4ec31e7422b70efdb2e650d673b2625efdfec18a4e48c30e35cf6
|
||||
lib/codeql/rust/elements/internal/generated/RecordPat.qll f2ce392fb7e481a139ea527ad32d1c7ba65404a05efc56f5c68ce1e8e1e0a928 9710048cd1e6b26b3054ac95778e47f16cff6424bab9ef0c099c1109ef14741f
|
||||
lib/codeql/rust/elements/internal/generated/RecordPatField.qll 5bf624d22903fb874e6d03541cf453493badd382b6910ce950ad0d34dd580e9a b9ec89b69a58b9c418405efa9b0e6ee7b07616f5696a0858583a339d657b5855
|
||||
lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll a6db0cdcc3da667c52862ed940597d899383ccf2bda9bb3f62b8ce9f48119307 99fe972c80db8f28e2a6f56cf2a11c98183244229da117320cc86c7ade62bd0b
|
||||
lib/codeql/rust/elements/internal/generated/Raw.qll 2e299cb4fc9e506d910827e3a3ab743570a02d963c9001b33c6c06f9aa92200d a19748787c02a18abffaaa4c7b9c23a9bbc56020fb36698bf82da72c09fa57db
|
||||
lib/codeql/rust/elements/internal/generated/RecordFieldList.qll 4a23b0d75a90671197246dbbb4e62706c180074abb8ebe60a96df11c47a917a2 09be127977651a24010b090d9681714d83ebd461098f9cf0e0d1973cafb1c782
|
||||
lib/codeql/rust/elements/internal/generated/RefExpr.qll 7d995884e3dc1c25fc719f5d7253179344d63650e217e9ff6530285fe7a57f64 f2c3c12551deea4964b66553fb9b6423ee16fec53bd63db4796191aa60dc6c66
|
||||
lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05
|
||||
lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll 3d8c0bd296d33b91a81633f697a43269a6538df06d277262d3990d3f6880ef57 13680f39e89bcd8299c218aba396f3deec804597e6f7cb7d4a7e7c748b6faa77
|
||||
@@ -621,8 +614,15 @@ lib/codeql/rust/elements/internal/generated/Static.qll 0b336767104d2b852b9acd234
|
||||
lib/codeql/rust/elements/internal/generated/Stmt.qll 8473ff532dd5cc9d7decaddcd174b94d610f6ca0aec8e473cc051dad9f3db917 6ef7d2b5237c2dbdcacbf7d8b39109d4dc100229f2b28b5c9e3e4fbf673ba72b
|
||||
lib/codeql/rust/elements/internal/generated/StmtList.qll a667193e32341e17400867c6e359878c4e645ef9f5f4d97676afc0283a33a026 a320ed678ee359302e2fc1b70a9476705cd616fcfa44a499d32f0c7715627f73
|
||||
lib/codeql/rust/elements/internal/generated/Struct.qll 4d57f0db12dc7ad3e31e750a24172ef1505406b4dab16386af0674bd18bf8f4b 1a73c83df926b996f629316f74c61ea775be04532ab61b56af904223354f033e
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 42286213860a73257d5d4384fbf94e4926e1fac3fc3bfc848b9cd34227c7abb3 7d8c696db355f23140df0cf37135a25e8d7499793ffdbca7e78c9f39c3b3b7ea
|
||||
lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 432075c5403cfc1b466e6665c08a54ae314239fbeab0b01e3e6b59d8057d1821 432075c5403cfc1b466e6665c08a54ae314239fbeab0b01e3e6b59d8057d1821
|
||||
lib/codeql/rust/elements/internal/generated/StructExpr.qll c6d861eaa0123b103fd9ffd2485423419ef9b7e0b4af9ed2a2090d8ec534f65d 50da99ee44771e1239ed8919f711991dd3ec98589fbe49b49b68c88074a07d74
|
||||
lib/codeql/rust/elements/internal/generated/StructExprField.qll a6c1f744dbad034e6a3b173b8ff8037e2bfdea58316dedfe5508299afb770435 f7ed27ce27d14516e735a19a0509aa614d9c7637133efec8e6dc4145b5f3bee7
|
||||
lib/codeql/rust/elements/internal/generated/StructExprFieldList.qll b19b6869a6828c7a39a7312539eb29fd21734ff47dfd02281de74194fd565d7e 3cadebffaa937e367a5e1da6741e4e9e5c9a9c7f7555e28cfa70639afd19db7c
|
||||
lib/codeql/rust/elements/internal/generated/StructField.qll d3eca4a20ae50c9396fd56820491bcc0af812b921b56ac9f73614d99c78277b8 874d95c4b7af98f706ea23e05afc9b260775128f6d256891607fa4f0022bc15a
|
||||
lib/codeql/rust/elements/internal/generated/StructPat.qll c76fa005c2fd0448a8803233e1e8818c4123301eb66ac5cf69d0b9eaafc61e98 6e0dffccdce24bca20e87d5ba0f0995c9a1ae8983283e71e7dbfcf6fffc67a58
|
||||
lib/codeql/rust/elements/internal/generated/StructPatField.qll 285530e9b73d51b3921984e344a9a944afc68c6d83fba7ee1d63345de455208f 17985cea91de1ed21e53e8c0fdb6382768cc57c5b79856dab3bc03cf1c323df9
|
||||
lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll e34c003e660ba059ba81bb73b3c8d21bd2a47d0251569c46277dc9ccf2947b0a 85113f35ba5f6b9e01ad4072246a4de1ac0e4528348ac564868e96f34a3e09e2
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 56643530ddd22deea0ee17ad47dc902d0accac41133e8f9263b7225853e0f0e2 b263a7d5f4815af6f7072a0b2d68f8fb358283a10e362d879d37c528379b6046
|
||||
lib/codeql/rust/elements/internal/generated/SynthConstructors.qll e4298dc8e52d56672d91df093cc858105b5072be4ae5bed95105e0ffd80e7233 e4298dc8e52d56672d91df093cc858105b5072be4ae5bed95105e0ffd80e7233
|
||||
lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b
|
||||
lib/codeql/rust/elements/internal/generated/TokenTree.qll 8577c2b097c1be2f0f7daa5acfcf146f78674a424d99563e08a84dd3e6d91b46 d2f30764e84dbfc0a6a5d3d8a5f935cd432413688cb32da9c94e420fbc10665c
|
||||
lib/codeql/rust/elements/internal/generated/Trait.qll 8fa41b50fa0f68333534f2b66bb4ec8e103ff09ac8fa5c2cc64bc04beafec205 ce1c9aa6d0e2f05d28aab8e1165c3b9fb8e24681ade0cf6a9df2e8617abeae7e
|
||||
@@ -643,7 +643,7 @@ lib/codeql/rust/elements/internal/generated/TypeRepr.qll 1e7b9d2ddab86e35dad7c31
|
||||
lib/codeql/rust/elements/internal/generated/UnderscoreExpr.qll b3780c99c5d57159bef4c6bd2fd8ec44ebd1854c892c1ca776c740f71249e58c 2fd451cbf0a779e8042e439882e7d9cadc19d1e596df3bbb086d16f2596407c7
|
||||
lib/codeql/rust/elements/internal/generated/Unextracted.qll 01563dfd769d6dc3c6b8a40d9a4dc0d99a3b6a0c6725c180d2bf4d7633929a17 a93ce90f8c03f4305e59de9c63f089fc7935298fc9a73d091d76933cf63e790c
|
||||
lib/codeql/rust/elements/internal/generated/Unimplemented.qll a3eb304781991bff1227de1e4422b68bf91e7b344e4f6c9e874b324e82a35e60 6bc4839fda3850a56dc993b79ef9ba921008395c8432b184e14438fba4566f21
|
||||
lib/codeql/rust/elements/internal/generated/Union.qll 06a602aa7c7097e72fff6ea33d8fb4debaf4023b64b765a3d388ffecc9fa43e4 60d72bd1273e624e36f6227925adc611f5de098081d4f455c32f5af4938ee45d
|
||||
lib/codeql/rust/elements/internal/generated/Union.qll 7f2a33166761d29299572681f1eb0b7efd647b3bd37b5a00c2d4661b06b1b04e 56da586702152f4507ae874f2e1cec9d963151a97bc279f2eed37fba921780a5
|
||||
lib/codeql/rust/elements/internal/generated/Use.qll d42ccf3516a9f79ae8766f93ad5f09d3cdcd7b96844d4c9de64189b56018a7b4 70a9553a8f71f6cbfdd0f59a4b42292d13177613ceb0542436436e0ac2e1f8ee
|
||||
lib/codeql/rust/elements/internal/generated/UseBoundGenericArg.qll 69162794e871291545ea04f61259b2d000671a96f7ca129f7dd9ed6e984067c4 31de9ebc0634b38e2347e0608b4ea888892f1f2732a2892464078cd8a07b4ee8
|
||||
lib/codeql/rust/elements/internal/generated/UseBoundGenericArgs.qll 05dca015d922935887856f3a0d577dbcf5b8f82bc384bdc9c8c2d0106419716d fcee14ed4f7a639b1ba721bd390fc0cdbfdc7c759e3092aa462d466fe390de45
|
||||
@@ -658,7 +658,7 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll 7edf1f23fbf953a2baabcd
|
||||
lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499
|
||||
lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b
|
||||
lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85
|
||||
lib/codeql/rust/elements.qll 041993d344a4c10b301ac607075254175f1a1f927328de4f40f4df0260d0dece 041993d344a4c10b301ac607075254175f1a1f927328de4f40f4df0260d0dece
|
||||
lib/codeql/rust/elements.qll 0f225f1d1f386597d897dc0589e679d49ea8ea05408188d7e1ca5d0b03cb30fb 0f225f1d1f386597d897dc0589e679d49ea8ea05408188d7e1ca5d0b03cb30fb
|
||||
test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871bd78b51997d3cffd969105e5fdd 2f936b6ca005c6157c755121584410c03e4a3949c23bee302fbe05ee10ce118f
|
||||
test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52
|
||||
test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684
|
||||
@@ -1023,39 +1023,8 @@ test/extractor-tests/generated/RangePat/RangePat.ql 97314b9a5543a7471d722ae188a6
|
||||
test/extractor-tests/generated/RangePat/RangePat_getEnd.ql 723eb5030ec52d3aa3650a3e2de6cc0195a0030630239b972235963320e0d808 2df3b1a6197c3abd43dc743fd09cbf55165e3191f2b49336777594541e5da96a
|
||||
test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql 564216b2342f56dc8c1aed6306f57b6dafb33de9e3ba337a840a8c077ce95933 2a76ec7a59bada29733a1515bc1ea8bedd37429d1694ca63c7a8fbf94098a4c7
|
||||
test/extractor-tests/generated/RangePat/RangePat_getStart.ql ad2066efa32fced2dd107031f2a9b9635c3c892e874870a4320522bae9309aa4 b4a8c57a838074e186b823938d1a9372153c193da6c839b5f242ca25c679e83f
|
||||
test/extractor-tests/generated/RecordExpr/RecordExpr.ql 220f7f766587dc9df1c6f81a1cda3d19d7d5e92a31c63752061297e1adf96bf0 792bbe4503adcb63f7ac0f11259bb60a8ce05538ba1676f141989a73ff4eb5c0
|
||||
test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql 2eb8f7591f08199d124732d7f2d7dd3e81792a52f8e6c90003aa0609923f8cb0 27e245224d6c9aa20023b418ce8dffff1293b50a0e10938932631fca7c559e78
|
||||
test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql 6d3d872eb64ff8cd7317190f9b2627d3fa6a74976e362cfb49e21c6623d63f82 d98b07f932ecb25a427e655017de47f951d3eabc4eedbc6f873571ce8921e9ff
|
||||
test/extractor-tests/generated/RecordExpr/RecordExpr_getResolvedCrateOrigin.ql 87d463c7950407c86783b9ccbcf6daa4f62f5fcb75bc20f1879bde9240281d4d 5659b4fb8b25cd998211aa3edb11188b3c487cabaf7a09989ce6fe0e4f67ba25
|
||||
test/extractor-tests/generated/RecordExpr/RecordExpr_getResolvedPath.ql 0de885c7efdd257ee44d2c8a2ad91e419d604517471966059ddae321e80597b6 7977fb7a8c954733dbb5cf8378d6103688d16bc4c9b891c68098d0ec224429b4
|
||||
test/extractor-tests/generated/RecordExprField/RecordExprField.ql 62ee00e478fcf07421b5989943a487ecc0c99cf50ec87f05aabe89dfb03f2a32 ad7c6ce362032e18fc9950b885c4b7b5c907e6abd2af2d13ecef84eb980027fb
|
||||
test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql 789d20f8c0bb0e9567d3d9a0c0266a04841cda0dbdbe10af8c450d5a82bb289e 9036f5b0e7ddf301012f52f3919804382421061366d2a4f3a016e9783befec6d
|
||||
test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql 7dcb5cf0d04bcd62b655fa0626535526cdaa0f891845f4b22cb50fcf1ae3e511 a177db76e4e9583438fad9bfb1300fed9e812c1046c44dccd307bf3a46603a69
|
||||
test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql 4607b1adb0e25fc5314c108dab14c19aff5a35a6b16445ed64a82c01bb7f6086 0040f2b4dffb37b257fea9870b2ac742ea3c1f9dfdeff6f69b449f9a4a3719d7
|
||||
test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql b6cd65fc4fa687dc34d0848ff8c23d37088345f94902b5622b5411a62924441e 34fa8bccddf7ead18b1e597f49af008e4b244ff19d4b7f23d0777978c4d3f361
|
||||
test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql 15b297e79c1ba8c92cb97148d6aab78ed1fd2c94f0d3a430ead8d541024e81ce 4f0a131011cf32e172f7bd027769e39642fb506d37b3d50b175c6ed5947d3d9c
|
||||
test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql c55e4775c8880c05944be04bdeb1c9e6bad45b922ba71ac3145acd83ff988e59 14ce98d1e5564e9e27c29110237cf6210d130ea887920b2b1bd34a853b7fcc63
|
||||
test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql f2dd6b85da1cd8195986aefbe7dc8171db6fbbe5b2612c4cbdd8aba052cb0c6a 2c19cb1510c215ddfa004d40bf30fc0fe0dcbb530c320b297541f1dbcb204143
|
||||
test/extractor-tests/generated/RecordField/RecordField.ql 8ba8ed51144c69266f8a5644604f560d1569de76e1070d8f22247d07ebc521c8 87d485651f9711e49c576dddd543077c49892b71e45fc65ce5122ded303b49f5
|
||||
test/extractor-tests/generated/RecordField/RecordField_getAttr.ql aa29d317dee23039a807df530a6f04b0678c4d1d34207a4381be535ff04af478 41c5778d6316eec19192334046ed110aea44a4c45937d5c355a9b71c54aa8e04
|
||||
test/extractor-tests/generated/RecordField/RecordField_getExpr.ql 15ab939ede4ed4395ef8db8f6e0a3ac03079a3ae617ce9335fb93ba565b402de 9d853f305baf56ec08b22342adc4deb096d771fa48fd478932cc5187cd66304f
|
||||
test/extractor-tests/generated/RecordField/RecordField_getName.ql 1f5c47d41367bd0115df86f22a70d4621d7cbfb41554daa598da29f549479670 64535303b273f1c2027b6ce89b50816ad3cbbca9bf00b2b8402e36b26e675d97
|
||||
test/extractor-tests/generated/RecordField/RecordField_getTypeRepr.ql f61cfcd0c682604b882a4ed9c746e6f6087e4798d7aaf9d29579e0e2372406e6 01371887fa82748ef196d2e9d27d26c586efb5b4f82d48967b5494723c54af4d
|
||||
test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql cc45e9bb9418d15cef07a1827358c3f18a8737324c8e6852591a2da70df89360 45557497fc165a212fffda71dedabc8159a4f72323430df732698a18922b366c
|
||||
test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql 586bccfa550243177d9fdfd6900a473f51a76ed360b537f19cb300330d5dad5b a063373dfdbf06b68c69694ea4ae72a26b906c910f9095894c09e72f8fb52819
|
||||
test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql 2eb92ef8528204f3f105c19a36cdc06b3b6d20242463ff2ed1fb81c544812a71 d69091899e7157099f117e14fe60cd3705cfda45f28f6a6a2b7234a4a9c1e664
|
||||
test/extractor-tests/generated/RecordPat/RecordPat.ql 24469c2a0902196d49249a37a0b56bf9fe62d1e7af3150813200b25ccb46dfaa 479e58d4fe6db7048e0649fd5a9c1b8ca1ceb8aa52a80dd07a999a07e32b0a3f
|
||||
test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql 187b8d44de158fc809257e28b2e8fdd246c8eb3c60115d54cd53396a320e372d 74813fd13c6f34927420ed44620743f7c80c537984e0db72c1c5f4b754b40b83
|
||||
test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql 32e45a6f59cdb8edbf7f9326164e225a7f545fabd2dd168b660699954a999fdf 325c9121dc130459426b473691876a0698b51d5cdf4530698a398510ce8e3051
|
||||
test/extractor-tests/generated/RecordPat/RecordPat_getResolvedCrateOrigin.ql 61a47db765e0c45797d3f92318fb6dbf07dfe1a2e63704294c58d49cb0894676 86a636746458053278a8ba0be062a9b1cfcad4866e065a8317fa8f033518ecae
|
||||
test/extractor-tests/generated/RecordPat/RecordPat_getResolvedPath.ql 0221208e93c4a26e555dd848238b4f5bcabf2ccf3fc38ceb2eef45c39d67b21a 37d80014a21a19e9132ad645a17234e33bb20f2352b450277b8fa919a54b95e9
|
||||
test/extractor-tests/generated/RecordPatField/RecordPatField.ql 6c51343258e56673d21b7ae73e7de011319ffa2eb65390e697f875bb428d25d1 82c3232db0cb353140618749b1cba5549b0ff43cbbaafb203077e18dbedb2c10
|
||||
test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql fb0592f7a1be4fd9c6f36c79dee5a0f6711b0a7820b079f8e95413722ae1aeb7 9dfb0de00ec9c4a23efd38515c63a3567204f2a3ac2634858296f58aa564d170
|
||||
test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql 3380a41d6cecd80681fc955719fa11377c32a5e0be276871f2d0d75ae62d8f0a 44efe89657d3a59fb94962d0fbf52d06571e203863a3d9e9dd47a5135a8ba4d9
|
||||
test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql 577187a4775283bbce66abcb54af50e5684e1f03f8b55e59d84f1914d142b04f 7c23778ad92a6dccf193abb269bd8fbcb33f3b778eb18c6d23135540a27fcec7
|
||||
test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql 5a49488f43bbac2349d75b3acbb3bca4440d9b3725434fefd1ba2eda2be6feb2 898177f203181e5e095091b0a3f6a92f1323c80862400cbfd85902d783a9160d
|
||||
test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql 7c0d190762089af3b6f4fb9ef95561bb2107d7476477bdcfce6b313caa61cab1 17c85ac9670c4faea44a76e9e21184a3d5cabc6c3deba083a0b84fb91e3cbe16
|
||||
test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql 0caef1f5d09a73a973200e061e09ea5498b855dc19af19c1dc48cd9f20da6857 45c12708b566a5efcc79155b45174fc3ff5a084109043493cffa5216b9054205
|
||||
test/extractor-tests/generated/RefExpr/RefExpr.ql 27d5dceb9e50668e77143ff5c4aa07cbe15aeea9829de70f1ddfe18d83690106 b95058b7a0bad4bddb857794901d9b651b2f9e4dd3554e5349a70a52cbbfaff6
|
||||
test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql 477fb3fee61395fabf78f76360ea27656432cb9db62e6f1dab1e9f3c75c83d39 5210f2ac54c082b616d8dcb091659cdad08a5d4ae06bf61193c33f208237482f
|
||||
test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql 180d6417fd7322cabf4143d0ddd7810f65506b172a5c82484b3ef398041636b2 a291f0bec1ec5b3fa6d088b3d1a658889b9a3521c39ff3bb7a5ab22a56b8b20a
|
||||
@@ -1107,6 +1076,37 @@ test/extractor-tests/generated/Struct/Struct_getGenericParamList.ql cd7245271300
|
||||
test/extractor-tests/generated/Struct/Struct_getName.ql 8f1d9da4013307b4d23a1ce5dc76466ecdd7f0010b5148ec2e7dd2883efe3427 411b326d15d56713c2a5e6d22909474c5d33062296518221e36c920927f859fe
|
||||
test/extractor-tests/generated/Struct/Struct_getVisibility.ql 17139d3f91e02a0fc12ad8443fe166fe11003301fee0c303f13aa6d1138e82d5 07bdc1fbcc0ea40508364ea632fce899cbe734159f5c377ea2029bc41bc9a3b4
|
||||
test/extractor-tests/generated/Struct/Struct_getWhereClause.ql d0db2c9811ed4568359e84255f04f0c75ae65a80d40981a1545d6cddf53e9c09 1133a46bc502757aaab61a8ac94b4a256b590548c5e27ec6a239ffd5a4a81577
|
||||
test/extractor-tests/generated/StructExpr/StructExpr.ql 5bdc2163b7ddd0bc3eb938acc366105590742c417b09ed814b9c4d5d78b9b90a e59a4973aa882879f1940a955020df91fb588f004d7ea83866f52b0930e46763
|
||||
test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql f6f2b26a93b24d19f74eab73518eaa688ec270f865764fb9b839ae7e029b10bd bd963650f78009ac44a2aa14f0e53f10e832a73cc69d5819ea89865874113040
|
||||
test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql c2794babda0823c62c2af6fe9e3b11d8e4b6baa8095bf8f01faee13b4894ff67 cba6a7576a572238c59142e46cc398c5f31cd91c8d1710381d579bb6bb0edb7c
|
||||
test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql 5152d15064daa1da4470cdc659a07281734d56ed958e67efc54701eb44d550dc a7a78db088b0dd7b7c148ad24c8faa014e2eab29146e056bdf35bef5ca2f8485
|
||||
test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql 1c2401038fe14e660d5101951e7467dc3a56969698a8cc5b818d664902b269bc f6b7047112ade49b632d2e3f71531dd2dffe7c2cc848587908fa4b85dc06ee82
|
||||
test/extractor-tests/generated/StructExprField/StructExprField.ql 4a530138ecae9ac693cd7d3dc06f02a8457263e4a7e9ab13092c59441de0f4c1 e434b184b6ed4ff0f759c33df4a41519d85163c8efbf259c1c9a65b282b0cfa7
|
||||
test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql 660400f80824956422b95923519769df08514f089269c7a5ccc14036b90b233d f137716537f8780ad63bd6af0da06a96f0d00cb7a35402d3684e6866112b9d1a
|
||||
test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql 00180d982057ee23297578d76bf1a337fde8341f0520ebfa5786c8564884ae5a c2b813c25df4ffc49486426365cc0cc0bbf07cf0c7d7adece7e6576fc8b776dc
|
||||
test/extractor-tests/generated/StructExprField/StructExprField_getNameRef.ql 1c1263f0f5b69ec098b59ba8dfe9689d20ca8359b09887e73026bee908bea37d 044b48656a7e53d2c4a3d638c8881d29f9045c24467b11ebeb96b9e35dc0d322
|
||||
test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql 33dc3f6c1f737e0ca2015530467bfa123eac0eb8ab63f2937ad0064f2246fb2d b89d5817c6a249232540570ef93ecf880a8ef74aa409c7cd8ddbc83f6d589fea
|
||||
test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql cd7f5236f6b660fc064f3a04f3a58d720ed4e81916cbd1a049c1fac7171108ed 61317928d0833f7bb55255a5045bedc0913db1266e963ede97d597ee43e3ddd9
|
||||
test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql 1292aec1141bdb75fd8e0993f683035f396a0e6c841b76ee86a0a1d3dce0dbc4 450eccbd07cc0aa81cef698f43d60aeb55f8952a573eaf84a389a6449c3d63a7
|
||||
test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql d0470b9846323d0408e0f26444cdc5322d78ce1ac203073ff4f556dac5343be7 280712a0b3714256aff4c2a4370fd43e70c418f526e383ed7100d61cdf790c36
|
||||
test/extractor-tests/generated/StructField/StructField.ql ad16292735a9bdbfcb287cf7141bbe52df894f7e5695cab1ebde670e4b314984 84ce151bdcbfc4decb2682417f024029897120f8067dd22a9ee56ccc47e0898d
|
||||
test/extractor-tests/generated/StructField/StructField_getAttr.ql a01715bc688d5fa48c9dd4bfab21d0909169f851a290895c13a181f22c0e73a9 fa6ffcf007492d9e1b7f90d571b9747bd47b2dc29e558a8e1c3013c5949dcdb7
|
||||
test/extractor-tests/generated/StructField/StructField_getExpr.ql 2d71524a890ffe2856c38c3549d05ca1a29765fa8214aa4168bf22d325f28707 24a1b78c143620ddb68f95879617f2b4f9172da36e13405d558fa6dc4f260257
|
||||
test/extractor-tests/generated/StructField/StructField_getName.ql 4c5a7e00b758a744a719bff63d493ee7d31ff8b3010e00c1d1449034d00130ec 9b284d848e5c86eac089f33deca7586441a89d927e7703cb4f98bb7c65a7238c
|
||||
test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql 3f36890b9ced576327d0fb6e3c80c6482c3a6d6f751fa769b24b2c14a46f8ee8 aed0681a3928b965f1448954d3a0369238a3cd715b97a0d988d15b971bf45356
|
||||
test/extractor-tests/generated/StructField/StructField_getVisibility.ql 335d097fabbc9720b065248cd1c295fe8dc040bf646ce491244b6840d9a847d3 9a9073eb52cd401b07beb4eb0aef7a15d5d398d0c76c35416ffcb059a360d654
|
||||
test/extractor-tests/generated/StructPat/StructPat.ql 2fa9b13ad6752a1296908c76caf3778dfd7d31e1ffc581011366208dfc3288a4 5a61ae9056a153b526d07c451a55f3959ce90adf762fe6c31f434fae27086d5d
|
||||
test/extractor-tests/generated/StructPat/StructPat_getPath.ql 03fb1254cc797239de302fbf1ad1b4e7e926e2ec4423221fbec06425e3647f63 9ab60ad1f16d4fb04d3de9f8f05d959fc90c42bb8f0dfc04ccc906897f5c1633
|
||||
test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql e3188ae0bb8835ad4aed5c775b52afb6cc7f9c520a8f62140d6cc590f2b8ce5d fd3e6eaf185e933e5ab1566cc49ef3497e50608070831879e01cf5a5ec23eae5
|
||||
test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql 1f4be7d78b187997093d52729d985dceb4c9e918274e0b9f06585e3337e3044b 2533855f07fce230dd567b2192ee20168bca077dbf7f1e8489dec142fcd396b8
|
||||
test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql f7b6dadd6ed0e40fb87e4be6eabe7fb96931b8c910c443588147202707655ced a43de755e0ca786a491afc97805e34d787c7bd03e7bca8df090e9386d4019688
|
||||
test/extractor-tests/generated/StructPatField/StructPatField.ql 283c474e08a209ab4eb4bbc2cb6b7d3ff20326a0257c26d039f7d76b37859c87 276d06a98e091fe7737ecbb686753607c9506a1bca8ee78c801d1acf18e2923b
|
||||
test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql 5e1df4f73291bbefda06437859aef73457fe58a22c134ceb9148cfcc19b696e7 69aea129500dca110023f03c6337e4b1a86627d6d51c43585534cf826db13d04
|
||||
test/extractor-tests/generated/StructPatField/StructPatField_getNameRef.ql 2496b1b5efe9036b4d93738ff4372396ff5dccad126e615f7ffd9b69ad44628b e8ce0dad6dd7561c11df59afcbb04a9c01fcdc66045f1abf31982e25d3f4b5ac
|
||||
test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql bb3e9ad8cdaac8723504fffbafa21acc95c5bce7843fc6f3641e98758d93573f 77e6f9946e66a25ac70622e65c164413e7001f4b8e9361a0850171fc0cead935
|
||||
test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql fad84896295380e3576bfaef384ac88b2f96a73196d8df3ec39ecc6184ec053f 3dd63ce5d1ffd48c873397368c6229de8da37e8f694f395165af8257a4d2faf2
|
||||
test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql 4e6fa98e48d474f31585a644d6045b7d8427a76bb04810728ad121a43b59e8a2 e3b1d915aae3e3c3df752146e222df71667f73731d7337cc2eb391b13f097315
|
||||
test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql 4be5b8afebc081602429d7cfb1fd87de629abc17f3739131c93f7e0b3adaec3d d5ced2366c5a278e820261239c4de183517dadf9bc8496f3e568758ab9570752
|
||||
test/extractor-tests/generated/TokenTree/TokenTree.ql ba2ef197e0566640b57503579f3bc811a16fec56f4817117395bf81da08922a6 2e7b105cb917a444171669eb06f5491a4b222b1f81fa79209a138ab97db85aff
|
||||
test/extractor-tests/generated/Trait/AssocItemList.ql 0ea572b1350f87cc09ce4dc1794b392cc9ad292abb8439c106a7a1afe166868b 6e7493a3ace65c68b714e31234e149f3fc44941c3b4d125892531102b1060b2f
|
||||
test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql 8149d905f6fc6caeb51fa1ddec787d0d90f4642687461c7b1a9d4ab93a27d65d 8fb9caad7d88a89dd71e5cc8e17496afbdf33800e58179f424ef482b1b765bb1
|
||||
@@ -1176,13 +1176,13 @@ test/extractor-tests/generated/TypeParam/TypeParam_getName.ql 9d5b6d6a9f2a5793e2
|
||||
test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql 080a6b370ad460bf128fdfd632aa443af2ad91c3483e192ad756eb234dbfa4d8 8b048d282963f670db357f1eef9b8339f83d03adf57489a22b441d5c782aff62
|
||||
test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql 4ad6ed0c803fb4f58094a55b866940b947b16259756c674200172551ee6546e0 d3270bdcc4c026325159bd2a59848eb51d96298b2bf21402ea0a83ac1ea6d291
|
||||
test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql d8502be88bcd97465f387c410b5078a4709e32b2baa556a4918ea5e609c40dd7 b238dc37404254e3e7806d50a7b1453e17e71da122931331b16a55853d3a843f
|
||||
test/extractor-tests/generated/Union/Union.ql 1049e542ca7723490d05e20b5a7a5867f74a5126395f333eae512aeb05efefd6 1f1cd82337e7ade9d02d16123201bbff62983c537672b5c1babfe6b65d300e82
|
||||
test/extractor-tests/generated/Union/Union.ql 2cbbdf085667e0741322cd21288d7987d6bdba72fb1b930aaf589494f5f9ea5e 2e64f70926141ea56aa14cc3122c522407f2f45ab9dc364ef4a3e3caf171befa
|
||||
test/extractor-tests/generated/Union/Union_getAttr.ql 42fa0878a6566208863b1d884baf7b68b46089827fdb1dbbfacbfccf5966a9a2 54aa94f0281ca80d1a4bdb0e2240f4384af2ab8d50f251875d1877d0964579fc
|
||||
test/extractor-tests/generated/Union/Union_getCrateOrigin.ql c218308cf17b1490550229a725542d248617661b1a5fa14e9b0e18d29c5ecc00 e0489242c8ff7aa4dbfdebcd46a5e0d9bea0aa618eb0617e76b9b6f863a2907a
|
||||
test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql 6268ddb68c3e05906e3fc85e40635925b84e5c7290746ded9c6814d362033068 04473b3b9891012e95733463018db8da0e96659ea0b10458b33dc857c091d278
|
||||
test/extractor-tests/generated/Union/Union_getGenericParamList.ql c55156ae26b766e385be7d21e67f8c3c45c29274201c93d660077fcc47e1ceee 4c4d338e17c32876ef6e51fd19cff67d125dd89c10e939dfaadbac824bef6a68
|
||||
test/extractor-tests/generated/Union/Union_getName.ql 17247183e1a8c8bbb15e67120f65ca323630bddeb614fa8a48e1e74319f8ed37 e21c2a0205bc991ba86f3e508451ef31398bdf5441f6d2a3f72113aaae9e152b
|
||||
test/extractor-tests/generated/Union/Union_getRecordFieldList.ql ded2890094adaa627be35f2a8335abbe5c1d4b5dcf1671f09f504546148cc02e 1f0d94a5c3259b8c39f2a78f1f9250655c6183a5277131a7f3de14126eee6d03
|
||||
test/extractor-tests/generated/Union/Union_getStructFieldList.ql ae42dec53a42bcb712ec5e94a3137a5c0b7743ea3b635e44e7af8a0d59e59182 61b34bb8d6e05d9eb34ce353eef7cc07c684179bf2e3fdf9f5541e04bef41425
|
||||
test/extractor-tests/generated/Union/Union_getVisibility.ql 86628736a677343d816e541ba76db02bdae3390f8367c09be3c1ff46d1ae8274 6514cdf4bfad8d9c968de290cc981be1063c0919051822cc6fdb03e8a891f123
|
||||
test/extractor-tests/generated/Union/Union_getWhereClause.ql 508e68ffa87f4eca2e2f9c894d215ea76070d628a294809dc267082b9e36a359 29da765d11794441a32a5745d4cf594495a9733e28189d898f64da864817894f
|
||||
test/extractor-tests/generated/Use/Use.ql b20f6221e6ee731718eb9a02fa765f298ad285f23393a3df0119707c48edd8b3 9ab45d9b3c51c6181a6609b72ebd763c336fee01b11757e7f044257510bd7f3f
|
||||
|
||||
110
rust/ql/.gitattributes
generated
vendored
110
rust/ql/.gitattributes
generated
vendored
@@ -131,14 +131,7 @@
|
||||
/lib/codeql/rust/elements/PtrTypeRepr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RangeExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RangePat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordExprField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordExprFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordPatField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RecordPatFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RefExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RefPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/RefTypeRepr.qll linguist-generated
|
||||
@@ -156,6 +149,13 @@
|
||||
/lib/codeql/rust/elements/Stmt.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StmtList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/Struct.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructExprField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructExprFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructPatField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/StructPatFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/Token.qll linguist-generated
|
||||
/lib/codeql/rust/elements/TokenTree.qll linguist-generated
|
||||
/lib/codeql/rust/elements/Trait.qll linguist-generated
|
||||
@@ -368,17 +368,8 @@
|
||||
/lib/codeql/rust/elements/internal/RangeExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RangePatConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RangePatImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordExprFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordExprFieldListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordExprFieldListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordFieldListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordFieldListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordPatConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordPatFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordPatFieldListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RecordPatFieldListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RefExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RefPatConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/RefTypeReprConstructor.qll linguist-generated
|
||||
@@ -405,6 +396,15 @@
|
||||
/lib/codeql/rust/elements/internal/StmtListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StmtListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructExprFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructExprFieldListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructExprFieldListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructPatConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructPatFieldConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructPatFieldListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/StructPatFieldListImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/TokenImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/TokenTreeConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/TokenTreeImpl.qll linguist-generated
|
||||
@@ -598,14 +598,7 @@
|
||||
/lib/codeql/rust/elements/internal/generated/RangeExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RangePat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/Raw.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordExprField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordPatField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RecordPatFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RefExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RefPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll linguist-generated
|
||||
@@ -623,6 +616,13 @@
|
||||
/lib/codeql/rust/elements/internal/generated/Stmt.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StmtList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/Struct.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructExprField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructExprFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructPat.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructPatField.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/Synth.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/Token.qll linguist-generated
|
||||
@@ -1025,39 +1025,8 @@
|
||||
/test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated
|
||||
/test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql linguist-generated
|
||||
/test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExpr/RecordExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExpr/RecordExpr_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExpr/RecordExpr_getRecordExprFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExpr/RecordExpr_getResolvedCrateOrigin.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExpr/RecordExpr_getResolvedPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprField/RecordExprField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprField/RecordExprField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprField/RecordExprField_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprField/RecordExprField_getNameRef.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordExprFieldList/RecordExprFieldList_getSpread.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField_getTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordField/RecordField_getVisibility.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordFieldList/RecordFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordFieldList/RecordFieldList_getField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPat/RecordPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPat/RecordPat_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPat/RecordPat_getRecordPatFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPat/RecordPat_getResolvedCrateOrigin.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPat/RecordPat_getResolvedPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatField/RecordPatField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatField/RecordPatField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatField/RecordPatField_getNameRef.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getField.ql linguist-generated
|
||||
/test/extractor-tests/generated/RecordPatFieldList/RecordPatFieldList_getRestPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql linguist-generated
|
||||
@@ -1109,6 +1078,37 @@
|
||||
/test/extractor-tests/generated/Struct/Struct_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/Struct/Struct_getVisibility.ql linguist-generated
|
||||
/test/extractor-tests/generated/Struct/Struct_getWhereClause.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExpr/StructExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExpr/StructExpr_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedCrateOrigin.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExpr/StructExpr_getResolvedPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExpr/StructExpr_getStructExprFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprField/StructExprField.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprField/StructExprField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprField/StructExprField_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprField/StructExprField_getNameRef.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getField.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructExprFieldList/StructExprFieldList_getSpread.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField_getTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructField/StructField_getVisibility.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPat/StructPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPat/StructPat_getPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPat/StructPat_getResolvedCrateOrigin.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPat/StructPat_getResolvedPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPat/StructPat_getStructPatFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatField/StructPatField.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatField/StructPatField_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatField/StructPatField_getNameRef.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatField/StructPatField_getPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getField.ql linguist-generated
|
||||
/test/extractor-tests/generated/StructPatFieldList/StructPatFieldList_getRestPat.ql linguist-generated
|
||||
/test/extractor-tests/generated/TokenTree/TokenTree.ql linguist-generated
|
||||
/test/extractor-tests/generated/Trait/AssocItemList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Trait/AssocItemList_getAssocItem.ql linguist-generated
|
||||
@@ -1184,7 +1184,7 @@
|
||||
/test/extractor-tests/generated/Union/Union_getExtendedCanonicalPath.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getGenericParamList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getName.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getRecordFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getStructFieldList.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getVisibility.ql linguist-generated
|
||||
/test/extractor-tests/generated/Union/Union_getWhereClause.ql linguist-generated
|
||||
/test/extractor-tests/generated/Use/Use.ql linguist-generated
|
||||
|
||||
@@ -230,15 +230,15 @@ final class MacroCallCfgNode extends Nodes::MacroCallCfgNode {
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
final class RecordExprCfgNode extends Nodes::RecordExprCfgNode {
|
||||
private RecordExprChildMapping node;
|
||||
final class StructExprCfgNode extends Nodes::StructExprCfgNode {
|
||||
private StructExprChildMapping node;
|
||||
|
||||
RecordExprCfgNode() { node = this.getRecordExpr() }
|
||||
StructExprCfgNode() { node = this.getStructExpr() }
|
||||
|
||||
/** Gets the record expression for the field `field`. */
|
||||
pragma[nomagic]
|
||||
ExprCfgNode getFieldExpr(string field) {
|
||||
exists(RecordExprField ref |
|
||||
exists(StructExprField ref |
|
||||
ref = node.getFieldExpr(field) and
|
||||
any(ChildMapping mapping).hasCfgChild(node, ref.getExpr(), this, result)
|
||||
)
|
||||
@@ -254,16 +254,16 @@ final class RecordExprCfgNode extends Nodes::RecordExprCfgNode {
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class RecordPatCfgNode extends Nodes::RecordPatCfgNode {
|
||||
private RecordPatChildMapping node;
|
||||
final class StructPatCfgNode extends Nodes::StructPatCfgNode {
|
||||
private StructPatChildMapping node;
|
||||
|
||||
RecordPatCfgNode() { node = this.getRecordPat() }
|
||||
StructPatCfgNode() { node = this.getStructPat() }
|
||||
|
||||
/** Gets the record pattern for the field `field`. */
|
||||
pragma[nomagic]
|
||||
PatCfgNode getFieldPat(string field) {
|
||||
exists(RecordPatField rpf |
|
||||
rpf = node.getRecordPatFieldList().getAField() and
|
||||
exists(StructPatField rpf |
|
||||
rpf = node.getStructPatFieldList().getAField() and
|
||||
any(ChildMapping mapping).hasCfgChild(node, rpf.getPat(), this, result) and
|
||||
field = rpf.getFieldName()
|
||||
)
|
||||
|
||||
@@ -62,15 +62,15 @@ class CallExprBaseChildMapping extends ParentAstNode, CallExprBase {
|
||||
override predicate relevantChild(AstNode child) { child = this.getArgList().getAnArg() }
|
||||
}
|
||||
|
||||
class RecordExprChildMapping extends ParentAstNode, RecordExpr {
|
||||
class StructExprChildMapping extends ParentAstNode, StructExpr {
|
||||
override predicate relevantChild(AstNode child) {
|
||||
child = this.getRecordExprFieldList().getAField().getExpr()
|
||||
child = this.getStructExprFieldList().getAField().getExpr()
|
||||
}
|
||||
}
|
||||
|
||||
class RecordPatChildMapping extends ParentAstNode, RecordPat {
|
||||
class StructPatChildMapping extends ParentAstNode, StructPat {
|
||||
override predicate relevantChild(AstNode child) {
|
||||
child = this.getRecordPatFieldList().getAField().getPat()
|
||||
child = this.getStructPatFieldList().getAField().getPat()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -575,9 +575,9 @@ module ExprTrees {
|
||||
}
|
||||
}
|
||||
|
||||
class RecordExprTree extends StandardPostOrderTree instanceof RecordExpr {
|
||||
class StructExprTree extends StandardPostOrderTree instanceof StructExpr {
|
||||
override AstNode getChildNode(int i) {
|
||||
result = super.getRecordExprFieldList().getField(i).getExpr()
|
||||
result = super.getStructExprFieldList().getField(i).getExpr()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,12 +726,12 @@ module PatternTrees {
|
||||
}
|
||||
}
|
||||
|
||||
class RecordPatTree extends PreOrderPatTree, RecordPat {
|
||||
class StructPatTree extends PreOrderPatTree, StructPat {
|
||||
override Pat getPat(int i) {
|
||||
result = this.getRecordPatFieldList().getField(i).getPat()
|
||||
result = this.getStructPatFieldList().getField(i).getPat()
|
||||
or
|
||||
i = this.getRecordPatFieldList().getNumberOfFields() and
|
||||
result = this.getRecordPatFieldList().getRestPat()
|
||||
i = this.getStructPatFieldList().getNumberOfFields() and
|
||||
result = this.getStructPatFieldList().getRestPat()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2528,70 +2528,6 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
predicate hasStart() { exists(this.getStart()) }
|
||||
}
|
||||
|
||||
final private class ParentRecordExpr extends ParentAstNode, RecordExpr {
|
||||
override predicate relevantChild(AstNode child) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A record expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
final class RecordExprCfgNode extends CfgNodeFinal, ExprCfgNode {
|
||||
private RecordExpr node;
|
||||
|
||||
RecordExprCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `RecordExpr`. */
|
||||
RecordExpr getRecordExpr() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the record expression field list of this record expression, if it exists.
|
||||
*/
|
||||
RecordExprFieldList getRecordExprFieldList() { result = node.getRecordExprFieldList() }
|
||||
|
||||
/**
|
||||
* Holds if `getRecordExprFieldList()` exists.
|
||||
*/
|
||||
predicate hasRecordExprFieldList() { exists(this.getRecordExprFieldList()) }
|
||||
}
|
||||
|
||||
final private class ParentRecordPat extends ParentAstNode, RecordPat {
|
||||
override predicate relevantChild(AstNode child) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A record pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class RecordPatCfgNode extends CfgNodeFinal, PatCfgNode {
|
||||
private RecordPat node;
|
||||
|
||||
RecordPatCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `RecordPat`. */
|
||||
RecordPat getRecordPat() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the record pattern field list of this record pattern, if it exists.
|
||||
*/
|
||||
RecordPatFieldList getRecordPatFieldList() { result = node.getRecordPatFieldList() }
|
||||
|
||||
/**
|
||||
* Holds if `getRecordPatFieldList()` exists.
|
||||
*/
|
||||
predicate hasRecordPatFieldList() { exists(this.getRecordPatFieldList()) }
|
||||
}
|
||||
|
||||
final private class ParentRefExpr extends ParentAstNode, RefExpr {
|
||||
override predicate relevantChild(AstNode child) {
|
||||
none()
|
||||
@@ -2900,6 +2836,70 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
int getNumberOfPats() { result = count(int i | exists(this.getPat(i))) }
|
||||
}
|
||||
|
||||
final private class ParentStructExpr extends ParentAstNode, StructExpr {
|
||||
override predicate relevantChild(AstNode child) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A struct expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
final class StructExprCfgNode extends CfgNodeFinal, ExprCfgNode {
|
||||
private StructExpr node;
|
||||
|
||||
StructExprCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `StructExpr`. */
|
||||
StructExpr getStructExpr() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the struct expression field list of this struct expression, if it exists.
|
||||
*/
|
||||
StructExprFieldList getStructExprFieldList() { result = node.getStructExprFieldList() }
|
||||
|
||||
/**
|
||||
* Holds if `getStructExprFieldList()` exists.
|
||||
*/
|
||||
predicate hasStructExprFieldList() { exists(this.getStructExprFieldList()) }
|
||||
}
|
||||
|
||||
final private class ParentStructPat extends ParentAstNode, StructPat {
|
||||
override predicate relevantChild(AstNode child) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* A struct pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class StructPatCfgNode extends CfgNodeFinal, PatCfgNode {
|
||||
private StructPat node;
|
||||
|
||||
StructPatCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `StructPat`. */
|
||||
StructPat getStructPat() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the struct pattern field list of this struct pattern, if it exists.
|
||||
*/
|
||||
StructPatFieldList getStructPatFieldList() { result = node.getStructPatFieldList() }
|
||||
|
||||
/**
|
||||
* Holds if `getStructPatFieldList()` exists.
|
||||
*/
|
||||
predicate hasStructPatFieldList() { exists(this.getStructPatFieldList()) }
|
||||
}
|
||||
|
||||
final private class ParentTryExpr extends ParentAstNode, TryExpr {
|
||||
override predicate relevantChild(AstNode child) {
|
||||
none()
|
||||
|
||||
@@ -32,7 +32,7 @@ module DataFlow {
|
||||
|
||||
final class TupleFieldContent = Content::TupleFieldContent;
|
||||
|
||||
final class RecordFieldContent = Content::RecordFieldContent;
|
||||
final class StructFieldContent = Content::StructFieldContent;
|
||||
|
||||
final class ReferenceContent = Content::ReferenceContent;
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ class TupleFieldContent extends FieldContent, TTupleFieldContent {
|
||||
}
|
||||
|
||||
/** A record field belonging to either a variant or a struct. */
|
||||
class RecordFieldContent extends FieldContent, TRecordFieldContent {
|
||||
private RecordField field;
|
||||
class StructFieldContent extends FieldContent, TStructFieldContent {
|
||||
private StructField field;
|
||||
|
||||
RecordFieldContent() { this = TRecordFieldContent(field) }
|
||||
StructFieldContent() { this = TStructFieldContent(field) }
|
||||
|
||||
/** Holds if this field belongs to an enum variant. */
|
||||
predicate isVariantField(Variant v, string name) { field.isVariantField(v, name) }
|
||||
@@ -69,21 +69,21 @@ class RecordFieldContent extends FieldContent, TRecordFieldContent {
|
||||
/** Holds if this field belongs to a struct. */
|
||||
predicate isStructField(Struct s, string name) { field.isStructField(s, name) }
|
||||
|
||||
override FieldExprCfgNode getAnAccess() { field = result.getFieldExpr().getRecordField() }
|
||||
override FieldExprCfgNode getAnAccess() { field = result.getFieldExpr().getStructField() }
|
||||
|
||||
final override string toString() {
|
||||
exists(Variant v, string name, string vname |
|
||||
this.isVariantField(v, name) and
|
||||
vname = v.getName().getText() and
|
||||
// only print field when the arity is > 1
|
||||
if strictcount(v.getRecordField(_)) > 1 then result = vname + "." + name else result = vname
|
||||
if strictcount(v.getStructField(_)) > 1 then result = vname + "." + name else result = vname
|
||||
)
|
||||
or
|
||||
exists(Struct s, string name, string sname |
|
||||
this.isStructField(s, name) and
|
||||
sname = s.getName().getText() and
|
||||
// only print field when the arity is > 1
|
||||
if strictcount(s.getRecordField(_)) > 1 then result = sname + "." + name else result = sname
|
||||
if strictcount(s.getStructField(_)) > 1 then result = sname + "." + name else result = sname
|
||||
)
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ private import codeql.rust.internal.CachedStages
|
||||
cached
|
||||
newtype TContent =
|
||||
TTupleFieldContent(TupleField field) { Stages::DataFlowStage::ref() } or
|
||||
TRecordFieldContent(RecordField field) or
|
||||
TStructFieldContent(StructField field) or
|
||||
// TODO: Remove once library types are extracted
|
||||
TVariantInLibTupleFieldContent(VariantInLib::VariantInLib v, int pos) { pos = v.getAPosition() } or
|
||||
TElementContent() or
|
||||
|
||||
@@ -635,9 +635,9 @@ module RustDataFlow implements InputSig<Location> {
|
||||
node2.asPat() = pat.getField(pos)
|
||||
)
|
||||
or
|
||||
exists(RecordPatCfgNode pat, string field |
|
||||
exists(StructPatCfgNode pat, string field |
|
||||
pat = node1.asPat() and
|
||||
c = TRecordFieldContent(pat.getRecordPat().getRecordField(field)) and
|
||||
c = TStructFieldContent(pat.getStructPat().getStructField(field)) and
|
||||
node2.asPat() = pat.getFieldPat(field)
|
||||
)
|
||||
or
|
||||
@@ -745,8 +745,8 @@ module RustDataFlow implements InputSig<Location> {
|
||||
VariantInLib::tupleVariantCanonicalConstruction(call.getCallExpr(), c, pos)
|
||||
)
|
||||
or
|
||||
exists(RecordExprCfgNode re, string field |
|
||||
c = TRecordFieldContent(re.getRecordExpr().getRecordField(field)) and
|
||||
exists(StructExprCfgNode re, string field |
|
||||
c = TStructFieldContent(re.getStructExpr().getStructField(field)) and
|
||||
node1.asExpr() = re.getFieldExpr(field) and
|
||||
node2.asExpr() = re
|
||||
)
|
||||
|
||||
@@ -77,9 +77,9 @@ module Input implements InputSig<Location, RustDataFlow> {
|
||||
// TODO: calculate in QL
|
||||
arg = a.getExtendedCanonicalPath() + "::" + field
|
||||
|
|
||||
c.(RecordFieldContent).isStructField(a, field)
|
||||
c.(StructFieldContent).isStructField(a, field)
|
||||
or
|
||||
c.(RecordFieldContent).isVariantField(a, field)
|
||||
c.(StructFieldContent).isVariantField(a, field)
|
||||
)
|
||||
or
|
||||
c =
|
||||
|
||||
14
rust/ql/lib/codeql/rust/elements.qll
generated
14
rust/ql/lib/codeql/rust/elements.qll
generated
@@ -134,14 +134,7 @@ import codeql.rust.elements.PrefixExpr
|
||||
import codeql.rust.elements.PtrTypeRepr
|
||||
import codeql.rust.elements.RangeExpr
|
||||
import codeql.rust.elements.RangePat
|
||||
import codeql.rust.elements.RecordExpr
|
||||
import codeql.rust.elements.RecordExprField
|
||||
import codeql.rust.elements.RecordExprFieldList
|
||||
import codeql.rust.elements.RecordField
|
||||
import codeql.rust.elements.RecordFieldList
|
||||
import codeql.rust.elements.RecordPat
|
||||
import codeql.rust.elements.RecordPatField
|
||||
import codeql.rust.elements.RecordPatFieldList
|
||||
import codeql.rust.elements.RefExpr
|
||||
import codeql.rust.elements.RefPat
|
||||
import codeql.rust.elements.RefTypeRepr
|
||||
@@ -159,6 +152,13 @@ import codeql.rust.elements.Static
|
||||
import codeql.rust.elements.Stmt
|
||||
import codeql.rust.elements.StmtList
|
||||
import codeql.rust.elements.Struct
|
||||
import codeql.rust.elements.StructExpr
|
||||
import codeql.rust.elements.StructExprField
|
||||
import codeql.rust.elements.StructExprFieldList
|
||||
import codeql.rust.elements.StructField
|
||||
import codeql.rust.elements.StructPat
|
||||
import codeql.rust.elements.StructPatField
|
||||
import codeql.rust.elements.StructPatFieldList
|
||||
import codeql.rust.elements.Token
|
||||
import codeql.rust.elements.TokenTree
|
||||
import codeql.rust.elements.Trait
|
||||
|
||||
2
rust/ql/lib/codeql/rust/elements/FieldList.qll
generated
2
rust/ql/lib/codeql/rust/elements/FieldList.qll
generated
@@ -7,7 +7,7 @@ private import internal.FieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
|
||||
/**
|
||||
* A FieldList. For example:
|
||||
* A field of a variant. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordExprFieldList`.
|
||||
*/
|
||||
|
||||
private import internal.RecordExprFieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.RecordExprField
|
||||
|
||||
/**
|
||||
* A RecordExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
final class RecordExprFieldList = Impl::RecordExprFieldList;
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
private import internal.RecordFieldListImpl
|
||||
import codeql.rust.elements.FieldList
|
||||
import codeql.rust.elements.RecordField
|
||||
import codeql.rust.elements.StructField
|
||||
|
||||
/**
|
||||
* A RecordFieldList. For example:
|
||||
* A field list of a struct expression. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordPatFieldList`.
|
||||
*/
|
||||
|
||||
private import internal.RecordPatFieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.RecordPatField
|
||||
import codeql.rust.elements.RestPat
|
||||
|
||||
/**
|
||||
* A RecordPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
final class RecordPatFieldList = Impl::RecordPatFieldList;
|
||||
@@ -1,15 +1,15 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordExpr`.
|
||||
* This module provides the public class `StructExpr`.
|
||||
*/
|
||||
|
||||
private import internal.RecordExprImpl
|
||||
private import internal.StructExprImpl
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.PathAstNode
|
||||
import codeql.rust.elements.RecordExprFieldList
|
||||
import codeql.rust.elements.StructExprFieldList
|
||||
|
||||
/**
|
||||
* A record expression. For example:
|
||||
* A struct expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
@@ -17,4 +17,4 @@ import codeql.rust.elements.RecordExprFieldList
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
final class RecordExpr = Impl::RecordExpr;
|
||||
final class StructExpr = Impl::StructExpr;
|
||||
@@ -1,18 +1,18 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordExprField`.
|
||||
* This module provides the public class `StructExprField`.
|
||||
*/
|
||||
|
||||
private import internal.RecordExprFieldImpl
|
||||
private import internal.StructExprFieldImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.NameRef
|
||||
|
||||
/**
|
||||
* A field in a record expression. For example `a: 1` in:
|
||||
* A field in a struct expression. For example `a: 1` in:
|
||||
* ```rust
|
||||
* Foo { a: 1, b: 2 };
|
||||
* ```
|
||||
*/
|
||||
final class RecordExprField = Impl::RecordExprField;
|
||||
final class StructExprField = Impl::StructExprField;
|
||||
18
rust/ql/lib/codeql/rust/elements/StructExprFieldList.qll
generated
Normal file
18
rust/ql/lib/codeql/rust/elements/StructExprFieldList.qll
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `StructExprFieldList`.
|
||||
*/
|
||||
|
||||
private import internal.StructExprFieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.StructExprField
|
||||
|
||||
/**
|
||||
* A StructExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
final class StructExprFieldList = Impl::StructExprFieldList;
|
||||
@@ -1,9 +1,9 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordField`.
|
||||
* This module provides the public class `StructField`.
|
||||
*/
|
||||
|
||||
private import internal.RecordFieldImpl
|
||||
private import internal.StructFieldImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
@@ -12,9 +12,9 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* A RecordField. For example:
|
||||
* A StructField. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
final class RecordField = Impl::RecordField;
|
||||
final class StructField = Impl::StructField;
|
||||
@@ -1,15 +1,15 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordPat`.
|
||||
* This module provides the public class `StructPat`.
|
||||
*/
|
||||
|
||||
private import internal.RecordPatImpl
|
||||
private import internal.StructPatImpl
|
||||
import codeql.rust.elements.Pat
|
||||
import codeql.rust.elements.PathAstNode
|
||||
import codeql.rust.elements.RecordPatFieldList
|
||||
import codeql.rust.elements.StructPatFieldList
|
||||
|
||||
/**
|
||||
* A record pattern. For example:
|
||||
* A struct pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
@@ -17,4 +17,4 @@ import codeql.rust.elements.RecordPatFieldList
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
final class RecordPat = Impl::RecordPat;
|
||||
final class StructPat = Impl::StructPat;
|
||||
@@ -1,18 +1,18 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `RecordPatField`.
|
||||
* This module provides the public class `StructPatField`.
|
||||
*/
|
||||
|
||||
private import internal.RecordPatFieldImpl
|
||||
private import internal.StructPatFieldImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.NameRef
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* A field in a record pattern. For example `a: 1` in:
|
||||
* A field in a struct pattern. For example `a: 1` in:
|
||||
* ```rust
|
||||
* let Foo { a: 1, b: 2 } = foo;
|
||||
* ```
|
||||
*/
|
||||
final class RecordPatField = Impl::RecordPatField;
|
||||
final class StructPatField = Impl::StructPatField;
|
||||
17
rust/ql/lib/codeql/rust/elements/StructPatFieldList.qll
generated
Normal file
17
rust/ql/lib/codeql/rust/elements/StructPatFieldList.qll
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `StructPatFieldList`.
|
||||
*/
|
||||
|
||||
private import internal.StructPatFieldListImpl
|
||||
import codeql.rust.elements.AstNode
|
||||
import codeql.rust.elements.RestPat
|
||||
import codeql.rust.elements.StructPatField
|
||||
|
||||
/**
|
||||
* A StructPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
final class StructPatFieldList = Impl::StructPatFieldList;
|
||||
@@ -23,7 +23,7 @@ module Impl {
|
||||
*/
|
||||
class FieldExpr extends Generated::FieldExpr {
|
||||
/** Gets the record field that this access references, if any. */
|
||||
RecordField getRecordField() { result = TypeInference::resolveRecordFieldExpr(this) }
|
||||
StructField getStructField() { result = TypeInference::resolveRecordFieldExpr(this) }
|
||||
|
||||
/** Gets the tuple field that this access references, if any. */
|
||||
TupleField getTupleField() { result = TypeInference::resolveTupleFieldExpr(this) }
|
||||
|
||||
@@ -13,7 +13,7 @@ private import codeql.rust.elements.internal.generated.FieldList
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A FieldList. For example:
|
||||
* A field of a variant. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
|
||||
@@ -23,7 +23,7 @@ module Impl {
|
||||
Pat getParentPat() {
|
||||
result = getImmediateParent(this)
|
||||
or
|
||||
result.(RecordPat).getRecordPatFieldList().getAField().getPat() = this
|
||||
result.(StructPat).getStructPatFieldList().getAField().getPat() = this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ private import codeql.rust.elements.internal.generated.RecordFieldList
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A RecordFieldList. For example:
|
||||
* A field list of a struct expression. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordExpr` synthesized instances.
|
||||
* `StructExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordExpr` synthesized instances.
|
||||
* The characteristic predicate of `StructExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordExpr(Raw::RecordExpr id) { any() }
|
||||
predicate constructStructExpr(Raw::StructExpr id) { any() }
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordExprField` synthesized instances.
|
||||
* `StructExprField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordExprField` synthesized instances.
|
||||
* The characteristic predicate of `StructExprField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordExprField(Raw::RecordExprField id) { any() }
|
||||
predicate constructStructExprField(Raw::StructExprField id) { any() }
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordExprField`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructExprField`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordExprField
|
||||
private import codeql.rust.elements.internal.generated.StructExprField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordExprField` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructExprField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
@@ -16,12 +16,12 @@ module Impl {
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A field in a record expression. For example `a: 1` in:
|
||||
* A field in a struct expression. For example `a: 1` in:
|
||||
* ```rust
|
||||
* Foo { a: 1, b: 2 };
|
||||
* ```
|
||||
*/
|
||||
class RecordExprField extends Generated::RecordExprField {
|
||||
class StructExprField extends Generated::StructExprField {
|
||||
override string toStringImpl() { result = concat(int i | | this.toStringPart(i) order by i) }
|
||||
|
||||
private string toStringPart(int index) {
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordExprFieldList` synthesized instances.
|
||||
* `StructExprFieldList` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordExprFieldList` synthesized instances.
|
||||
* The characteristic predicate of `StructExprFieldList` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordExprFieldList(Raw::RecordExprFieldList id) { any() }
|
||||
predicate constructStructExprFieldList(Raw::StructExprFieldList id) { any() }
|
||||
@@ -1,22 +1,22 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordExprFieldList`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructExprFieldList`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordExprFieldList
|
||||
private import codeql.rust.elements.internal.generated.StructExprFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordExprFieldList` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructExprFieldList` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A RecordExprFieldList. For example:
|
||||
* A StructExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordExprFieldList extends Generated::RecordExprFieldList { }
|
||||
class StructExprFieldList extends Generated::StructExprFieldList { }
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordExpr`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordExpr
|
||||
private import codeql.rust.elements.internal.generated.StructExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordExpr` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
@@ -16,7 +16,7 @@ module Impl {
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A record expression. For example:
|
||||
* A struct expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
@@ -24,13 +24,13 @@ module Impl {
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
class RecordExpr extends Generated::RecordExpr {
|
||||
class StructExpr extends Generated::StructExpr {
|
||||
override string toStringImpl() { result = this.getPath().toStringImpl() + " {...}" }
|
||||
|
||||
/** Gets the record expression for the field `name`. */
|
||||
pragma[nomagic]
|
||||
RecordExprField getFieldExpr(string name) {
|
||||
result = this.getRecordExprFieldList().getAField() and
|
||||
StructExprField getFieldExpr(string name) {
|
||||
result = this.getStructExprFieldList().getAField() and
|
||||
name = result.getFieldName()
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ module Impl {
|
||||
|
||||
/** Gets the record field that matches the `name` field of this record expression. */
|
||||
pragma[nomagic]
|
||||
RecordField getRecordField(string name) {
|
||||
StructField getStructField(string name) {
|
||||
exists(PathResolution::ItemNode i | i = this.getResolvedPath(name) |
|
||||
result.isStructField(i, name) or
|
||||
result.isVariantField(i, name)
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordField` synthesized instances.
|
||||
* `StructField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordField` synthesized instances.
|
||||
* The characteristic predicate of `StructField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordField(Raw::RecordField id) { any() }
|
||||
predicate constructStructField(Raw::StructField id) { any() }
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordField`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructField`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordField
|
||||
private import codeql.rust.elements.internal.generated.StructField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordField` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
@@ -15,16 +15,16 @@ module Impl {
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A RecordField. For example:
|
||||
* A StructField. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordField extends Generated::RecordField {
|
||||
class StructField extends Generated::StructField {
|
||||
/** Holds if this record field is named `name` and belongs to the variant `v`. */
|
||||
predicate isVariantField(Variant v, string name) { this = v.getRecordField(name) }
|
||||
predicate isVariantField(Variant v, string name) { this = v.getStructField(name) }
|
||||
|
||||
/** Holds if this record field is named `name` and belongs to the struct `s`. */
|
||||
predicate isStructField(Struct s, string name) { this = s.getRecordField(name) }
|
||||
predicate isStructField(Struct s, string name) { this = s.getStructField(name) }
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ module Impl {
|
||||
|
||||
/** Gets the record field named `name`, if any. */
|
||||
pragma[nomagic]
|
||||
RecordField getRecordField(string name) {
|
||||
StructField getStructField(string name) {
|
||||
result = this.getFieldList().(RecordFieldList).getAField() and
|
||||
result.getName().getText() = name
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordPat` synthesized instances.
|
||||
* `StructPat` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordPat` synthesized instances.
|
||||
* The characteristic predicate of `StructPat` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordPat(Raw::RecordPat id) { any() }
|
||||
predicate constructStructPat(Raw::StructPat id) { any() }
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordPatField` synthesized instances.
|
||||
* `StructPatField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordPatField` synthesized instances.
|
||||
* The characteristic predicate of `StructPatField` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordPatField(Raw::RecordPatField id) { any() }
|
||||
predicate constructStructPatField(Raw::StructPatField id) { any() }
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordPatField`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructPatField`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordPatField
|
||||
private import codeql.rust.elements.internal.generated.StructPatField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordPatField` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructPatField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
@@ -15,12 +15,12 @@ module Impl {
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A field in a record pattern. For example `a: 1` in:
|
||||
* A field in a struct pattern. For example `a: 1` in:
|
||||
* ```rust
|
||||
* let Foo { a: 1, b: 2 } = foo;
|
||||
* ```
|
||||
*/
|
||||
class RecordPatField extends Generated::RecordPatField {
|
||||
class StructPatField extends Generated::StructPatField {
|
||||
override string toStringImpl() { result = concat(int i | | this.toStringPart(i) order by i) }
|
||||
|
||||
private string toStringPart(int index) {
|
||||
@@ -1,14 +1,14 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `RecordPatFieldList` synthesized instances.
|
||||
* `StructPatFieldList` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `RecordPatFieldList` synthesized instances.
|
||||
* The characteristic predicate of `StructPatFieldList` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructRecordPatFieldList(Raw::RecordPatFieldList id) { any() }
|
||||
predicate constructStructPatFieldList(Raw::StructPatFieldList id) { any() }
|
||||
@@ -1,22 +1,22 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordPatFieldList`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructPatFieldList`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordPatFieldList
|
||||
private import codeql.rust.elements.internal.generated.StructPatFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordPatFieldList` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructPatFieldList` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A RecordPatFieldList. For example:
|
||||
* A StructPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordPatFieldList extends Generated::RecordPatFieldList { }
|
||||
class StructPatFieldList extends Generated::StructPatFieldList { }
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `RecordPat`.
|
||||
* This module provides a hand-modifiable wrapper around the generated class `StructPat`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.RecordPat
|
||||
private import codeql.rust.elements.internal.generated.StructPat
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `RecordPat` and should not
|
||||
* INTERNAL: This module contains the customizable definition of `StructPat` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
@@ -16,7 +16,7 @@ module Impl {
|
||||
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* A record pattern. For example:
|
||||
* A struct pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
@@ -24,18 +24,18 @@ module Impl {
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class RecordPat extends Generated::RecordPat {
|
||||
class StructPat extends Generated::StructPat {
|
||||
override string toStringImpl() { result = this.getPath().toAbbreviatedString() + " {...}" }
|
||||
|
||||
pragma[nomagic]
|
||||
private PathResolution::ItemNode getResolvedPath(string name) {
|
||||
result = PathResolution::resolvePath(this.getPath()) and
|
||||
name = this.getRecordPatFieldList().getAField().getFieldName()
|
||||
name = this.getStructPatFieldList().getAField().getFieldName()
|
||||
}
|
||||
|
||||
/** Gets the record field that matches the `name` pattern of this pattern. */
|
||||
pragma[nomagic]
|
||||
RecordField getRecordField(string name) {
|
||||
StructField getStructField(string name) {
|
||||
exists(PathResolution::ItemNode i | i = this.getResolvedPath(name) |
|
||||
result.isStructField(i, name) or
|
||||
result.isVariantField(i, name)
|
||||
@@ -24,7 +24,7 @@ module Impl {
|
||||
|
||||
/** Gets the record field named `name`, if any. */
|
||||
pragma[nomagic]
|
||||
RecordField getRecordField(string name) {
|
||||
StructField getStructField(string name) {
|
||||
result = this.getFieldList().(RecordFieldList).getAField() and
|
||||
result.getName().getText() = name
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A FieldList. For example:
|
||||
* A field of a variant. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
|
||||
@@ -876,137 +876,6 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordExprField(
|
||||
RecordExprField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nExpr, int nNameRef |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nExpr = nAttr + 1 and
|
||||
nNameRef = nExpr + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
or
|
||||
index = nExpr and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordExprFieldList(
|
||||
RecordExprFieldList e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nField, int nSpread |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nField = nAttr + 1 + max(int i | i = -1 or exists(e.getField(i)) | i) and
|
||||
nSpread = nField + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
result = e.getField(index - nAttr) and
|
||||
partialPredicateCall = "Field(" + (index - nAttr).toString() + ")"
|
||||
or
|
||||
index = nField and result = e.getSpread() and partialPredicateCall = "Spread()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordField(
|
||||
RecordField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(
|
||||
int b, int bAstNode, int n, int nAttr, int nExpr, int nName, int nTypeRepr, int nVisibility
|
||||
|
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nExpr = nAttr + 1 and
|
||||
nName = nExpr + 1 and
|
||||
nTypeRepr = nName + 1 and
|
||||
nVisibility = nTypeRepr + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
or
|
||||
index = nExpr and result = e.getName() and partialPredicateCall = "Name()"
|
||||
or
|
||||
index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()"
|
||||
or
|
||||
index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordPatField(
|
||||
RecordPatField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nNameRef, int nPat |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nNameRef = nAttr + 1 and
|
||||
nPat = nNameRef + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
or
|
||||
index = nNameRef and result = e.getPat() and partialPredicateCall = "Pat()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordPatFieldList(
|
||||
RecordPatFieldList e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nField, int nRestPat |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nField = n + 1 + max(int i | i = -1 or exists(e.getField(i)) | i) and
|
||||
nRestPat = nField + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getField(index - n) and
|
||||
partialPredicateCall = "Field(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRename(Rename e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bAstNode, int n, int nName |
|
||||
b = 0 and
|
||||
@@ -1127,6 +996,137 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructExprField(
|
||||
StructExprField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nExpr, int nNameRef |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nExpr = nAttr + 1 and
|
||||
nNameRef = nExpr + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
or
|
||||
index = nExpr and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructExprFieldList(
|
||||
StructExprFieldList e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nField, int nSpread |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nField = nAttr + 1 + max(int i | i = -1 or exists(e.getField(i)) | i) and
|
||||
nSpread = nField + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
result = e.getField(index - nAttr) and
|
||||
partialPredicateCall = "Field(" + (index - nAttr).toString() + ")"
|
||||
or
|
||||
index = nField and result = e.getSpread() and partialPredicateCall = "Spread()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructField(
|
||||
StructField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(
|
||||
int b, int bAstNode, int n, int nAttr, int nExpr, int nName, int nTypeRepr, int nVisibility
|
||||
|
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nExpr = nAttr + 1 and
|
||||
nName = nExpr + 1 and
|
||||
nTypeRepr = nName + 1 and
|
||||
nVisibility = nTypeRepr + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
or
|
||||
index = nExpr and result = e.getName() and partialPredicateCall = "Name()"
|
||||
or
|
||||
index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()"
|
||||
or
|
||||
index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructPatField(
|
||||
StructPatField e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nAttr, int nNameRef, int nPat |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nNameRef = nAttr + 1 and
|
||||
nPat = nNameRef + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getAttr(index - n) and
|
||||
partialPredicateCall = "Attr(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
or
|
||||
index = nNameRef and result = e.getPat() and partialPredicateCall = "Pat()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructPatFieldList(
|
||||
StructPatFieldList e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bAstNode, int n, int nField, int nRestPat |
|
||||
b = 0 and
|
||||
bAstNode = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfAstNode(e, i, _)) | i) and
|
||||
n = bAstNode and
|
||||
nField = n + 1 + max(int i | i = -1 or exists(e.getField(i)) | i) and
|
||||
nRestPat = nField + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfAstNode(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getField(index - n) and
|
||||
partialPredicateCall = "Field(" + (index - n).toString() + ")"
|
||||
or
|
||||
index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfToken(Token e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bAstNode, int n |
|
||||
b = 0 and
|
||||
@@ -3662,50 +3662,6 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordExpr(RecordExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bExpr, int bPathAstNode, int n, int nRecordExprFieldList |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
bPathAstNode =
|
||||
bExpr + 1 + max(int i | i = -1 or exists(getImmediateChildOfPathAstNode(e, i, _)) | i) and
|
||||
n = bPathAstNode and
|
||||
nRecordExprFieldList = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = getImmediateChildOfPathAstNode(e, index - bExpr, partialPredicateCall)
|
||||
or
|
||||
index = n and
|
||||
result = e.getRecordExprFieldList() and
|
||||
partialPredicateCall = "RecordExprFieldList()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfRecordPat(RecordPat e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bPat, int bPathAstNode, int n, int nRecordPatFieldList |
|
||||
b = 0 and
|
||||
bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and
|
||||
bPathAstNode =
|
||||
bPat + 1 + max(int i | i = -1 or exists(getImmediateChildOfPathAstNode(e, i, _)) | i) and
|
||||
n = bPathAstNode and
|
||||
nRecordPatFieldList = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfPat(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = getImmediateChildOfPathAstNode(e, index - bPat, partialPredicateCall)
|
||||
or
|
||||
index = n and
|
||||
result = e.getRecordPatFieldList() and
|
||||
partialPredicateCall = "RecordPatFieldList()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStatic(Static e, int index, string partialPredicateCall) {
|
||||
exists(
|
||||
int b, int bExternItem, int bItem, int n, int nAttr, int nBody, int nName, int nTypeRepr,
|
||||
@@ -3781,6 +3737,50 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructExpr(StructExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bExpr, int bPathAstNode, int n, int nStructExprFieldList |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
bPathAstNode =
|
||||
bExpr + 1 + max(int i | i = -1 or exists(getImmediateChildOfPathAstNode(e, i, _)) | i) and
|
||||
n = bPathAstNode and
|
||||
nStructExprFieldList = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = getImmediateChildOfPathAstNode(e, index - bExpr, partialPredicateCall)
|
||||
or
|
||||
index = n and
|
||||
result = e.getStructExprFieldList() and
|
||||
partialPredicateCall = "StructExprFieldList()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfStructPat(StructPat e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bPat, int bPathAstNode, int n, int nStructPatFieldList |
|
||||
b = 0 and
|
||||
bPat = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfPat(e, i, _)) | i) and
|
||||
bPathAstNode =
|
||||
bPat + 1 + max(int i | i = -1 or exists(getImmediateChildOfPathAstNode(e, i, _)) | i) and
|
||||
n = bPathAstNode and
|
||||
nStructPatFieldList = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfPat(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = getImmediateChildOfPathAstNode(e, index - bPat, partialPredicateCall)
|
||||
or
|
||||
index = n and
|
||||
result = e.getStructPatFieldList() and
|
||||
partialPredicateCall = "StructPatFieldList()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfTrait(Trait e, int index, string partialPredicateCall) {
|
||||
exists(
|
||||
int b, int bItem, int n, int nAssocItemList, int nAttr, int nGenericParamList, int nName,
|
||||
@@ -3944,7 +3944,7 @@ private module Impl {
|
||||
|
||||
private Element getImmediateChildOfUnion(Union e, int index, string partialPredicateCall) {
|
||||
exists(
|
||||
int b, int bItem, int n, int nAttr, int nGenericParamList, int nName, int nRecordFieldList,
|
||||
int b, int bItem, int n, int nAttr, int nGenericParamList, int nName, int nStructFieldList,
|
||||
int nVisibility, int nWhereClause
|
||||
|
|
||||
b = 0 and
|
||||
@@ -3953,8 +3953,8 @@ private module Impl {
|
||||
nAttr = n + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nGenericParamList = nAttr + 1 and
|
||||
nName = nGenericParamList + 1 and
|
||||
nRecordFieldList = nName + 1 and
|
||||
nVisibility = nRecordFieldList + 1 and
|
||||
nStructFieldList = nName + 1 and
|
||||
nVisibility = nStructFieldList + 1 and
|
||||
nWhereClause = nVisibility + 1 and
|
||||
(
|
||||
none()
|
||||
@@ -3971,10 +3971,10 @@ private module Impl {
|
||||
index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()"
|
||||
or
|
||||
index = nName and
|
||||
result = e.getRecordFieldList() and
|
||||
partialPredicateCall = "RecordFieldList()"
|
||||
result = e.getStructFieldList() and
|
||||
partialPredicateCall = "StructFieldList()"
|
||||
or
|
||||
index = nRecordFieldList and
|
||||
index = nStructFieldList and
|
||||
result = e.getVisibility() and
|
||||
partialPredicateCall = "Visibility()"
|
||||
or
|
||||
@@ -4145,16 +4145,6 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfPathSegment(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordExprField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordExprFieldList(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordPatField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordPatFieldList(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRename(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRetTypeRepr(e, index, partialAccessor)
|
||||
@@ -4165,6 +4155,16 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfStmtList(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructExprField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructExprFieldList(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructPatField(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructPatFieldList(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfTokenTree(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfTupleField(e, index, partialAccessor)
|
||||
@@ -4381,14 +4381,14 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfPathPat(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfRecordPat(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStatic(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStruct(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStructPat(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfTrait(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfTraitAlias(e, index, partialAccessor)
|
||||
|
||||
@@ -345,7 +345,7 @@ module Raw {
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A FieldList. For example:
|
||||
* A field of a variant. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
@@ -768,141 +768,6 @@ module Raw {
|
||||
PathTypeRepr getTraitTypeRepr() { path_segment_trait_type_reprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A field in a record expression. For example `a: 1` in:
|
||||
* ```rust
|
||||
* Foo { a: 1, b: 2 };
|
||||
* ```
|
||||
*/
|
||||
class RecordExprField extends @record_expr_field, AstNode {
|
||||
override string toString() { result = "RecordExprField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record expression field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { record_expr_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this record expression field, if it exists.
|
||||
*/
|
||||
Expr getExpr() { record_expr_field_exprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this record expression field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { record_expr_field_name_refs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A RecordExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordExprFieldList extends @record_expr_field_list, AstNode {
|
||||
override string toString() { result = "RecordExprFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record expression field list (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { record_expr_field_list_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this record expression field list (0-based).
|
||||
*/
|
||||
RecordExprField getField(int index) { record_expr_field_list_fields(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the spread of this record expression field list, if it exists.
|
||||
*/
|
||||
Expr getSpread() { record_expr_field_list_spreads(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A RecordField. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordField extends @record_field, AstNode {
|
||||
override string toString() { result = "RecordField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { record_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this record field, if it exists.
|
||||
*/
|
||||
Expr getExpr() { record_field_exprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name of this record field, if it exists.
|
||||
*/
|
||||
Name getName() { record_field_names(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the type representation of this record field, if it exists.
|
||||
*/
|
||||
TypeRepr getTypeRepr() { record_field_type_reprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the visibility of this record field, if it exists.
|
||||
*/
|
||||
Visibility getVisibility() { record_field_visibilities(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A field in a record pattern. For example `a: 1` in:
|
||||
* ```rust
|
||||
* let Foo { a: 1, b: 2 } = foo;
|
||||
* ```
|
||||
*/
|
||||
class RecordPatField extends @record_pat_field, AstNode {
|
||||
override string toString() { result = "RecordPatField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record pattern field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { record_pat_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this record pattern field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { record_pat_field_name_refs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the pattern of this record pattern field, if it exists.
|
||||
*/
|
||||
Pat getPat() { record_pat_field_pats(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A RecordPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class RecordPatFieldList extends @record_pat_field_list, AstNode {
|
||||
override string toString() { result = "RecordPatFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this record pattern field list (0-based).
|
||||
*/
|
||||
RecordPatField getField(int index) { record_pat_field_list_fields(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the rest pattern of this record pattern field list, if it exists.
|
||||
*/
|
||||
RestPat getRestPat() { record_pat_field_list_rest_pats(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A Rename. For example:
|
||||
@@ -1015,6 +880,141 @@ module Raw {
|
||||
Expr getTailExpr() { stmt_list_tail_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A field in a struct expression. For example `a: 1` in:
|
||||
* ```rust
|
||||
* Foo { a: 1, b: 2 };
|
||||
* ```
|
||||
*/
|
||||
class StructExprField extends @struct_expr_field, AstNode {
|
||||
override string toString() { result = "StructExprField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this struct expression field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { struct_expr_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this struct expression field, if it exists.
|
||||
*/
|
||||
Expr getExpr() { struct_expr_field_exprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this struct expression field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { struct_expr_field_name_refs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A StructExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class StructExprFieldList extends @struct_expr_field_list, AstNode {
|
||||
override string toString() { result = "StructExprFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this struct expression field list (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { struct_expr_field_list_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this struct expression field list (0-based).
|
||||
*/
|
||||
StructExprField getField(int index) { struct_expr_field_list_fields(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the spread of this struct expression field list, if it exists.
|
||||
*/
|
||||
Expr getSpread() { struct_expr_field_list_spreads(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A StructField. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class StructField extends @struct_field, AstNode {
|
||||
override string toString() { result = "StructField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this struct field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { struct_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this struct field, if it exists.
|
||||
*/
|
||||
Expr getExpr() { struct_field_exprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name of this struct field, if it exists.
|
||||
*/
|
||||
Name getName() { struct_field_names(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the type representation of this struct field, if it exists.
|
||||
*/
|
||||
TypeRepr getTypeRepr() { struct_field_type_reprs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the visibility of this struct field, if it exists.
|
||||
*/
|
||||
Visibility getVisibility() { struct_field_visibilities(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A field in a struct pattern. For example `a: 1` in:
|
||||
* ```rust
|
||||
* let Foo { a: 1, b: 2 } = foo;
|
||||
* ```
|
||||
*/
|
||||
class StructPatField extends @struct_pat_field, AstNode {
|
||||
override string toString() { result = "StructPatField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this struct pattern field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { struct_pat_field_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this struct pattern field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { struct_pat_field_name_refs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the pattern of this struct pattern field, if it exists.
|
||||
*/
|
||||
Pat getPat() { struct_pat_field_pats(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A StructPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
*/
|
||||
class StructPatFieldList extends @struct_pat_field_list, AstNode {
|
||||
override string toString() { result = "StructPatFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this struct pattern field list (0-based).
|
||||
*/
|
||||
StructPatField getField(int index) { struct_pat_field_list_fields(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the rest pattern of this struct pattern field list, if it exists.
|
||||
*/
|
||||
RestPat getRestPat() { struct_pat_field_list_rest_pats(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* The base class for all tokens.
|
||||
@@ -2737,7 +2737,7 @@ module Raw {
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A RecordFieldList. For example:
|
||||
* A field list of a struct expression. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
@@ -2748,7 +2748,7 @@ module Raw {
|
||||
/**
|
||||
* Gets the `index`th field of this record field list (0-based).
|
||||
*/
|
||||
RecordField getField(int index) { record_field_list_fields(this, index, result) }
|
||||
StructField getField(int index) { record_field_list_fields(this, index, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3777,46 +3777,6 @@ module Raw {
|
||||
override string toString() { result = "PathPat" }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A record expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
class RecordExpr extends @record_expr, Expr, PathAstNode {
|
||||
override string toString() { result = "RecordExpr" }
|
||||
|
||||
/**
|
||||
* Gets the record expression field list of this record expression, if it exists.
|
||||
*/
|
||||
RecordExprFieldList getRecordExprFieldList() {
|
||||
record_expr_record_expr_field_lists(this, result)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A record pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class RecordPat extends @record_pat, Pat, PathAstNode {
|
||||
override string toString() { result = "RecordPat" }
|
||||
|
||||
/**
|
||||
* Gets the record pattern field list of this record pattern, if it exists.
|
||||
*/
|
||||
RecordPatFieldList getRecordPatFieldList() { record_pat_record_pat_field_lists(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A Static. For example:
|
||||
@@ -3909,6 +3869,46 @@ module Raw {
|
||||
WhereClause getWhereClause() { struct_where_clauses(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A struct expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
*/
|
||||
class StructExpr extends @struct_expr, Expr, PathAstNode {
|
||||
override string toString() { result = "StructExpr" }
|
||||
|
||||
/**
|
||||
* Gets the struct expression field list of this struct expression, if it exists.
|
||||
*/
|
||||
StructExprFieldList getStructExprFieldList() {
|
||||
struct_expr_struct_expr_field_lists(this, result)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A struct pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class StructPat extends @struct_pat, Pat, PathAstNode {
|
||||
override string toString() { result = "StructPat" }
|
||||
|
||||
/**
|
||||
* Gets the struct pattern field list of this struct pattern, if it exists.
|
||||
*/
|
||||
StructPatFieldList getStructPatFieldList() { struct_pat_struct_pat_field_lists(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A Trait. For example:
|
||||
@@ -4109,9 +4109,9 @@ module Raw {
|
||||
Name getName() { union_names(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the record field list of this union, if it exists.
|
||||
* Gets the struct field list of this union, if it exists.
|
||||
*/
|
||||
RecordFieldList getRecordFieldList() { union_record_field_lists(this, result) }
|
||||
RecordFieldList getStructFieldList() { union_struct_field_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the visibility of this union, if it exists.
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
import codeql.rust.elements.internal.PathAstNodeImpl::Impl as PathAstNodeImpl
|
||||
import codeql.rust.elements.RecordExprFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A record expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordExpr` class directly.
|
||||
* Use the subclass `RecordExpr`, where the following predicates are available.
|
||||
*/
|
||||
class RecordExpr extends Synth::TRecordExpr, ExprImpl::Expr, PathAstNodeImpl::PathAstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordExpr" }
|
||||
|
||||
/**
|
||||
* Gets the record expression field list of this record expression, if it exists.
|
||||
*/
|
||||
RecordExprFieldList getRecordExprFieldList() {
|
||||
result =
|
||||
Synth::convertRecordExprFieldListFromRaw(Synth::convertRecordExprToRaw(this)
|
||||
.(Raw::RecordExpr)
|
||||
.getRecordExprFieldList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getRecordExprFieldList()` exists.
|
||||
*/
|
||||
final predicate hasRecordExprFieldList() { exists(this.getRecordExprFieldList()) }
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.FieldListImpl::Impl as FieldListImpl
|
||||
import codeql.rust.elements.RecordField
|
||||
import codeql.rust.elements.StructField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordFieldList` and should not
|
||||
@@ -15,7 +15,7 @@ import codeql.rust.elements.RecordField
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A RecordFieldList. For example:
|
||||
* A field list of a struct expression. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
@@ -28,9 +28,9 @@ module Generated {
|
||||
/**
|
||||
* Gets the `index`th field of this record field list (0-based).
|
||||
*/
|
||||
RecordField getField(int index) {
|
||||
StructField getField(int index) {
|
||||
result =
|
||||
Synth::convertRecordFieldFromRaw(Synth::convertRecordFieldListToRaw(this)
|
||||
Synth::convertStructFieldFromRaw(Synth::convertRecordFieldListToRaw(this)
|
||||
.(Raw::RecordFieldList)
|
||||
.getField(index))
|
||||
}
|
||||
@@ -38,7 +38,7 @@ module Generated {
|
||||
/**
|
||||
* Gets any of the fields of this record field list.
|
||||
*/
|
||||
final RecordField getAField() { result = this.getField(_) }
|
||||
final StructField getAField() { result = this.getField(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of fields of this record field list.
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordPat`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.PatImpl::Impl as PatImpl
|
||||
import codeql.rust.elements.internal.PathAstNodeImpl::Impl as PathAstNodeImpl
|
||||
import codeql.rust.elements.RecordPatFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordPat` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A record pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordPat` class directly.
|
||||
* Use the subclass `RecordPat`, where the following predicates are available.
|
||||
*/
|
||||
class RecordPat extends Synth::TRecordPat, PatImpl::Pat, PathAstNodeImpl::PathAstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordPat" }
|
||||
|
||||
/**
|
||||
* Gets the record pattern field list of this record pattern, if it exists.
|
||||
*/
|
||||
RecordPatFieldList getRecordPatFieldList() {
|
||||
result =
|
||||
Synth::convertRecordPatFieldListFromRaw(Synth::convertRecordPatToRaw(this)
|
||||
.(Raw::RecordPat)
|
||||
.getRecordPatFieldList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getRecordPatFieldList()` exists.
|
||||
*/
|
||||
final predicate hasRecordPatFieldList() { exists(this.getRecordPatFieldList()) }
|
||||
}
|
||||
}
|
||||
47
rust/ql/lib/codeql/rust/elements/internal/generated/StructExpr.qll
generated
Normal file
47
rust/ql/lib/codeql/rust/elements/internal/generated/StructExpr.qll
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `StructExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
import codeql.rust.elements.internal.PathAstNodeImpl::Impl as PathAstNodeImpl
|
||||
import codeql.rust.elements.StructExprFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `StructExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A struct expression. For example:
|
||||
* ```rust
|
||||
* let first = Foo { a: 1, b: 2 };
|
||||
* let second = Foo { a: 2, ..first };
|
||||
* Foo { a: 1, b: 2 }[2] = 10;
|
||||
* Foo { .. } = second;
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::StructExpr` class directly.
|
||||
* Use the subclass `StructExpr`, where the following predicates are available.
|
||||
*/
|
||||
class StructExpr extends Synth::TStructExpr, ExprImpl::Expr, PathAstNodeImpl::PathAstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructExpr" }
|
||||
|
||||
/**
|
||||
* Gets the struct expression field list of this struct expression, if it exists.
|
||||
*/
|
||||
StructExprFieldList getStructExprFieldList() {
|
||||
result =
|
||||
Synth::convertStructExprFieldListFromRaw(Synth::convertStructExprToRaw(this)
|
||||
.(Raw::StructExpr)
|
||||
.getStructExprFieldList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getStructExprFieldList()` exists.
|
||||
*/
|
||||
final predicate hasStructExprFieldList() { exists(this.getStructExprFieldList()) }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordExprField`.
|
||||
* This module provides the generated definition of `StructExprField`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
@@ -12,48 +12,48 @@ import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.NameRef
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordExprField` and should not
|
||||
* INTERNAL: This module contains the fully generated definition of `StructExprField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A field in a record expression. For example `a: 1` in:
|
||||
* A field in a struct expression. For example `a: 1` in:
|
||||
* ```rust
|
||||
* Foo { a: 1, b: 2 };
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordExprField` class directly.
|
||||
* Use the subclass `RecordExprField`, where the following predicates are available.
|
||||
* INTERNAL: Do not reference the `Generated::StructExprField` class directly.
|
||||
* Use the subclass `StructExprField`, where the following predicates are available.
|
||||
*/
|
||||
class RecordExprField extends Synth::TRecordExprField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordExprField" }
|
||||
class StructExprField extends Synth::TStructExprField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructExprField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record expression field (0-based).
|
||||
* Gets the `index`th attr of this struct expression field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertRecordExprFieldToRaw(this)
|
||||
.(Raw::RecordExprField)
|
||||
Synth::convertAttrFromRaw(Synth::convertStructExprFieldToRaw(this)
|
||||
.(Raw::StructExprField)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this record expression field.
|
||||
* Gets any of the attrs of this struct expression field.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this record expression field.
|
||||
* Gets the number of attrs of this struct expression field.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this record expression field, if it exists.
|
||||
* Gets the expression of this struct expression field, if it exists.
|
||||
*/
|
||||
Expr getExpr() {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertRecordExprFieldToRaw(this)
|
||||
.(Raw::RecordExprField)
|
||||
Synth::convertExprFromRaw(Synth::convertStructExprFieldToRaw(this)
|
||||
.(Raw::StructExprField)
|
||||
.getExpr())
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@ module Generated {
|
||||
final predicate hasExpr() { exists(this.getExpr()) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this record expression field, if it exists.
|
||||
* Gets the name reference of this struct expression field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() {
|
||||
result =
|
||||
Synth::convertNameRefFromRaw(Synth::convertRecordExprFieldToRaw(this)
|
||||
.(Raw::RecordExprField)
|
||||
Synth::convertNameRefFromRaw(Synth::convertStructExprFieldToRaw(this)
|
||||
.(Raw::StructExprField)
|
||||
.getNameRef())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordExprFieldList`.
|
||||
* This module provides the generated definition of `StructExprFieldList`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
@@ -9,71 +9,71 @@ private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.RecordExprField
|
||||
import codeql.rust.elements.StructExprField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordExprFieldList` and should not
|
||||
* INTERNAL: This module contains the fully generated definition of `StructExprFieldList` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A RecordExprFieldList. For example:
|
||||
* A StructExprFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordExprFieldList` class directly.
|
||||
* Use the subclass `RecordExprFieldList`, where the following predicates are available.
|
||||
* INTERNAL: Do not reference the `Generated::StructExprFieldList` class directly.
|
||||
* Use the subclass `StructExprFieldList`, where the following predicates are available.
|
||||
*/
|
||||
class RecordExprFieldList extends Synth::TRecordExprFieldList, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordExprFieldList" }
|
||||
class StructExprFieldList extends Synth::TStructExprFieldList, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructExprFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record expression field list (0-based).
|
||||
* Gets the `index`th attr of this struct expression field list (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertRecordExprFieldListToRaw(this)
|
||||
.(Raw::RecordExprFieldList)
|
||||
Synth::convertAttrFromRaw(Synth::convertStructExprFieldListToRaw(this)
|
||||
.(Raw::StructExprFieldList)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this record expression field list.
|
||||
* Gets any of the attrs of this struct expression field list.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this record expression field list.
|
||||
* Gets the number of attrs of this struct expression field list.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this record expression field list (0-based).
|
||||
* Gets the `index`th field of this struct expression field list (0-based).
|
||||
*/
|
||||
RecordExprField getField(int index) {
|
||||
StructExprField getField(int index) {
|
||||
result =
|
||||
Synth::convertRecordExprFieldFromRaw(Synth::convertRecordExprFieldListToRaw(this)
|
||||
.(Raw::RecordExprFieldList)
|
||||
Synth::convertStructExprFieldFromRaw(Synth::convertStructExprFieldListToRaw(this)
|
||||
.(Raw::StructExprFieldList)
|
||||
.getField(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the fields of this record expression field list.
|
||||
* Gets any of the fields of this struct expression field list.
|
||||
*/
|
||||
final RecordExprField getAField() { result = this.getField(_) }
|
||||
final StructExprField getAField() { result = this.getField(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of fields of this record expression field list.
|
||||
* Gets the number of fields of this struct expression field list.
|
||||
*/
|
||||
final int getNumberOfFields() { result = count(int i | exists(this.getField(i))) }
|
||||
|
||||
/**
|
||||
* Gets the spread of this record expression field list, if it exists.
|
||||
* Gets the spread of this struct expression field list, if it exists.
|
||||
*/
|
||||
Expr getSpread() {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertRecordExprFieldListToRaw(this)
|
||||
.(Raw::RecordExprFieldList)
|
||||
Synth::convertExprFromRaw(Synth::convertStructExprFieldListToRaw(this)
|
||||
.(Raw::StructExprFieldList)
|
||||
.getSpread())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordField`.
|
||||
* This module provides the generated definition of `StructField`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
@@ -14,47 +14,47 @@ import codeql.rust.elements.TypeRepr
|
||||
import codeql.rust.elements.Visibility
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordField` and should not
|
||||
* INTERNAL: This module contains the fully generated definition of `StructField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A RecordField. For example:
|
||||
* A StructField. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordField` class directly.
|
||||
* Use the subclass `RecordField`, where the following predicates are available.
|
||||
* INTERNAL: Do not reference the `Generated::StructField` class directly.
|
||||
* Use the subclass `StructField`, where the following predicates are available.
|
||||
*/
|
||||
class RecordField extends Synth::TRecordField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordField" }
|
||||
class StructField extends Synth::TStructField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record field (0-based).
|
||||
* Gets the `index`th attr of this struct field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertRecordFieldToRaw(this)
|
||||
.(Raw::RecordField)
|
||||
Synth::convertAttrFromRaw(Synth::convertStructFieldToRaw(this)
|
||||
.(Raw::StructField)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this record field.
|
||||
* Gets any of the attrs of this struct field.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this record field.
|
||||
* Gets the number of attrs of this struct field.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this record field, if it exists.
|
||||
* Gets the expression of this struct field, if it exists.
|
||||
*/
|
||||
Expr getExpr() {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertRecordFieldToRaw(this).(Raw::RecordField).getExpr())
|
||||
Synth::convertExprFromRaw(Synth::convertStructFieldToRaw(this).(Raw::StructField).getExpr())
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,11 +63,11 @@ module Generated {
|
||||
final predicate hasExpr() { exists(this.getExpr()) }
|
||||
|
||||
/**
|
||||
* Gets the name of this record field, if it exists.
|
||||
* Gets the name of this struct field, if it exists.
|
||||
*/
|
||||
Name getName() {
|
||||
result =
|
||||
Synth::convertNameFromRaw(Synth::convertRecordFieldToRaw(this).(Raw::RecordField).getName())
|
||||
Synth::convertNameFromRaw(Synth::convertStructFieldToRaw(this).(Raw::StructField).getName())
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -76,12 +76,12 @@ module Generated {
|
||||
final predicate hasName() { exists(this.getName()) }
|
||||
|
||||
/**
|
||||
* Gets the type representation of this record field, if it exists.
|
||||
* Gets the type representation of this struct field, if it exists.
|
||||
*/
|
||||
TypeRepr getTypeRepr() {
|
||||
result =
|
||||
Synth::convertTypeReprFromRaw(Synth::convertRecordFieldToRaw(this)
|
||||
.(Raw::RecordField)
|
||||
Synth::convertTypeReprFromRaw(Synth::convertStructFieldToRaw(this)
|
||||
.(Raw::StructField)
|
||||
.getTypeRepr())
|
||||
}
|
||||
|
||||
@@ -91,12 +91,12 @@ module Generated {
|
||||
final predicate hasTypeRepr() { exists(this.getTypeRepr()) }
|
||||
|
||||
/**
|
||||
* Gets the visibility of this record field, if it exists.
|
||||
* Gets the visibility of this struct field, if it exists.
|
||||
*/
|
||||
Visibility getVisibility() {
|
||||
result =
|
||||
Synth::convertVisibilityFromRaw(Synth::convertRecordFieldToRaw(this)
|
||||
.(Raw::RecordField)
|
||||
Synth::convertVisibilityFromRaw(Synth::convertStructFieldToRaw(this)
|
||||
.(Raw::StructField)
|
||||
.getVisibility())
|
||||
}
|
||||
|
||||
47
rust/ql/lib/codeql/rust/elements/internal/generated/StructPat.qll
generated
Normal file
47
rust/ql/lib/codeql/rust/elements/internal/generated/StructPat.qll
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `StructPat`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.PatImpl::Impl as PatImpl
|
||||
import codeql.rust.elements.internal.PathAstNodeImpl::Impl as PathAstNodeImpl
|
||||
import codeql.rust.elements.StructPatFieldList
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `StructPat` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A struct pattern. For example:
|
||||
* ```rust
|
||||
* match x {
|
||||
* Foo { a: 1, b: 2 } => "ok",
|
||||
* Foo { .. } => "fail",
|
||||
* }
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::StructPat` class directly.
|
||||
* Use the subclass `StructPat`, where the following predicates are available.
|
||||
*/
|
||||
class StructPat extends Synth::TStructPat, PatImpl::Pat, PathAstNodeImpl::PathAstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructPat" }
|
||||
|
||||
/**
|
||||
* Gets the struct pattern field list of this struct pattern, if it exists.
|
||||
*/
|
||||
StructPatFieldList getStructPatFieldList() {
|
||||
result =
|
||||
Synth::convertStructPatFieldListFromRaw(Synth::convertStructPatToRaw(this)
|
||||
.(Raw::StructPat)
|
||||
.getStructPatFieldList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getStructPatFieldList()` exists.
|
||||
*/
|
||||
final predicate hasStructPatFieldList() { exists(this.getStructPatFieldList()) }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordPatField`.
|
||||
* This module provides the generated definition of `StructPatField`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
@@ -12,48 +12,48 @@ import codeql.rust.elements.NameRef
|
||||
import codeql.rust.elements.Pat
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordPatField` and should not
|
||||
* INTERNAL: This module contains the fully generated definition of `StructPatField` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A field in a record pattern. For example `a: 1` in:
|
||||
* A field in a struct pattern. For example `a: 1` in:
|
||||
* ```rust
|
||||
* let Foo { a: 1, b: 2 } = foo;
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordPatField` class directly.
|
||||
* Use the subclass `RecordPatField`, where the following predicates are available.
|
||||
* INTERNAL: Do not reference the `Generated::StructPatField` class directly.
|
||||
* Use the subclass `StructPatField`, where the following predicates are available.
|
||||
*/
|
||||
class RecordPatField extends Synth::TRecordPatField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordPatField" }
|
||||
class StructPatField extends Synth::TStructPatField, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructPatField" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this record pattern field (0-based).
|
||||
* Gets the `index`th attr of this struct pattern field (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertRecordPatFieldToRaw(this)
|
||||
.(Raw::RecordPatField)
|
||||
Synth::convertAttrFromRaw(Synth::convertStructPatFieldToRaw(this)
|
||||
.(Raw::StructPatField)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this record pattern field.
|
||||
* Gets any of the attrs of this struct pattern field.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this record pattern field.
|
||||
* Gets the number of attrs of this struct pattern field.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this record pattern field, if it exists.
|
||||
* Gets the name reference of this struct pattern field, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() {
|
||||
result =
|
||||
Synth::convertNameRefFromRaw(Synth::convertRecordPatFieldToRaw(this)
|
||||
.(Raw::RecordPatField)
|
||||
Synth::convertNameRefFromRaw(Synth::convertStructPatFieldToRaw(this)
|
||||
.(Raw::StructPatField)
|
||||
.getNameRef())
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@ module Generated {
|
||||
final predicate hasNameRef() { exists(this.getNameRef()) }
|
||||
|
||||
/**
|
||||
* Gets the pattern of this record pattern field, if it exists.
|
||||
* Gets the pattern of this struct pattern field, if it exists.
|
||||
*/
|
||||
Pat getPat() {
|
||||
result =
|
||||
Synth::convertPatFromRaw(Synth::convertRecordPatFieldToRaw(this)
|
||||
.(Raw::RecordPatField)
|
||||
Synth::convertPatFromRaw(Synth::convertStructPatFieldToRaw(this)
|
||||
.(Raw::StructPatField)
|
||||
.getPat())
|
||||
}
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `RecordPatFieldList`.
|
||||
* This module provides the generated definition of `StructPatFieldList`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.AstNodeImpl::Impl as AstNodeImpl
|
||||
import codeql.rust.elements.RecordPatField
|
||||
import codeql.rust.elements.RestPat
|
||||
import codeql.rust.elements.StructPatField
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `RecordPatFieldList` and should not
|
||||
* INTERNAL: This module contains the fully generated definition of `StructPatFieldList` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A RecordPatFieldList. For example:
|
||||
* A StructPatFieldList. For example:
|
||||
* ```rust
|
||||
* todo!()
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::RecordPatFieldList` class directly.
|
||||
* Use the subclass `RecordPatFieldList`, where the following predicates are available.
|
||||
* INTERNAL: Do not reference the `Generated::StructPatFieldList` class directly.
|
||||
* Use the subclass `StructPatFieldList`, where the following predicates are available.
|
||||
*/
|
||||
class RecordPatFieldList extends Synth::TRecordPatFieldList, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "RecordPatFieldList" }
|
||||
class StructPatFieldList extends Synth::TStructPatFieldList, AstNodeImpl::AstNode {
|
||||
override string getAPrimaryQlClass() { result = "StructPatFieldList" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th field of this record pattern field list (0-based).
|
||||
* Gets the `index`th field of this struct pattern field list (0-based).
|
||||
*/
|
||||
RecordPatField getField(int index) {
|
||||
StructPatField getField(int index) {
|
||||
result =
|
||||
Synth::convertRecordPatFieldFromRaw(Synth::convertRecordPatFieldListToRaw(this)
|
||||
.(Raw::RecordPatFieldList)
|
||||
Synth::convertStructPatFieldFromRaw(Synth::convertStructPatFieldListToRaw(this)
|
||||
.(Raw::StructPatFieldList)
|
||||
.getField(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the fields of this record pattern field list.
|
||||
* Gets any of the fields of this struct pattern field list.
|
||||
*/
|
||||
final RecordPatField getAField() { result = this.getField(_) }
|
||||
final StructPatField getAField() { result = this.getField(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of fields of this record pattern field list.
|
||||
* Gets the number of fields of this struct pattern field list.
|
||||
*/
|
||||
final int getNumberOfFields() { result = count(int i | exists(this.getField(i))) }
|
||||
|
||||
/**
|
||||
* Gets the rest pattern of this record pattern field list, if it exists.
|
||||
* Gets the rest pattern of this struct pattern field list, if it exists.
|
||||
*/
|
||||
RestPat getRestPat() {
|
||||
result =
|
||||
Synth::convertRestPatFromRaw(Synth::convertRecordPatFieldListToRaw(this)
|
||||
.(Raw::RecordPatFieldList)
|
||||
Synth::convertRestPatFromRaw(Synth::convertStructPatFieldListToRaw(this)
|
||||
.(Raw::StructPatFieldList)
|
||||
.getRestPat())
|
||||
}
|
||||
|
||||
@@ -466,38 +466,10 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRangePat(Raw::RangePat id) { constructRangePat(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordExpr(Raw::RecordExpr id) { constructRecordExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordExprField(Raw::RecordExprField id) { constructRecordExprField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordExprFieldList(Raw::RecordExprFieldList id) { constructRecordExprFieldList(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordField(Raw::RecordField id) { constructRecordField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordFieldList(Raw::RecordFieldList id) { constructRecordFieldList(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordPat(Raw::RecordPat id) { constructRecordPat(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordPatField(Raw::RecordPatField id) { constructRecordPatField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TRecordPatFieldList(Raw::RecordPatFieldList id) { constructRecordPatFieldList(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -558,6 +530,34 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStruct(Raw::Struct id) { constructStruct(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructExpr(Raw::StructExpr id) { constructStructExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructExprField(Raw::StructExprField id) { constructStructExprField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructExprFieldList(Raw::StructExprFieldList id) { constructStructExprFieldList(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructField(Raw::StructField id) { constructStructField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructPat(Raw::StructPat id) { constructStructPat(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructPatField(Raw::StructPatField id) { constructStructPatField(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TStructPatFieldList(Raw::StructPatFieldList id) { constructStructPatFieldList(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -718,12 +718,12 @@ module Synth {
|
||||
TFormatArgsArg or TGenericArg or TGenericArgList or TGenericParam or TGenericParamList or
|
||||
TItemList or TLabel or TLetElse or TMacroItems or TMacroStmts or TMatchArm or
|
||||
TMatchArmList or TMatchGuard or TMeta or TName or TParamBase or TParamList or
|
||||
TParenthesizedArgList or TPat or TPath or TPathSegment or TRecordExprField or
|
||||
TRecordExprFieldList or TRecordField or TRecordPatField or TRecordPatFieldList or TRename or
|
||||
TResolvable or TRetTypeRepr or TReturnTypeSyntax or TSourceFile or TStmt or TStmtList or
|
||||
TToken or TTokenTree or TTupleField or TTypeBound or TTypeBoundList or TTypeRepr or
|
||||
TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or
|
||||
TVisibility or TWhereClause or TWherePred;
|
||||
TParenthesizedArgList or TPat or TPath or TPathSegment or TRename or TResolvable or
|
||||
TRetTypeRepr or TReturnTypeSyntax or TSourceFile or TStmt or TStmtList or
|
||||
TStructExprField or TStructExprFieldList or TStructField or TStructPatField or
|
||||
TStructPatFieldList or TToken or TTokenTree or TTupleField or TTypeBound or
|
||||
TTypeBoundList or TTypeRepr or TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or
|
||||
TUseTreeList or TVariantList or TVisibility or TWhereClause or TWherePred;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -743,7 +743,7 @@ module Synth {
|
||||
TBreakExpr or TCallExprBase or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or
|
||||
TFormatArgsExpr or TIfExpr or TIndexExpr or TLabelableExpr or TLetExpr or TLiteralExpr or
|
||||
TMacroExpr or TMatchExpr or TOffsetOfExpr or TParenExpr or TPathExprBase or TPrefixExpr or
|
||||
TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or TTryExpr or TTupleExpr or
|
||||
TRangeExpr or TRefExpr or TReturnExpr or TStructExpr or TTryExpr or TTupleExpr or
|
||||
TUnderscoreExpr or TYeetExpr or TYieldExpr;
|
||||
|
||||
/**
|
||||
@@ -799,13 +799,13 @@ module Synth {
|
||||
*/
|
||||
class TPat =
|
||||
TBoxPat or TConstBlockPat or TIdentPat or TLiteralPat or TMacroPat or TOrPat or TParenPat or
|
||||
TPathPat or TRangePat or TRecordPat or TRefPat or TRestPat or TSlicePat or TTuplePat or
|
||||
TPathPat or TRangePat or TRefPat or TRestPat or TSlicePat or TStructPat or TTuplePat or
|
||||
TTupleStructPat or TWildcardPat;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TPathAstNode = TPathExpr or TPathPat or TRecordExpr or TRecordPat or TTupleStructPat;
|
||||
class TPathAstNode = TPathExpr or TPathPat or TStructExpr or TStructPat or TTupleStructPat;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1519,58 +1519,12 @@ module Synth {
|
||||
*/
|
||||
TRangePat convertRangePatFromRaw(Raw::Element e) { result = TRangePat(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordExpr`, if possible.
|
||||
*/
|
||||
TRecordExpr convertRecordExprFromRaw(Raw::Element e) { result = TRecordExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordExprField`, if possible.
|
||||
*/
|
||||
TRecordExprField convertRecordExprFieldFromRaw(Raw::Element e) { result = TRecordExprField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordExprFieldList`, if possible.
|
||||
*/
|
||||
TRecordExprFieldList convertRecordExprFieldListFromRaw(Raw::Element e) {
|
||||
result = TRecordExprFieldList(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordField`, if possible.
|
||||
*/
|
||||
TRecordField convertRecordFieldFromRaw(Raw::Element e) { result = TRecordField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordFieldList`, if possible.
|
||||
*/
|
||||
TRecordFieldList convertRecordFieldListFromRaw(Raw::Element e) { result = TRecordFieldList(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordPat`, if possible.
|
||||
*/
|
||||
TRecordPat convertRecordPatFromRaw(Raw::Element e) { result = TRecordPat(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordPatField`, if possible.
|
||||
*/
|
||||
TRecordPatField convertRecordPatFieldFromRaw(Raw::Element e) { result = TRecordPatField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRecordPatFieldList`, if possible.
|
||||
*/
|
||||
TRecordPatFieldList convertRecordPatFieldListFromRaw(Raw::Element e) {
|
||||
result = TRecordPatFieldList(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TRefExpr`, if possible.
|
||||
@@ -1661,6 +1615,52 @@ module Synth {
|
||||
*/
|
||||
TStruct convertStructFromRaw(Raw::Element e) { result = TStruct(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructExpr`, if possible.
|
||||
*/
|
||||
TStructExpr convertStructExprFromRaw(Raw::Element e) { result = TStructExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructExprField`, if possible.
|
||||
*/
|
||||
TStructExprField convertStructExprFieldFromRaw(Raw::Element e) { result = TStructExprField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructExprFieldList`, if possible.
|
||||
*/
|
||||
TStructExprFieldList convertStructExprFieldListFromRaw(Raw::Element e) {
|
||||
result = TStructExprFieldList(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructField`, if possible.
|
||||
*/
|
||||
TStructField convertStructFieldFromRaw(Raw::Element e) { result = TStructField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructPat`, if possible.
|
||||
*/
|
||||
TStructPat convertStructPatFromRaw(Raw::Element e) { result = TStructPat(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructPatField`, if possible.
|
||||
*/
|
||||
TStructPatField convertStructPatFieldFromRaw(Raw::Element e) { result = TStructPatField(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TStructPatFieldList`, if possible.
|
||||
*/
|
||||
TStructPatFieldList convertStructPatFieldListFromRaw(Raw::Element e) {
|
||||
result = TStructPatFieldList(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TTokenTree`, if possible.
|
||||
@@ -1992,16 +1992,6 @@ module Synth {
|
||||
or
|
||||
result = convertPathSegmentFromRaw(e)
|
||||
or
|
||||
result = convertRecordExprFieldFromRaw(e)
|
||||
or
|
||||
result = convertRecordExprFieldListFromRaw(e)
|
||||
or
|
||||
result = convertRecordFieldFromRaw(e)
|
||||
or
|
||||
result = convertRecordPatFieldFromRaw(e)
|
||||
or
|
||||
result = convertRecordPatFieldListFromRaw(e)
|
||||
or
|
||||
result = convertRenameFromRaw(e)
|
||||
or
|
||||
result = convertResolvableFromRaw(e)
|
||||
@@ -2016,6 +2006,16 @@ module Synth {
|
||||
or
|
||||
result = convertStmtListFromRaw(e)
|
||||
or
|
||||
result = convertStructExprFieldFromRaw(e)
|
||||
or
|
||||
result = convertStructExprFieldListFromRaw(e)
|
||||
or
|
||||
result = convertStructFieldFromRaw(e)
|
||||
or
|
||||
result = convertStructPatFieldFromRaw(e)
|
||||
or
|
||||
result = convertStructPatFieldListFromRaw(e)
|
||||
or
|
||||
result = convertTokenFromRaw(e)
|
||||
or
|
||||
result = convertTokenTreeFromRaw(e)
|
||||
@@ -2134,12 +2134,12 @@ module Synth {
|
||||
or
|
||||
result = convertRangeExprFromRaw(e)
|
||||
or
|
||||
result = convertRecordExprFromRaw(e)
|
||||
or
|
||||
result = convertRefExprFromRaw(e)
|
||||
or
|
||||
result = convertReturnExprFromRaw(e)
|
||||
or
|
||||
result = convertStructExprFromRaw(e)
|
||||
or
|
||||
result = convertTryExprFromRaw(e)
|
||||
or
|
||||
result = convertTupleExprFromRaw(e)
|
||||
@@ -2310,14 +2310,14 @@ module Synth {
|
||||
or
|
||||
result = convertRangePatFromRaw(e)
|
||||
or
|
||||
result = convertRecordPatFromRaw(e)
|
||||
or
|
||||
result = convertRefPatFromRaw(e)
|
||||
or
|
||||
result = convertRestPatFromRaw(e)
|
||||
or
|
||||
result = convertSlicePatFromRaw(e)
|
||||
or
|
||||
result = convertStructPatFromRaw(e)
|
||||
or
|
||||
result = convertTuplePatFromRaw(e)
|
||||
or
|
||||
result = convertTupleStructPatFromRaw(e)
|
||||
@@ -2334,9 +2334,9 @@ module Synth {
|
||||
or
|
||||
result = convertPathPatFromRaw(e)
|
||||
or
|
||||
result = convertRecordExprFromRaw(e)
|
||||
result = convertStructExprFromRaw(e)
|
||||
or
|
||||
result = convertRecordPatFromRaw(e)
|
||||
result = convertStructPatFromRaw(e)
|
||||
or
|
||||
result = convertTupleStructPatFromRaw(e)
|
||||
}
|
||||
@@ -3105,58 +3105,12 @@ module Synth {
|
||||
*/
|
||||
Raw::Element convertRangePatToRaw(TRangePat e) { e = TRangePat(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordExprToRaw(TRecordExpr e) { e = TRecordExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordExprField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordExprFieldToRaw(TRecordExprField e) { e = TRecordExprField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordExprFieldList` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordExprFieldListToRaw(TRecordExprFieldList e) {
|
||||
e = TRecordExprFieldList(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordFieldToRaw(TRecordField e) { e = TRecordField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordFieldList` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordFieldListToRaw(TRecordFieldList e) { e = TRecordFieldList(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordPat` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordPatToRaw(TRecordPat e) { e = TRecordPat(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordPatField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordPatFieldToRaw(TRecordPatField e) { e = TRecordPatField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRecordPatFieldList` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertRecordPatFieldListToRaw(TRecordPatFieldList e) {
|
||||
e = TRecordPatFieldList(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TRefExpr` to a raw DB element, if possible.
|
||||
@@ -3247,6 +3201,52 @@ module Synth {
|
||||
*/
|
||||
Raw::Element convertStructToRaw(TStruct e) { e = TStruct(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructExprToRaw(TStructExpr e) { e = TStructExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructExprField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructExprFieldToRaw(TStructExprField e) { e = TStructExprField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructExprFieldList` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructExprFieldListToRaw(TStructExprFieldList e) {
|
||||
e = TStructExprFieldList(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructFieldToRaw(TStructField e) { e = TStructField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructPat` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructPatToRaw(TStructPat e) { e = TStructPat(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructPatField` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructPatFieldToRaw(TStructPatField e) { e = TStructPatField(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TStructPatFieldList` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertStructPatFieldListToRaw(TStructPatFieldList e) {
|
||||
e = TStructPatFieldList(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TTokenTree` to a raw DB element, if possible.
|
||||
@@ -3578,16 +3578,6 @@ module Synth {
|
||||
or
|
||||
result = convertPathSegmentToRaw(e)
|
||||
or
|
||||
result = convertRecordExprFieldToRaw(e)
|
||||
or
|
||||
result = convertRecordExprFieldListToRaw(e)
|
||||
or
|
||||
result = convertRecordFieldToRaw(e)
|
||||
or
|
||||
result = convertRecordPatFieldToRaw(e)
|
||||
or
|
||||
result = convertRecordPatFieldListToRaw(e)
|
||||
or
|
||||
result = convertRenameToRaw(e)
|
||||
or
|
||||
result = convertResolvableToRaw(e)
|
||||
@@ -3602,6 +3592,16 @@ module Synth {
|
||||
or
|
||||
result = convertStmtListToRaw(e)
|
||||
or
|
||||
result = convertStructExprFieldToRaw(e)
|
||||
or
|
||||
result = convertStructExprFieldListToRaw(e)
|
||||
or
|
||||
result = convertStructFieldToRaw(e)
|
||||
or
|
||||
result = convertStructPatFieldToRaw(e)
|
||||
or
|
||||
result = convertStructPatFieldListToRaw(e)
|
||||
or
|
||||
result = convertTokenToRaw(e)
|
||||
or
|
||||
result = convertTokenTreeToRaw(e)
|
||||
@@ -3720,12 +3720,12 @@ module Synth {
|
||||
or
|
||||
result = convertRangeExprToRaw(e)
|
||||
or
|
||||
result = convertRecordExprToRaw(e)
|
||||
or
|
||||
result = convertRefExprToRaw(e)
|
||||
or
|
||||
result = convertReturnExprToRaw(e)
|
||||
or
|
||||
result = convertStructExprToRaw(e)
|
||||
or
|
||||
result = convertTryExprToRaw(e)
|
||||
or
|
||||
result = convertTupleExprToRaw(e)
|
||||
@@ -3896,14 +3896,14 @@ module Synth {
|
||||
or
|
||||
result = convertRangePatToRaw(e)
|
||||
or
|
||||
result = convertRecordPatToRaw(e)
|
||||
or
|
||||
result = convertRefPatToRaw(e)
|
||||
or
|
||||
result = convertRestPatToRaw(e)
|
||||
or
|
||||
result = convertSlicePatToRaw(e)
|
||||
or
|
||||
result = convertStructPatToRaw(e)
|
||||
or
|
||||
result = convertTuplePatToRaw(e)
|
||||
or
|
||||
result = convertTupleStructPatToRaw(e)
|
||||
@@ -3920,9 +3920,9 @@ module Synth {
|
||||
or
|
||||
result = convertPathPatToRaw(e)
|
||||
or
|
||||
result = convertRecordExprToRaw(e)
|
||||
result = convertStructExprToRaw(e)
|
||||
or
|
||||
result = convertRecordPatToRaw(e)
|
||||
result = convertStructPatToRaw(e)
|
||||
or
|
||||
result = convertTupleStructPatToRaw(e)
|
||||
}
|
||||
|
||||
@@ -114,14 +114,7 @@ import codeql.rust.elements.internal.PrefixExprConstructor
|
||||
import codeql.rust.elements.internal.PtrTypeReprConstructor
|
||||
import codeql.rust.elements.internal.RangeExprConstructor
|
||||
import codeql.rust.elements.internal.RangePatConstructor
|
||||
import codeql.rust.elements.internal.RecordExprConstructor
|
||||
import codeql.rust.elements.internal.RecordExprFieldConstructor
|
||||
import codeql.rust.elements.internal.RecordExprFieldListConstructor
|
||||
import codeql.rust.elements.internal.RecordFieldConstructor
|
||||
import codeql.rust.elements.internal.RecordFieldListConstructor
|
||||
import codeql.rust.elements.internal.RecordPatConstructor
|
||||
import codeql.rust.elements.internal.RecordPatFieldConstructor
|
||||
import codeql.rust.elements.internal.RecordPatFieldListConstructor
|
||||
import codeql.rust.elements.internal.RefExprConstructor
|
||||
import codeql.rust.elements.internal.RefPatConstructor
|
||||
import codeql.rust.elements.internal.RefTypeReprConstructor
|
||||
@@ -137,6 +130,13 @@ import codeql.rust.elements.internal.SourceFileConstructor
|
||||
import codeql.rust.elements.internal.StaticConstructor
|
||||
import codeql.rust.elements.internal.StmtListConstructor
|
||||
import codeql.rust.elements.internal.StructConstructor
|
||||
import codeql.rust.elements.internal.StructExprConstructor
|
||||
import codeql.rust.elements.internal.StructExprFieldConstructor
|
||||
import codeql.rust.elements.internal.StructExprFieldListConstructor
|
||||
import codeql.rust.elements.internal.StructFieldConstructor
|
||||
import codeql.rust.elements.internal.StructPatConstructor
|
||||
import codeql.rust.elements.internal.StructPatFieldConstructor
|
||||
import codeql.rust.elements.internal.StructPatFieldListConstructor
|
||||
import codeql.rust.elements.internal.TokenTreeConstructor
|
||||
import codeql.rust.elements.internal.TraitConstructor
|
||||
import codeql.rust.elements.internal.TraitAliasConstructor
|
||||
|
||||
@@ -75,19 +75,19 @@ module Generated {
|
||||
final predicate hasName() { exists(this.getName()) }
|
||||
|
||||
/**
|
||||
* Gets the record field list of this union, if it exists.
|
||||
* Gets the struct field list of this union, if it exists.
|
||||
*/
|
||||
RecordFieldList getRecordFieldList() {
|
||||
RecordFieldList getStructFieldList() {
|
||||
result =
|
||||
Synth::convertRecordFieldListFromRaw(Synth::convertUnionToRaw(this)
|
||||
.(Raw::Union)
|
||||
.getRecordFieldList())
|
||||
.getStructFieldList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getRecordFieldList()` exists.
|
||||
* Holds if `getStructFieldList()` exists.
|
||||
*/
|
||||
final predicate hasRecordFieldList() { exists(this.getRecordFieldList()) }
|
||||
final predicate hasStructFieldList() { exists(this.getStructFieldList()) }
|
||||
|
||||
/**
|
||||
* Gets the visibility of this union, if it exists.
|
||||
|
||||
@@ -728,11 +728,11 @@ private predicate pathUsesNamespace(Path p, Namespace n) {
|
||||
(
|
||||
p = any(Visibility v).getPath()
|
||||
or
|
||||
p = any(RecordExpr re).getPath()
|
||||
p = any(StructExpr re).getPath()
|
||||
or
|
||||
p = any(PathTypeRepr ptr).getPath()
|
||||
or
|
||||
p = any(RecordPat rp).getPath()
|
||||
p = any(StructPat rp).getPath()
|
||||
or
|
||||
p =
|
||||
any(UseTree use |
|
||||
|
||||
@@ -24,9 +24,9 @@ query predicate multipleStaticCallTargets(CallExprBase call, Callable target) {
|
||||
}
|
||||
|
||||
/** Holds if `fe` resolves to multiple record fields including `field`. */
|
||||
query predicate multipleRecordFields(FieldExpr fe, RecordField field) {
|
||||
field = fe.getRecordField() and
|
||||
strictcount(fe.getRecordField()) > 1
|
||||
query predicate multipleStructFields(FieldExpr fe, StructField field) {
|
||||
field = fe.getStructField() and
|
||||
strictcount(fe.getStructField()) > 1
|
||||
}
|
||||
|
||||
/** Holds if `fe` resolves to multiple tuple fields including `field`. */
|
||||
@@ -46,7 +46,7 @@ int getPathResolutionInconsistencyCounts(string type) {
|
||||
result = count(CallExprBase call | multipleStaticCallTargets(call, _) | call)
|
||||
or
|
||||
type = "Multiple record fields" and
|
||||
result = count(FieldExpr fe | multipleRecordFields(fe, _) | fe)
|
||||
result = count(FieldExpr fe | multipleStructFields(fe, _) | fe)
|
||||
or
|
||||
type = "Multiple tuple fields" and
|
||||
result = count(FieldExpr fe | multipleTupleFields(fe, _) | fe)
|
||||
|
||||
@@ -31,7 +31,7 @@ abstract class Type extends TType {
|
||||
|
||||
/** Gets the record field `name` belonging to this type, if any. */
|
||||
pragma[nomagic]
|
||||
abstract RecordField getRecordField(string name);
|
||||
abstract StructField getStructField(string name);
|
||||
|
||||
/** Gets the `i`th tuple field belonging to this type, if any. */
|
||||
pragma[nomagic]
|
||||
@@ -95,7 +95,7 @@ class StructType extends StructOrEnumType, TStruct {
|
||||
|
||||
override ItemNode asItemNode() { result = struct }
|
||||
|
||||
override RecordField getRecordField(string name) { result = struct.getRecordField(name) }
|
||||
override StructField getStructField(string name) { result = struct.getStructField(name) }
|
||||
|
||||
override TupleField getTupleField(int i) { result = struct.getTupleField(i) }
|
||||
|
||||
@@ -116,7 +116,7 @@ class EnumType extends StructOrEnumType, TEnum {
|
||||
|
||||
override ItemNode asItemNode() { result = enum }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
@@ -137,7 +137,7 @@ class TraitType extends Type, TTrait {
|
||||
|
||||
override Function getMethod(string name) { result = trait.(ItemNode).getASuccessor(name) }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
@@ -218,7 +218,7 @@ class ImplType extends Type, TImpl {
|
||||
|
||||
override Function getMethod(string name) { result = impl.(ItemNode).getASuccessor(name) }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
@@ -247,7 +247,7 @@ class ArrayType extends Type, TArrayType {
|
||||
|
||||
override Function getMethod(string name) { none() }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
@@ -273,7 +273,7 @@ class RefType extends Type, TRefType {
|
||||
|
||||
override Function getMethod(string name) { none() }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
@@ -293,7 +293,7 @@ class RefType extends Type, TRefType {
|
||||
abstract class TypeParameter extends Type {
|
||||
override TypeMention getABaseTypeMention() { none() }
|
||||
|
||||
override RecordField getRecordField(string name) { none() }
|
||||
override StructField getStructField(string name) { none() }
|
||||
|
||||
override TupleField getTupleField(int i) { none() }
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ private TypeMention getExplicitTypeArgMention(Path path, TypeParam tp) {
|
||||
* A matching configuration for resolving types of record expressions
|
||||
* like `Foo { bar = baz }`.
|
||||
*/
|
||||
private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
private module StructExprMatchingInput implements MatchingInputSig {
|
||||
private newtype TPos =
|
||||
TFieldPos(string name) { exists(any(Declaration decl).getField(name)) } or
|
||||
TRecordPos()
|
||||
@@ -273,7 +273,7 @@ private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
ppos = this.getATypeParam()
|
||||
}
|
||||
|
||||
abstract RecordField getField(string name);
|
||||
abstract StructField getField(string name);
|
||||
|
||||
Type getDeclaredType(DeclarationPosition dpos, TypePath path) {
|
||||
// type of a field
|
||||
@@ -294,7 +294,7 @@ private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
|
||||
override TypeParam getATypeParam() { result = this.getGenericParamList().getATypeParam() }
|
||||
|
||||
override RecordField getField(string name) { result = this.getRecordField(name) }
|
||||
override StructField getField(string name) { result = this.getStructField(name) }
|
||||
|
||||
override Type getDeclaredType(DeclarationPosition dpos, TypePath path) {
|
||||
result = super.getDeclaredType(dpos, path)
|
||||
@@ -315,7 +315,7 @@ private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
result = this.getEnum().getGenericParamList().getATypeParam()
|
||||
}
|
||||
|
||||
override RecordField getField(string name) { result = this.getRecordField(name) }
|
||||
override StructField getField(string name) { result = this.getStructField(name) }
|
||||
|
||||
override Type getDeclaredType(DeclarationPosition dpos, TypePath path) {
|
||||
result = super.getDeclaredType(dpos, path)
|
||||
@@ -329,7 +329,7 @@ private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
|
||||
class AccessPosition = DeclarationPosition;
|
||||
|
||||
class Access extends RecordExpr {
|
||||
class Access extends StructExpr {
|
||||
Type getTypeArgument(TypeArgumentPosition apos, TypePath path) {
|
||||
result = getExplicitTypeArgMention(this.getPath(), apos.asTypeParam()).resolveTypeAt(path)
|
||||
}
|
||||
@@ -353,17 +353,17 @@ private module RecordExprMatchingInput implements MatchingInputSig {
|
||||
}
|
||||
}
|
||||
|
||||
private module RecordExprMatching = Matching<RecordExprMatchingInput>;
|
||||
private module StructExprMatching = Matching<StructExprMatchingInput>;
|
||||
|
||||
/**
|
||||
* Gets the type of `n` at `path`, where `n` is either a record expression or
|
||||
* a field expression of a record expression.
|
||||
*/
|
||||
pragma[nomagic]
|
||||
private Type inferRecordExprType(AstNode n, TypePath path) {
|
||||
exists(RecordExprMatchingInput::Access a, RecordExprMatchingInput::AccessPosition apos |
|
||||
private Type inferStructExprType(AstNode n, TypePath path) {
|
||||
exists(StructExprMatchingInput::Access a, StructExprMatchingInput::AccessPosition apos |
|
||||
n = a.getNodeAt(apos) and
|
||||
result = RecordExprMatching::inferAccessType(a, apos, path)
|
||||
result = StructExprMatching::inferAccessType(a, apos, path)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -733,7 +733,7 @@ private module FieldExprMatchingInput implements MatchingInputSig {
|
||||
Type getDeclaredType(DeclarationPosition dpos, TypePath path) {
|
||||
dpos.isSelf() and
|
||||
// no case for variants as those can only be destructured using pattern matching
|
||||
exists(Struct s | s.getRecordField(_) = this or s.getTupleField(_) = this |
|
||||
exists(Struct s | s.getStructField(_) = this or s.getTupleField(_) = this |
|
||||
result = TStruct(s) and
|
||||
path.isEmpty()
|
||||
or
|
||||
@@ -746,8 +746,8 @@ private module FieldExprMatchingInput implements MatchingInputSig {
|
||||
}
|
||||
}
|
||||
|
||||
private class RecordFieldDecl extends Declaration instanceof RecordField {
|
||||
override TypeRepr getTypeRepr() { result = RecordField.super.getTypeRepr() }
|
||||
private class StructFieldDecl extends Declaration instanceof StructField {
|
||||
override TypeRepr getTypeRepr() { result = StructField.super.getTypeRepr() }
|
||||
}
|
||||
|
||||
private class TupleFieldDecl extends Declaration instanceof TupleField {
|
||||
@@ -920,8 +920,8 @@ private module Cached {
|
||||
* Gets the record field that the field expression `fe` resolves to, if any.
|
||||
*/
|
||||
cached
|
||||
RecordField resolveRecordFieldExpr(FieldExpr fe) {
|
||||
exists(string name | result = getFieldExprLookupType(fe, name).getRecordField(name))
|
||||
StructField resolveRecordFieldExpr(FieldExpr fe) {
|
||||
exists(string name | result = getFieldExprLookupType(fe, name).getStructField(name))
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
@@ -988,7 +988,7 @@ private module Cached {
|
||||
or
|
||||
result = inferImplicitSelfType(n, path)
|
||||
or
|
||||
result = inferRecordExprType(n, path)
|
||||
result = inferStructExprType(n, path)
|
||||
or
|
||||
result = inferPathExprType(n, path)
|
||||
or
|
||||
|
||||
@@ -194,11 +194,6 @@ named_crates(
|
||||
| @pat
|
||||
| @path
|
||||
| @path_segment
|
||||
| @record_expr_field
|
||||
| @record_expr_field_list
|
||||
| @record_field
|
||||
| @record_pat_field
|
||||
| @record_pat_field_list
|
||||
| @rename
|
||||
| @resolvable
|
||||
| @ret_type_repr
|
||||
@@ -206,6 +201,11 @@ named_crates(
|
||||
| @source_file
|
||||
| @stmt
|
||||
| @stmt_list
|
||||
| @struct_expr_field
|
||||
| @struct_expr_field_list
|
||||
| @struct_field
|
||||
| @struct_pat_field
|
||||
| @struct_pat_field_list
|
||||
| @token
|
||||
| @token_tree
|
||||
| @tuple_field
|
||||
@@ -444,9 +444,9 @@ closure_binder_generic_param_lists(
|
||||
| @path_expr_base
|
||||
| @prefix_expr
|
||||
| @range_expr
|
||||
| @record_expr
|
||||
| @ref_expr
|
||||
| @return_expr
|
||||
| @struct_expr
|
||||
| @try_expr
|
||||
| @tuple_expr
|
||||
| @underscore_expr
|
||||
@@ -751,10 +751,10 @@ parenthesized_arg_list_type_args(
|
||||
| @paren_pat
|
||||
| @path_pat
|
||||
| @range_pat
|
||||
| @record_pat
|
||||
| @ref_pat
|
||||
| @rest_pat
|
||||
| @slice_pat
|
||||
| @struct_pat
|
||||
| @tuple_pat
|
||||
| @tuple_struct_pat
|
||||
| @wildcard_pat
|
||||
@@ -822,128 +822,6 @@ path_segment_trait_type_reprs(
|
||||
int trait_type_repr: @path_type_repr ref
|
||||
);
|
||||
|
||||
record_expr_fields(
|
||||
unique int id: @record_expr_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_expr_field_attrs(
|
||||
int id: @record_expr_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_expr_field_exprs(
|
||||
int id: @record_expr_field ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_expr_field_name_refs(
|
||||
int id: @record_expr_field ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
record_expr_field_lists(
|
||||
unique int id: @record_expr_field_list
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_expr_field_list_attrs(
|
||||
int id: @record_expr_field_list ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_expr_field_list_fields(
|
||||
int id: @record_expr_field_list ref,
|
||||
int index: int ref,
|
||||
int field: @record_expr_field ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_expr_field_list_spreads(
|
||||
int id: @record_expr_field_list ref,
|
||||
int spread: @expr ref
|
||||
);
|
||||
|
||||
record_fields(
|
||||
unique int id: @record_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_field_attrs(
|
||||
int id: @record_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_field_exprs(
|
||||
int id: @record_field ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_field_names(
|
||||
int id: @record_field ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_field_type_reprs(
|
||||
int id: @record_field ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_field_visibilities(
|
||||
int id: @record_field ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
record_pat_fields(
|
||||
unique int id: @record_pat_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_pat_field_attrs(
|
||||
int id: @record_pat_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_pat_field_name_refs(
|
||||
int id: @record_pat_field ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_pat_field_pats(
|
||||
int id: @record_pat_field ref,
|
||||
int pat: @pat ref
|
||||
);
|
||||
|
||||
record_pat_field_lists(
|
||||
unique int id: @record_pat_field_list
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
record_pat_field_list_fields(
|
||||
int id: @record_pat_field_list ref,
|
||||
int index: int ref,
|
||||
int field: @record_pat_field ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_pat_field_list_rest_pats(
|
||||
int id: @record_pat_field_list ref,
|
||||
int rest_pat: @rest_pat ref
|
||||
);
|
||||
|
||||
renames(
|
||||
unique int id: @rename
|
||||
);
|
||||
@@ -1033,6 +911,128 @@ stmt_list_tail_exprs(
|
||||
int tail_expr: @expr ref
|
||||
);
|
||||
|
||||
struct_expr_fields(
|
||||
unique int id: @struct_expr_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_expr_field_attrs(
|
||||
int id: @struct_expr_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_expr_field_exprs(
|
||||
int id: @struct_expr_field ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_expr_field_name_refs(
|
||||
int id: @struct_expr_field ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
struct_expr_field_lists(
|
||||
unique int id: @struct_expr_field_list
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_expr_field_list_attrs(
|
||||
int id: @struct_expr_field_list ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_expr_field_list_fields(
|
||||
int id: @struct_expr_field_list ref,
|
||||
int index: int ref,
|
||||
int field: @struct_expr_field ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_expr_field_list_spreads(
|
||||
int id: @struct_expr_field_list ref,
|
||||
int spread: @expr ref
|
||||
);
|
||||
|
||||
struct_fields(
|
||||
unique int id: @struct_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_field_attrs(
|
||||
int id: @struct_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_field_exprs(
|
||||
int id: @struct_field ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_field_names(
|
||||
int id: @struct_field ref,
|
||||
int name: @name ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_field_type_reprs(
|
||||
int id: @struct_field ref,
|
||||
int type_repr: @type_repr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_field_visibilities(
|
||||
int id: @struct_field ref,
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
struct_pat_fields(
|
||||
unique int id: @struct_pat_field
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_pat_field_attrs(
|
||||
int id: @struct_pat_field ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_pat_field_name_refs(
|
||||
int id: @struct_pat_field ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_pat_field_pats(
|
||||
int id: @struct_pat_field ref,
|
||||
int pat: @pat ref
|
||||
);
|
||||
|
||||
struct_pat_field_lists(
|
||||
unique int id: @struct_pat_field_list
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
struct_pat_field_list_fields(
|
||||
int id: @struct_pat_field_list ref,
|
||||
int index: int ref,
|
||||
int field: @struct_pat_field ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_pat_field_list_rest_pats(
|
||||
int id: @struct_pat_field_list ref,
|
||||
int rest_pat: @rest_pat ref
|
||||
);
|
||||
|
||||
@token =
|
||||
@comment
|
||||
;
|
||||
@@ -2238,8 +2238,8 @@ paren_type_repr_type_reprs(
|
||||
@path_ast_node =
|
||||
@path_expr
|
||||
| @path_pat
|
||||
| @record_expr
|
||||
| @record_pat
|
||||
| @struct_expr
|
||||
| @struct_pat
|
||||
| @tuple_struct_pat
|
||||
;
|
||||
|
||||
@@ -2365,7 +2365,7 @@ record_field_lists(
|
||||
record_field_list_fields(
|
||||
int id: @record_field_list ref,
|
||||
int index: int ref,
|
||||
int field: @record_field ref
|
||||
int field: @struct_field ref
|
||||
);
|
||||
|
||||
ref_exprs(
|
||||
@@ -3206,26 +3206,6 @@ path_pats(
|
||||
unique int id: @path_pat
|
||||
);
|
||||
|
||||
record_exprs(
|
||||
unique int id: @record_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_expr_record_expr_field_lists(
|
||||
int id: @record_expr ref,
|
||||
int record_expr_field_list: @record_expr_field_list ref
|
||||
);
|
||||
|
||||
record_pats(
|
||||
unique int id: @record_pat
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
record_pat_record_pat_field_lists(
|
||||
int id: @record_pat ref,
|
||||
int record_pat_field_list: @record_pat_field_list ref
|
||||
);
|
||||
|
||||
statics(
|
||||
unique int id: @static
|
||||
);
|
||||
@@ -3317,6 +3297,26 @@ struct_where_clauses(
|
||||
int where_clause: @where_clause ref
|
||||
);
|
||||
|
||||
struct_exprs(
|
||||
unique int id: @struct_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_expr_struct_expr_field_lists(
|
||||
int id: @struct_expr ref,
|
||||
int struct_expr_field_list: @struct_expr_field_list ref
|
||||
);
|
||||
|
||||
struct_pats(
|
||||
unique int id: @struct_pat
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
struct_pat_struct_pat_field_lists(
|
||||
int id: @struct_pat ref,
|
||||
int struct_pat_field_list: @struct_pat_field_list ref
|
||||
);
|
||||
|
||||
traits(
|
||||
unique int id: @trait
|
||||
);
|
||||
@@ -3502,9 +3502,9 @@ union_names(
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
union_record_field_lists(
|
||||
union_struct_field_lists(
|
||||
int id: @union ref,
|
||||
int record_field_list: @record_field_list ref
|
||||
int struct_field_list: @record_field_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import rust
|
||||
import DatabaseQuality
|
||||
import RustAnalyzerComparison
|
||||
import codeql.rust.Diagnostics
|
||||
|
||||
predicate fileCount(string key, int value) {
|
||||
@@ -41,6 +42,20 @@ predicate extractorDiagnostics(string key, int value) {
|
||||
)
|
||||
}
|
||||
|
||||
predicate pathResolutionCompare(string key, int value) {
|
||||
exists(string suffix |
|
||||
PathResolutionCompare::summary(suffix, value) and
|
||||
key = "Rust-analyzer path resolution comparison: " + suffix
|
||||
)
|
||||
}
|
||||
|
||||
predicate callGraphCompare(string key, int value) {
|
||||
exists(string suffix |
|
||||
CallGraphCompare::summary(suffix, value) and
|
||||
key = "Rust-analyzer call graph comparison: " + suffix
|
||||
)
|
||||
}
|
||||
|
||||
from string key, float value
|
||||
where
|
||||
(
|
||||
@@ -54,7 +69,9 @@ where
|
||||
CallTargetStatsReport::percentageOfOk(key, value) or
|
||||
MacroCallTargetStatsReport::numberOfOk(key, value) or
|
||||
MacroCallTargetStatsReport::numberOfNotOk(key, value) or
|
||||
MacroCallTargetStatsReport::percentageOfOk(key, value)
|
||||
MacroCallTargetStatsReport::percentageOfOk(key, value) or
|
||||
pathResolutionCompare(key, value) or
|
||||
callGraphCompare(key, value)
|
||||
) and
|
||||
/* Infinity */
|
||||
value != 1.0 / 0.0 and
|
||||
|
||||
134
rust/ql/src/queries/telemetry/RustAnalyzerComparison.qll
Normal file
134
rust/ql/src/queries/telemetry/RustAnalyzerComparison.qll
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*
|
||||
* Provides functionality for comparing data from `rust-analyzer` with data computed
|
||||
* in QL.
|
||||
*/
|
||||
|
||||
import rust
|
||||
|
||||
private signature module ResolvableSig {
|
||||
class Source {
|
||||
string toString();
|
||||
|
||||
Location getLocation();
|
||||
}
|
||||
|
||||
class Target {
|
||||
string toString();
|
||||
|
||||
Location getLocation();
|
||||
}
|
||||
}
|
||||
|
||||
private signature module CompareSig<ResolvableSig R> {
|
||||
predicate isResolvable(R::Source s);
|
||||
|
||||
R::Target resolve(R::Source s);
|
||||
}
|
||||
|
||||
private module Compare<ResolvableSig R, CompareSig<R> RustAnalyzer, CompareSig<R> Ql> {
|
||||
private import R
|
||||
|
||||
predicate same(Source s, Target t) {
|
||||
t = RustAnalyzer::resolve(s) and
|
||||
t = Ql::resolve(s)
|
||||
}
|
||||
|
||||
predicate sameCount(int c) { c = count(Source s | same(s, _)) }
|
||||
|
||||
predicate diff(Source s, Target t1, Target t2) {
|
||||
t1 = RustAnalyzer::resolve(s) and
|
||||
t2 = Ql::resolve(s) and
|
||||
t1 != t2
|
||||
}
|
||||
|
||||
predicate diffCount(int c) { c = count(Source s | not same(s, _) and diff(s, _, _)) }
|
||||
|
||||
predicate rustAnalyzerUnique(Source s) {
|
||||
RustAnalyzer::isResolvable(s) and
|
||||
not Ql::isResolvable(s)
|
||||
}
|
||||
|
||||
predicate rustAnalyzerUniqueCount(int c) { c = count(Source s | rustAnalyzerUnique(s)) }
|
||||
|
||||
predicate qlUnique(Source s) {
|
||||
not RustAnalyzer::isResolvable(s) and
|
||||
Ql::isResolvable(s)
|
||||
}
|
||||
|
||||
predicate qlUniqueCount(int c) { c = count(Source s | qlUnique(s)) }
|
||||
|
||||
predicate summary(string key, int value) {
|
||||
key = "rust-analyzer unique" and rustAnalyzerUniqueCount(value)
|
||||
or
|
||||
key = "QL unique" and qlUniqueCount(value)
|
||||
or
|
||||
key = "same" and sameCount(value)
|
||||
or
|
||||
key = "different" and diffCount(value)
|
||||
}
|
||||
}
|
||||
|
||||
private module PathResolution implements ResolvableSig {
|
||||
class Source extends Resolvable {
|
||||
Source() { not this instanceof MethodCallExpr }
|
||||
}
|
||||
|
||||
class Target = Item;
|
||||
}
|
||||
|
||||
private module RustAnalyzerPathResolution implements CompareSig<PathResolution> {
|
||||
predicate isResolvable(PathResolution::Source s) { s.hasResolvedPath() }
|
||||
|
||||
Item resolve(PathResolution::Source s) { s.resolvesAsItem(result) }
|
||||
}
|
||||
|
||||
private module QlPathResolution implements CompareSig<PathResolution> {
|
||||
private import codeql.rust.internal.PathResolution
|
||||
|
||||
private Path getPath(Resolvable r) {
|
||||
result = r.(PathExpr).getPath()
|
||||
or
|
||||
result = r.(StructExpr).getPath()
|
||||
or
|
||||
result = r.(PathPat).getPath()
|
||||
or
|
||||
result = r.(StructPat).getPath()
|
||||
or
|
||||
result = r.(TupleStructPat).getPath()
|
||||
}
|
||||
|
||||
predicate isResolvable(PathResolution::Source s) { exists(resolve(s)) }
|
||||
|
||||
Item resolve(PathResolution::Source s) { result = resolvePath(getPath(s)) }
|
||||
}
|
||||
|
||||
module PathResolutionCompare =
|
||||
Compare<PathResolution, RustAnalyzerPathResolution, QlPathResolution>;
|
||||
|
||||
private module CallGraph implements ResolvableSig {
|
||||
class Source = CallExprBase;
|
||||
|
||||
class Target = Item;
|
||||
}
|
||||
|
||||
private module RustAnalyzerCallGraph implements CompareSig<CallGraph> {
|
||||
private import codeql.rust.elements.internal.CallExprBaseImpl::Impl as CallExprBaseImpl
|
||||
|
||||
predicate isResolvable(CallExprBase c) {
|
||||
CallExprBaseImpl::getCallResolvable(c).hasResolvedPath()
|
||||
}
|
||||
|
||||
Item resolve(CallExprBase c) { CallExprBaseImpl::getCallResolvable(c).resolvesAsItem(result) }
|
||||
}
|
||||
|
||||
private module QlCallGraph implements CompareSig<CallGraph> {
|
||||
private import codeql.rust.internal.PathResolution as PathResolution
|
||||
|
||||
predicate isResolvable(CallExprBase c) { exists(resolve(c)) }
|
||||
|
||||
Item resolve(CallExprBase c) { result = c.getStaticTarget() }
|
||||
}
|
||||
|
||||
module CallGraphCompare = Compare<CallGraph, RustAnalyzerCallGraph, QlCallGraph>;
|
||||
@@ -36,13 +36,13 @@ canonicalPaths
|
||||
| regular.rs:51:5:51:18 | Use | None | None |
|
||||
| regular.rs:57:1:63:1 | fn enum_match | repo::test | crate::regular::enum_match |
|
||||
resolvedPaths
|
||||
| anonymous.rs:27:17:27:30 | OtherStruct {...} | repo::test | {0}::OtherStruct |
|
||||
| anonymous.rs:27:17:27:30 | OtherStruct {...} | None | None |
|
||||
| anonymous.rs:28:9:28:9 | s | None | None |
|
||||
| anonymous.rs:28:9:28:13 | s.f(...) | repo::test | <{0}::OtherStruct as crate::regular::Trait>::f |
|
||||
| anonymous.rs:29:9:29:9 | s | None | None |
|
||||
| anonymous.rs:29:9:29:13 | s.g(...) | repo::test | <{0}::OtherStruct as {0}::OtherTrait>::g |
|
||||
| anonymous.rs:30:9:30:14 | nested | repo::test | {0}::nested |
|
||||
| regular.rs:27:13:27:21 | Struct {...} | repo::test | crate::regular::Struct |
|
||||
| regular.rs:27:13:27:21 | Struct {...} | None | None |
|
||||
| regular.rs:28:5:28:5 | s | None | None |
|
||||
| regular.rs:28:5:28:9 | s.f(...) | repo::test | <crate::regular::Struct as crate::regular::Trait>::f |
|
||||
| regular.rs:29:5:29:5 | s | None | None |
|
||||
@@ -54,13 +54,13 @@ resolvedPaths
|
||||
| regular.rs:42:9:42:20 | ...::Some | lang:core | crate::option::Option::Some |
|
||||
| regular.rs:43:9:43:24 | ...::Variant1 | repo::test | crate::regular::MyEnum::Variant1 |
|
||||
| regular.rs:44:9:44:24 | ...::Variant2 | repo::test | crate::regular::MyEnum::Variant2 |
|
||||
| regular.rs:45:9:45:33 | ...::Variant3 {...} | repo::test | crate::regular::MyEnum::Variant3 |
|
||||
| regular.rs:45:9:45:33 | ...::Variant3 {...} | None | None |
|
||||
| regular.rs:49:9:49:18 | None::<...> | lang:core | crate::option::Option::None |
|
||||
| regular.rs:50:9:50:12 | Some | lang:core | crate::option::Option::Some |
|
||||
| regular.rs:52:9:52:16 | Variant1 | repo::test | crate::regular::MyEnum::Variant1 |
|
||||
| regular.rs:53:9:53:16 | Variant2 | repo::test | crate::regular::MyEnum::Variant2 |
|
||||
| regular.rs:54:9:54:25 | Variant3 {...} | repo::test | crate::regular::MyEnum::Variant3 |
|
||||
| regular.rs:54:9:54:25 | Variant3 {...} | None | None |
|
||||
| regular.rs:58:11:58:11 | e | None | None |
|
||||
| regular.rs:59:9:59:24 | ...::Variant1 | repo::test | crate::regular::MyEnum::Variant1 |
|
||||
| regular.rs:60:9:60:27 | ...::Variant2(...) | repo::test | crate::regular::MyEnum::Variant2 |
|
||||
| regular.rs:61:9:61:31 | ...::Variant3 {...} | repo::test | crate::regular::MyEnum::Variant3 |
|
||||
| regular.rs:61:9:61:31 | ...::Variant3 {...} | None | None |
|
||||
|
||||
@@ -89,14 +89,7 @@ PrefixExpr/gen_prefix_expr.rs c4b53e87f370713b9a9e257be26d082b0761497bac19b1d740
|
||||
PtrTypeRepr/gen_ptr_type_repr.rs 290d64a8ab4e8946b2e37496e7d2837529135e99b61cfb16a98c00f4d6ff8679 290d64a8ab4e8946b2e37496e7d2837529135e99b61cfb16a98c00f4d6ff8679
|
||||
RangeExpr/gen_range_expr.rs 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0
|
||||
RangePat/gen_range_pat.rs 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28 18b5169c3ab9230c95d86c4897f8343b2176d9602c9ea371c70c1eb0dbf89a28
|
||||
RecordExpr/gen_record_expr.rs f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727 f8a7db88ae9e2a47588d26a76331cba64014dc6d5e065af28adcd718c8c52727
|
||||
RecordExprField/gen_record_expr_field.rs ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f ea34f9fc64a600a5fff6b3388a2f89990bc9381937f49e83ce5f8192a14a0e4f
|
||||
RecordExprFieldList/gen_record_expr_field_list.rs e1cf6cdf9b8eaade99e8ad60c24d34c401d3789173fa31cb9aacf14fbd84e062 e1cf6cdf9b8eaade99e8ad60c24d34c401d3789173fa31cb9aacf14fbd84e062
|
||||
RecordField/gen_record_field.rs 6adab09450e655a004190d3f5485f9cb0f0bdc2d94206f727a3b323358c0cd72 6adab09450e655a004190d3f5485f9cb0f0bdc2d94206f727a3b323358c0cd72
|
||||
RecordFieldList/gen_record_field_list.rs 7799933ffee9cc21cb848866b0d6d6c2d290dbee32d6a5f441ee9ce708f0d95a 7799933ffee9cc21cb848866b0d6d6c2d290dbee32d6a5f441ee9ce708f0d95a
|
||||
RecordPat/gen_record_pat.rs a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9 a7e8aafb51532785459467e82d175a4cbab7ad5757cd00d74a0b1b673a5f21d9
|
||||
RecordPatField/gen_record_pat_field.rs f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84 f6c31bd08e6021aa4da6e8238561a77208f0ef723c5e217c6fbc16b8aec73a84
|
||||
RecordPatFieldList/gen_record_pat_field_list.rs 35aa6ce694da1c822a593a9b1251e2a2c61365489edf2c0e9710251d8d02fe3f 35aa6ce694da1c822a593a9b1251e2a2c61365489edf2c0e9710251d8d02fe3f
|
||||
RecordFieldList/gen_record_field_list.rs f28f14c3d8ff7ae7b5f0bac076165cc7e98a2fdc5377c2a32a0e2e231a6173d9 f28f14c3d8ff7ae7b5f0bac076165cc7e98a2fdc5377c2a32a0e2e231a6173d9
|
||||
RefExpr/gen_ref_expr.rs 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6 82695467551def4a00c78aa1ea6a1460e9edbef7df2672f13daccb0ee5d6b4c6
|
||||
RefPat/gen_ref_pat.rs aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54 aba7518649d9a37928e59a40d42f76cc0f4735e8daf711a3def6d2f0520e1f54
|
||||
RefTypeRepr/gen_ref_type_repr.rs 39a79cf148b7ee30e23a12c9349854dbe83aee1790153a388c43ff749907f8ea 39a79cf148b7ee30e23a12c9349854dbe83aee1790153a388c43ff749907f8ea
|
||||
@@ -112,6 +105,13 @@ SourceFile/gen_source_file.rs a7a1d4fa77b53adb6fbc031bf7ab49cf7c8787728ba0a687c3
|
||||
Static/gen_static.rs ff01782c2f0f702373fc6df45ac9277fbdd8d4fad69dbe5f984a14790a46e7b9 ff01782c2f0f702373fc6df45ac9277fbdd8d4fad69dbe5f984a14790a46e7b9
|
||||
StmtList/gen_stmt_list.rs bb3791a613b91a2086c19cb0eddbf978bb37bbb2bd79d3e61b40be35c71daaad bb3791a613b91a2086c19cb0eddbf978bb37bbb2bd79d3e61b40be35c71daaad
|
||||
Struct/gen_struct.rs 09c5c164d7c8a3991fad1a118d66c12c24d2ebf30fbea6205f7690ca9f24dbb2 09c5c164d7c8a3991fad1a118d66c12c24d2ebf30fbea6205f7690ca9f24dbb2
|
||||
StructExpr/gen_struct_expr.rs 8dd9a578625a88623c725b8afdfd8b636e1c3c991fe96c55b24d4b283d2212fb 8dd9a578625a88623c725b8afdfd8b636e1c3c991fe96c55b24d4b283d2212fb
|
||||
StructExprField/gen_struct_expr_field.rs 4ccca8e8ad462b4873f5604f0afdd1836027b8d39e36fbe7d6624ef3e744a084 4ccca8e8ad462b4873f5604f0afdd1836027b8d39e36fbe7d6624ef3e744a084
|
||||
StructExprFieldList/gen_struct_expr_field_list.rs 30a48484dbeca1fd8ead4b7b80f97bd583259e35dce2b590329c86a2d0e152de 30a48484dbeca1fd8ead4b7b80f97bd583259e35dce2b590329c86a2d0e152de
|
||||
StructField/gen_struct_field.rs 024d30845e244dd535dfb6c30f16de0eec5acd3a257110eeffd260ec82f9edb2 024d30845e244dd535dfb6c30f16de0eec5acd3a257110eeffd260ec82f9edb2
|
||||
StructPat/gen_struct_pat.rs 3f972ff8a76acb61ef48bdea92d2fac8b1005449d746e6188fd5486b1f542e5c 3f972ff8a76acb61ef48bdea92d2fac8b1005449d746e6188fd5486b1f542e5c
|
||||
StructPatField/gen_struct_pat_field.rs dfdab8cef7dcfee40451744c8d2c7c4ae67fdb8bd054b894c08d62997942f364 dfdab8cef7dcfee40451744c8d2c7c4ae67fdb8bd054b894c08d62997942f364
|
||||
StructPatFieldList/gen_struct_pat_field_list.rs 92490d79c975d25fd0d2e4a830a80abd896c5eb3b30fc54a3b386603ff09d693 92490d79c975d25fd0d2e4a830a80abd896c5eb3b30fc54a3b386603ff09d693
|
||||
TokenTree/gen_token_tree.rs dde6595ee4e8f3fcdecfb054438b08e1a7db10d83d9fff121794df814c7aee0e dde6595ee4e8f3fcdecfb054438b08e1a7db10d83d9fff121794df814c7aee0e
|
||||
Trait/gen_trait.rs bac694993e224f9c6dd86cfb28c54846ae1b3bae45a1e58d3149c884184487ea bac694993e224f9c6dd86cfb28c54846ae1b3bae45a1e58d3149c884184487ea
|
||||
TraitAlias/gen_trait_alias.rs c0c2d370674a20173db33e118e011328a880ba8ab42788ca735bb3d80b4b64a8 c0c2d370674a20173db33e118e011328a880ba8ab42788ca735bb3d80b4b64a8
|
||||
|
||||
14
rust/ql/test/extractor-tests/generated/.gitattributes
generated
vendored
14
rust/ql/test/extractor-tests/generated/.gitattributes
generated
vendored
@@ -91,14 +91,7 @@
|
||||
/PtrTypeRepr/gen_ptr_type_repr.rs linguist-generated
|
||||
/RangeExpr/gen_range_expr.rs linguist-generated
|
||||
/RangePat/gen_range_pat.rs linguist-generated
|
||||
/RecordExpr/gen_record_expr.rs linguist-generated
|
||||
/RecordExprField/gen_record_expr_field.rs linguist-generated
|
||||
/RecordExprFieldList/gen_record_expr_field_list.rs linguist-generated
|
||||
/RecordField/gen_record_field.rs linguist-generated
|
||||
/RecordFieldList/gen_record_field_list.rs linguist-generated
|
||||
/RecordPat/gen_record_pat.rs linguist-generated
|
||||
/RecordPatField/gen_record_pat_field.rs linguist-generated
|
||||
/RecordPatFieldList/gen_record_pat_field_list.rs linguist-generated
|
||||
/RefExpr/gen_ref_expr.rs linguist-generated
|
||||
/RefPat/gen_ref_pat.rs linguist-generated
|
||||
/RefTypeRepr/gen_ref_type_repr.rs linguist-generated
|
||||
@@ -114,6 +107,13 @@
|
||||
/Static/gen_static.rs linguist-generated
|
||||
/StmtList/gen_stmt_list.rs linguist-generated
|
||||
/Struct/gen_struct.rs linguist-generated
|
||||
/StructExpr/gen_struct_expr.rs linguist-generated
|
||||
/StructExprField/gen_struct_expr_field.rs linguist-generated
|
||||
/StructExprFieldList/gen_struct_expr_field_list.rs linguist-generated
|
||||
/StructField/gen_struct_field.rs linguist-generated
|
||||
/StructPat/gen_struct_pat.rs linguist-generated
|
||||
/StructPatField/gen_struct_pat_field.rs linguist-generated
|
||||
/StructPatFieldList/gen_struct_pat_field_list.rs linguist-generated
|
||||
/TokenTree/gen_token_tree.rs linguist-generated
|
||||
/Trait/gen_trait.rs linguist-generated
|
||||
/TraitAlias/gen_trait_alias.rs linguist-generated
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_expr_field() -> () {
|
||||
// A field in a record expression. For example `a: 1` in:
|
||||
Foo { a: 1, b: 2 };
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_expr_field_list() -> () {
|
||||
// A RecordExprFieldList. For example:
|
||||
todo!()
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_field() -> () {
|
||||
// A RecordField. For example:
|
||||
todo!()
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_field_list() -> () {
|
||||
// A RecordFieldList. For example:
|
||||
// A field list of a struct expression. For example:
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordPat x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getRecordPatFieldList()
|
||||
@@ -1,6 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_pat_field() -> () {
|
||||
// A field in a record pattern. For example `a: 1` in:
|
||||
let Foo { a: 1, b: 2 } = foo;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_pat_field_list() -> () {
|
||||
// A RecordPatFieldList. For example:
|
||||
todo!()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
| gen_struct_expr.rs:5:17:5:34 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes |
|
||||
| gen_struct_expr.rs:6:18:6:38 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes |
|
||||
| gen_struct_expr.rs:7:5:7:22 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes |
|
||||
| gen_struct_expr.rs:8:5:8:14 | Foo {...} | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasPath: | yes | hasStructExprFieldList: | yes |
|
||||
@@ -3,8 +3,8 @@ import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from
|
||||
RecordExpr x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath,
|
||||
string hasRecordExprFieldList
|
||||
StructExpr x, string hasResolvedPath, string hasResolvedCrateOrigin, string hasPath,
|
||||
string hasStructExprFieldList
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
@@ -15,8 +15,8 @@ where
|
||||
else hasResolvedCrateOrigin = "no"
|
||||
) and
|
||||
(if x.hasPath() then hasPath = "yes" else hasPath = "no") and
|
||||
if x.hasRecordExprFieldList()
|
||||
then hasRecordExprFieldList = "yes"
|
||||
else hasRecordExprFieldList = "no"
|
||||
if x.hasStructExprFieldList()
|
||||
then hasStructExprFieldList = "yes"
|
||||
else hasStructExprFieldList = "no"
|
||||
select x, "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin,
|
||||
"hasPath:", hasPath, "hasRecordExprFieldList:", hasRecordExprFieldList
|
||||
"hasPath:", hasPath, "hasStructExprFieldList:", hasStructExprFieldList
|
||||
@@ -0,0 +1,4 @@
|
||||
| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:17:5:19 | Foo |
|
||||
| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:18:6:20 | Foo |
|
||||
| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:5:7:7 | Foo |
|
||||
| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:5:8:7 | Foo |
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExpr x
|
||||
from StructExpr x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getPath()
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExpr x
|
||||
from StructExpr x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getResolvedCrateOrigin()
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExpr x
|
||||
from StructExpr x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getResolvedPath()
|
||||
@@ -0,0 +1,4 @@
|
||||
| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:21:5:34 | StructExprFieldList |
|
||||
| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:22:6:38 | StructExprFieldList |
|
||||
| gen_struct_expr.rs:7:5:7:22 | Foo {...} | gen_struct_expr.rs:7:9:7:22 | StructExprFieldList |
|
||||
| gen_struct_expr.rs:8:5:8:14 | Foo {...} | gen_struct_expr.rs:8:9:8:14 | StructExprFieldList |
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExpr x
|
||||
from StructExpr x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getRecordExprFieldList()
|
||||
select x, x.getStructExprFieldList()
|
||||
@@ -1,7 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_record_expr() -> () {
|
||||
// A record expression. For example:
|
||||
fn test_struct_expr() -> () {
|
||||
// A struct expression. For example:
|
||||
let first = Foo { a: 1, b: 2 };
|
||||
let second = Foo { a: 2, ..first };
|
||||
Foo { a: 1, b: 2 }[2] = 10;
|
||||
@@ -0,0 +1,2 @@
|
||||
| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes |
|
||||
| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes |
|
||||
@@ -2,7 +2,7 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExprField x, int getNumberOfAttrs, string hasExpr, string hasNameRef
|
||||
from StructExprField x, int getNumberOfAttrs, string hasExpr, string hasNameRef
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExprField x, int index
|
||||
from StructExprField x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getAttr(index)
|
||||
@@ -0,0 +1,2 @@
|
||||
| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:14:5:14 | 1 |
|
||||
| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:20:5:20 | 2 |
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExprField x
|
||||
from StructExprField x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getExpr()
|
||||
@@ -0,0 +1,2 @@
|
||||
| gen_struct_expr_field.rs:5:11:5:14 | a: 1 | gen_struct_expr_field.rs:5:11:5:11 | a |
|
||||
| gen_struct_expr_field.rs:5:17:5:20 | b: 2 | gen_struct_expr_field.rs:5:17:5:17 | b |
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from RecordExprField x
|
||||
from StructExprField x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getNameRef()
|
||||
6
rust/ql/test/extractor-tests/generated/StructExprField/gen_struct_expr_field.rs
generated
Normal file
6
rust/ql/test/extractor-tests/generated/StructExprField/gen_struct_expr_field.rs
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_struct_expr_field() -> () {
|
||||
// A field in a struct expression. For example `a: 1` in:
|
||||
Foo { a: 1, b: 2 };
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user