diff --git a/Cargo.lock b/Cargo.lock index 1d5b8824c84a..bb43206a229a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -393,6 +393,7 @@ dependencies = [ "ra_ap_hir", "ra_ap_hir_def", "ra_ap_hir_expand", + "ra_ap_hir_ty", "ra_ap_ide_db", "ra_ap_intern", "ra_ap_load-cargo", diff --git a/MODULE.bazel b/MODULE.bazel index 13c801520b04..f17b6f795246 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -68,7 +68,7 @@ use_repo(py_deps, "vendor__anyhow-1.0.44", "vendor__cc-1.0.70", "vendor__clap-2. # deps for ruby+rust # keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh` tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r") -use_repo(tree_sitter_extractors_deps, "vendor__anyhow-1.0.93", "vendor__argfile-0.2.1", "vendor__chrono-0.4.38", "vendor__clap-4.5.20", "vendor__encoding-0.2.33", "vendor__figment-0.10.19", "vendor__flate2-1.0.34", "vendor__glob-0.3.1", "vendor__globset-0.4.15", "vendor__itertools-0.10.5", "vendor__itertools-0.13.0", "vendor__lazy_static-1.5.0", "vendor__log-0.4.22", "vendor__num-traits-0.2.19", "vendor__num_cpus-1.16.0", "vendor__proc-macro2-1.0.89", "vendor__quote-1.0.37", "vendor__ra_ap_base_db-0.0.232", "vendor__ra_ap_cfg-0.0.232", "vendor__ra_ap_hir-0.0.232", "vendor__ra_ap_hir_def-0.0.232", "vendor__ra_ap_hir_expand-0.0.232", "vendor__ra_ap_ide_db-0.0.232", "vendor__ra_ap_intern-0.0.232", "vendor__ra_ap_load-cargo-0.0.232", "vendor__ra_ap_parser-0.0.232", "vendor__ra_ap_paths-0.0.232", "vendor__ra_ap_project_model-0.0.232", "vendor__ra_ap_span-0.0.232", "vendor__ra_ap_syntax-0.0.232", "vendor__ra_ap_vfs-0.0.232", "vendor__rand-0.8.5", "vendor__rayon-1.10.0", "vendor__regex-1.11.1", "vendor__serde-1.0.214", "vendor__serde_json-1.0.132", "vendor__serde_with-3.11.0", "vendor__stderrlog-0.6.0", "vendor__syn-2.0.87", "vendor__tracing-0.1.40", "vendor__tracing-subscriber-0.3.18", "vendor__tree-sitter-0.24.4", "vendor__tree-sitter-embedded-template-0.23.2", "vendor__tree-sitter-json-0.24.8", "vendor__tree-sitter-ql-0.23.1", "vendor__tree-sitter-ruby-0.23.1", "vendor__triomphe-0.1.14", "vendor__ungrammar-1.16.1") +use_repo(tree_sitter_extractors_deps, "vendor__anyhow-1.0.93", "vendor__argfile-0.2.1", "vendor__chrono-0.4.38", "vendor__clap-4.5.20", "vendor__encoding-0.2.33", "vendor__figment-0.10.19", "vendor__flate2-1.0.34", "vendor__glob-0.3.1", "vendor__globset-0.4.15", "vendor__itertools-0.10.5", "vendor__itertools-0.13.0", "vendor__lazy_static-1.5.0", "vendor__log-0.4.22", "vendor__num-traits-0.2.19", "vendor__num_cpus-1.16.0", "vendor__proc-macro2-1.0.89", "vendor__quote-1.0.37", "vendor__ra_ap_base_db-0.0.232", "vendor__ra_ap_cfg-0.0.232", "vendor__ra_ap_hir-0.0.232", "vendor__ra_ap_hir_def-0.0.232", "vendor__ra_ap_hir_expand-0.0.232", "vendor__ra_ap_hir_ty-0.0.232", "vendor__ra_ap_ide_db-0.0.232", "vendor__ra_ap_intern-0.0.232", "vendor__ra_ap_load-cargo-0.0.232", "vendor__ra_ap_parser-0.0.232", "vendor__ra_ap_paths-0.0.232", "vendor__ra_ap_project_model-0.0.232", "vendor__ra_ap_span-0.0.232", "vendor__ra_ap_syntax-0.0.232", "vendor__ra_ap_vfs-0.0.232", "vendor__rand-0.8.5", "vendor__rayon-1.10.0", "vendor__regex-1.11.1", "vendor__serde-1.0.214", "vendor__serde_json-1.0.132", "vendor__serde_with-3.11.0", "vendor__stderrlog-0.6.0", "vendor__syn-2.0.87", "vendor__tracing-0.1.40", "vendor__tracing-subscriber-0.3.18", "vendor__tree-sitter-0.24.4", "vendor__tree-sitter-embedded-template-0.23.2", "vendor__tree-sitter-json-0.24.8", "vendor__tree-sitter-ql-0.23.1", "vendor__tree-sitter-ruby-0.23.1", "vendor__triomphe-0.1.14", "vendor__ungrammar-1.16.1") dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet") dotnet.toolchain(dotnet_version = "9.0.100") diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel index 844d385f8a41..8a741aeb3fd7 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel @@ -163,6 +163,12 @@ alias( tags = ["manual"], ) +alias( + name = "ra_ap_hir_ty", + actual = "@vendor__ra_ap_hir_ty-0.0.232//:ra_ap_hir_ty", + tags = ["manual"], +) + alias( name = "ra_ap_ide_db", actual = "@vendor__ra_ap_ide_db-0.0.232//:ra_ap_ide_db", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl index 1d0b825c2356..7c423d38a2ad 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl @@ -331,6 +331,7 @@ _NORMAL_DEPENDENCIES = { "ra_ap_hir": Label("@vendor__ra_ap_hir-0.0.232//:ra_ap_hir"), "ra_ap_hir_def": Label("@vendor__ra_ap_hir_def-0.0.232//:ra_ap_hir_def"), "ra_ap_hir_expand": Label("@vendor__ra_ap_hir_expand-0.0.232//:ra_ap_hir_expand"), + "ra_ap_hir_ty": Label("@vendor__ra_ap_hir_ty-0.0.232//:ra_ap_hir_ty"), "ra_ap_ide_db": Label("@vendor__ra_ap_ide_db-0.0.232//:ra_ap_ide_db"), "ra_ap_intern": Label("@vendor__ra_ap_intern-0.0.232//:ra_ap_intern"), "ra_ap_load-cargo": Label("@vendor__ra_ap_load-cargo-0.0.232//:ra_ap_load_cargo"), @@ -3329,6 +3330,7 @@ def crate_repositories(): struct(repo = "vendor__ra_ap_hir-0.0.232", is_dev_dep = False), struct(repo = "vendor__ra_ap_hir_def-0.0.232", is_dev_dep = False), struct(repo = "vendor__ra_ap_hir_expand-0.0.232", is_dev_dep = False), + struct(repo = "vendor__ra_ap_hir_ty-0.0.232", is_dev_dep = False), struct(repo = "vendor__ra_ap_ide_db-0.0.232", is_dev_dep = False), struct(repo = "vendor__ra_ap_intern-0.0.232", is_dev_dep = False), struct(repo = "vendor__ra_ap_load-cargo-0.0.232", is_dev_dep = False), diff --git a/rust/ast-generator/src/main.rs b/rust/ast-generator/src/main.rs index 665ffbac6c75..a58d5f6a5119 100644 --- a/rust/ast-generator/src/main.rs +++ b/rust/ast-generator/src/main.rs @@ -452,10 +452,10 @@ use ra_ap_syntax::ast::{{ use ra_ap_syntax::{{ast, AstNode}}; impl Translator<'_> {{ - fn emit_else_branch(&mut self, node: ast::ElseBranch) -> Label {{ + fn emit_else_branch(&mut self, node: &ast::ElseBranch) -> Label {{ match node {{ - ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).into(), - ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).into(), + ast::ElseBranch::IfExpr(ref inner) => self.emit_if_expr(inner).into(), + ast::ElseBranch::Block(ref inner) => self.emit_block_expr(inner).into(), }} }}\n" )?; @@ -465,22 +465,28 @@ impl Translator<'_> {{ writeln!( buf, - " pub(crate) fn emit_{}(&mut self, node: ast::{}) -> Label {{", + " #[allow(clippy::let_and_return)] pub(crate) fn emit_{}(&mut self, node: &ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name )?; - writeln!(buf, " match node {{")?; + writeln!(buf, " let label = match node {{")?; for variant in &node.variants { writeln!( buf, - " ast::{}::{}(inner) => self.emit_{}(inner).into(),", + " ast::{}::{}(ref inner) => self.emit_{}(inner).into(),", type_name, variant, to_lower_snake_case(variant) )?; } - writeln!(buf, " }}")?; + writeln!(buf, " }};")?; + writeln!( + buf, + " emit_detached!({}, self, node, label);", + class_name + )?; + writeln!(buf, " label")?; writeln!(buf, " }}\n")?; } @@ -490,7 +496,7 @@ impl Translator<'_> {{ writeln!( buf, - " pub(crate) fn emit_{}(&mut self, node: ast::{}) -> Label {{", + " pub(crate) fn emit_{}(&mut self, node: &ast::{}) -> Label {{", to_lower_snake_case(type_name), type_name, class_name @@ -519,7 +525,7 @@ impl Translator<'_> {{ } else if field.is_many { writeln!( buf, - " let {} = node.{}().map(|x| self.emit_{}(x)).collect();", + " let {} = node.{}().map(|x| self.emit_{}(&x)).collect();", class_field_name, struct_field_name, to_lower_snake_case(type_name) @@ -527,7 +533,7 @@ impl Translator<'_> {{ } else { writeln!( buf, - " let {} = node.{}().map(|x| self.emit_{}(x));", + " let {} = node.{}().map(|x| self.emit_{}(&x));", class_field_name, struct_field_name, to_lower_snake_case(type_name) @@ -549,7 +555,7 @@ impl Translator<'_> {{ writeln!(buf, " {},", class_field_name)?; } writeln!(buf, " }});")?; - writeln!(buf, " self.emit_location(label, &node);")?; + writeln!(buf, " self.emit_location(label, node);")?; writeln!( buf, " emit_detached!({}, self, node, label);", @@ -557,7 +563,7 @@ impl Translator<'_> {{ )?; writeln!( buf, - " self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());" + " self.emit_tokens(node, label.into(), node.syntax().children_with_tokens());" )?; writeln!(buf, " label")?; diff --git a/rust/extractor/Cargo.toml b/rust/extractor/Cargo.toml index 8b58898d3cf3..cb8431142c72 100644 --- a/rust/extractor/Cargo.toml +++ b/rust/extractor/Cargo.toml @@ -15,6 +15,7 @@ ra_ap_hir = "0.0.232" ra_ap_hir_def = "0.0.232" ra_ap_ide_db = "0.0.232" ra_ap_hir_expand = "0.0.232" +ra_ap_hir_ty = "0.0.232" ra_ap_load-cargo = "0.0.232" ra_ap_paths = "0.0.232" ra_ap_project_model = "0.0.232" diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index 0f781aae8dab..d93454b9e5f9 100644 --- a/rust/extractor/src/generated/.generated.list +++ b/rust/extractor/src/generated/.generated.list @@ -1,2 +1,2 @@ mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 -top.rs 7a5bbe75eae6069f4f255db13787a3575e706742af1f57122c02d46895de9a1b 7a5bbe75eae6069f4f255db13787a3575e706742af1f57122c02d46895de9a1b +top.rs 7c8084cca71a70cba70e86dde98cf8124b3c6fbd368da27ff664b95b43a6675e 7c8084cca71a70cba70e86dde98cf8124b3c6fbd368da27ff664b95b43a6675e diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index eb1f16f8cc66..d710e4d2b779 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -481,6 +481,12 @@ pub struct Expr { _unused: () } +impl Expr { + pub fn emit_type(id: trap::Label, value: String, out: &mut trap::Writer) { + out.add_tuple("expr_types", vec![id.into(), value.into()]); + } +} + impl trap::TrapClass for Expr { fn class_name() -> &'static str { "Expr" } } @@ -1617,6 +1623,12 @@ pub struct Pat { _unused: () } +impl Pat { + pub fn emit_type(id: trap::Label, value: String, out: &mut trap::Writer) { + out.add_tuple("pat_types", vec![id.into(), value.into()]); + } +} + impl trap::TrapClass for Pat { fn class_name() -> &'static str { "Pat" } } diff --git a/rust/extractor/src/main.rs b/rust/extractor/src/main.rs index ecbdc965f8e7..44266f9ab5e1 100644 --- a/rust/extractor/src/main.rs +++ b/rust/extractor/src/main.rs @@ -65,7 +65,7 @@ impl Extractor<'_> { no_location, ); } - translator.emit_source_file(ast); + translator.emit_source_file(&ast); translator.trap.commit().unwrap_or_else(|err| { log::error!( "Failed to write trap file for: {}: {}", diff --git a/rust/extractor/src/translate/base.rs b/rust/extractor/src/translate/base.rs index c7e00edb3314..f98453a050f6 100644 --- a/rust/extractor/src/translate/base.rs +++ b/rust/extractor/src/translate/base.rs @@ -1,6 +1,6 @@ use super::mappings::{AddressableAst, AddressableHir}; -use crate::generated::MacroCall; use crate::generated::{self}; +use crate::generated::{Expr, MacroCall, Pat}; use crate::rust_analyzer::FileSemanticInformation; use crate::trap::{DiagnosticSeverity, TrapFile, TrapId}; use crate::trap::{Label, TrapClass}; @@ -10,7 +10,10 @@ use log::Level; use ra_ap_base_db::salsa::InternKey; use ra_ap_base_db::CrateOrigin; use ra_ap_hir::db::ExpandDatabase; -use ra_ap_hir::{Adt, Crate, ItemContainer, Module, ModuleDef, PathResolution, Semantics, Type}; +use ra_ap_hir::{ + Adt, Crate, HirDisplay, ItemContainer, Module, ModuleDef, PathResolution, Semantics, Type, + TypeInfo, +}; use ra_ap_hir_def::type_ref::Mutability; use ra_ap_hir_def::ModuleId; use ra_ap_hir_expand::ExpandTo; @@ -26,33 +29,39 @@ use ra_ap_syntax::{ #[macro_export] macro_rules! emit_detached { + (Expr, $self:ident, $node:ident, $label:ident) => { + $self.extract_expr_type($node, $label); + }; + (Pat, $self:ident, $node:ident, $label:ident) => { + $self.extract_pat_type($node, $label); + }; (MacroCall, $self:ident, $node:ident, $label:ident) => { - $self.extract_macro_call_expanded(&$node, $label); + $self.extract_macro_call_expanded($node, $label); }; (Function, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; (Trait, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; (Struct, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; (Enum, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; (Union, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; (Module, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_origin(&$node, $label.into()); + $self.extract_canonical_origin($node, $label.into()); }; // TODO canonical origin of other items (Path, $self:ident, $node:ident, $label:ident) => { - $self.extract_canonical_destination(&$node, $label); + $self.extract_canonical_destination($node, $label); }; (MethodCallExpr, $self:ident, $node:ident, $label:ident) => { - $self.extract_method_canonical_destination(&$node, $label); + $self.extract_method_canonical_destination($node, $label); }; ($($_:tt)*) => {}; } @@ -252,23 +261,80 @@ impl<'a> Translator<'a> { ) -> Option> { match expand_to { ra_ap_hir_expand::ExpandTo::Statements => { - ast::MacroStmts::cast(expanded).map(|x| self.emit_macro_stmts(x).into()) + ast::MacroStmts::cast(expanded).map(|x| self.emit_macro_stmts(&x).into()) } ra_ap_hir_expand::ExpandTo::Items => { - ast::MacroItems::cast(expanded).map(|x| self.emit_macro_items(x).into()) + ast::MacroItems::cast(expanded).map(|x| self.emit_macro_items(&x).into()) } ra_ap_hir_expand::ExpandTo::Pattern => { - ast::Pat::cast(expanded).map(|x| self.emit_pat(x).into()) + ast::Pat::cast(expanded).map(|x| self.emit_pat(&x).into()) } ra_ap_hir_expand::ExpandTo::Type => { - ast::Type::cast(expanded).map(|x| self.emit_type(x).into()) + ast::Type::cast(expanded).map(|x| self.emit_type(&x).into()) } ra_ap_hir_expand::ExpandTo::Expr => { - ast::Expr::cast(expanded).map(|x| self.emit_expr(x).into()) + ast::Expr::cast(expanded).map(|x| self.emit_expr(&x).into()) + } + } + } + pub(crate) fn extract_expr_type(&mut self, expr: &ast::Expr, label: Label) { + if let Some(semantics) = self.semantics { + if let Some(tp) = semantics.type_of_expr(expr) { + Expr::emit_type( + label, + Translator::display_type(semantics, tp), + &mut self.trap.writer, + ) + } else { + let text_range = self + .text_range_for_node(expr) + .unwrap_or(TextRange::empty(0.into())); + self.emit_diagnostic( + DiagnosticSeverity::Info, + "types".to_owned(), + "missing type for expression".to_owned(), + "missing type for expression".to_owned(), + self.location(text_range), + ); } } } + pub(crate) fn extract_pat_type(&mut self, pat: &ast::Pat, label: Label) { + if let Some(semantics) = self.semantics { + if let Some(tp) = semantics.type_of_pat(pat) { + Pat::emit_type( + label, + Translator::display_type(semantics, tp), + &mut self.trap.writer, + ) + } else { + let text_range = self + .text_range_for_node(pat) + .unwrap_or(TextRange::empty(0.into())); + self.emit_diagnostic( + DiagnosticSeverity::Info, + "types".to_owned(), + "missing type for pattern".to_owned(), + "missing type for pattern".to_owned(), + self.location(text_range), + ); + } + } + } + fn display_type(semantics: &Semantics<'_, RootDatabase>, tp: TypeInfo) -> String { + let tp = tp.original(); + let display = tp.into_displayable( + semantics.db, + None, + None, + false, + ra_ap_hir_ty::display::DisplayTarget::Test, + ra_ap_hir_ty::display::ClosureStyle::ImplFn, + true, + ); + format!("{display}") + } pub(crate) fn extract_macro_call_expanded( &mut self, mcall: &ast::MacroCall, diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs index aea607b753df..05ba1e782d93 100644 --- a/rust/extractor/src/translate/generated.rs +++ b/rust/extractor/src/translate/generated.rs @@ -14,255 +14,275 @@ use ra_ap_syntax::ast::{ use ra_ap_syntax::{ast, AstNode}; impl Translator<'_> { - fn emit_else_branch(&mut self, node: ast::ElseBranch) -> Label { + fn emit_else_branch(&mut self, node: &ast::ElseBranch) -> Label { match node { - ast::ElseBranch::IfExpr(inner) => self.emit_if_expr(inner).into(), - ast::ElseBranch::Block(inner) => self.emit_block_expr(inner).into(), + ast::ElseBranch::IfExpr(ref inner) => self.emit_if_expr(inner).into(), + ast::ElseBranch::Block(ref inner) => self.emit_block_expr(inner).into(), } } - pub(crate) fn emit_assoc_item(&mut self, node: ast::AssocItem) -> Label { - match node { - ast::AssocItem::Const(inner) => self.emit_const(inner).into(), - ast::AssocItem::Fn(inner) => self.emit_fn(inner).into(), - ast::AssocItem::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::AssocItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), - } - } - - pub(crate) fn emit_expr(&mut self, node: ast::Expr) -> Label { - match node { - ast::Expr::ArrayExpr(inner) => self.emit_array_expr(inner).into(), - ast::Expr::AsmExpr(inner) => self.emit_asm_expr(inner).into(), - ast::Expr::AwaitExpr(inner) => self.emit_await_expr(inner).into(), - ast::Expr::BecomeExpr(inner) => self.emit_become_expr(inner).into(), - ast::Expr::BinExpr(inner) => self.emit_bin_expr(inner).into(), - ast::Expr::BlockExpr(inner) => self.emit_block_expr(inner).into(), - ast::Expr::BreakExpr(inner) => self.emit_break_expr(inner).into(), - ast::Expr::CallExpr(inner) => self.emit_call_expr(inner).into(), - ast::Expr::CastExpr(inner) => self.emit_cast_expr(inner).into(), - ast::Expr::ClosureExpr(inner) => self.emit_closure_expr(inner).into(), - ast::Expr::ContinueExpr(inner) => self.emit_continue_expr(inner).into(), - ast::Expr::FieldExpr(inner) => self.emit_field_expr(inner).into(), - ast::Expr::ForExpr(inner) => self.emit_for_expr(inner).into(), - ast::Expr::FormatArgsExpr(inner) => self.emit_format_args_expr(inner).into(), - ast::Expr::IfExpr(inner) => self.emit_if_expr(inner).into(), - ast::Expr::IndexExpr(inner) => self.emit_index_expr(inner).into(), - ast::Expr::LetExpr(inner) => self.emit_let_expr(inner).into(), - ast::Expr::Literal(inner) => self.emit_literal(inner).into(), - ast::Expr::LoopExpr(inner) => self.emit_loop_expr(inner).into(), - ast::Expr::MacroExpr(inner) => self.emit_macro_expr(inner).into(), - ast::Expr::MatchExpr(inner) => self.emit_match_expr(inner).into(), - ast::Expr::MethodCallExpr(inner) => self.emit_method_call_expr(inner).into(), - ast::Expr::OffsetOfExpr(inner) => self.emit_offset_of_expr(inner).into(), - ast::Expr::ParenExpr(inner) => self.emit_paren_expr(inner).into(), - ast::Expr::PathExpr(inner) => self.emit_path_expr(inner).into(), - ast::Expr::PrefixExpr(inner) => self.emit_prefix_expr(inner).into(), - ast::Expr::RangeExpr(inner) => self.emit_range_expr(inner).into(), - ast::Expr::RecordExpr(inner) => self.emit_record_expr(inner).into(), - ast::Expr::RefExpr(inner) => self.emit_ref_expr(inner).into(), - ast::Expr::ReturnExpr(inner) => self.emit_return_expr(inner).into(), - ast::Expr::TryExpr(inner) => self.emit_try_expr(inner).into(), - ast::Expr::TupleExpr(inner) => self.emit_tuple_expr(inner).into(), - ast::Expr::UnderscoreExpr(inner) => self.emit_underscore_expr(inner).into(), - ast::Expr::WhileExpr(inner) => self.emit_while_expr(inner).into(), - ast::Expr::YeetExpr(inner) => self.emit_yeet_expr(inner).into(), - ast::Expr::YieldExpr(inner) => self.emit_yield_expr(inner).into(), - } - } - - pub(crate) fn emit_extern_item(&mut self, node: ast::ExternItem) -> Label { - match node { - ast::ExternItem::Fn(inner) => self.emit_fn(inner).into(), - ast::ExternItem::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::ExternItem::Static(inner) => self.emit_static(inner).into(), - ast::ExternItem::TypeAlias(inner) => self.emit_type_alias(inner).into(), - } - } - - pub(crate) fn emit_field_list(&mut self, node: ast::FieldList) -> Label { - match node { - ast::FieldList::RecordFieldList(inner) => self.emit_record_field_list(inner).into(), - ast::FieldList::TupleFieldList(inner) => self.emit_tuple_field_list(inner).into(), - } - } - - pub(crate) fn emit_generic_arg(&mut self, node: ast::GenericArg) -> Label { - match node { - ast::GenericArg::AssocTypeArg(inner) => self.emit_assoc_type_arg(inner).into(), - ast::GenericArg::ConstArg(inner) => self.emit_const_arg(inner).into(), - ast::GenericArg::LifetimeArg(inner) => self.emit_lifetime_arg(inner).into(), - ast::GenericArg::TypeArg(inner) => self.emit_type_arg(inner).into(), - } - } - - pub(crate) fn emit_generic_param(&mut self, node: ast::GenericParam) -> Label { - match node { - ast::GenericParam::ConstParam(inner) => self.emit_const_param(inner).into(), - ast::GenericParam::LifetimeParam(inner) => self.emit_lifetime_param(inner).into(), - ast::GenericParam::TypeParam(inner) => self.emit_type_param(inner).into(), - } - } - - pub(crate) fn emit_pat(&mut self, node: ast::Pat) -> Label { - match node { - ast::Pat::BoxPat(inner) => self.emit_box_pat(inner).into(), - ast::Pat::ConstBlockPat(inner) => self.emit_const_block_pat(inner).into(), - ast::Pat::IdentPat(inner) => self.emit_ident_pat(inner).into(), - ast::Pat::LiteralPat(inner) => self.emit_literal_pat(inner).into(), - ast::Pat::MacroPat(inner) => self.emit_macro_pat(inner).into(), - ast::Pat::OrPat(inner) => self.emit_or_pat(inner).into(), - ast::Pat::ParenPat(inner) => self.emit_paren_pat(inner).into(), - ast::Pat::PathPat(inner) => self.emit_path_pat(inner).into(), - ast::Pat::RangePat(inner) => self.emit_range_pat(inner).into(), - ast::Pat::RecordPat(inner) => self.emit_record_pat(inner).into(), - ast::Pat::RefPat(inner) => self.emit_ref_pat(inner).into(), - ast::Pat::RestPat(inner) => self.emit_rest_pat(inner).into(), - ast::Pat::SlicePat(inner) => self.emit_slice_pat(inner).into(), - ast::Pat::TuplePat(inner) => self.emit_tuple_pat(inner).into(), - ast::Pat::TupleStructPat(inner) => self.emit_tuple_struct_pat(inner).into(), - ast::Pat::WildcardPat(inner) => self.emit_wildcard_pat(inner).into(), - } - } - - pub(crate) fn emit_stmt(&mut self, node: ast::Stmt) -> Label { - match node { - ast::Stmt::ExprStmt(inner) => self.emit_expr_stmt(inner).into(), - ast::Stmt::Item(inner) => self.emit_item(inner).into(), - ast::Stmt::LetStmt(inner) => self.emit_let_stmt(inner).into(), - } - } - - pub(crate) fn emit_type(&mut self, node: ast::Type) -> Label { - match node { - ast::Type::ArrayType(inner) => self.emit_array_type(inner).into(), - ast::Type::DynTraitType(inner) => self.emit_dyn_trait_type(inner).into(), - ast::Type::FnPtrType(inner) => self.emit_fn_ptr_type(inner).into(), - ast::Type::ForType(inner) => self.emit_for_type(inner).into(), - ast::Type::ImplTraitType(inner) => self.emit_impl_trait_type(inner).into(), - ast::Type::InferType(inner) => self.emit_infer_type(inner).into(), - ast::Type::MacroType(inner) => self.emit_macro_type(inner).into(), - ast::Type::NeverType(inner) => self.emit_never_type(inner).into(), - ast::Type::ParenType(inner) => self.emit_paren_type(inner).into(), - ast::Type::PathType(inner) => self.emit_path_type(inner).into(), - ast::Type::PtrType(inner) => self.emit_ptr_type(inner).into(), - ast::Type::RefType(inner) => self.emit_ref_type(inner).into(), - ast::Type::SliceType(inner) => self.emit_slice_type(inner).into(), - ast::Type::TupleType(inner) => self.emit_tuple_type(inner).into(), - } - } - - pub(crate) fn emit_item(&mut self, node: ast::Item) -> Label { - match node { - ast::Item::Const(inner) => self.emit_const(inner).into(), - ast::Item::Enum(inner) => self.emit_enum(inner).into(), - ast::Item::ExternBlock(inner) => self.emit_extern_block(inner).into(), - ast::Item::ExternCrate(inner) => self.emit_extern_crate(inner).into(), - ast::Item::Fn(inner) => self.emit_fn(inner).into(), - ast::Item::Impl(inner) => self.emit_impl(inner).into(), - ast::Item::MacroCall(inner) => self.emit_macro_call(inner).into(), - ast::Item::MacroDef(inner) => self.emit_macro_def(inner).into(), - ast::Item::MacroRules(inner) => self.emit_macro_rules(inner).into(), - ast::Item::Module(inner) => self.emit_module(inner).into(), - ast::Item::Static(inner) => self.emit_static(inner).into(), - ast::Item::Struct(inner) => self.emit_struct(inner).into(), - ast::Item::Trait(inner) => self.emit_trait(inner).into(), - ast::Item::TraitAlias(inner) => self.emit_trait_alias(inner).into(), - ast::Item::TypeAlias(inner) => self.emit_type_alias(inner).into(), - ast::Item::Union(inner) => self.emit_union(inner).into(), - ast::Item::Use(inner) => self.emit_use(inner).into(), - } - } - - pub(crate) fn emit_abi(&mut self, node: ast::Abi) -> Label { + #[allow(clippy::let_and_return)] pub(crate) fn emit_assoc_item(&mut self, node: &ast::AssocItem) -> Label { + let label = match node { + ast::AssocItem::Const(ref inner) => self.emit_const(inner).into(), + ast::AssocItem::Fn(ref inner) => self.emit_fn(inner).into(), + ast::AssocItem::MacroCall(ref inner) => self.emit_macro_call(inner).into(), + ast::AssocItem::TypeAlias(ref inner) => self.emit_type_alias(inner).into(), + }; + emit_detached!(AssocItem, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_expr(&mut self, node: &ast::Expr) -> Label { + let label = match node { + ast::Expr::ArrayExpr(ref inner) => self.emit_array_expr(inner).into(), + ast::Expr::AsmExpr(ref inner) => self.emit_asm_expr(inner).into(), + ast::Expr::AwaitExpr(ref inner) => self.emit_await_expr(inner).into(), + ast::Expr::BecomeExpr(ref inner) => self.emit_become_expr(inner).into(), + ast::Expr::BinExpr(ref inner) => self.emit_bin_expr(inner).into(), + ast::Expr::BlockExpr(ref inner) => self.emit_block_expr(inner).into(), + ast::Expr::BreakExpr(ref inner) => self.emit_break_expr(inner).into(), + ast::Expr::CallExpr(ref inner) => self.emit_call_expr(inner).into(), + ast::Expr::CastExpr(ref inner) => self.emit_cast_expr(inner).into(), + ast::Expr::ClosureExpr(ref inner) => self.emit_closure_expr(inner).into(), + ast::Expr::ContinueExpr(ref inner) => self.emit_continue_expr(inner).into(), + ast::Expr::FieldExpr(ref inner) => self.emit_field_expr(inner).into(), + ast::Expr::ForExpr(ref inner) => self.emit_for_expr(inner).into(), + ast::Expr::FormatArgsExpr(ref inner) => self.emit_format_args_expr(inner).into(), + ast::Expr::IfExpr(ref inner) => self.emit_if_expr(inner).into(), + ast::Expr::IndexExpr(ref inner) => self.emit_index_expr(inner).into(), + ast::Expr::LetExpr(ref inner) => self.emit_let_expr(inner).into(), + ast::Expr::Literal(ref inner) => self.emit_literal(inner).into(), + ast::Expr::LoopExpr(ref inner) => self.emit_loop_expr(inner).into(), + ast::Expr::MacroExpr(ref inner) => self.emit_macro_expr(inner).into(), + ast::Expr::MatchExpr(ref inner) => self.emit_match_expr(inner).into(), + ast::Expr::MethodCallExpr(ref inner) => self.emit_method_call_expr(inner).into(), + ast::Expr::OffsetOfExpr(ref inner) => self.emit_offset_of_expr(inner).into(), + ast::Expr::ParenExpr(ref inner) => self.emit_paren_expr(inner).into(), + ast::Expr::PathExpr(ref inner) => self.emit_path_expr(inner).into(), + ast::Expr::PrefixExpr(ref inner) => self.emit_prefix_expr(inner).into(), + ast::Expr::RangeExpr(ref inner) => self.emit_range_expr(inner).into(), + ast::Expr::RecordExpr(ref inner) => self.emit_record_expr(inner).into(), + ast::Expr::RefExpr(ref inner) => self.emit_ref_expr(inner).into(), + ast::Expr::ReturnExpr(ref inner) => self.emit_return_expr(inner).into(), + ast::Expr::TryExpr(ref inner) => self.emit_try_expr(inner).into(), + ast::Expr::TupleExpr(ref inner) => self.emit_tuple_expr(inner).into(), + ast::Expr::UnderscoreExpr(ref inner) => self.emit_underscore_expr(inner).into(), + ast::Expr::WhileExpr(ref inner) => self.emit_while_expr(inner).into(), + ast::Expr::YeetExpr(ref inner) => self.emit_yeet_expr(inner).into(), + ast::Expr::YieldExpr(ref inner) => self.emit_yield_expr(inner).into(), + }; + emit_detached!(Expr, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_extern_item(&mut self, node: &ast::ExternItem) -> Label { + let label = match node { + ast::ExternItem::Fn(ref inner) => self.emit_fn(inner).into(), + ast::ExternItem::MacroCall(ref inner) => self.emit_macro_call(inner).into(), + ast::ExternItem::Static(ref inner) => self.emit_static(inner).into(), + ast::ExternItem::TypeAlias(ref inner) => self.emit_type_alias(inner).into(), + }; + emit_detached!(ExternItem, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_field_list(&mut self, node: &ast::FieldList) -> Label { + let label = match node { + ast::FieldList::RecordFieldList(ref inner) => self.emit_record_field_list(inner).into(), + ast::FieldList::TupleFieldList(ref inner) => self.emit_tuple_field_list(inner).into(), + }; + emit_detached!(FieldList, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_generic_arg(&mut self, node: &ast::GenericArg) -> Label { + let label = match node { + ast::GenericArg::AssocTypeArg(ref inner) => self.emit_assoc_type_arg(inner).into(), + ast::GenericArg::ConstArg(ref inner) => self.emit_const_arg(inner).into(), + ast::GenericArg::LifetimeArg(ref inner) => self.emit_lifetime_arg(inner).into(), + ast::GenericArg::TypeArg(ref inner) => self.emit_type_arg(inner).into(), + }; + emit_detached!(GenericArg, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_generic_param(&mut self, node: &ast::GenericParam) -> Label { + let label = match node { + ast::GenericParam::ConstParam(ref inner) => self.emit_const_param(inner).into(), + ast::GenericParam::LifetimeParam(ref inner) => self.emit_lifetime_param(inner).into(), + ast::GenericParam::TypeParam(ref inner) => self.emit_type_param(inner).into(), + }; + emit_detached!(GenericParam, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_pat(&mut self, node: &ast::Pat) -> Label { + let label = match node { + ast::Pat::BoxPat(ref inner) => self.emit_box_pat(inner).into(), + ast::Pat::ConstBlockPat(ref inner) => self.emit_const_block_pat(inner).into(), + ast::Pat::IdentPat(ref inner) => self.emit_ident_pat(inner).into(), + ast::Pat::LiteralPat(ref inner) => self.emit_literal_pat(inner).into(), + ast::Pat::MacroPat(ref inner) => self.emit_macro_pat(inner).into(), + ast::Pat::OrPat(ref inner) => self.emit_or_pat(inner).into(), + ast::Pat::ParenPat(ref inner) => self.emit_paren_pat(inner).into(), + ast::Pat::PathPat(ref inner) => self.emit_path_pat(inner).into(), + ast::Pat::RangePat(ref inner) => self.emit_range_pat(inner).into(), + ast::Pat::RecordPat(ref inner) => self.emit_record_pat(inner).into(), + ast::Pat::RefPat(ref inner) => self.emit_ref_pat(inner).into(), + ast::Pat::RestPat(ref inner) => self.emit_rest_pat(inner).into(), + ast::Pat::SlicePat(ref inner) => self.emit_slice_pat(inner).into(), + ast::Pat::TuplePat(ref inner) => self.emit_tuple_pat(inner).into(), + ast::Pat::TupleStructPat(ref inner) => self.emit_tuple_struct_pat(inner).into(), + ast::Pat::WildcardPat(ref inner) => self.emit_wildcard_pat(inner).into(), + }; + emit_detached!(Pat, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_stmt(&mut self, node: &ast::Stmt) -> Label { + let label = match node { + ast::Stmt::ExprStmt(ref inner) => self.emit_expr_stmt(inner).into(), + ast::Stmt::Item(ref inner) => self.emit_item(inner).into(), + ast::Stmt::LetStmt(ref inner) => self.emit_let_stmt(inner).into(), + }; + emit_detached!(Stmt, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_type(&mut self, node: &ast::Type) -> Label { + let label = match node { + ast::Type::ArrayType(ref inner) => self.emit_array_type(inner).into(), + ast::Type::DynTraitType(ref inner) => self.emit_dyn_trait_type(inner).into(), + ast::Type::FnPtrType(ref inner) => self.emit_fn_ptr_type(inner).into(), + ast::Type::ForType(ref inner) => self.emit_for_type(inner).into(), + ast::Type::ImplTraitType(ref inner) => self.emit_impl_trait_type(inner).into(), + ast::Type::InferType(ref inner) => self.emit_infer_type(inner).into(), + ast::Type::MacroType(ref inner) => self.emit_macro_type(inner).into(), + ast::Type::NeverType(ref inner) => self.emit_never_type(inner).into(), + ast::Type::ParenType(ref inner) => self.emit_paren_type(inner).into(), + ast::Type::PathType(ref inner) => self.emit_path_type(inner).into(), + ast::Type::PtrType(ref inner) => self.emit_ptr_type(inner).into(), + ast::Type::RefType(ref inner) => self.emit_ref_type(inner).into(), + ast::Type::SliceType(ref inner) => self.emit_slice_type(inner).into(), + ast::Type::TupleType(ref inner) => self.emit_tuple_type(inner).into(), + }; + emit_detached!(TypeRef, self, node, label); + label + } + + #[allow(clippy::let_and_return)] pub(crate) fn emit_item(&mut self, node: &ast::Item) -> Label { + let label = match node { + ast::Item::Const(ref inner) => self.emit_const(inner).into(), + ast::Item::Enum(ref inner) => self.emit_enum(inner).into(), + ast::Item::ExternBlock(ref inner) => self.emit_extern_block(inner).into(), + ast::Item::ExternCrate(ref inner) => self.emit_extern_crate(inner).into(), + ast::Item::Fn(ref inner) => self.emit_fn(inner).into(), + ast::Item::Impl(ref inner) => self.emit_impl(inner).into(), + ast::Item::MacroCall(ref inner) => self.emit_macro_call(inner).into(), + ast::Item::MacroDef(ref inner) => self.emit_macro_def(inner).into(), + ast::Item::MacroRules(ref inner) => self.emit_macro_rules(inner).into(), + ast::Item::Module(ref inner) => self.emit_module(inner).into(), + ast::Item::Static(ref inner) => self.emit_static(inner).into(), + ast::Item::Struct(ref inner) => self.emit_struct(inner).into(), + ast::Item::Trait(ref inner) => self.emit_trait(inner).into(), + ast::Item::TraitAlias(ref inner) => self.emit_trait_alias(inner).into(), + ast::Item::TypeAlias(ref inner) => self.emit_type_alias(inner).into(), + ast::Item::Union(ref inner) => self.emit_union(inner).into(), + ast::Item::Use(ref inner) => self.emit_use(inner).into(), + }; + emit_detached!(Item, self, node, label); + label + } + + pub(crate) fn emit_abi(&mut self, node: &ast::Abi) -> Label { let abi_string = node.try_get_text(); let label = self.trap.emit(generated::Abi { id: TrapId::Star, abi_string, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Abi, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_arg_list(&mut self, node: ast::ArgList) -> Label { - let args = node.args().map(|x| self.emit_expr(x)).collect(); + pub(crate) fn emit_arg_list(&mut self, node: &ast::ArgList) -> Label { + let args = node.args().map(|x| self.emit_expr(&x)).collect(); let label = self.trap.emit(generated::ArgList { id: TrapId::Star, args, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ArgList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_array_expr(&mut self, node: ast::ArrayExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let exprs = node.exprs().map(|x| self.emit_expr(x)).collect(); + pub(crate) fn emit_array_expr(&mut self, node: &ast::ArrayExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let exprs = node.exprs().map(|x| self.emit_expr(&x)).collect(); let label = self.trap.emit(generated::ArrayExpr { id: TrapId::Star, attrs, exprs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ArrayExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_array_type(&mut self, node: ast::ArrayType) -> Label { - let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_array_type(&mut self, node: &ast::ArrayType) -> Label { + let const_arg = node.const_arg().map(|x| self.emit_const_arg(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ArrayType { id: TrapId::Star, const_arg, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ArrayType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_asm_expr(&mut self, node: ast::AsmExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_asm_expr(&mut self, node: &ast::AsmExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::AsmExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(AsmExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_assoc_item_list(&mut self, node: ast::AssocItemList) -> Label { - let assoc_items = node.assoc_items().map(|x| self.emit_assoc_item(x)).collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_assoc_item_list(&mut self, node: &ast::AssocItemList) -> Label { + let assoc_items = node.assoc_items().map(|x| self.emit_assoc_item(&x)).collect(); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let label = self.trap.emit(generated::AssocItemList { id: TrapId::Star, assoc_items, attrs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(AssocItemList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_assoc_type_arg(&mut self, node: ast::AssocTypeArg) -> Label { - let const_arg = node.const_arg().map(|x| self.emit_const_arg(x)); - let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let return_type_syntax = node.return_type_syntax().map(|x| self.emit_return_type_syntax(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_assoc_type_arg(&mut self, node: &ast::AssocTypeArg) -> Label { + let const_arg = node.const_arg().map(|x| self.emit_const_arg(&x)); + let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(&x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); + let param_list = node.param_list().map(|x| self.emit_param_list(&x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(&x)); + let return_type_syntax = node.return_type_syntax().map(|x| self.emit_return_type_syntax(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::AssocTypeArg { id: TrapId::Star, const_arg, @@ -274,57 +294,57 @@ impl Translator<'_> { ty, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(AssocTypeArg, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_attr(&mut self, node: ast::Attr) -> Label { - let meta = node.meta().map(|x| self.emit_meta(x)); + pub(crate) fn emit_attr(&mut self, node: &ast::Attr) -> Label { + let meta = node.meta().map(|x| self.emit_meta(&x)); let label = self.trap.emit(generated::Attr { id: TrapId::Star, meta, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Attr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_await_expr(&mut self, node: ast::AwaitExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_await_expr(&mut self, node: &ast::AwaitExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::AwaitExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(AwaitExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_become_expr(&mut self, node: ast::BecomeExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_become_expr(&mut self, node: &ast::BecomeExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::BecomeExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(BecomeExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_bin_expr(&mut self, node: ast::BinExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lhs = node.lhs().map(|x| self.emit_expr(x)); + pub(crate) fn emit_bin_expr(&mut self, node: &ast::BinExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let lhs = node.lhs().map(|x| self.emit_expr(&x)); let operator_name = node.try_get_text(); - let rhs = node.rhs().map(|x| self.emit_expr(x)); + let rhs = node.rhs().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::BinaryExpr { id: TrapId::Star, attrs, @@ -332,22 +352,22 @@ impl Translator<'_> { operator_name, rhs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(BinaryExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_block_expr(&mut self, node: ast::BlockExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_block_expr(&mut self, node: &ast::BlockExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); let is_gen = node.gen_token().is_some(); let is_move = node.move_token().is_some(); let is_try = node.try_token().is_some(); let is_unsafe = node.unsafe_token().is_some(); - let label = node.label().map(|x| self.emit_label(x)); - let stmt_list = node.stmt_list().map(|x| self.emit_stmt_list(x)); + let label = node.label().map(|x| self.emit_label(&x)); + let stmt_list = node.stmt_list().map(|x| self.emit_stmt_list(&x)); let label = self.trap.emit(generated::BlockExpr { id: TrapId::Star, attrs, @@ -360,95 +380,95 @@ impl Translator<'_> { label, stmt_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(BlockExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_box_pat(&mut self, node: ast::BoxPat) -> Label { - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_box_pat(&mut self, node: &ast::BoxPat) -> Label { + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::BoxPat { id: TrapId::Star, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(BoxPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_break_expr(&mut self, node: ast::BreakExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + pub(crate) fn emit_break_expr(&mut self, node: &ast::BreakExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::BreakExpr { id: TrapId::Star, attrs, expr, lifetime, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(BreakExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_call_expr(&mut self, node: ast::CallExpr) -> Label { - let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_call_expr(&mut self, node: &ast::CallExpr) -> Label { + let arg_list = node.arg_list().map(|x| self.emit_arg_list(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::CallExpr { id: TrapId::Star, arg_list, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(CallExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_cast_expr(&mut self, node: ast::CastExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_cast_expr(&mut self, node: &ast::CastExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::CastExpr { id: TrapId::Star, attrs, expr, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(CastExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_closure_binder(&mut self, node: ast::ClosureBinder) -> Label { - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_closure_binder(&mut self, node: &ast::ClosureBinder) -> Label { + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let label = self.trap.emit(generated::ClosureBinder { id: TrapId::Star, generic_param_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ClosureBinder, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_closure_expr(&mut self, node: ast::ClosureExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); - let closure_binder = node.closure_binder().map(|x| self.emit_closure_binder(x)); + pub(crate) fn emit_closure_expr(&mut self, node: &ast::ClosureExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let body = node.body().map(|x| self.emit_expr(&x)); + let closure_binder = node.closure_binder().map(|x| self.emit_closure_binder(&x)); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); let is_gen = node.gen_token().is_some(); let is_move = node.move_token().is_some(); let is_static = node.static_token().is_some(); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(&x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(&x)); let label = self.trap.emit(generated::ClosureExpr { id: TrapId::Star, attrs, @@ -462,20 +482,20 @@ impl Translator<'_> { param_list, ret_type, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ClosureExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_const(&mut self, node: ast::Const) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); + pub(crate) fn emit_const(&mut self, node: &ast::Const) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let body = node.body().map(|x| self.emit_expr(&x)); let is_const = node.const_token().is_some(); let is_default = node.default_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::Const { id: TrapId::Star, attrs, @@ -486,44 +506,44 @@ impl Translator<'_> { ty, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Const, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_const_arg(&mut self, node: ast::ConstArg) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_const_arg(&mut self, node: &ast::ConstArg) -> Label { + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ConstArg { id: TrapId::Star, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ConstArg, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_const_block_pat(&mut self, node: ast::ConstBlockPat) -> Label { - let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); + pub(crate) fn emit_const_block_pat(&mut self, node: &ast::ConstBlockPat) -> Label { + let block_expr = node.block_expr().map(|x| self.emit_block_expr(&x)); let is_const = node.const_token().is_some(); let label = self.trap.emit(generated::ConstBlockPat { id: TrapId::Star, block_expr, is_const, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ConstBlockPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_const_param(&mut self, node: ast::ConstParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let default_val = node.default_val().map(|x| self.emit_const_arg(x)); + pub(crate) fn emit_const_param(&mut self, node: &ast::ConstParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let default_val = node.default_val().map(|x| self.emit_const_arg(&x)); let is_const = node.const_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ConstParam { id: TrapId::Star, attrs, @@ -532,45 +552,45 @@ impl Translator<'_> { name, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ConstParam, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_continue_expr(&mut self, node: ast::ContinueExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + pub(crate) fn emit_continue_expr(&mut self, node: &ast::ContinueExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::ContinueExpr { id: TrapId::Star, attrs, lifetime, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ContinueExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_dyn_trait_type(&mut self, node: ast::DynTraitType) -> Label { - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_dyn_trait_type(&mut self, node: &ast::DynTraitType) -> Label { + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::DynTraitType { id: TrapId::Star, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(DynTraitType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_enum(&mut self, node: ast::Enum) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let variant_list = node.variant_list().map(|x| self.emit_variant_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + pub(crate) fn emit_enum(&mut self, node: &ast::Enum) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let variant_list = node.variant_list().map(|x| self.emit_variant_list(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Enum { id: TrapId::Star, attrs, @@ -580,28 +600,28 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Enum, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_expr_stmt(&mut self, node: ast::ExprStmt) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_expr_stmt(&mut self, node: &ast::ExprStmt) -> Label { + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ExprStmt { id: TrapId::Star, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ExprStmt, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_extern_block(&mut self, node: ast::ExternBlock) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let extern_item_list = node.extern_item_list().map(|x| self.emit_extern_item_list(x)); + pub(crate) fn emit_extern_block(&mut self, node: &ast::ExternBlock) -> Label { + let abi = node.abi().map(|x| self.emit_abi(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let extern_item_list = node.extern_item_list().map(|x| self.emit_extern_item_list(&x)); let is_unsafe = node.unsafe_token().is_some(); let label = self.trap.emit(generated::ExternBlock { id: TrapId::Star, @@ -610,17 +630,17 @@ impl Translator<'_> { extern_item_list, is_unsafe, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ExternBlock, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_extern_crate(&mut self, node: ast::ExternCrate) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let rename = node.rename().map(|x| self.emit_rename(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_extern_crate(&mut self, node: &ast::ExternCrate) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); + let rename = node.rename().map(|x| self.emit_rename(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::ExternCrate { id: TrapId::Star, attrs, @@ -628,57 +648,57 @@ impl Translator<'_> { rename, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ExternCrate, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_extern_item_list(&mut self, node: ast::ExternItemList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let extern_items = node.extern_items().map(|x| self.emit_extern_item(x)).collect(); + pub(crate) fn emit_extern_item_list(&mut self, node: &ast::ExternItemList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let extern_items = node.extern_items().map(|x| self.emit_extern_item(&x)).collect(); let label = self.trap.emit(generated::ExternItemList { id: TrapId::Star, attrs, extern_items, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ExternItemList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_field_expr(&mut self, node: ast::FieldExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + pub(crate) fn emit_field_expr(&mut self, node: &ast::FieldExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); let label = self.trap.emit(generated::FieldExpr { id: TrapId::Star, attrs, expr, name_ref, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(FieldExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_fn(&mut self, node: ast::Fn) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_block_expr(x)); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_fn(&mut self, node: &ast::Fn) -> Label { + let abi = node.abi().map(|x| self.emit_abi(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let body = node.body().map(|x| self.emit_block_expr(&x)); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); let is_default = node.default_token().is_some(); let is_gen = node.gen_token().is_some(); let is_unsafe = node.unsafe_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let param_list = node.param_list().map(|x| self.emit_param_list(&x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Function { id: TrapId::Star, abi, @@ -696,19 +716,19 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Function, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_fn_ptr_type(&mut self, node: ast::FnPtrType) -> Label { - let abi = node.abi().map(|x| self.emit_abi(x)); + pub(crate) fn emit_fn_ptr_type(&mut self, node: &ast::FnPtrType) -> Label { + let abi = node.abi().map(|x| self.emit_abi(&x)); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); let is_unsafe = node.unsafe_token().is_some(); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); + let param_list = node.param_list().map(|x| self.emit_param_list(&x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(&x)); let label = self.trap.emit(generated::FnPtrType { id: TrapId::Star, abi, @@ -718,18 +738,18 @@ impl Translator<'_> { param_list, ret_type, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(FnPtrType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_for_expr(&mut self, node: ast::ForExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let iterable = node.iterable().map(|x| self.emit_expr(x)); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_for_expr(&mut self, node: &ast::ForExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let iterable = node.iterable().map(|x| self.emit_expr(&x)); + let label = node.label().map(|x| self.emit_label(&x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::ForExpr { id: TrapId::Star, attrs, @@ -738,86 +758,86 @@ impl Translator<'_> { loop_body, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ForExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_for_type(&mut self, node: ast::ForType) -> Label { - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_for_type(&mut self, node: &ast::ForType) -> Label { + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ForType { id: TrapId::Star, generic_param_list, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ForType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_format_args_arg(&mut self, node: ast::FormatArgsArg) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let name = node.name().map(|x| self.emit_name(x)); + pub(crate) fn emit_format_args_arg(&mut self, node: &ast::FormatArgsArg) -> Label { + let expr = node.expr().map(|x| self.emit_expr(&x)); + let name = node.name().map(|x| self.emit_name(&x)); let label = self.trap.emit(generated::FormatArgsArg { id: TrapId::Star, expr, name, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(FormatArgsArg, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_format_args_expr(&mut self, node: ast::FormatArgsExpr) -> Label { - let args = node.args().map(|x| self.emit_format_args_arg(x)).collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let template = node.template().map(|x| self.emit_expr(x)); + pub(crate) fn emit_format_args_expr(&mut self, node: &ast::FormatArgsExpr) -> Label { + let args = node.args().map(|x| self.emit_format_args_arg(&x)).collect(); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let template = node.template().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::FormatArgsExpr { id: TrapId::Star, args, attrs, template, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(FormatArgsExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_generic_arg_list(&mut self, node: ast::GenericArgList) -> Label { - let generic_args = node.generic_args().map(|x| self.emit_generic_arg(x)).collect(); + pub(crate) fn emit_generic_arg_list(&mut self, node: &ast::GenericArgList) -> Label { + let generic_args = node.generic_args().map(|x| self.emit_generic_arg(&x)).collect(); let label = self.trap.emit(generated::GenericArgList { id: TrapId::Star, generic_args, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(GenericArgList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_generic_param_list(&mut self, node: ast::GenericParamList) -> Label { - let generic_params = node.generic_params().map(|x| self.emit_generic_param(x)).collect(); + pub(crate) fn emit_generic_param_list(&mut self, node: &ast::GenericParamList) -> Label { + let generic_params = node.generic_params().map(|x| self.emit_generic_param(&x)).collect(); let label = self.trap.emit(generated::GenericParamList { id: TrapId::Star, generic_params, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(GenericParamList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ident_pat(&mut self, node: ast::IdentPat) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_ident_pat(&mut self, node: &ast::IdentPat) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let is_mut = node.mut_token().is_some(); let is_ref = node.ref_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::IdentPat { id: TrapId::Star, attrs, @@ -826,17 +846,17 @@ impl Translator<'_> { name, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(IdentPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_if_expr(&mut self, node: ast::IfExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let condition = node.condition().map(|x| self.emit_expr(x)); - let else_ = node.else_branch().map(|x| self.emit_else_branch(x)); - let then = node.then_branch().map(|x| self.emit_block_expr(x)); + pub(crate) fn emit_if_expr(&mut self, node: &ast::IfExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let condition = node.condition().map(|x| self.emit_expr(&x)); + let else_ = node.else_branch().map(|x| self.emit_else_branch(&x)); + let then = node.then_branch().map(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::IfExpr { id: TrapId::Star, attrs, @@ -844,23 +864,23 @@ impl Translator<'_> { else_, then, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(IfExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_impl(&mut self, node: ast::Impl) -> Label { - let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_impl(&mut self, node: &ast::Impl) -> Label { + let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let is_const = node.const_token().is_some(); let is_default = node.default_token().is_some(); let is_unsafe = node.unsafe_token().is_some(); - let self_ty = node.self_ty().map(|x| self.emit_type(x)); - let trait_ = node.trait_().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let self_ty = node.self_ty().map(|x| self.emit_type(&x)); + let trait_ = node.trait_().map(|x| self.emit_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Impl { id: TrapId::Star, assoc_item_list, @@ -874,110 +894,110 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Impl, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_impl_trait_type(&mut self, node: ast::ImplTraitType) -> Label { - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_impl_trait_type(&mut self, node: &ast::ImplTraitType) -> Label { + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::ImplTraitType { id: TrapId::Star, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ImplTraitType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_index_expr(&mut self, node: ast::IndexExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let base = node.base().map(|x| self.emit_expr(x)); - let index = node.index().map(|x| self.emit_expr(x)); + pub(crate) fn emit_index_expr(&mut self, node: &ast::IndexExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let base = node.base().map(|x| self.emit_expr(&x)); + let index = node.index().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::IndexExpr { id: TrapId::Star, attrs, base, index, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(IndexExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_infer_type(&mut self, node: ast::InferType) -> Label { + pub(crate) fn emit_infer_type(&mut self, node: &ast::InferType) -> Label { let label = self.trap.emit(generated::InferType { id: TrapId::Star, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(InferType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_item_list(&mut self, node: ast::ItemList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let items = node.items().map(|x| self.emit_item(x)).collect(); + pub(crate) fn emit_item_list(&mut self, node: &ast::ItemList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let items = node.items().map(|x| self.emit_item(&x)).collect(); let label = self.trap.emit(generated::ItemList { id: TrapId::Star, attrs, items, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ItemList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_label(&mut self, node: ast::Label) -> Label { - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + pub(crate) fn emit_label(&mut self, node: &ast::Label) -> Label { + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::Label { id: TrapId::Star, lifetime, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Label, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_let_else(&mut self, node: ast::LetElse) -> Label { - let block_expr = node.block_expr().map(|x| self.emit_block_expr(x)); + pub(crate) fn emit_let_else(&mut self, node: &ast::LetElse) -> Label { + let block_expr = node.block_expr().map(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::LetElse { id: TrapId::Star, block_expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LetElse, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_let_expr(&mut self, node: ast::LetExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_let_expr(&mut self, node: &ast::LetExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::LetExpr { id: TrapId::Star, attrs, expr, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LetExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_let_stmt(&mut self, node: ast::LetStmt) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let initializer = node.initializer().map(|x| self.emit_expr(x)); - let let_else = node.let_else().map(|x| self.emit_let_else(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_let_stmt(&mut self, node: &ast::LetStmt) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let initializer = node.initializer().map(|x| self.emit_expr(&x)); + let let_else = node.let_else().map(|x| self.emit_let_else(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::LetStmt { id: TrapId::Star, attrs, @@ -986,116 +1006,116 @@ impl Translator<'_> { pat, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LetStmt, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_lifetime(&mut self, node: ast::Lifetime) -> Label { + pub(crate) fn emit_lifetime(&mut self, node: &ast::Lifetime) -> Label { let text = node.try_get_text(); let label = self.trap.emit(generated::Lifetime { id: TrapId::Star, text, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Lifetime, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_lifetime_arg(&mut self, node: ast::LifetimeArg) -> Label { - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); + pub(crate) fn emit_lifetime_arg(&mut self, node: &ast::LifetimeArg) -> Label { + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); let label = self.trap.emit(generated::LifetimeArg { id: TrapId::Star, lifetime, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LifetimeArg, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_lifetime_param(&mut self, node: ast::LifetimeParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_lifetime_param(&mut self, node: &ast::LifetimeParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::LifetimeParam { id: TrapId::Star, attrs, lifetime, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LifetimeParam, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_literal(&mut self, node: ast::Literal) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_literal(&mut self, node: &ast::Literal) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let text_value = node.try_get_text(); let label = self.trap.emit(generated::LiteralExpr { id: TrapId::Star, attrs, text_value, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LiteralExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_literal_pat(&mut self, node: ast::LiteralPat) -> Label { - let literal = node.literal().map(|x| self.emit_literal(x)); + pub(crate) fn emit_literal_pat(&mut self, node: &ast::LiteralPat) -> Label { + let literal = node.literal().map(|x| self.emit_literal(&x)); let label = self.trap.emit(generated::LiteralPat { id: TrapId::Star, literal, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LiteralPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_loop_expr(&mut self, node: ast::LoopExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); + pub(crate) fn emit_loop_expr(&mut self, node: &ast::LoopExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let label = node.label().map(|x| self.emit_label(&x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::LoopExpr { id: TrapId::Star, attrs, label, loop_body, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(LoopExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_call(&mut self, node: ast::MacroCall) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); + pub(crate) fn emit_macro_call(&mut self, node: &ast::MacroCall) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let path = node.path().map(|x| self.emit_path(&x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(&x)); let label = self.trap.emit(generated::MacroCall { id: TrapId::Star, attrs, path, token_tree, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroCall, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_def(&mut self, node: ast::MacroDef) -> Label { - let args = node.args().map(|x| self.emit_token_tree(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_token_tree(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_macro_def(&mut self, node: &ast::MacroDef) -> Label { + let args = node.args().map(|x| self.emit_token_tree(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let body = node.body().map(|x| self.emit_token_tree(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::MacroDef { id: TrapId::Star, args, @@ -1104,53 +1124,53 @@ impl Translator<'_> { name, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroDef, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_expr(&mut self, node: ast::MacroExpr) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + pub(crate) fn emit_macro_expr(&mut self, node: &ast::MacroExpr) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroExpr { id: TrapId::Star, macro_call, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_items(&mut self, node: ast::MacroItems) -> Label { - let items = node.items().map(|x| self.emit_item(x)).collect(); + pub(crate) fn emit_macro_items(&mut self, node: &ast::MacroItems) -> Label { + let items = node.items().map(|x| self.emit_item(&x)).collect(); let label = self.trap.emit(generated::MacroItems { id: TrapId::Star, items, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroItems, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_pat(&mut self, node: ast::MacroPat) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + pub(crate) fn emit_macro_pat(&mut self, node: &ast::MacroPat) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroPat { id: TrapId::Star, macro_call, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_rules(&mut self, node: ast::MacroRules) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name = node.name().map(|x| self.emit_name(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_macro_rules(&mut self, node: &ast::MacroRules) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let name = node.name().map(|x| self.emit_name(&x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::MacroRules { id: TrapId::Star, attrs, @@ -1158,43 +1178,43 @@ impl Translator<'_> { token_tree, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroRules, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_stmts(&mut self, node: ast::MacroStmts) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); - let statements = node.statements().map(|x| self.emit_stmt(x)).collect(); + pub(crate) fn emit_macro_stmts(&mut self, node: &ast::MacroStmts) -> Label { + let expr = node.expr().map(|x| self.emit_expr(&x)); + let statements = node.statements().map(|x| self.emit_stmt(&x)).collect(); let label = self.trap.emit(generated::MacroStmts { id: TrapId::Star, expr, statements, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroStmts, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_macro_type(&mut self, node: ast::MacroType) -> Label { - let macro_call = node.macro_call().map(|x| self.emit_macro_call(x)); + pub(crate) fn emit_macro_type(&mut self, node: &ast::MacroType) -> Label { + let macro_call = node.macro_call().map(|x| self.emit_macro_call(&x)); let label = self.trap.emit(generated::MacroType { id: TrapId::Star, macro_call, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MacroType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_match_arm(&mut self, node: ast::MatchArm) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let guard = node.guard().map(|x| self.emit_match_guard(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_match_arm(&mut self, node: &ast::MatchArm) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let guard = node.guard().map(|x| self.emit_match_guard(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::MatchArm { id: TrapId::Star, attrs, @@ -1202,59 +1222,59 @@ impl Translator<'_> { guard, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MatchArm, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_match_arm_list(&mut self, node: ast::MatchArmList) -> Label { - let arms = node.arms().map(|x| self.emit_match_arm(x)).collect(); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_match_arm_list(&mut self, node: &ast::MatchArmList) -> Label { + let arms = node.arms().map(|x| self.emit_match_arm(&x)).collect(); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let label = self.trap.emit(generated::MatchArmList { id: TrapId::Star, arms, attrs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MatchArmList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_match_expr(&mut self, node: ast::MatchExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let match_arm_list = node.match_arm_list().map(|x| self.emit_match_arm_list(x)); + pub(crate) fn emit_match_expr(&mut self, node: &ast::MatchExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let match_arm_list = node.match_arm_list().map(|x| self.emit_match_arm_list(&x)); let label = self.trap.emit(generated::MatchExpr { id: TrapId::Star, attrs, expr, match_arm_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MatchExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_match_guard(&mut self, node: ast::MatchGuard) -> Label { - let condition = node.condition().map(|x| self.emit_expr(x)); + pub(crate) fn emit_match_guard(&mut self, node: &ast::MatchGuard) -> Label { + let condition = node.condition().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::MatchGuard { id: TrapId::Star, condition, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MatchGuard, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_meta(&mut self, node: ast::Meta) -> Label { - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_meta(&mut self, node: &ast::Meta) -> Label { + let expr = node.expr().map(|x| self.emit_expr(&x)); let is_unsafe = node.unsafe_token().is_some(); - let path = node.path().map(|x| self.emit_path(x)); - let token_tree = node.token_tree().map(|x| self.emit_token_tree(x)); + let path = node.path().map(|x| self.emit_path(&x)); + let token_tree = node.token_tree().map(|x| self.emit_token_tree(&x)); let label = self.trap.emit(generated::Meta { id: TrapId::Star, expr, @@ -1262,18 +1282,18 @@ impl Translator<'_> { path, token_tree, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Meta, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_method_call_expr(&mut self, node: ast::MethodCallExpr) -> Label { - let arg_list = node.arg_list().map(|x| self.emit_arg_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let receiver = node.receiver().map(|x| self.emit_expr(x)); + pub(crate) fn emit_method_call_expr(&mut self, node: &ast::MethodCallExpr) -> Label { + let arg_list = node.arg_list().map(|x| self.emit_arg_list(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(&x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); + let receiver = node.receiver().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::MethodCallExpr { id: TrapId::Star, arg_list, @@ -1282,17 +1302,17 @@ impl Translator<'_> { name_ref, receiver, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(MethodCallExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_module(&mut self, node: ast::Module) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let item_list = node.item_list().map(|x| self.emit_item_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_module(&mut self, node: &ast::Module) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let item_list = node.item_list().map(|x| self.emit_item_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::Module { id: TrapId::Star, attrs, @@ -1300,190 +1320,190 @@ impl Translator<'_> { name, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Module, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_name(&mut self, node: ast::Name) -> Label { + pub(crate) fn emit_name(&mut self, node: &ast::Name) -> Label { let text = node.try_get_text(); let label = self.trap.emit(generated::Name { id: TrapId::Star, text, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Name, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_name_ref(&mut self, node: ast::NameRef) -> Label { + pub(crate) fn emit_name_ref(&mut self, node: &ast::NameRef) -> Label { let text = node.try_get_text(); let label = self.trap.emit(generated::NameRef { id: TrapId::Star, text, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(NameRef, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_never_type(&mut self, node: ast::NeverType) -> Label { + pub(crate) fn emit_never_type(&mut self, node: &ast::NeverType) -> Label { let label = self.trap.emit(generated::NeverType { id: TrapId::Star, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(NeverType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_offset_of_expr(&mut self, node: ast::OffsetOfExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node.fields().map(|x| self.emit_name_ref(x)).collect(); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_offset_of_expr(&mut self, node: &ast::OffsetOfExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let fields = node.fields().map(|x| self.emit_name_ref(&x)).collect(); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::OffsetOfExpr { id: TrapId::Star, attrs, fields, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(OffsetOfExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_or_pat(&mut self, node: ast::OrPat) -> Label { - let pats = node.pats().map(|x| self.emit_pat(x)).collect(); + pub(crate) fn emit_or_pat(&mut self, node: &ast::OrPat) -> Label { + let pats = node.pats().map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::OrPat { id: TrapId::Star, pats, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(OrPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_param(&mut self, node: ast::Param) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let pat = node.pat().map(|x| self.emit_pat(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_param(&mut self, node: &ast::Param) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let pat = node.pat().map(|x| self.emit_pat(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::Param { id: TrapId::Star, attrs, pat, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Param, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_param_list(&mut self, node: ast::ParamList) -> Label { - let params = node.params().map(|x| self.emit_param(x)).collect(); - let self_param = node.self_param().map(|x| self.emit_self_param(x)); + pub(crate) fn emit_param_list(&mut self, node: &ast::ParamList) -> Label { + let params = node.params().map(|x| self.emit_param(&x)).collect(); + let self_param = node.self_param().map(|x| self.emit_self_param(&x)); let label = self.trap.emit(generated::ParamList { id: TrapId::Star, params, self_param, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ParamList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_paren_expr(&mut self, node: ast::ParenExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_paren_expr(&mut self, node: &ast::ParenExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ParenExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ParenExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_paren_pat(&mut self, node: ast::ParenPat) -> Label { - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_paren_pat(&mut self, node: &ast::ParenPat) -> Label { + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::ParenPat { id: TrapId::Star, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ParenPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_paren_type(&mut self, node: ast::ParenType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_paren_type(&mut self, node: &ast::ParenType) -> Label { + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::ParenType { id: TrapId::Star, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ParenType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_path(&mut self, node: ast::Path) -> Label { - let qualifier = node.qualifier().map(|x| self.emit_path(x)); - let part = node.segment().map(|x| self.emit_path_segment(x)); + pub(crate) fn emit_path(&mut self, node: &ast::Path) -> Label { + let qualifier = node.qualifier().map(|x| self.emit_path(&x)); + let part = node.segment().map(|x| self.emit_path_segment(&x)); let label = self.trap.emit(generated::Path { id: TrapId::Star, qualifier, part, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Path, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_path_expr(&mut self, node: ast::PathExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); + pub(crate) fn emit_path_expr(&mut self, node: &ast::PathExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let path = node.path().map(|x| self.emit_path(&x)); let label = self.trap.emit(generated::PathExpr { id: TrapId::Star, attrs, path, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PathExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_path_pat(&mut self, node: ast::PathPat) -> Label { - let path = node.path().map(|x| self.emit_path(x)); + pub(crate) fn emit_path_pat(&mut self, node: &ast::PathPat) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); let label = self.trap.emit(generated::PathPat { id: TrapId::Star, path, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PathPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_path_segment(&mut self, node: ast::PathSegment) -> Label { - let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let param_list = node.param_list().map(|x| self.emit_param_list(x)); - let path_type = node.path_type().map(|x| self.emit_path_type(x)); - let ret_type = node.ret_type().map(|x| self.emit_ret_type(x)); - let return_type_syntax = node.return_type_syntax().map(|x| self.emit_return_type_syntax(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_path_segment(&mut self, node: &ast::PathSegment) -> Label { + let generic_arg_list = node.generic_arg_list().map(|x| self.emit_generic_arg_list(&x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); + let param_list = node.param_list().map(|x| self.emit_param_list(&x)); + let path_type = node.path_type().map(|x| self.emit_path_type(&x)); + let ret_type = node.ret_type().map(|x| self.emit_ret_type(&x)); + let return_type_syntax = node.return_type_syntax().map(|x| self.emit_return_type_syntax(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::PathSegment { id: TrapId::Star, generic_arg_list, @@ -1494,27 +1514,27 @@ impl Translator<'_> { return_type_syntax, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PathSegment, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_path_type(&mut self, node: ast::PathType) -> Label { - let path = node.path().map(|x| self.emit_path(x)); + pub(crate) fn emit_path_type(&mut self, node: &ast::PathType) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); let label = self.trap.emit(generated::PathType { id: TrapId::Star, path, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PathType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_prefix_expr(&mut self, node: ast::PrefixExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_prefix_expr(&mut self, node: &ast::PrefixExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let operator_name = node.try_get_text(); let label = self.trap.emit(generated::PrefixExpr { id: TrapId::Star, @@ -1522,33 +1542,33 @@ impl Translator<'_> { expr, operator_name, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PrefixExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ptr_type(&mut self, node: ast::PtrType) -> Label { + pub(crate) fn emit_ptr_type(&mut self, node: &ast::PtrType) -> Label { let is_const = node.const_token().is_some(); let is_mut = node.mut_token().is_some(); - let ty = node.ty().map(|x| self.emit_type(x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::PtrType { id: TrapId::Star, is_const, is_mut, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(PtrType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_range_expr(&mut self, node: ast::RangeExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let end = node.end().map(|x| self.emit_expr(x)); + pub(crate) fn emit_range_expr(&mut self, node: &ast::RangeExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let end = node.end().map(|x| self.emit_expr(&x)); let operator_name = node.try_get_text(); - let start = node.start().map(|x| self.emit_expr(x)); + let start = node.start().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::RangeExpr { id: TrapId::Star, attrs, @@ -1556,79 +1576,79 @@ impl Translator<'_> { operator_name, start, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RangeExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_range_pat(&mut self, node: ast::RangePat) -> Label { - let end = node.end().map(|x| self.emit_pat(x)); + pub(crate) fn emit_range_pat(&mut self, node: &ast::RangePat) -> Label { + let end = node.end().map(|x| self.emit_pat(&x)); let operator_name = node.try_get_text(); - let start = node.start().map(|x| self.emit_pat(x)); + let start = node.start().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::RangePat { id: TrapId::Star, end, operator_name, start, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RangePat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_expr(&mut self, node: ast::RecordExpr) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let record_expr_field_list = node.record_expr_field_list().map(|x| self.emit_record_expr_field_list(x)); + pub(crate) fn emit_record_expr(&mut self, node: &ast::RecordExpr) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); + let record_expr_field_list = node.record_expr_field_list().map(|x| self.emit_record_expr_field_list(&x)); let label = self.trap.emit(generated::RecordExpr { id: TrapId::Star, path, record_expr_field_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_expr_field(&mut self, node: ast::RecordExprField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); + pub(crate) fn emit_record_expr_field(&mut self, node: &ast::RecordExprField) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); let label = self.trap.emit(generated::RecordExprField { id: TrapId::Star, attrs, expr, name_ref, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordExprField, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_expr_field_list(&mut self, node: ast::RecordExprFieldList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node.fields().map(|x| self.emit_record_expr_field(x)).collect(); - let spread = node.spread().map(|x| self.emit_expr(x)); + pub(crate) fn emit_record_expr_field_list(&mut self, node: &ast::RecordExprFieldList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let fields = node.fields().map(|x| self.emit_record_expr_field(&x)).collect(); + let spread = node.spread().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::RecordExprFieldList { id: TrapId::Star, attrs, fields, spread, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordExprFieldList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_field(&mut self, node: ast::RecordField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_record_field(&mut self, node: &ast::RecordField) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::RecordField { id: TrapId::Star, attrs, @@ -1636,71 +1656,71 @@ impl Translator<'_> { ty, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordField, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_field_list(&mut self, node: ast::RecordFieldList) -> Label { - let fields = node.fields().map(|x| self.emit_record_field(x)).collect(); + pub(crate) fn emit_record_field_list(&mut self, node: &ast::RecordFieldList) -> Label { + let fields = node.fields().map(|x| self.emit_record_field(&x)).collect(); let label = self.trap.emit(generated::RecordFieldList { id: TrapId::Star, fields, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordFieldList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_pat(&mut self, node: ast::RecordPat) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let record_pat_field_list = node.record_pat_field_list().map(|x| self.emit_record_pat_field_list(x)); + pub(crate) fn emit_record_pat(&mut self, node: &ast::RecordPat) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); + let record_pat_field_list = node.record_pat_field_list().map(|x| self.emit_record_pat_field_list(&x)); let label = self.trap.emit(generated::RecordPat { id: TrapId::Star, path, record_pat_field_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_pat_field(&mut self, node: ast::RecordPatField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let name_ref = node.name_ref().map(|x| self.emit_name_ref(x)); - let pat = node.pat().map(|x| self.emit_pat(x)); + pub(crate) fn emit_record_pat_field(&mut self, node: &ast::RecordPatField) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let name_ref = node.name_ref().map(|x| self.emit_name_ref(&x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::RecordPatField { id: TrapId::Star, attrs, name_ref, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordPatField, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_record_pat_field_list(&mut self, node: ast::RecordPatFieldList) -> Label { - let fields = node.fields().map(|x| self.emit_record_pat_field(x)).collect(); - let rest_pat = node.rest_pat().map(|x| self.emit_rest_pat(x)); + pub(crate) fn emit_record_pat_field_list(&mut self, node: &ast::RecordPatFieldList) -> Label { + let fields = node.fields().map(|x| self.emit_record_pat_field(&x)).collect(); + let rest_pat = node.rest_pat().map(|x| self.emit_rest_pat(&x)); let label = self.trap.emit(generated::RecordPatFieldList { id: TrapId::Star, fields, rest_pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RecordPatFieldList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ref_expr(&mut self, node: ast::RefExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_ref_expr(&mut self, node: &ast::RefExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let is_const = node.const_token().is_some(); let is_mut = node.mut_token().is_some(); let is_raw = node.raw_token().is_some(); @@ -1712,108 +1732,108 @@ impl Translator<'_> { is_mut, is_raw, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RefExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ref_pat(&mut self, node: ast::RefPat) -> Label { + pub(crate) fn emit_ref_pat(&mut self, node: &ast::RefPat) -> Label { let is_mut = node.mut_token().is_some(); - let pat = node.pat().map(|x| self.emit_pat(x)); + let pat = node.pat().map(|x| self.emit_pat(&x)); let label = self.trap.emit(generated::RefPat { id: TrapId::Star, is_mut, pat, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RefPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ref_type(&mut self, node: ast::RefType) -> Label { + pub(crate) fn emit_ref_type(&mut self, node: &ast::RefType) -> Label { let is_mut = node.mut_token().is_some(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::RefType { id: TrapId::Star, is_mut, lifetime, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RefType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_rename(&mut self, node: ast::Rename) -> Label { - let name = node.name().map(|x| self.emit_name(x)); + pub(crate) fn emit_rename(&mut self, node: &ast::Rename) -> Label { + let name = node.name().map(|x| self.emit_name(&x)); let label = self.trap.emit(generated::Rename { id: TrapId::Star, name, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Rename, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_rest_pat(&mut self, node: ast::RestPat) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_rest_pat(&mut self, node: &ast::RestPat) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let label = self.trap.emit(generated::RestPat { id: TrapId::Star, attrs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RestPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_ret_type(&mut self, node: ast::RetType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_ret_type(&mut self, node: &ast::RetType) -> Label { + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::RetType { id: TrapId::Star, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(RetType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_return_expr(&mut self, node: ast::ReturnExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_return_expr(&mut self, node: &ast::ReturnExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::ReturnExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ReturnExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_return_type_syntax(&mut self, node: ast::ReturnTypeSyntax) -> Label { + pub(crate) fn emit_return_type_syntax(&mut self, node: &ast::ReturnTypeSyntax) -> Label { let label = self.trap.emit(generated::ReturnTypeSyntax { id: TrapId::Star, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(ReturnTypeSyntax, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_self_param(&mut self, node: ast::SelfParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_self_param(&mut self, node: &ast::SelfParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let is_mut = node.mut_token().is_some(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::SelfParam { id: TrapId::Star, attrs, @@ -1822,58 +1842,58 @@ impl Translator<'_> { name, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(SelfParam, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_slice_pat(&mut self, node: ast::SlicePat) -> Label { - let pats = node.pats().map(|x| self.emit_pat(x)).collect(); + pub(crate) fn emit_slice_pat(&mut self, node: &ast::SlicePat) -> Label { + let pats = node.pats().map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::SlicePat { id: TrapId::Star, pats, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(SlicePat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_slice_type(&mut self, node: ast::SliceType) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_slice_type(&mut self, node: &ast::SliceType) -> Label { + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::SliceType { id: TrapId::Star, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(SliceType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_source_file(&mut self, node: ast::SourceFile) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let items = node.items().map(|x| self.emit_item(x)).collect(); + pub(crate) fn emit_source_file(&mut self, node: &ast::SourceFile) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let items = node.items().map(|x| self.emit_item(&x)).collect(); let label = self.trap.emit(generated::SourceFile { id: TrapId::Star, attrs, items, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(SourceFile, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_static(&mut self, node: ast::Static) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let body = node.body().map(|x| self.emit_expr(x)); + pub(crate) fn emit_static(&mut self, node: &ast::Static) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let body = node.body().map(|x| self.emit_expr(&x)); let is_mut = node.mut_token().is_some(); let is_static = node.static_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::Static { id: TrapId::Star, attrs, @@ -1884,35 +1904,35 @@ impl Translator<'_> { ty, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Static, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_stmt_list(&mut self, node: ast::StmtList) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let statements = node.statements().map(|x| self.emit_stmt(x)).collect(); - let tail_expr = node.tail_expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_stmt_list(&mut self, node: &ast::StmtList) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let statements = node.statements().map(|x| self.emit_stmt(&x)).collect(); + let tail_expr = node.tail_expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::StmtList { id: TrapId::Star, attrs, statements, tail_expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(StmtList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_struct(&mut self, node: ast::Struct) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let field_list = node.field_list().map(|x| self.emit_field_list(x)); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + pub(crate) fn emit_struct(&mut self, node: &ast::Struct) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let field_list = node.field_list().map(|x| self.emit_field_list(&x)); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Struct { id: TrapId::Star, attrs, @@ -1922,32 +1942,32 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Struct, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_token_tree(&mut self, node: ast::TokenTree) -> Label { + pub(crate) fn emit_token_tree(&mut self, node: &ast::TokenTree) -> Label { let label = self.trap.emit(generated::TokenTree { id: TrapId::Star, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TokenTree, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_trait(&mut self, node: ast::Trait) -> Label { - let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(x)); - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_trait(&mut self, node: &ast::Trait) -> Label { + let assoc_item_list = node.assoc_item_list().map(|x| self.emit_assoc_item_list(&x)); + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let is_auto = node.auto_token().is_some(); let is_unsafe = node.unsafe_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Trait { id: TrapId::Star, assoc_item_list, @@ -1960,19 +1980,19 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Trait, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_trait_alias(&mut self, node: ast::TraitAlias) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + pub(crate) fn emit_trait_alias(&mut self, node: &ast::TraitAlias) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::TraitAlias { id: TrapId::Star, attrs, @@ -1982,115 +2002,115 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TraitAlias, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_try_expr(&mut self, node: ast::TryExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_try_expr(&mut self, node: &ast::TryExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::TryExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TryExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_expr(&mut self, node: ast::TupleExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let fields = node.fields().map(|x| self.emit_expr(x)).collect(); + pub(crate) fn emit_tuple_expr(&mut self, node: &ast::TupleExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let fields = node.fields().map(|x| self.emit_expr(&x)).collect(); let label = self.trap.emit(generated::TupleExpr { id: TrapId::Star, attrs, fields, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TupleExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_field(&mut self, node: ast::TupleField) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let ty = node.ty().map(|x| self.emit_type(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_tuple_field(&mut self, node: &ast::TupleField) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let ty = node.ty().map(|x| self.emit_type(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::TupleField { id: TrapId::Star, attrs, ty, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TupleField, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_field_list(&mut self, node: ast::TupleFieldList) -> Label { - let fields = node.fields().map(|x| self.emit_tuple_field(x)).collect(); + pub(crate) fn emit_tuple_field_list(&mut self, node: &ast::TupleFieldList) -> Label { + let fields = node.fields().map(|x| self.emit_tuple_field(&x)).collect(); let label = self.trap.emit(generated::TupleFieldList { id: TrapId::Star, fields, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TupleFieldList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_pat(&mut self, node: ast::TuplePat) -> Label { - let fields = node.fields().map(|x| self.emit_pat(x)).collect(); + pub(crate) fn emit_tuple_pat(&mut self, node: &ast::TuplePat) -> Label { + let fields = node.fields().map(|x| self.emit_pat(&x)).collect(); let label = self.trap.emit(generated::TuplePat { id: TrapId::Star, fields, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TuplePat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_struct_pat(&mut self, node: ast::TupleStructPat) -> Label { - let fields = node.fields().map(|x| self.emit_pat(x)).collect(); - let path = node.path().map(|x| self.emit_path(x)); + pub(crate) fn emit_tuple_struct_pat(&mut self, node: &ast::TupleStructPat) -> Label { + let fields = node.fields().map(|x| self.emit_pat(&x)).collect(); + let path = node.path().map(|x| self.emit_path(&x)); let label = self.trap.emit(generated::TupleStructPat { id: TrapId::Star, fields, path, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TupleStructPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_tuple_type(&mut self, node: ast::TupleType) -> Label { - let fields = node.fields().map(|x| self.emit_type(x)).collect(); + pub(crate) fn emit_tuple_type(&mut self, node: &ast::TupleType) -> Label { + let fields = node.fields().map(|x| self.emit_type(&x)).collect(); let label = self.trap.emit(generated::TupleType { id: TrapId::Star, fields, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TupleType, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_type_alias(&mut self, node: ast::TypeAlias) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_type_alias(&mut self, node: &ast::TypeAlias) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let is_default = node.default_token().is_some(); - let name = node.name().map(|x| self.emit_name(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + let name = node.name().map(|x| self.emit_name(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::TypeAlias { id: TrapId::Star, attrs, @@ -2102,30 +2122,30 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TypeAlias, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_type_arg(&mut self, node: ast::TypeArg) -> Label { - let ty = node.ty().map(|x| self.emit_type(x)); + pub(crate) fn emit_type_arg(&mut self, node: &ast::TypeArg) -> Label { + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::TypeArg { id: TrapId::Star, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TypeArg, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_type_bound(&mut self, node: ast::TypeBound) -> Label { - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); + pub(crate) fn emit_type_bound(&mut self, node: &ast::TypeBound) -> Label { + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); let is_async = node.async_token().is_some(); let is_const = node.const_token().is_some(); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); let label = self.trap.emit(generated::TypeBound { id: TrapId::Star, generic_param_list, @@ -2134,29 +2154,29 @@ impl Translator<'_> { lifetime, ty, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TypeBound, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_type_bound_list(&mut self, node: ast::TypeBoundList) -> Label { - let bounds = node.bounds().map(|x| self.emit_type_bound(x)).collect(); + pub(crate) fn emit_type_bound_list(&mut self, node: &ast::TypeBoundList) -> Label { + let bounds = node.bounds().map(|x| self.emit_type_bound(&x)).collect(); let label = self.trap.emit(generated::TypeBoundList { id: TrapId::Star, bounds, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TypeBoundList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_type_param(&mut self, node: ast::TypeParam) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let default_type = node.default_type().map(|x| self.emit_type(x)); - let name = node.name().map(|x| self.emit_name(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_type_param(&mut self, node: &ast::TypeParam) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let default_type = node.default_type().map(|x| self.emit_type(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::TypeParam { id: TrapId::Star, attrs, @@ -2164,31 +2184,31 @@ impl Translator<'_> { name, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(TypeParam, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_underscore_expr(&mut self, node: ast::UnderscoreExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); + pub(crate) fn emit_underscore_expr(&mut self, node: &ast::UnderscoreExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); let label = self.trap.emit(generated::UnderscoreExpr { id: TrapId::Star, attrs, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(UnderscoreExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_union(&mut self, node: ast::Union) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let record_field_list = node.record_field_list().map(|x| self.emit_record_field_list(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); - let where_clause = node.where_clause().map(|x| self.emit_where_clause(x)); + pub(crate) fn emit_union(&mut self, node: &ast::Union) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let record_field_list = node.record_field_list().map(|x| self.emit_record_field_list(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); + let where_clause = node.where_clause().map(|x| self.emit_where_clause(&x)); let label = self.trap.emit(generated::Union { id: TrapId::Star, attrs, @@ -2198,62 +2218,62 @@ impl Translator<'_> { visibility, where_clause, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Union, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_use(&mut self, node: ast::Use) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let use_tree = node.use_tree().map(|x| self.emit_use_tree(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_use(&mut self, node: &ast::Use) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let use_tree = node.use_tree().map(|x| self.emit_use_tree(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::Use { id: TrapId::Star, attrs, use_tree, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Use, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_use_tree(&mut self, node: ast::UseTree) -> Label { - let path = node.path().map(|x| self.emit_path(x)); - let rename = node.rename().map(|x| self.emit_rename(x)); - let use_tree_list = node.use_tree_list().map(|x| self.emit_use_tree_list(x)); + pub(crate) fn emit_use_tree(&mut self, node: &ast::UseTree) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); + let rename = node.rename().map(|x| self.emit_rename(&x)); + let use_tree_list = node.use_tree_list().map(|x| self.emit_use_tree_list(&x)); let label = self.trap.emit(generated::UseTree { id: TrapId::Star, path, rename, use_tree_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(UseTree, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_use_tree_list(&mut self, node: ast::UseTreeList) -> Label { - let use_trees = node.use_trees().map(|x| self.emit_use_tree(x)).collect(); + pub(crate) fn emit_use_tree_list(&mut self, node: &ast::UseTreeList) -> Label { + let use_trees = node.use_trees().map(|x| self.emit_use_tree(&x)).collect(); let label = self.trap.emit(generated::UseTreeList { id: TrapId::Star, use_trees, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(UseTreeList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_variant(&mut self, node: ast::Variant) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); - let field_list = node.field_list().map(|x| self.emit_field_list(x)); - let name = node.name().map(|x| self.emit_name(x)); - let visibility = node.visibility().map(|x| self.emit_visibility(x)); + pub(crate) fn emit_variant(&mut self, node: &ast::Variant) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); + let field_list = node.field_list().map(|x| self.emit_field_list(&x)); + let name = node.name().map(|x| self.emit_name(&x)); + let visibility = node.visibility().map(|x| self.emit_visibility(&x)); let label = self.trap.emit(generated::Variant { id: TrapId::Star, attrs, @@ -2262,53 +2282,53 @@ impl Translator<'_> { name, visibility, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Variant, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_variant_list(&mut self, node: ast::VariantList) -> Label { - let variants = node.variants().map(|x| self.emit_variant(x)).collect(); + pub(crate) fn emit_variant_list(&mut self, node: &ast::VariantList) -> Label { + let variants = node.variants().map(|x| self.emit_variant(&x)).collect(); let label = self.trap.emit(generated::VariantList { id: TrapId::Star, variants, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(VariantList, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_visibility(&mut self, node: ast::Visibility) -> Label { - let path = node.path().map(|x| self.emit_path(x)); + pub(crate) fn emit_visibility(&mut self, node: &ast::Visibility) -> Label { + let path = node.path().map(|x| self.emit_path(&x)); let label = self.trap.emit(generated::Visibility { id: TrapId::Star, path, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(Visibility, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_where_clause(&mut self, node: ast::WhereClause) -> Label { - let predicates = node.predicates().map(|x| self.emit_where_pred(x)).collect(); + pub(crate) fn emit_where_clause(&mut self, node: &ast::WhereClause) -> Label { + let predicates = node.predicates().map(|x| self.emit_where_pred(&x)).collect(); let label = self.trap.emit(generated::WhereClause { id: TrapId::Star, predicates, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(WhereClause, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_where_pred(&mut self, node: ast::WherePred) -> Label { - let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(x)); - let lifetime = node.lifetime().map(|x| self.emit_lifetime(x)); - let ty = node.ty().map(|x| self.emit_type(x)); - let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(x)); + pub(crate) fn emit_where_pred(&mut self, node: &ast::WherePred) -> Label { + let generic_param_list = node.generic_param_list().map(|x| self.emit_generic_param_list(&x)); + let lifetime = node.lifetime().map(|x| self.emit_lifetime(&x)); + let ty = node.ty().map(|x| self.emit_type(&x)); + let type_bound_list = node.type_bound_list().map(|x| self.emit_type_bound_list(&x)); let label = self.trap.emit(generated::WherePred { id: TrapId::Star, generic_param_list, @@ -2316,17 +2336,17 @@ impl Translator<'_> { ty, type_bound_list, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(WherePred, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_while_expr(&mut self, node: ast::WhileExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let condition = node.condition().map(|x| self.emit_expr(x)); - let label = node.label().map(|x| self.emit_label(x)); - let loop_body = node.loop_body().map(|x| self.emit_block_expr(x)); + pub(crate) fn emit_while_expr(&mut self, node: &ast::WhileExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let condition = node.condition().map(|x| self.emit_expr(&x)); + let label = node.label().map(|x| self.emit_label(&x)); + let loop_body = node.loop_body().map(|x| self.emit_block_expr(&x)); let label = self.trap.emit(generated::WhileExpr { id: TrapId::Star, attrs, @@ -2334,47 +2354,47 @@ impl Translator<'_> { label, loop_body, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(WhileExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_wildcard_pat(&mut self, node: ast::WildcardPat) -> Label { + pub(crate) fn emit_wildcard_pat(&mut self, node: &ast::WildcardPat) -> Label { let label = self.trap.emit(generated::WildcardPat { id: TrapId::Star, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(WildcardPat, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_yeet_expr(&mut self, node: ast::YeetExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_yeet_expr(&mut self, node: &ast::YeetExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::YeetExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(YeetExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } - pub(crate) fn emit_yield_expr(&mut self, node: ast::YieldExpr) -> Label { - let attrs = node.attrs().map(|x| self.emit_attr(x)).collect(); - let expr = node.expr().map(|x| self.emit_expr(x)); + pub(crate) fn emit_yield_expr(&mut self, node: &ast::YieldExpr) -> Label { + let attrs = node.attrs().map(|x| self.emit_attr(&x)).collect(); + let expr = node.expr().map(|x| self.emit_expr(&x)); let label = self.trap.emit(generated::YieldExpr { id: TrapId::Star, attrs, expr, }); - self.emit_location(label, &node); + self.emit_location(label, node); emit_detached!(YieldExpr, self, node, label); - self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens()); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); label } diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 6c3cf6ea6a07..fb9f082c05e5 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,4 @@ -lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 4005dd5213c45c8f96e12f08d8a6a7532692d68a3cd9e3a0fd55d7f982a92f23 ec753357ac4fc76706acc0cf1d9208e63a0688e480ece52e4314d7dc2a743de5 +lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 30cc4d8c1d5ab734b6524b568cf6e3558887fad373e8a7e9e91860de780c6f79 9acc58125d5514c236d5e34fa429fcd8e267fad4743cc329243fe8fcf84fabba lib/codeql/rust/elements/Abi.qll 4c973d28b6d628f5959d1f1cc793704572fd0acaae9a97dfce82ff9d73f73476 250f68350180af080f904cd34cb2af481c5c688dc93edf7365fd0ae99855e893 lib/codeql/rust/elements/ArgList.qll 661f5100f5d3ef8351452d9058b663a2a5c720eea8cf11bedd628969741486a2 28e424aac01a90fb58cd6f9f83c7e4cf379eea39e636bc0ba07efc818be71c71 lib/codeql/rust/elements/ArrayExpr.qll a3e6e122632f4011644ec31b37f88b32fe3f2b7e388e7e878a6883309937049f 12ccb5873d95c433da5606fd371d182ef2f71b78d0c53c2d6dec10fa45852bdc @@ -187,7 +187,6 @@ lib/codeql/rust/elements/internal/AwaitExprConstructor.qll 44ff1653e73d5b9f6885c lib/codeql/rust/elements/internal/BecomeExprConstructor.qll ba073aaa256cb8827a0307c3128d50f62b11aac0b1f324e48c95f30351a9b942 3a787ded505c3158fa4f4923f66e8ecdcb7b5f86f27f64c5412dc32dca031f18 lib/codeql/rust/elements/internal/BinaryExprConstructor.qll 7f9b17757f78b9fb7c46e21d2040a77fa50083bef4911c8464991c3d1ad91d87 a59390cd8e896c0bfbdc9ba0674e06d980ffcefa710fbc9886be52ed427e9717 lib/codeql/rust/elements/internal/BlockExprConstructor.qll 438337c807645e98a01440f3f4610d68b0567ba15c8f51dc43bf5a30c9af3696 48ce7a546910c884619762349b8ada9836284f8008298fdb0070a38f7ddf25a0 -lib/codeql/rust/elements/internal/BlockExprImpl.qll 36ac09e4a6eeeec22919b62b1d004bdb5bb2527e67932c308aec383a770768d6 3b4b2a2014f6fe075c63a2d633b297566b548ef2e4343cadf067a9edbcadc876 lib/codeql/rust/elements/internal/BoxPatConstructor.qll 153f110ba25fd6c889092bfd16f73bb610fa60d6e0c8965d5f44d2446fcd48a2 9324cf0d8aa29945551bf8ab64801d598f57aab8cd4e19bcd4e9ef8a4a4e06eb lib/codeql/rust/elements/internal/BreakExprConstructor.qll 356be043c28e0b34fdf925a119c945632ee883c6f5ebb9a27003c6a8d250afd9 bb77e66b04bb9489340e7506931559b94285c6904b6f9d2f83b214cba4f3cfd5 lib/codeql/rust/elements/internal/CallExprBaseImpl.qll d2749cc1a9d7ee8bf7f34b6c3e0238a576a68e439a8c10a503c164ff45ffcbeb ffc7b0a8841945fe6736b0e1aed7d9ed69185db03dee2b16da121325b39397c7 @@ -263,7 +262,6 @@ lib/codeql/rust/elements/internal/MacroCallConstructor.qll 707fee4fba1fd632cd001 lib/codeql/rust/elements/internal/MacroDefConstructor.qll 382a3bdf46905d112ee491620cc94f87d584d72f49e01eb1483f749e4709c055 eb61b90d8d8d655c2b00ff576ae20c8da9709eeef754212bc64d8e1558ad05ce lib/codeql/rust/elements/internal/MacroDefImpl.qll f26e787ffd43e8cb079db01eba04412dbf32c338938acf1bc09a2f094bbdfdfe 044f43bc94fe4b6df22afae32e9f039d1d0d9e85ad9f24b6388be71211c37ce5 lib/codeql/rust/elements/internal/MacroExprConstructor.qll b12edb21ea189a1b28d96309c69c3d08e08837621af22edd67ff9416c097d2df d35bc98e7b7b5451930214c0d93dce33a2c7b5b74f36bf99f113f53db1f19c14 -lib/codeql/rust/elements/internal/MacroExprImpl.qll 92dd9f658a85ae407e055f090385f451084de59190d8a00c7e1fba453c3eced4 89d544634fecdbead2ff06a26fc8132e127dab07f38b9322fa14dc55657b9f1a lib/codeql/rust/elements/internal/MacroItemsConstructor.qll 8e9ab7ec1e0f50a22605d4e993f99a85ca8059fbb506d67bc8f5a281af367b05 2602f9db31ea0c48192c3dde3bb5625a8ed1cae4cd3408729b9e09318d5bd071 lib/codeql/rust/elements/internal/MacroItemsImpl.qll 76fd50a1f27336e9efc6d3f73ef4d724f19627cadbaa805d1e14d2cfa4f19899 40c0e512090050b39b69128730f4f4581f51ffd3c687fb52913617bd70a144e9 lib/codeql/rust/elements/internal/MacroPatConstructor.qll 24744c1bbe21c1d249a04205fb09795ae38ed106ba1423e86ccbc5e62359eaa2 4fac3f731a1ffd87c1230d561c5236bd28dcde0d1ce0dcd7d7a84ba393669d4a @@ -441,7 +439,7 @@ lib/codeql/rust/elements/internal/generated/ContinueExpr.qll e2010feb14fb6edeb83 lib/codeql/rust/elements/internal/generated/DynTraitType.qll da9dce6347ce385d7468986cf6960b4a6787f017ff5632612a7216ed62bdc9c9 9d0b37221674b597a21bfacbdfc7e08b54381a6adacfe544df154481cd562ed8 lib/codeql/rust/elements/internal/generated/Element.qll fb483b636180c699181c8aff83bc471b2c416206694f7028c671015918547663 542d1b9ae80c997974c94db3655887186df3921a8fa3f565eaf292dcfdac3c4c lib/codeql/rust/elements/internal/generated/Enum.qll 4f4cbc9cd758c20d476bc767b916c62ba434d1750067d0ffb63e0821bb95ec86 3da735d54022add50cec0217bbf8ec4cf29b47f4851ee327628bcdd6454989d0 -lib/codeql/rust/elements/internal/generated/Expr.qll 5fa34f2ed21829a1509417440dae42d416234ff43433002974328e7aabb8f30f 46f3972c7413b7db28a3ea8acb5a50a74b6dd9b658e8725f6953a8829ac912f8 +lib/codeql/rust/elements/internal/generated/Expr.qll fbb0c5032a03a329ca883bce9ef4b709284e6036e685d576aee859515ad98c76 b6909a9f3fc4f9490912b465c36cc7a3dee667079abc3eac45e89fa5f0f6bb35 lib/codeql/rust/elements/internal/generated/ExprStmt.qll d1112230015fbeb216b43407a268dc2ccd0f9e0836ab2dca4800c51b38fa1d7d 4a80562dcc55efa5e72c6c3b1d6747ab44fe494e76faff2b8f6e9f10a4b08b5b lib/codeql/rust/elements/internal/generated/ExternBlock.qll c292d804a1f8d2cf6a443be701640c4e87410662921e026d3553bc624fd18abd ba6fae821d2502a97dec636e2d70476ad0693bc6185ae50e8391699529bd0ee0 lib/codeql/rust/elements/internal/generated/ExternCrate.qll 35fea4e810a896c1656adb4682c4c3bc20283768073e26ae064189ce310433c8 fc504dff79ba758d89b10cd5049539fbc766ee9862ff495066cea26abf0b5e0b @@ -509,8 +507,8 @@ 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 ce24b8f8ecbf0f204af200317405724063887257460c80cf250c39b2fdf37185 e7c87d37e1a0ca7ea03840017e1aa9ddb7f927f1f3b6396c0305b46aeee33db6 lib/codeql/rust/elements/internal/generated/ParenType.qll 9cc954d73f8330dcac7b475f97748b63af5c8766dee9d2f2872c0a7e4c903537 c07534c8a9c683c4a9b11d490095647e420de0a0bfc23273eaf6f31b00244273 -lib/codeql/rust/elements/internal/generated/ParentChild.qll 52186ab2aead10bbbaab401272afff0b8247b0050064123d0e45d972ec501dee f082318c0da678845763d6070283872b94b59425fbaa305582b5fe72da03e7e6 -lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 +lib/codeql/rust/elements/internal/generated/ParentChild.qll cd52c48e5e44b05549f223e817e419b272f0eb3c45e6be0bb7a7375f02227559 f082318c0da678845763d6070283872b94b59425fbaa305582b5fe72da03e7e6 +lib/codeql/rust/elements/internal/generated/Pat.qll 6c029c4e23e46a036f048f729fdbd72da8afcb567f1789ec4506d782466f4584 ffac4e2844567abbc27212e2fe39208ed1c42781ee7d87b1b41816b878826057 lib/codeql/rust/elements/internal/generated/Path.qll 4c1c8e840ed57880e574142b081b11d7a7428a009f10e3aa8f4645e211f6b2e0 989668cf0f1bdee7557e2f97c01e41d2a56848227fed41477833f5fc1e1d35f6 lib/codeql/rust/elements/internal/generated/PathExpr.qll 2096e3c1db22ee488a761690adabfc9cfdea501c99f7c5d96c0019cb113fc506 54245ce0449c4e263173213df01e079d5168a758503a5dbd61b25ad35a311140 lib/codeql/rust/elements/internal/generated/PathExprBase.qll d8218e201b8557fa6d9ca2c30b764e5ad9a04a2e4fb695cc7219bbd7636a6ac2 4ef178426d7095a156f4f8c459b4d16f63abc64336cb50a6cf883a5f7ee09113 @@ -522,7 +520,7 @@ lib/codeql/rust/elements/internal/generated/PtrType.qll 40099c5a4041314b66932dfd lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590 ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590 lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 lib/codeql/rust/elements/internal/generated/RangePat.qll efd93730de217cf50dcba5875595263a5eadf9f7e4e1272401342a094d158614 229b251b3d118932e31e78ac4dfb75f48b766f240f20d436062785606d44467b -lib/codeql/rust/elements/internal/generated/Raw.qll b23d3574920376ca7c52858d6ad2ea6670640812422329f9c44f699075c16d89 13c1a199de3e71f012bdab0fa2b982f1c92f95536b07bbbe816e680a0e64ad71 +lib/codeql/rust/elements/internal/generated/Raw.qll be536da4258ad82bd85ef22281ab7f2d3cea363f1ebd299e8537df57dcd68f06 434793427f320f4d83514b3ccc1a3e4a278c751184035b4512d088179425fc42 lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40 lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1 lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0 @@ -588,15 +586,17 @@ test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871b test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52 test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684 test/extractor-tests/generated/ArgList/ArgList_getArg.ql c07c946218489a0ad5fe89e5fd4a7f0ad84a73dc2e650729f48a340cb133be84 ff2382c0693f47e5eb1290aca325290e60c19d877b25b1d7e2ee96009f5fe934 -test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql fd4e504678714c99a987069e5013bda04313573cec2bab31b74bc4559bb73d7f 0b63120b61964a215ec451793a1b5aef525882484ad62193d7635b5a370881d4 +test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql 8006eecbf5d8a666febdcfe099a42d7b365a2203b4d95d5132caa76f95c2fc80 c582669fc7f586ee086d881d69440f428087ea3a1d4c2c22adf386890903bcae test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql ce143c8b416c35270cca839848baf6d8cda74251f3717314e0f332fcb74a9259 c86d282153feee3facad752ed0fc1638be0cbaafca4ec620f337ad61b694cade test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql e8b7e24db6fc6098131fea1053430920b2e2f33d2aa52b10d2ff29b9efd70a88 a52b6b2476104695b395d86bbd1a99068372ca56989ea94b150055e664ba034a +test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.ql c645c21df891de799b609cb3bcee090e3fe616a98297051f7bc3edd9eac02a5e 15a79e1a20b1db9c0fd8e2e71563e73636e1ab949e417074389416fa6a4925e7 test/extractor-tests/generated/ArrayType/ArrayType.ql d781ea647d60218777261d82230bd85f989a4768a043e736d268363b5a777390 b5c7fa0aa1b8b1f3a82b8af7254bf20efd3477bba83ad53530959d1733636604 test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql b6a250873bc2d553219b8301a15bd19a4044f590085992c532a800bf3ab744cb 5e6b9dbbe2d3ea7f6fa3fba4811517a528d5eb58169b69d1b9113e1508c6e627 test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql 1c23613e509ada3ffc1f727d0db7c5955dbc104d886fe5f9d8f39413b54d16b0 a662d234e1e54159d931a873f20ed8953d9b27778c7a6ca898f86b31d1dae0cc -test/extractor-tests/generated/AsmExpr/AsmExpr.ql 1273efcd8aab7de2a04ead74075d25c8a22afc9f0e6a3fb4322e3508a2cb6f84 cdd5389a269c048f56afaf3e93a0fb076ba1f445d6dcfc6621d8a324cac2f421 +test/extractor-tests/generated/AsmExpr/AsmExpr.ql 83dcd1df6c63fe554822dfeb5d821c81f48d505695c7caff66d8f76d1311a72b bfd71f27bd53fa689a825131f9e755edc5d7b847024e3a43a5c62843a385369d test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql 93e644147ddc4de00c882c32d17ff3c22822e116b67361d52217619153b7d4c4 4c0c3f72707f41e879426ff75c5631e9283dc0507316740bec22216c5feb04e9 test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql 4a37390e948fe336b592342b0c2b63afeac3000ce1416f5875cc9b0ce5a826e4 d32df64ddc3ce1b0536018ddcff30a24d9099c67e6bcbe9a4693ffb6e478361d +test/extractor-tests/generated/AsmExpr/AsmExpr_getType.ql 652a89fb672b7be270e0a214fe10b8cbc04a41b98358c642af7aa36bf1fcd403 e6852c6a7abdc493bf43e31e1d0a86e2ece5b1c2306ac809a92b4d623fe77f9b test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql 2bf498a1e318cadf66f9f6341b41247c09070dbbab6d15ed4d3cd986a7f7da85 24d62bb3cb0a97c0e6180221e6cc8be86d9616021f8ef53175bbeabb5151a613 test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql c81e25fd7885f13c0500e8f9b84195876e70f2b25ad604046f497818226c8542 62ac0e7c82da169c248e4f9e0e8f866d2f4e599b03a287c2bd407b95a5d9efc8 test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql 4d20375752c000aab8d2e4988fff1a5c95689d114c8d63f37b389b95000ee873 957e360a4eeefa2536958770a7d150fda610d1d45c09900dbe66e470e361e294 @@ -608,43 +608,52 @@ test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTy.ql 6973aa12e00987 test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getTypeBoundList.ql 7e006ac8e8574c66a312b1389c7a85a83561b946e060575cc7234ef523b1a3ba 6123b375796c014a0bc96d39877b3108c13eff34536aa68402bda85511da18da test/extractor-tests/generated/Attr/Attr.ql 028ac0a387f674205c5ef903238872ab1b6b7e2201f58c31776cdf740daf437c cb56a22887e0737d28034b39d7c3fb37a3d6eb1f34ce3d112bcea2f0affb3b13 test/extractor-tests/generated/Attr/Attr_getMeta.ql f1e2df2bc987c670e31b454ab51b3028efc1018fbed2298a8c97f554eb1862f0 a9115ced872c89edc398bda1cbd54068f9065debc14ea5ac887ba13ad8f4e3d8 -test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql 8dcc94a553fbddf17dfc619fbac563a9dc4fc6029860e10703e9ae9765d9ab66 52e7f0c98e6ab5dcef04b2ab5283ecde76e61a2297aa2080d16998f93dc923b7 +test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql be0157c19dba62b3f7bbfebcb76a83e5a5b61da604ef661908536273ce6f585e 82e6d4d8e2810ec3aa37e6d910e66d621af7e7035a524dd22c216ef3a36d17b5 test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql c5ee1fc6017c4432a59dfec7d10d32681bd23f98cac70bbe65bc2aec8a680f3a ce6cf93c6305e6585c9d452bcc23af9dc8cbe2c872d2af5238a54c85df2071ee test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql 143158284c8b7cc40fd2fa47c0bcf3f137ecd080b830476faca0c950b97c797c 0c9f64ce70cccf90fff7e7e9602f8ffdf68535d113914aab24f6450505b61d10 -test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b095c87b128d667f76585cda671173808130df6d094ac7ebcf89fc345d7908f4 aa3f1caba1cc7a40a0903f91458807e9ac9e8e9f3f5688acea061cebc8a2ff07 +test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.ql a8be182a7d828fb5818a00d9e047b2213148c9382da644a4d35f504541d9fbed ecac87dfc22a9a6bb4aa11bf34e3f36d429c8d60fe8d2f9a140b6bd5d692be28 +test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 19a374ef0fd0fe55223da2dbb085b1486ddc5f8508a647182fa098a45e6559ea 5d4612168c4c839dd75518acb392f07ff6d24afc6505800796ebca5fd1e0c621 test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql 88c6342cfaa4d199a6c9f69612d3f783ad48c715c729f4909d563e032ee50be3 d90c139b22bf7350f9ae32b8b3ae6c19bf190fb2b4d5154b845f2252090fde32 test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql c8942270a2ff2b1b5c9ee4319185f0a8f1f8acb39eb825029c02a2457a8cd641 fb4c910ab658404869506718e18a5c8097629ba56111329552abbf429df0a324 -test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql 1c36f72c679d4c0e7d0653bf5f7b70e3019d68e9115645f6db61f6fccabfeaf4 890b64875e44a73eec0d7c905de3363fffec3468171de628652b5066a4306bed +test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.ql bf0fa5e039e43dff11eed5099acc5c1b4266a787aa66a9307ba61492ba3cda84 e32e898a6b9f4921c3fd8ec951deb9253e9e4af7494f2826c4cec9515538ba49 +test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql fdcb484121cf1b2b6c99f079dde1b76604afad5904edc0c23db8a3379f92f434 4d1dd9813cd1edd40e945cd81be042696c852b95bc463da89161666aae3bc716 test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql 26d985ac4b668d78d2fefc6b5a37f2dc334e4c5f8511dd14b89014e2ef5c3b07 4546dae1816b2618f8d881e0ca8eaa851c768fcd994f3edd3285a3880878177c test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql c3f19d8a60066ad6b1810291a669473c75b659cd2f6ac3ab9ed3db2203d4145c c05c5e0226e30f923155669ffc79cfe63af1ca464e8dfc85888dda5f7049711b test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql 33612159be1c111e3306009d0b04579450fc962a81119b6ea4e255d3c409b401 1a0995b298f50242217cfef81dca8ac978e19e06f90a5f4caadcb6f84460fec2 test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql 3bcd36b678e87d5c29a43b69c54c80468a89aefa7e69481b48158ae794a53160 a629dc1472b3f6fd7c608ff760e83d8e1363db81dfe9a4b2968690c2ba4925ca -test/extractor-tests/generated/BlockExpr/BlockExpr.ql 19caa39aaa39356219dda740b7152f85e43a4f8d6295841e2c535c7e3bda7a5a bd668574ba41021e758e391d4790b871439badb2486ccf6a5aaf788ad6ae4142 +test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.ql 2229aba1319d7c6669982af485da055a4a72eb927542697d3c88d785136502a0 cf328d3769e56999c0e123795844a77c7877c2b8db0a16003c6f7d994d5006e6 +test/extractor-tests/generated/BlockExpr/BlockExpr.ql 0ab2838d87350d2eabb6798c395b3d0e7d498b3ea4e44c154ed7e0947b97be97 9facb42d6f9887c174242db466ed217bfb2dc2492af56607531afe97cfa56c4a test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql 15d4d9853d3262ce6ec629c075c60a76eb112dcafe34b71df0e09b39282223cf 792c498bc7079bb5b93034b8a87db3b275a591d78954e844821aeacffe4258ea test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql de3c28a2677ed71ebd95207aa43ce270765f7f556283f095f1f6296622b80cbc 414ebbb2bfbe4350f933fc3d3636b49a6bb8242e200180780caf95ab8523adb0 test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql 8c391dfeb69bd92c547a2417bf231cc960a8f34845802722214294728772316a f3e847fa594e9d9cf25d09a0396a10176aad1100c1977a24756ff6287a79e69e -test/extractor-tests/generated/BoxPat/BoxPat.ql 228052e5303f523797994232b1b762c26ce29bd1e38b49d496ccf04090b97c00 6501e816dcb8839b9b72c6ab231db449b8f7779e5faadf5a8c5be81f53eb001f +test/extractor-tests/generated/BlockExpr/BlockExpr_getType.ql 92b7dd3bf148b4a22e4da88fc7ab6c6a1b044d45ac2d43b101d35a53adfb930d eb40173c0f4bd2a786c4ae6e4bd22b28d512339e49af171732c34324412e5967 +test/extractor-tests/generated/BoxPat/BoxPat.ql aeaa73d2f6c89a1c3ed0885179341cda89b2bfbb47ec8a014cd9a36f0ec2625e dcbb8d6ebe30d02a456ab405e70a87695a7d8fbbf3ad97b0a198dbb0691c187a test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql 7372e29737d968820108211612ed880f3e13084992419f5b52eaddf4bbfa874c dda2f412fcfba756604c03b766e9bbd17e6c2141b2d355fc0e33ec33573ffadb -test/extractor-tests/generated/BreakExpr/BreakExpr.ql cdde2855d98f658187c60b9edc2aa36b1853270f3c183a37b11801ff24d22a8b 687ec032ff86ee21952d2b95dde93fba026a09f6f39a284fbc6e9b42647d80e3 +test/extractor-tests/generated/BoxPat/BoxPat_getType.ql 1244fc336d27731e46a1d047c8fa54005581807aebca332a68edaaef6a85517f 91fb017b34e3a921133dd29e50bacc2c3783bc584192289676c8d6f456d14a05 +test/extractor-tests/generated/BreakExpr/BreakExpr.ql 9fd729a555bffad07741d78e30c585b745435970417c55a693d567e778753d81 8ee7ee28722d6c21c90ddaf440957411c2d8e088089e2650e051b55daaf39bc8 test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql c7690a9aab1923bf3c2fb06f0a1d441d480b3c91ee1df3a868bbbd96c4042053 c592dd077fb6e22b2d6ddcaec37da2c5a26ba92d84f5d1ae4c78a615b9013765 test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql 0358f4fe6a66da56177703cf0e991042729c5e34ae8b6dccbb827f95fe936c72 1cb2dd778c50e19fe04c5fdf3a08a502635ea8303e71ff38d03aa7dc53213986 test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql ad83cc0db3c0f959fef6bb7ce0938d241a877e8cf84d15fb63879be2fe47238c 240b2fe2156b763d3a82fc64159615872db65b65ffb9ba2f3fd5d1ebd6c60f34 -test/extractor-tests/generated/CallExpr/CallExpr.ql 69d88b3c799f6e81fe53fe04724ed6c1cbfbfcc21023dd62aed3a3f852c6a2aa 0caa94802919d30bf2749d8a1c58545163e2b1cad5490f19158b5e5063806443 +test/extractor-tests/generated/BreakExpr/BreakExpr_getType.ql 9efc002e39583f4118aeb76e025cc6950d6e5fe444b95d94eeef347128b79b99 e7821934f5140a6b876db4deeed7a3d9db8d58341d85c121b6c62370ed85d153 +test/extractor-tests/generated/CallExpr/CallExpr.ql 3197feb491dc2fbdc1a38b421e1dadfe20b2fa2110be92fac5ddb86731eb171d 664448b9ddf6904fe15a92f5d3858c4b08a50231da9c994df5aab9316a1f419c test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql b022e7b6b6db9932e787e37b7760c6a09c91140a0368940374a2c919688e0488 c20849c96b53c96f6f717efff5e8b4c0e900c0ef5d715cfbaf7101c7056ad8f4 test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql 1ace458070875b9ff2c671c2ee18392ea7bf6e51b68ee98d412c8606e8eb8d33 4c35da8255d2975cef4adee15623662441bb8f2e1d73582e4c193d1bc11cc1b5 test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql f680f04423ece282c459d5908e5aa0bc43ca072ff0e605587dfa94210da1d06d f8a709015b8317b8e2dcf3b3ee9370e2c3a655ef7e3c6034b1b90f4d75ebdda2 -test/extractor-tests/generated/CastExpr/CastExpr.ql 2ffb22ebc6e47953a49162488b3605d36b9d89330b1e71187066e7bbc40a22ad 7621a39d49f573b9862b9a4e1021d53205670ee59b49e4d81128637926f76485 +test/extractor-tests/generated/CallExpr/CallExpr_getType.ql 49166add82ff23b69abaddb52a952cedf453521ad0d1ee55618b7e6c2a493251 e21f93129542f92c6d91a2c310f45e2a6f99931c8c4e4dc85b0d8fed6ae97d4d +test/extractor-tests/generated/CastExpr/CastExpr.ql 7fdcb925dd234f2e7768c3bf5154e8da26a77dacc634f97a2a3c3a2a828087f1 40747190f061bac5041f0aa043d596c8b476e24ea0d8f809d5f7b64ca71f59b5 test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql 5d5d98172e495cdb8b5cea9d6588c4c245107b441464e3ffd6c27668af11ab4e 5820bf083aaa4c3275004a2cd9eeecc4b45ab96916cbc0655a1b42611c540715 test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql c37186b8f3e3dab8ae28c0da7263ff7272c40501beb16736ec0fb8990d285e22 59d50d7349234afcf84986b7570db9dcd342e16812f7c46199d4736cdfa5462d test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql ad5d6e260e1495ba360bd2ade3b60f09705a86a08d618acf8c4aff342c8ee200 c02c1dc65ba9160bc28827e40473915de5403bdc91c16d9d8b6778aa97314a1b +test/extractor-tests/generated/CastExpr/CastExpr_getType.ql c943e7bb0462e63f0896f838c14ebeab96d74cedca0c4226cacaad4afc60fec4 9cc7016215bda18469a0183403e7094a48bc10d67b3f27901382367b9844be86 test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql 42516df87ac28c814d65f6739b2ede6eaa41c505d64756a3b8c7e0ca79895230 8b840f92ec033a4ef5edbe52bed909d8be0fffddf6d3e4bfaf9a8bc174fa2f2c test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql 71010c43a78a7abe8e63c94353f4b7eb97aca011755d200e7087467c1e3b7a68 2c834328f783ec5032544a692f7e23975bac0228b52b9f8fde46ef46a5f22a5f -test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql f25f9b32e5c0cd61e4b75053a5af4640a08b115ea5a4310ab95df450f6dfe1c4 9b731218857fa16776e29bce084c2ec1526b24e15f46d4f24047917d77d4646a +test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 3155fe11a9fd8c88766315015b203075b56c41953a47e9e134046327bb2cd741 0effea1e7f3e84aff0838d8b90b36bb9b75b4b16246340c6c40666cde8195c70 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getAttr.ql f7f803afa4e2a5976c911fdf8a91ec607c2f998e22531b9c69a63d85579e34c3 1296acd0fb97e1484aa3f1d5ba09d18088001186f3ba5821eb3218a931ca0d54 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getBody.ql 22a973a61274e87620e38338b29beef395818b95a88e2261fff197f7a78a8f76 bd28ed426e4d07823044db869aa8022dc81e8599d156e3e0e7cd49be914a1f36 test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql cbfcf89b8efb5cb9b7bfbea26b5a78b3d4c7994cbf03d5ca60b61ee1b5cb4be5 621431277732ef79c585cb0b7199c49b14c597ee6b594a70d9e6966a09d40a9f test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql 68ce501516094512dd5bfed42a785474583a91312f704087cba801b02ba7b834 eacbf89d63159e7decfd84c2a1dc5c067dfce56a8157fbb52bc133e9702d266d test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql c95bc7306b2d77aa05a6501b6321e6f1e7a48b7ad422ba082635ab20014288ae fe72d44c9819b42fff49b9092a9fb2bfafde6d3b9e4967547fb5298822f30bc3 +test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.ql abafbe62e8512d41f00c4fbb4bbe6dd88dfac7d22d12f978536dcf06df93e624 15cc5e71dd3708e40044dc9d77b7f45dc84c0e2f0f103e3acd96786ec957fcc0 test/extractor-tests/generated/Comment/Comment.ql 5428b8417a737f88f0d55d87de45c4693d81f03686f03da11dc5369e163d977b 8948c1860cde198d49cff7c74741f554a9e89f8af97bb94de80f3c62e1e29244 test/extractor-tests/generated/Const/Const.ql fff4c81591a1f5e691f2ad242e8fe8e2b0d6b0f974e312a2a0bdb7de80b985b5 0cdf3eba64d5d66d5069727bad08cbeb1266456f61b3967d27f542412cf56d47 test/extractor-tests/generated/Const/Const_getAttr.ql bd6296dab00065db39663db8d09fe62146838875206ff9d8595d06d6439f5043 34cb55ca6d1f44e27d82a8b624f16f9408bae2485c85da94cc76327eed168577 @@ -656,16 +665,18 @@ test/extractor-tests/generated/Const/Const_getTy.ql bf9abfd2be9d22193bc6be9916c7 test/extractor-tests/generated/Const/Const_getVisibility.ql de6b2e9d887316e279b45fab7887980ca7d93fd32c2259f3a06de2b6e2957c12 2f135cdbbb84b43d282131edb7eb4df6caba61bf7421881a49d4679f0f44f661 test/extractor-tests/generated/ConstArg/ConstArg.ql f1422b216eb45819ff41f0c19e0f88aa184ddd3fa2984ba22ec46df398147fc3 d2e4f367848c2bc4f6aef51c1dd8180035c39919430082c83f18a3f324228df3 test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql 317fd83ad51acc3ff3dfab71ebb1385b67d49404c1d7b3804a8ca3c099b84e99 91ecf5ebbfc1aab286dce708680f0be97417f9755676db7479fa6836e50be845 -test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql ee17b4deba9c503130e3ce565102bc8e181770efcb1309be9c822f0a7ba6fc17 638ed17b5c009e71b31f580c4060ba763bd4208c3984b6c032183ab46a4dd43d +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql 25b32ee2fb70644b6da4edb48cafde036db89b845cc8e48725a93b129b1db466 3d0f98863415a5fb5a7538d7632cc3c768b834d8b5690fd4bc8cbd46697b003f test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql cc06e762e1652e467c7cf02c34f17c621fb3a938f294ee527fa04ed78c8701ec f863f8f6bfc9d169b585ae56b4e4ac0fc1603fd14775450e950cca4d5ea28e8a +test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.ql dd2174aba0f8ee4426fd6392bd3f360bb6d65add82b9412996a8314ce99662b4 247aa476be331c9a3e18143103b7cc6ccb2dc06a0c41ebd8a30754b1690a76e7 test/extractor-tests/generated/ConstParam/ConstParam.ql 1c2ec1a00ffc754ade227536f3efe789cdbee714fa003abff5e0221b9b53d08a 6f24ef0b280b18603a6efd217c691c4249898be95dafd5ff5a586cb2f2ecdf40 test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql af8949f1ea039a562a3b3561185a85f7f8a871bf27dba0580782f81c62b6508c 2874783b84fdce47b809f953e02c36473cad6a2d3dd1c0f1a9cb14a3e28b9c30 test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql 021630468422c30e7aa623bdf4e97f3076e68087991723c624922b1ee608d173 9fd78738cfd0455be2c655852f6c618e901af80c6b6791396d9683c118a44e91 test/extractor-tests/generated/ConstParam/ConstParam_getName.ql e2e9b75dd7ce501793efce75079aabd3851b91aa4d437972693bacd7b04859d8 4d2326b39af870a2ef8b37448f78395cdb5c1e94df88f137ef71f8fd3548cd8e test/extractor-tests/generated/ConstParam/ConstParam_getTy.ql ad3f1ee12d3ba8e851856cf3e75566791218e40649a8bf54b1f08764c8b5feec f4ed7f40f83f59df8dd2f53073f73ee94c2ef6f6f77963f81ac8c62dd88244c9 -test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 971ccb238aec663855745fa2669d5f8973a4e6c76bacdf0deaf23522ec1cf80c 4e3ceb4c4cd833ad8311bb02e5cda18163082e341cd8a3def60734a53cca8929 +test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql f02196d914d700a6ae63cd5f021fcaf6884b3c6cf9f0a74e679cbf158eee1c56 422b0fcf63f05a67ce78768e34cbc3be8f211ce8039c6ded0c8c19a4b208dbc8 test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql acb261869d3b3c65e364e7b6fbd7afdf5305806d4417b05044beed9a81e66ea4 af35ce0aee87ddc7a0cd34be4a480c619940d036d5cecce0e4e1fcd75b7c553e test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql 39dae9872d92fa9b15343c93da545c2b0e15b4f27f2296c200fd4611b68858d5 52a209022e3b83260b4ef5513ffbcc1ca1f7c21bad2c721a0d3698793d2161d2 +test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.ql d6b82e64dd23d5d88341c14265487fa5fd43f187ef02a6ae198abf4ff8e67198 1f67a4878738ccda4b3bb56de9a95fb1be5090cc324967b2701f752421cf417f test/extractor-tests/generated/DynTraitType/DynTraitType.ql db4cf318a76eaedaa9a9deaf11009a24497b88557439c2e0560290efe950ca05 e0fcd8be6bbe2e305ac16e25925a50206f36cba25cb0bc4c7e9b166d2ee6b19f test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql d04a1836c28f14884771f5868d5a3f551d9251c3c3a6c07a4dd9dbef6b764875 9c590f1ecd375c22fbc0ad5657243ef40fe7a7684ee81e57e7efbb73544d4398 test/extractor-tests/generated/Enum/Enum.ql ed518d828d8e2e4790849284de1d0d5e728dbc2fe5e9f187e8ebfa2d503efd5a 7092b963eb133371e1cbc09d45f8c2308d7093523140b351d67073a8d258643e @@ -695,20 +706,22 @@ test/extractor-tests/generated/ExternCrate/ExternCrate_getVisibility.ql d2c13d0c test/extractor-tests/generated/ExternItemList/ExternItemList.ql 7596986006fe1084815ad47b7e1cb77c4062a8c0432c2e6234c974b8632ead40 23c30ea01dba595e6e1bfa384f3570d32df4310ec2e8dbeb9a20afab9edbbfc0 test/extractor-tests/generated/ExternItemList/ExternItemList_getAttr.ql f9560f441efc30b65ad88e3d3d323f40cbe3862c04a9c044fb2ca16edac4f3ca 18138daa285c73d40e5caa03791a6133b44429bff4e14cb1f223d487cf1648b4 test/extractor-tests/generated/ExternItemList/ExternItemList_getExternItem.ql 2f20a6a4f41babb7340dd366a8145bb7cc9ceb75812af8a6316d076a4eac3428 4f613a73604dfe3f0d32343156e8ae30f4295186ac4ef2f733c772e96821ffc4 -test/extractor-tests/generated/FieldExpr/FieldExpr.ql 1b45da610feb62cee42f7a3866e6a9396c1e4c880ce1a82f09892047090e1322 980eae97fdeff4b8b3b264080a3cbb320d3a2530960fa185108f665b4c2aee29 +test/extractor-tests/generated/FieldExpr/FieldExpr.ql 5027c60e8dcbc4825109b0dfc760932f0dd6acf0dc339be291cab8eba7ce0139 a339aa2079e2e47af84f70e21e012c8eebc4d0138bcaabdc9d7eeffd36f1d88b test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql 609c4f1e275d963cf93a364b5ec750de8cb4790abdaa710cb533ff13ab750a4e 8c2aa84b1ea6ef40a7ee39a2168baf1b88323bfbc6b9f184e7b39631765a48dd test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql 57df2d733faf3e3e30ae106d8423aab612ab0ddf8659da008e384130cf1e8023 1e240bee8e83dc26f78d2c55464ca1fb88d773691d47aee9a2182c90f57eb8f1 test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql 8631f5e8bdd72443a1ee3d667ee9136a51ad49dfd206612a36b79686da1beb19 692aef607108b8e3eaa78b8c915f2fd1d310905f8fea770b9694722a9a2a6232 +test/extractor-tests/generated/FieldExpr/FieldExpr_getType.ql 6d76728e620ddb835416b71eca8d1365b74a226ccc83f86c285d65f270ee36a8 49152c37b7615d49c0f69e79f5b2655eae805e840b37cc32039dd5056fe5957b test/extractor-tests/generated/FnPtrType/FnPtrType.ql 50b76d678582cd0b8d7cc4a7658d5009d660bafcec6bd9968c9f60a7f547fa23 5bbf2504eb835e231a2355bc5d099322423c49c6af371902cf20a150e360cea7 test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql de1706382c2980c02dbdd295e0a2320c992afa3f19af0c2378b9980a7cd0c481 a3fa36711949d9d5ac53cc5dd39cb19b397c3f2e47c1d457df470c6e5142f9be test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql 9ea393acf37919e2fd1bbc16e738440e00a56552bf80baef9bfd2a9a405afb93 3b4237b22eea569cef0081eb3ea16b2d0f01f8f070f21e16390267e9cbe0cf57 test/extractor-tests/generated/FnPtrType/FnPtrType_getRetType.ql 57f662e4778e1bf4103f061bb8085def0708528f94045c9ff4a95ce802fff13d 924b924c7d766458e956afa0963e6eb1bfc083e5f9aeae64cf2d08929f79612c -test/extractor-tests/generated/ForExpr/ForExpr.ql 1f8b7a9bbe7a8c077864be64dc51d91ec267c4f34f1cad80fc79902cc0af04ff ae999fb206b04ed81fa08bdd7617cbfe932c5e4109285e10108613cdebba8f7a +test/extractor-tests/generated/ForExpr/ForExpr.ql 8e0729427102ef3cf34551be72f99c01214f4569aa62ffd984a339f6d566ef91 11afd8c5c0c05ac7638c0d7b7d07d1d883df5ffe49a88583f20aaf57c18cdcb8 test/extractor-tests/generated/ForExpr/ForExpr_getAttr.ql d3399b7453e10ff48efc79ec38dd9b6e06bb472b9c39f559242d003e7f63b1d9 ba37e6bf129e1c2f9094e093bbfbf41864f2cb7725a64334f9443270dafdbfdc test/extractor-tests/generated/ForExpr/ForExpr_getIterable.ql 90a6540f8a91cfe3ed1bdde1e680786ce5a00edbb797a8fe70bcc0507c438fcc 65c67ad5890aa502628ee73efd26bcbd4597a8bdfc9839233ede9e26393638f8 test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql ce90da75e040f448d524187357f3ceededba72407a84c1dc8e1498ed9788044d 0e23d43e0b3412fe90c6a5a4331f8da85eebe19e05b8c7d9710056857280797b test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql 21657e470752bd83e05e176c2ca9371ba0f7ca3d1f97f764a42dff3caeb46ff2 0cafad7adf79ce90f475465b4a144e6529c6345504282b1ba3c6a12ff2e99892 test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql 1e0205a9b3a58fd2ddba49ef1b13a82c812519604d4c5bc02f23cbb6ce960016 d00efc63d714b1c76e4b0a67195d4e605f43a1e49d469f4f18bfa18d12280b63 +test/extractor-tests/generated/ForExpr/ForExpr_getType.ql 31a1d233a25fdd3b96bc8642d2a96e610295a24874504840091ff4a3cdf20745 d18dba6b41162031df6b255837ee54c7ea55ad534ece8fe388498ef7f28bd66a test/extractor-tests/generated/ForType/ForType.ql ba930d0c4fe52d57449ce4025b1c3e49c688afc5ef18ee8ac1ed7a9fd3eb8d41 08e9aa0301a942f6f9564ddeddc69606f3e2916e1b551cc56ae3b6048c56ce61 test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql e25cd79737bbae92d8f417c6bbf6fb8ae660976b8005cd91d0900c7076fdd827 b1e32b7e3ca9f29a4564f83e37ae53de6baf04837a393e6dedc64a01cc7d10e8 test/extractor-tests/generated/ForType/ForType_getTy.ql e932d3412828bb83afc42e2dc1a4cbe9fcf25ec9a9617ec138722f834091a61a 298fc9df34b2cb436c8f180c4d229341ee4a73e3c451b905f017f32a6f65056c @@ -716,14 +729,16 @@ test/extractor-tests/generated/FormatArgsExpr/Format.ql 25268dd7ad2a58b071c3a381 test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg.ql a521903c73f79e2616f7b8ef76790e11cbf432f8437825d52d117da232022b9e 4cb195d09ecb51e5bbd5c1c069ec1720f74fc074efc88b0f5c07cfc140167775 test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getExpr.ql 7e1a7f902fb661660760d2a2f3f4cb6818a0c9f5b5061ede6ae80223774e4e09 8a50f64cba6f56320631206c801160201e3c98e74367bb035d689baaa9b4e411 test/extractor-tests/generated/FormatArgsExpr/FormatArgsArg_getName.ql 0e2f24388d516e14d195957163a2d5d97029c9e11a83ca71cf69e00ecc0bb2a8 dab2969f5ae6a15ec331c0152e7c116d1ee2c3d073b2d4da59ffbcb83404c65f -test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql 7b6f09b23d0dffa19b8dddf7f5cfe53068f8a8e5279e235c6d54e60616bd0822 47db74f035770ce708a00355acbfd4ae99152b7eb29cf28001985806a4efe5aa +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql a3aa59481a053f0c2eab5bff07768c095565ffc0efd31b70b1c135f7a3897138 081b2eaa880836e9bc9cf0578d79a0fea2de078da31935ad98c1baf93502e47f test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getArg.ql 8f692486be1546b914b17abdff4a989dfbaa889bfa1fc44597f4357806c1a1dd da9fd237e31e9c8dd0ef0c3c968157815b87d3e8dcdfd74674c988ce2ab6d270 test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql 1f9bf1344f942e65c3a3591b6ae04d3f5a2a1a65459bce0d976698de7d8a5958 02acb861d8ab4d32cf144c589881a888c3da5e2ade27e8c85fec3ae45219bb3b test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql 02d3fad540700966488b24c62dcf200548154a2f10f578ee2995d8c4ebe32287 cccfe779b9804c2bb968a2b1f54da8a72393805c2c8b31d7160e8538f2f335f2 test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql c912ac37275cbe7b3b29607bed1a3190c80779436422c14a475113e1bfd91a54 ef90f67a9b952a38ce557b1afbf0b5ce8551e83ddfaad8309a0c9523e40b5ea7 +test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.ql 5a3ab20d40eefb2335a43654280c8f4f9abd60a47c224f1be63fcbea6846f524 e9866c797815cd347a283c6713309a630c842e7d00abcb561386f43115d270a3 test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql 7a7ee3a3322b4af8cb3b525cfed8cc9719d136ea80aa6b3fb30c7e16394dd93f 5aa8a77d7741b02f8ceb9e5991efa4c2c43c6f1624989218990e985108dae535 test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql 7bd4ec3dde2ef0463585794101e6cc426c368b0e4ab95fbb1f24f8f0a76cf471 e7b01e8b21df5b22c51643e2c909c6fc4ca96fda41b3290c907ba228abe8669b -test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql 2793ba1ff52182dab992d82d3767a000928f6b2fbfdb621349cafc183f0d2480 c3777d03214f7feb9020de3ce45af6556129e39e9b30d083de605b70ab9a0a12 +test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql d892667f003f0e304244993296a26efae8f3452287eef5176a0f29b367c6647c 16fa1ffb7f5a159009bf9740b94bfdcec1716325c7012a845a71dbc2ff3f8c23 +test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.ql 7596fabc6fb77d8c9c9b642306fad57cf2be276afc15914de6e45705a3ac6186 0e8aa6f09a5f0bd8b3c8c37ebf1002725387caf452afb9d5213c1bde3ea6070f test/extractor-tests/generated/FormatArgsExpr/Format_getArgument.ql 26d592398a17795427b5b6b51ff4a013ee15c31443e732a000baca5f2e65acca 7940a864b84b89e84d7fb186599cb8b6bcbead7141c592b8ab0c59fcd380d5fb test/extractor-tests/generated/Function/Function.ql c1c2a9b68c35f839ccd2b5e62e87d1acd94dcc2a3dc4c307c269b84b2a0806e6 1c446f19d2f81dd139aa5a1578d1b165e13bddbaeab8cfee8f0430bced3a99ab test/extractor-tests/generated/Function/Function_getAbi.ql e5c9c97de036ddd51cae5d99d41847c35c6b2eabbbd145f4467cb501edc606d8 0b81511528bd0ef9e63b19edfc3cb638d8af43eb87d018fad69d6ef8f8221454 @@ -741,15 +756,17 @@ test/extractor-tests/generated/GenericArgList/GenericArgList.ql 2d3e37da2c02a88e test/extractor-tests/generated/GenericArgList/GenericArgList_getGenericArg.ql 7f92dc62d814c39bc50dfd46c359540261fe433fcad1752ea2fe139a05071183 9863976c97c1b7c07d5d18d8ffee798b1c1b0223784a61066ee2c9ffc46c4979 test/extractor-tests/generated/GenericParamList/GenericParamList.ql 5d04af9be32c5f8bdf9ec679b0acbabd58ff01a20f5543a0c7d4fe5c5773ebba 7e86c4d3ed64b9ef2f928abd22b593d72131862321096722df5150b5202a4a28 test/extractor-tests/generated/GenericParamList/GenericParamList_getGenericParam.ql 7866ed49ebfca1cc1fffeec797329a592f52b4431a5d259aeb7120a7f4961c44 16d89dd05d9db1b1997f801d9e5ba2dd9389d13a3031c730414f3daf5fb7b12f -test/extractor-tests/generated/IdentPat/IdentPat.ql 1e61edbdff611193bbb497eeba8c35043e1d1c6d3359903be58382b1c95e39e4 6f3a288cc12ee24a9ff21ca2fe544838d66f6481e60539cf7d4a473e628e3c3f +test/extractor-tests/generated/IdentPat/IdentPat.ql 4e0484f4fe3a42e91acb4701f9510fa94ea964b575f951126dd29fdbf00cd0fc d8bf0d8dcc762870fcc6ffe3eb7fe18f0d9fbf2ab05710a1314e731db38c9cbb test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql 02607c8c616dc94152777390f912fc1e6bb420cc3ea687397e31392848942aa7 aeb10434577815d9a9f0f45a1a448656323f05d5321ff07d435ca4a449527d53 test/extractor-tests/generated/IdentPat/IdentPat_getName.ql b96a3dbca1bade052cad294d95f95504665ad0b14c7f5f9f8083486d0ee64026 28c851703250c25b518024add1052d3204271db3f89eddf862d9a1e122ee6eb0 test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql fea604fee0db39f83a3dadb4583cb53123c63351282bc3387b84f90477be19cb ef2e620ade30e0225f6bf1c84982d1b8f949ee0c2ced5edbd00e5547e0a81a7c -test/extractor-tests/generated/IfExpr/IfExpr.ql 1401ba0ed88e27d24e5dc3911bfcc2aee3e0f3da30981866bfec2c71c238e6b9 2bd7abeb5ab28418eb4155206696356cc484ed83705a3a215e0d779b632a521c +test/extractor-tests/generated/IdentPat/IdentPat_getType.ql 9b28427bd41f8a0c0b4f1ab48bf49fe77e9b247c3be23849d874a673377b0a2d 11e77ebc48ec89057985bceddf871c2fd250b2edad437070e1456a42d41ead0d +test/extractor-tests/generated/IfExpr/IfExpr.ql dbfc528c976557c8a291e5ff7cda70d60e591a586fe3ea72a3b4807140286223 aae3699691486b37949337da959872adbdf853dc5b19225bb9662615f6ca061e test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql f5872cdbb21683bed689e753ebe1c49cded210188883a5f846ab79c0b2147e1b 6cb3a47778c3116ee95f7aeac0e2dd640bbf0c07f8b65236e9040e139f02e5fb test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql 5bab301a1d53fe6ee599edfb17f9c7edb2410ec6ea7108b3f4a5f0a8d14316e3 355183b52cca9dc81591a09891dab799150370fff2034ddcbf7b1e4a7cb43482 test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 8674cedf42fb7be513fdf6b9c3988308453ae3baf8051649832e7767b366c12f e064e5f0b8e394b080a05a7bccd57277a229c1f985aa4df37daea26aeade4603 test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql 0989ddab2c231c0ee122ae805ffa0d3f0697fb7b6d9e53ee6d32b9140d4b0421 81028f9cd6b417c63091d46a8b85c3b32b1c77eea885f3f93ae12c99685bfe0a +test/extractor-tests/generated/IfExpr/IfExpr_getType.ql 2479094046a4b972f79bb352e456b64584a2999853c5fd30087b2596c74161ec f614ab8a5c53fff8c665b2e29ff5bb36d5dc4deaa469773b675d43122f7df559 test/extractor-tests/generated/Impl/Impl.ql c473ab1d919fc56b641684b9eb7ba0e65defe554e1bb2fa603b8246a896aa574 16f2f7d8456aee81b395bf8e44fcf0562cfa44294fa03e4f85f3b06f5ff1c57f test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql cf875361c53c081ac967482fd3af8daf735b0bc22f21dcf0936fcf70500a001a 0ad723839fa26d30fa1cd2badd01f9453977eba81add7f0f0a0fcb3adb76b87e test/extractor-tests/generated/Impl/Impl_getAttr.ql 018bdf6d9a9724d4f497d249de7cecd8bda0ac2340bde64b9b3d7c57482e715b cd065899d92aa35aca5d53ef64eadf7bb195d9a4e8ed632378a4e8c550b850cd @@ -762,10 +779,11 @@ test/extractor-tests/generated/Impl/Impl_getVisibility.ql 2497bb8c867297e4c39847 test/extractor-tests/generated/Impl/Impl_getWhereClause.ql 269d4b0639db28a7535b2d745b11cda0885da7369f9cf4c4973a6ccc20c9960b c4baf89f68a173c1415baf90ddd9195e29784997a5ce45a36171485f6bb44c03 test/extractor-tests/generated/ImplTraitType/ImplTraitType.ql ec1474d83239bf546fcace59188d7ea42f64345b92cf2364117da05f1827fa55 7d352e1cb65bb80c479c7eb90da08745e51252a7e7fd20e33d892b351b5304e1 test/extractor-tests/generated/ImplTraitType/ImplTraitType_getTypeBoundList.ql dfb41cb9140f96bad398278294ecf20909c0fbc32b361c3dfc97aef2b8b9a5a8 17c9e4687345a5a788b01fcd708e700195ca28524467a3144708f1dc4c6471e5 -test/extractor-tests/generated/IndexExpr/IndexExpr.ql 0a93213b755faaab84b7eccb5b8f3d8f8ba87910ad661f194e06917722dbf6a8 46497b3e92523c6c015373fe122678846618b45412b903323ff3644e37f2c52d +test/extractor-tests/generated/IndexExpr/IndexExpr.ql aadd070040874d08d11782afbc61cad008c1fad557836dcb3a1d53b521cd2a54 c88d674634595b33a11e93eb8d3f6cd541317e32e634af8587e07b541511244b test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql 360dbf8e7d69c691a1f4c9bb0aaa7860a6b0f09b21a1d1a6db908ec7a7d7561a e50b942f7592cb944f607bd64f8e4d4abac30bdc53f73b4dc851e689dce61be9 test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql 841cacda1a1cd976229f2bd18dcee4315506105c2cb3789c30a7539fd6d49d0c 37a92e9151f10cf971b24f5af6e2ca6dccf87b6e0e0b2237a0564f97719a0d66 test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql 1aa934524dd44009297ef89a657d1ba99304f6590514a0b0b51b2769780f8c20 a42f25640f0331318bbc8f44af133095580b8947309628511bf0b3675149506a +test/extractor-tests/generated/IndexExpr/IndexExpr_getType.ql c8fc9fdf7973c5b17ae3e0cd9ab87995b6a65486ba5574b95fdd39d27fdf46db 245b8704634bc86ce7264ccea3c5727e471fb0197d7fcf359b7ee900400be31d test/extractor-tests/generated/InferType/InferType.ql ee94ff7a5d84299fdd6e52583fb2f548cff364cd3b5fe385707a2da8958bf641 9532163987d0c9f11456790d8c5a8249cb02f13526911bcfd4fc726db2e1aaef test/extractor-tests/generated/ItemList/ItemList.ql 6c1c8ef6da0fce64b1a5edbec98fe18910b0ecc390d1219cc08124ab51b13bf6 e94e5c8d1639c1ed2ba543a521a57a026e15ea6b339b6c6d4409dd30ae67a51f test/extractor-tests/generated/ItemList/ItemList_getAttr.ql 24d7a764d4f8997bb77e93c21e6e5ba7256ed11657bd6479bf42458b8e89b52f a6b4df0cc6bf79ab3f98c93eabbbd3aaf11ec2506a0e894fa1f51be90191d71c @@ -774,10 +792,11 @@ test/extractor-tests/generated/Label/Label.ql 6a92a27d615dd9c380cb9d889eecf827fc test/extractor-tests/generated/Label/Label_getLifetime.ql 3d6ddc3b44182e6432e938d5c1c95e0281575e320d517e431f6bad7748efb93e 56d07e485cb5e4263443eb5a0d62d7d4456bb0c2748331b371e519bfe14d3b81 test/extractor-tests/generated/LetElse/LetElse.ql bdf2b17d5efe6b9cb5bb4fcfe854a5fcd72443d39ae1e7981d2a0459c481e394 a14a611d0783ae38d631600c2bde7409f4e739ba2f284314b90ec9a21c23ab3a test/extractor-tests/generated/LetElse/LetElse_getBlockExpr.ql 32c21ad843884944738a735f01e272032a347d1860fa6d27d17652c549f941b0 2bfd8a5e3d42eb1c73eb679ada847dd29f2f0657a0ad8ef15da126e54fff5ef5 -test/extractor-tests/generated/LetExpr/LetExpr.ql a25072a00cfe1242dc846b38199c000ed7217d33fdd50d2763237fdfda7b9449 8c9367af79d9fbc98ed2fe62450929fa876512f1c999615b5c1ecff082fdc7bc +test/extractor-tests/generated/LetExpr/LetExpr.ql 291e32127f18b5711c0db07114dbbe7750f0f9ca54d82243c0a6f981d334643b 8166309665b5aaa624fba8f3992ae76d413ce0070d3e6ab3e3b23cbb1b716eb5 test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql 911b143afebaa0a487b13d533f089c5b0eaf336a44a4cab42147c284338484ba 625c91fb6d8c2e3a9f13e5679cc0cd29329c6c2b213d2e1191e23db2b65841dd test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql ccabfaa15cfc8685e86cb950cb62b7f2fec278f28906ab34deb97b308f160cc4 e0574537d47a77f1be85090970f3e1263858174479002fd4de3f85b777ee4336 test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql bc0363f77bc2ba583619ab7d309293ace0ed6a851bfb9b886f75729f96eb40a8 bc0cd9233b7904d8cc7f9021377120f5f4bcc5c7aa28b1b55f17bc738c434d78 +test/extractor-tests/generated/LetExpr/LetExpr_getType.ql 56a721032d359dea3b65b0b2593e87891ac641ceef2ae7af2b9cde9a4d4126c8 ae10a44154e9dccf93064b1cd29638462371d2d85a41e437083ec4faccf47a72 test/extractor-tests/generated/LetStmt/LetStmt.ql 02db64303bfe87a11a85663e4c79bdabd9ca13693f146c7923b47c4c92850fcc 9ec1326b8bc58b270b178a4c02621b1650d107de7c02a9408d97c59f0d8a6178 test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql 68f69c4c054514140c0f0833a170e9f3facf950bd7af663ac9019f6c88ba0ea7 ca54d25cc052289458c7e34e40f0304bca2c412cecfb407f31279262bd74c15a test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql 6a5f0eed3ce3e8cbc57be6ec2b4eed732f00e084108d21a61d9ab28b65e494ca a48b426b97a6c347ad04fe2e592cd25b5c66b2a6a299cbf8c0da03e14304fd70 @@ -792,15 +811,18 @@ test/extractor-tests/generated/LifetimeParam/LifetimeParam.ql 4848a1c83b138e3842 test/extractor-tests/generated/LifetimeParam/LifetimeParam_getAttr.ql d1ff2d3cd34bfc0f363bcd7638d4b9fdcc604c6a9c74da22359df1877a0cb26d 57b7654249890266ecfc9a325c27da84b8b3cf21666a74f38e6439ed7a0596f9 test/extractor-tests/generated/LifetimeParam/LifetimeParam_getLifetime.ql 893879293bed44e7a259c7e501f8301b92be0e00665c0049cddfc7d027790284 ee74064414e6ec1299180aa00851b5f323053bf4bbc2c5db6c0bedbcc1388411 test/extractor-tests/generated/LifetimeParam/LifetimeParam_getTypeBoundList.ql b1fb7f8e9fff999f7b0508951c089b2d6588a0960f172b67e7e111e64d608d49 fdfdd3a159033fca0549d6db97d681114e83f630982e72abbbf7cf1b2d77b4e9 -test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql a5644e5cf8b03121a1bdee793083cfe27286a7ac67d6ab5f1733b1fa81c5b38c 711d44afb1d0fba47f355563a040f4b21ca63a1c59a73d9b6510715133fee5b3 +test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b1f4046e7cd994370de24a819fbae780048d7cc16d0b911ac210d0f3109de6ca b3d85d44c999de5b5bdbff0f4473fed7523fa38ca706e8776dd4b1d5484a3712 test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql 6e76da2bb7858f493641f91216ea28f22dc5825931841327e34330f11d20c8b3 3f10a510944ea049b636ffc2c6223c0a15fd9b528ada7ffce54fb70637640768 test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql 7049fec0bbbf0e048af1ff318f42f43d0f8a7354a5638dc21174c4ea725b54ce 2edc94cc0a7f58ec9808b63ddb4d20a3907c88e50bd9ffb14f0281b433f5621b -test/extractor-tests/generated/LiteralPat/LiteralPat.ql 3d3db6cad0eb13f84b69efa24a9f9a32d35c62582274d2751cc3ac54dca3b538 7feb64af87546ea64c139c61ac20176a99ad40b9949b361742a424b164fe6d54 +test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.ql 01fb1328891d6c330ea66e0989d86c96db24cb0da84040251f70ed4a4c57bb02 8f9eb2e6489f917a044be1dddd9a0b1f127d2e6e110607bab3756b2bf5754d74 +test/extractor-tests/generated/LiteralPat/LiteralPat.ql 8a363bd3825ffd1589a1ef8f2f790d552484a03466404c850b46c61a5e4759e5 60e3452eaf3f07ba4c4859aac1aa61db524e0d8f0187fc752c2b1f6aa9fd8208 test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql 2cb03a22220e99237d4f3cd94d5090757cd6e57df708d32e80bca3964507651f 4dd9a6c1e23ad9851d9aa8c42c79535f7a2c7224bbaaff286eac7fd04b39c6f0 -test/extractor-tests/generated/LoopExpr/LoopExpr.ql 37b320acefa3734331f87414de270c98ab3309fe069d428550738197e3498a8c e744c25640b5c46aab53ce5114b789e13319572b0c99d0f2bc3c177849e61541 +test/extractor-tests/generated/LiteralPat/LiteralPat_getType.ql 57643d6ce8e8ee91df367f719ff73d4621582d4f02d68eda0f793101172e2cbf dd6d444cd5f65a2e1a9621899200cb87ef7032c5778e19bee788a83504d19934 +test/extractor-tests/generated/LoopExpr/LoopExpr.ql f2be0d4e0fb81b48d1933747f9aab416739ac9796ec40856943095c82f9d53e4 ee799e46f263567b3fc582fa371ecbdb35e6f99c971c62a1e212a257ecb9cc84 test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql d557c1a34ae8762b32702d6b50e79c25bc506275c33a896b6b94bbbe73d04c49 34846c9eefa0219f4a16e28b518b2afa23f372d0aa03b08d042c5a35375e0cd6 test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 0b77b9d9fb5903d37bce5a2c0d6b276e6269da56fcb37b83cd931872fb88490f c7f09c526e59dcadec13ec9719980d68b8619d630caab2c26b8368b06c1f2cc0 test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql 0267f54077640f3dfeb38524577e4a1229115eeb1c839398d0c5f460c1d65129 96ec876635b8c561f7add19e57574444f630eae3df9ab9bc33ac180e61f3a7b8 +test/extractor-tests/generated/LoopExpr/LoopExpr_getType.ql 1540491df05cfe49719ca45ae874f9ea61d20c037775f77d45c10567e3aee0b5 ad95fde93fc766ef74b8f708579c589382ba4b521c563c137cfcccaf3f5ee57e test/extractor-tests/generated/MacroCall/MacroCall.ql f41552ce4c8132db854132e445aa0c8df514bfd375aa71cc9ed0ae838b7df9f1 442ecbe1481084bb072c6f8cf0eb595b7ad371587e8708610a10f2cc718535f7 test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql c22a2a29d705e85b03a6586d1eda1a2f4f99f95f7dfeb4e6908ec3188b5ad0ad 9b8d9dcc2116a123c15c520a880efab73ade20e08197c64bc3ed0c50902c4672 test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql 3030e87de6f773d510882ee4469146f6008898e23a4a4ccabcbaa7da1a4e765e a10fe67315eda1c59d726d538ead34f35ccffc3e121eeda74c286d49a4ce4f54 @@ -816,12 +838,14 @@ test/extractor-tests/generated/MacroDef/MacroDef_getCrateOrigin.ql 6c46366798df8 test/extractor-tests/generated/MacroDef/MacroDef_getExtendedCanonicalPath.ql d09b262b8e5558078506ec370255a63c861ca0c41ab9af3eb4f987325dadd90c cd466062c59b6a8ea2a05ddac1bf5b6d04165755f4773867774215ec5e79afa3 test/extractor-tests/generated/MacroDef/MacroDef_getName.ql 6bc8a17804f23782e98f7baf70a0a87256a639c11f92e3c80940021319868847 726f9d8249b2ca6789d37bb4248bf5dd044acc9add5c25ed62607502c8af65aa test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql d858ccaab381432c529bf4a621afc82ea5e4b810b463f2b1f551de79908e14e7 83a85c4f90417ab44570a862642d8f8fc9208e62ba20ca69b32d39a3190381aa -test/extractor-tests/generated/MacroExpr/MacroExpr.ql 69445cf24f5bec5c3f11f0ebf13604891bb2c0dffe715612628e5572587c7a6c 5434db79d94e437c86126d9cf20bf1e86e5537f462a57b9bf6b22a2caa95cc40 +test/extractor-tests/generated/MacroExpr/MacroExpr.ql 01ac6af95e63a1a6f300d03fe08e79dcd18f25ff7791b47431c7e62078c73ac5 00dcf5ac69e7e29b80cc0bdb7b48e9c5719b0975f51c606a2203401c9dbba1dc test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql 8859743e23b987225a6a1933054a1ed8f5f1442b61a769599e2efd143f4feb9e d2d336135ff4d2ea65e79430dee8d0f69f9d7818a674f5446903d986f3948b92 +test/extractor-tests/generated/MacroExpr/MacroExpr_getType.ql ea8c338c40aa6189fd7eb44b1d009d736464342264d2a95ab677bee836cc781f a325bb962be18d8ce3d01069f38fa498a385fa590f11a1e365cf6bf0c2f270b9 test/extractor-tests/generated/MacroItems/MacroItems.ql 876b5d2a4ce7dcb599e022083ff3f2d57300bcb0ea05f61069d59ad58353ca69 61ea54d4633ef871d3e634069e39fbb2545f7dc2796fa66f8edbacd4e0aa4ef5 test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql 53fc2db35a23b9aca6ee327d2a51202d23ddf482e6bdd92c5399b7f3a73959b1 63051c8b7a7bfbe9cc640f775e753c9a82f1eb8472989f7d3c8af94fdf26c7a0 -test/extractor-tests/generated/MacroPat/MacroPat.ql d9ec72d4d6a7342ee2d9aa7e90227faa31792ca5842fe948d7fdf22597a123b7 74b0f21ef2bb6c13aae74dba1eea97451755110909a083360e2c56cfbc76fd91 +test/extractor-tests/generated/MacroPat/MacroPat.ql 7e3ad20678d49bfb7d030540929710b022d5f365a69bd2359723c628ce96ec43 f1529645120a7bb740855e028b1f4fbd4bbbeb3c079aa18ec3f9519f307a73e1 test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql 398996f0d0f2aa6d3b58d80b26c7d1185b5094d455c6c5c7f075f6d414150aa6 b4662e57cac36ed0e692201f53ba46c3d0826bba99c5cc6dfcb302b44dd2154b +test/extractor-tests/generated/MacroPat/MacroPat_getType.ql 2cc16cfe143871a601d95888f8a999afd0c3325280a2b1f9120c2556224b2b54 82bee71bf91fae60cb5b14b3aa20416e89c1d74787401496af26bc4d4ece3b24 test/extractor-tests/generated/MacroRules/MacroRules.ql e8a243a1aa368d44c963d81b4459aa6eba7caf514d4865af5007cc33fe53dde4 9e9114cb808239e3bb15403cf5712f8dbaf4e2719e74efddbb800ec0be19f06a test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql 7de501c724e3465520cdc870c357911e7e7fce147f6fb5ed30ad37f21cf7d932 0d7754b89bcad6c012a0b43ee4e48e64dd20b608b3a7aeb4042f95eec50bb6e6 test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql fccedeee10ef85be3c26f6360b867e81d4ebce3e7f9cf90ccb641c5a14e73e7d 28c38a03a7597a9f56032077102e7a19378b0f3f3a6804e6c234526d0a441997 @@ -842,17 +866,18 @@ test/extractor-tests/generated/MatchArm/MatchArm_getPat.ql b346bca229226414b32ac test/extractor-tests/generated/MatchArmList/MatchArmList.ql 14b5e110d48e2b77c85b7a188262e6a98300e0d4d507bb7ed9179c5802251dd6 4d091f06b12fef0fffe1c80a10f74438d8068f2fa09c50d5e240b6d140e60d90 test/extractor-tests/generated/MatchArmList/MatchArmList_getArm.ql 4781d002538a92b7f40fb0ec3d61aeedb6348341ddc354bbdd3ff61b74d59767 ae0da9497a30ce006e03bdb70e0ee24b685df529ac15a7d99a6869b5f7d7b371 test/extractor-tests/generated/MatchArmList/MatchArmList_getAttr.ql 4d7e6d152d2dbeb4c9f594becabea27d3b25fecbde40d791a2907c69cc0c9631 4be9be658bb22e1b764c4ebc8d6b99bf50fd939f35ea44fbb869056c14632bd4 -test/extractor-tests/generated/MatchExpr/MatchExpr.ql ec116bca37079488977a50beeba508c440cf337799947fcb810b6bd7a7605255 42dc7b5f0dd6fd91417d9846a7b4f678cbfcf095791aaf57c8d3b4548ce2dd98 +test/extractor-tests/generated/MatchExpr/MatchExpr.ql e95871245e666e3249d43208df95eb9d9adcc688a9fea93686d4fe7a7c7257dd 9000d25eef831d906c8c2c11dcfacb5710e17da735b4d85d1e6ab26c3c48a359 test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql cb8057372dcf24dfa02896ebf4e60a0b757dc4742b94011edc38f5b898ed4d25 6809695c2d3ac3b92c06049c9b920e8c0e99ee1998a11a7f181f2b0ceb47c197 test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql 7baaa64071cf2666e3b2bc05630d92a7a3b6cf04a026b1f7053c5e2a735bcaa8 d9ba8d8bbff05cfc0461ab41295f921b48429b4376c29adf54428bd5a9aa5298 test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql d97055bcb0431e8b258b5ecdd98aa07cb24ece06b0cd658b697cd71da4ede8fc 5e9c03b2665ef6b2af98897996abb2e0a9c18d54eb64588340b8efbcee9793bd +test/extractor-tests/generated/MatchExpr/MatchExpr_getType.ql 604973763d06c6a2f8b24142c01562327b8691080f6248caa505468d955a65da 6e086199ec7c95963fd137505d7b1be16c428911af249a8ac4d359a4eaf553b1 test/extractor-tests/generated/MatchGuard/MatchGuard.ql 23e47ec1b13e2d80e31b57894a46ec789d6ab5ed1eb66bdb6bba9bd5ae71d3ef 7302f4a93108a83228e0ebd5b4a1bc6bccc1f6f0f3272054866fa90378c0dcc4 test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql 8a79dd46798f111f8d0d5a975380b5cebe5e337267752b77b3718b268ba2773d 6691d8fb483f64fc7e3ad3f46e3129e0a1184d7beb9f83a1000acdbb081c8b5e test/extractor-tests/generated/Meta/Meta.ql 16f163f00ba2bbaa0a8c6f3f6710c860a8f61d02d43321c78e05a10a3606e39b ba982c6bb93ddb4fc2c44d24635bd487128a5b1d1f885214044c989a21f4d05a test/extractor-tests/generated/Meta/Meta_getExpr.ql ec9ec61f5be7d65c32775fb5c068daea04f9db7d875293ed99cc1b2481db041f 77a0c52f1cb6ddc8fdb294d637f9eda1b7301ffa3067f0fca6272d894f57d3ee test/extractor-tests/generated/Meta/Meta_getPath.ql aa9d4145a4e613c51b6e4637d57e3b7d0f66e0bb88f4ce959d598870814c06bb 2087e00686d502c0e2e89c88eae0fb354463576a9ae4101320981d3fd79b9078 test/extractor-tests/generated/Meta/Meta_getTokenTree.ql 1051c27ffd0d9a20436d684fde529b9ff55abe30d50e1d575b0318951e75bd34 983975672d928fb907676628384c949731da9807bf0c781bb7ec749d25733d2d -test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 0149a2d174c72a530b39a5878e204cb6db7632935a5ceaf20e2b2363b67dfdf6 8284d9133c21136f89a04105c280efe736a782035235c6abc081f3d9a2616447 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql 470c90b31dc67352631bc595d74a22332d8e4d0cb26d917d73a7f70c2092eae1 12431f272631af82b7e3d8ac835d5e6caa5e68e0067e0bbcc7b1b4a0a78fa117 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArgList.ql 180e0b1715f5cd2be0de01bff3d3a45594b495b8250748d40ff7108d6c85923d bdadcdbecca5891287a47b6dd6b2fda62e07457718aef39212503ab63bc17783 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getAttr.ql 2ce876a04a159efce83b863dffc47fbb714b95daea2b91fa6fbb623d28eed9ec 7bca1cd0e8fbceec0e640afb6800e1780eff5b5b402e71b9b169c0ba26966f96 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgList.ql 655db9a0501b1ef20d604cc4cd9d708371781291443e8dec97b70ec2914601d2 2fc7df0eca22dcef2f9f5c86d37ee43452d372a4c0f9f4da0194828c82ba93e0 @@ -860,6 +885,7 @@ test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getNameRef.ql 9a482 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql 77407ac956c897ff7234132de1a825f1af5cfd0b6c1fd3a30f64fe08813d56db d80719e02d19c45bd6534c89ec7255652655f5680199854a0a6552b7c7793249 test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql c22504665900715e8a32dd47627111e8cef4ed2646f74a8886dead15fbc85bb5 d92462cf3cb40dcd383bcaffc67d9a43e840494df9d7491339cbd09a0a73427b test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql 9e7bbb7ed60db49b45c3bdf8e01ec58de751889fc394f59ac33f9d6e98200aa1 c055d877e2ff0edc78cce6dd79c78b2881e7940889729cbb5c12e7029ddeb5a3 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.ql 32d2e7a38921c56ea95d1432c1dbea2101ae30c307f8a596ead48861468c4428 266a329840fa004ffcbc0e293ea34be21c1737e598649511c133f6a9cb70ec2c test/extractor-tests/generated/Module/Module.ql 4bc4d74921a5af94b124a5010cdf6908cdc9ecf26124e354155fba781009071f acca26579b087ce1fc674703c4d95d8d353075d3021c464d2f3fc06891716774 test/extractor-tests/generated/Module/Module_getAttr.ql b97ae3f5175a358bf02c47ec154f7c2a0bd7ca54d0561517008d59344736d5cd f199116633c183826afa9ab8e409c3bf118d8e626647dbc617ae0d40d42e5d25 test/extractor-tests/generated/Module/Module_getCrateOrigin.ql ff479546bf8fe8ef3da60c9c95b7e8e523c415be61839b2fff5f44c146c4e7df b14d3c0577bd6d6e3b6e5f4b93448cdccde424e21327a2e0213715b16c064a52 @@ -872,12 +898,14 @@ test/extractor-tests/generated/Name/Name_getText.ql 5d223baad356308abc45cdce9ca9 test/extractor-tests/generated/NameRef/NameRef.ql f73d49d5c176cd7589f6ca148b0d0cc3d1084e27686910058adfd5764ef5767d ebff67ed3b325b01277e25baa1ad588e633ef8ce63209a72305465a0dc8002d1 test/extractor-tests/generated/NameRef/NameRef_getText.ql 5212dfc1b65c0f724a72f5bffd82268d1f8ae287d3d61797673c29fd70d7ebd6 75c343614925c55a18917c07ef62af08c97c9cc714f627d1a27b9f26158a0bde test/extractor-tests/generated/NeverType/NeverType.ql 7da48f7c20733a77495718c06a96eb1a8ea5e825b95e585a960cf777edff1b6a 30e24cfcb4f2ae1b7862a177e622636b4563a1b1d348413884bc605302d31fcf -test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql f7d7b30870567124e46dc81503a33cb6425fff51f99fa57894228847e68291a3 b0c242095e0df52687502baae97f36e0fc7b4e1e01cd05f75ff0cbe92a6e2f33 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql 8820c6c00242a7db2e9f6c43bb4c53b5d9bac535c1e2139c12a2ecc0882e419b aa9d99efd22059a53ec30d04471dcad11d2f4e995eb7c06f5dc83afd397f0659 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql a12e828c85577184a41b255f54b10d4a654b57703074a7ebcfde2d43a358955f bc2590e76b60a3ddda9cc10903c68d07c6af19a593c8426d108a2a6520304145 test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql 6d729fb91deacb1f620df5cbc86473183664e81849958624195da883c410a707 f3374c3d7306699d1f9d1c6c5788ee7c5a17103345bf53847be9d94e5fb9f14d test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql b8597637cffd7a492148020b306c4ab1d2f17f919f441f462ebc00d229b038ca 2c7de1df4351929c221b30e3cede4cd6981fe8a2c1861e194489981c65e00f33 -test/extractor-tests/generated/OrPat/OrPat.ql 49d881b384acaf68fa79de46da997cacab3e75467641f61150908f4112c47fa4 5d721da23be44e79d7b8a0dd475119836828d6a1edaff2c55decea8da83e65b8 +test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.ql 4bc9788b7171826a76c80f277581dff1381c60202da5f59fa828ca519952b80f baefb802f7a11416fb98d82c24fd6956a242fff86fa64125403536a1c18535f7 +test/extractor-tests/generated/OrPat/OrPat.ql 86a12651dd209e56df7c903b169d4b36836d896bdf26c6399b8f3abbf5bd7d43 b8955b557a498cedb973a8b8088a1f8126c7d06955eb6f6f462353ff48d6bdb2 test/extractor-tests/generated/OrPat/OrPat_getPat.ql d56b78287cecebacb25249380647500387e0d9e28be20034b8a12406a999a7c4 cba7bb60afaaed4333ea5ff6d3850fb44a8b42edee67d86fd16df85938454269 +test/extractor-tests/generated/OrPat/OrPat_getType.ql e06db1bf7f1a5278a59bf1dfd894d3d7f31487c524b63c6ff604901378e4d5b4 f152f47477b4b4e95a0eaf2c260f7f4d132971e6efc8dc28ebd24d4bb9b8a4c8 test/extractor-tests/generated/Param/Param.ql 060c53b7e93840ae9cbf0c8fdaea17b16d6825f4b7aaa2eab164a660c5a7ea4d 172f6f4b86a98720f710e5d4342b7d52839c6f3c169ce1debb37629961a702ba test/extractor-tests/generated/Param/Param_getAttr.ql e1dcf86540fd2971ced34a33b2959f001c3f654914d82e576caa4534b80fbfbf 987a826bf6dcd25c3426edb603a22f6caa030c82c1cb0e9e11062fdbfed23030 test/extractor-tests/generated/Param/Param_getPat.ql 0c448e8ba8bf3432be08b5eb4a052aa19cccf0eb4596a3239481401dae9d2dc2 c943d4da36e1e734c1a012f092b2f597cb389a7ab33d5371ff8ee9c93e115ffc @@ -885,19 +913,23 @@ test/extractor-tests/generated/Param/Param_getTy.ql 134dec0c5562a8df68224069f10e test/extractor-tests/generated/ParamList/ParamList.ql 4d879e6a6db24fb8d7f935c2dd332075ca4b2de41cc841aafec7e0b6b77f2cf3 b7e2357b77961f0f8315d3c9e8fde8578373ecfb9efba892416b31d7c168bb26 test/extractor-tests/generated/ParamList/ParamList_getParam.ql dcaabf654941bf9afe50df3a5c61ef0eab50830a436eede98e30778bfd244a09 63cc7f529f96d5016804f50a385d8a736a534475a6340a8c2f51de99b54206a1 test/extractor-tests/generated/ParamList/ParamList_getSelfParam.ql 310582a9921226a44e6fee2b386d48bf84388351204941dd12e3a2da395eefaf 6c2e0a6d5bc6db49430cf25501444da6540b7b2f9ac0052da93c8086e2af0c46 -test/extractor-tests/generated/ParenExpr/ParenExpr.ql a40c60a92be944f15f5cbcca52b0fde318bb1ad6864f9ab9302dbf5ce5f1058d a50e80b6b222fb43f9fec82677d0785c0b2696b9818887e2befafb7a6d399a7a +test/extractor-tests/generated/ParenExpr/ParenExpr.ql 7dbf7130fbb018fd41b8a3642b8906e39caf721a3f08ff4d38656659248016f5 6121a490b40edab5dd2cd22e8295b7df8dcfbd7013a19ea3c682950dfedca37c test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql e8b9016d2374d124472d135c8b9031124227cbb139362f6aa6d4d99cad631e30 4aaf95ee8a9ab1ead19eaa4dabc080f12aca49f50a150a287b93132de5c61df1 test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql a75dc46dc78d3b4a4f629ba16f7129ecc0ab90f60b651259d00d241b2886bf7c 32164d75418df184618501f41fbc0a81dafe1ad2dcbc9ec87bea909aaf05ae40 -test/extractor-tests/generated/ParenPat/ParenPat.ql 565182ccd81a9b420911b488c083f540d339eec6a9c230424800bb505df13a66 876cdca008ed32f415c9ee99ce7e66b276769d0b51ad7eee716e1317484a34ce +test/extractor-tests/generated/ParenExpr/ParenExpr_getType.ql c5e263dc1a221fcadbf2395d72b3e828714154ab681c7b18e329e9bdc2cfdc25 7251fe908cbf2ec1aaefe0714f5341ffd15f39a3e7c513121ef9855c75ba0318 +test/extractor-tests/generated/ParenPat/ParenPat.ql c63f151d4f4500d5453cf423b88b32cedac26e0478c2669caf2a66474ead56a0 367f31695a2d47f85c5be61643c5c5d8301d12938ef23e7d7e1e48bcfd516c0f test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql 96f3db0ec4e71fd8706192a16729203448ccc7b0a12ba0abeb0c20757b64fba1 0c66ba801869dc6d48dc0b2bca146757b868e8a88ad9429ba340837750f3a902 +test/extractor-tests/generated/ParenPat/ParenPat_getType.ql 34d1d86653c6ea6fc532b7763347b5f87b2227521f22c3dc37f1972ba4ccae17 7a756b2733f789a7cd98371718cfb3aadf1680d7acdffedf826873de0fe828ab test/extractor-tests/generated/ParenType/ParenType.ql 81c8ad667397ce36157941abd9b879e9305a440018853af4528eb737ae4d2935 3ef3b86203b0143be2d7f7f4833f55fd6c226cb9205e3c1940b6c2a1371622f3 test/extractor-tests/generated/ParenType/ParenType_getTy.ql 41dd6605e7b348618156712b559e2f1b6aac02d6c727e8cbf8653530794ec969 30ac6611c730e76cfb75f98efcf817783a50cec0cf3b3197459d7642f74dde85 test/extractor-tests/generated/Path/Path.ql f17c1c4d23c0d5e9776cee84444f6ee7445de88afbc1f26c34b96e13ab618158 89499cb0f63b3634d6b5e2b8c4a13bd4401ce82e54af0ab46e41a34b0288eeb9 -test/extractor-tests/generated/Path/PathExpr.ql b9696cd7ad9f3874e4bc4b1b9c77f42f06ab6c61b77fb641458da63667087b9b db84a7a8dd05e30ff80733af01f08d43ff031bb4b3e3af06332a73ba7e7bbc43 +test/extractor-tests/generated/Path/PathExpr.ql aa3787e3bf91214bbdc173fe7ef3e1b411725059aae628df20133cf343d4b0c3 59658a733f2024414f576e2aa3c8a67d9b520bb7ee06ea84a5fc1bf774a218a6 test/extractor-tests/generated/Path/PathExpr_getAttr.ql 2ccac48cd91d86670c1d2742de20344135d424e6f0e3dafcc059555046f92d92 9b7b5f5f9e3674fad9b3a5bcd3cabc0dff32a95640da0fce6f4d0eb931f1757d test/extractor-tests/generated/Path/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 -test/extractor-tests/generated/Path/PathPat.ql 823732954a5882e33a37bd0bf0cafb2cec51659a5203a4831eec2516da0e49fa 54001149718a9ca15d8c0d4be63f3fe00a9f0d44fa1309e2f605d7932355ea5d +test/extractor-tests/generated/Path/PathExpr_getType.ql 1f018d66a9f63c90d985dac6e73232d948cf18ce639e56cb5f0a742f2065cd9a 5e3bd0afaa0c67bff1e11a73daad0defdbb1aa2c5a9becef88afadc131c65ed1 +test/extractor-tests/generated/Path/PathPat.ql 42fd17f23506e25d9069b9e2d12cffa00851ce36858c0bfadbc507e0e72d07fb c275e3603ad9c9046f43f92e48217668497b70b2e1d9b2808bc9009af45c5da5 test/extractor-tests/generated/Path/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb +test/extractor-tests/generated/Path/PathPat_getType.ql ed26b5111819883f19ca11c1c4ec67e6e82693ad95d6e8a5c9629bcf30d5e7de 87c6b067299f7b0dfe670ce7f65cd3bf81aa56e88560e7c61acbe34e80636710 test/extractor-tests/generated/Path/PathSegment.ql efc39cea1b4c0b2b0da6434136334430d074699f84124d6bcf94c24aa854dc64 c0a4bd60c67665c058ca22a59e535e925fdb00dec95ffc5c71697fb0ed78a329 test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql 8f6e67b3e316309f20e21d7e7944accf66b0256b76fa50ee9a714044c6ec8cea 15f10a701fc4d3f9fd6734da90790cdbc8a1ddd57bf52695740acedcb2e6e485 test/extractor-tests/generated/Path/PathSegment_getNameRef.ql 799d284e2f9267d6bbe67aa7035e525ef347dc74cb3e2180e7b2171b5cb49674 592130bc2358989536abf62e8a261272c851483ede4f19783f7d61ffc1803e4b @@ -912,24 +944,28 @@ test/extractor-tests/generated/Path/Path_getPart.ql 8aa45a0b58203ef1177166efbe1c test/extractor-tests/generated/Path/Path_getQualifier.ql 9af95e22cdf3a65da6a41d93136aef4523db5ce81d38f6ed4bc613f1c68784d0 3102d9241a417a92c97a53ac56a7a8683463f1adc7a593cda1382c0d25b3f261 test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.ql 7c0ff524595514630de4178028260d4832bfc4f57bfddec9f8e72a6c6dbf241c 55e617380476c183ef9259199d2cfd551b07466e94bc452c4723754d0c82691b test/extractor-tests/generated/Path/Path_getResolvedPath.ql 20c8977781dfe687d5db03290612179cf1360eb47b86ea62d25d1eef62a681e7 c35b76e7d63c05dc80867285bb913042cbe90b45d4d4306df9eac2cba5e8db70 -test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 44fb7174365c6deecdc22c720d84617c6e060c05d49c41c90433451588f8aa6f 871fab471c82fede3c36edc003f9decee5bb7844c016951d28be78d0c91487e5 +test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql a3b7d8eb9c09c51294b36106e32ec3c9fff3360d2f4f6a4792fcff3340d660ed 8301c56be7a99bab07371b2010defed9102b204ec0c8f425c6e77b46ca0883ff test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql fdad6ad5199435ded1e4a9ea6b246e76b904cd73a36aaa4780e84eef91741c5b 75d63940046e62c1efa1151b0cac45b5ec0bab5e39aec2e11d43f6c385e37984 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql 2d1d97f6277794871fbb032ea87ac30b1aa902a74cd874720156162057ea202e b1b9880fce07d66df7ec87f12189c37adf9f233a1d0b38a1b09808d052a95642 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql d27602e77ddf491a278426de65041dda8568f427d1e0ff97c0f23069ae64670e 4e4766e948adf88a6b003ead7d9de1ad26174fe9e30c370f1d3e666aa944df52 +test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.ql 636990626d0c84c1ac41473c6ab21dd1f4e8e3223448b938bc37d66a8cdd6a34 88fc68c6754b027670d0d495c80b931b972d0c94623f399f6b764e962ddb1e73 test/extractor-tests/generated/PtrType/PtrType.ql 6317c79917e024d2162ae9089c17539fae818288f9ba5976fe39d004691dd343 d7e12a58475322a1292777608056ff90d7014b3e3a77bb756e233014d2670f28 test/extractor-tests/generated/PtrType/PtrType_getTy.ql 97f5e6197e66c4dcf15d4a62692e30a26979f2902d83354911985d39c8560d1a 0b049b882a33be9746fbb704394a024ac320415cfd1707dc48fe114781558e36 -test/extractor-tests/generated/RangeExpr/RangeExpr.ql 707c08aab49cc0a22c80a734e663b13ecbbddf0db28b6a25fdbc030a1ce38d6f 1f78950b30485cdde9fe7d9e416ad1dfdac8c5b6bc328172e6e721821c076131 +test/extractor-tests/generated/RangeExpr/RangeExpr.ql bba781519077ecd7bf000a4d190d7b1dd89c0190ee367fe191ab0a2824615c3b b8fbe62135dbcf5d302f8ca9314b01eb137826c8b488ce14bf0ea2c835e77f03 test/extractor-tests/generated/RangeExpr/RangeExpr_getAttr.ql 8767e670f88c2115bc61b16195d2c9d02bc074adc4ca57d2aa537c1af9b4c530 4fa51652c60ca7d06bd9ad604107e002603ee2a7b4587636f6b46b8e8060e06c test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql 0328c3d0597004f3facf3d553ed763566344f54e1b9c9e26f2f41b8146b6bdba 8e701b595631af117fd0a79154e298dfc64cb0874eb58018921f94076a0c7ebe test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql 355a4d61bcb6ac37003c49e736e0e3d4c6d223343db4d79ecb43a78fbf6b4c94 a81c79a5d54dec5f3918ad486cb07ffcb0af067823f7597d8e86efaffdb70935 test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql e6e35c735b2bc56adf38f96f32ef59a004391cafbb23b9acc34d2177764588c7 478969212626b1d101c19115f726ca7616fdd4d8de82fa1e91c50a26515c2ee1 -test/extractor-tests/generated/RangePat/RangePat.ql 97314b9a5543a7471d722ae188a657fd325974eb38eafe0997a6cf1095d04d69 5dd655582157b3436722b4ba3118bdd29853b0bc170248ad2c4c1162c534afe6 +test/extractor-tests/generated/RangeExpr/RangeExpr_getType.ql ee6d1fb4fc1060d1a0df29e18004af8a73fda2378e367cc7c03fe3a64c22a06e 41669b497c65efd609c43bcf2085202e05a35f5abf7cb1ec70241d4cb45da756 +test/extractor-tests/generated/RangePat/RangePat.ql 5012ed56e76468757d7d8e8f709e8ac2481dc0497fc1acc979f1253a4a743464 627cc17b868e7d8323674028bd6e307f60c740d65722e5da3af43005e3828115 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 1b8f5c315f8038e531bd92c5402acdafdbc9468e2f4474cbeffddca37cc87fb6 9458b2815fd13848659bdc2ce1e9566fccdb0b2c9f018c79885ba7608df07a5a +test/extractor-tests/generated/RangePat/RangePat_getType.ql b782a6f7c2c825256cfd555cf8e45c1bd82181c4e2087e872fed40697ffe5d5e b76365cf92746a1a9ff4c4cce7a7ff668a63d236a656643646e1aec5e424f129 +test/extractor-tests/generated/RecordExpr/RecordExpr.ql f9fb2bc42118e89e3b45311ef6be25f7c89578d30ce2c4714e637075fee83bed 889597ba71580085456029ff3f75623691fb46173b0844c031b9f11e41e99e83 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_getType.ql 31040a2ac28317d54151332ff1a4dcefee69d4ff8e9563c63d33b3e838f0abb5 c4a7d89c835a58b08240fb0e11be532f89883254dcf8d38f3c8d21b964dc1def 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 @@ -945,9 +981,10 @@ test/extractor-tests/generated/RecordField/RecordField_getTy.ql 601fbb244267f366 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 01510828e1facc6551e06241e41636259883a546ad43b08499468c14d6052768 fcf3873fe1cd1ebe4910150763aa350f882ca8e84603f35520bb0beeea2c21af +test/extractor-tests/generated/RecordPat/RecordPat.ql 719a9181b3a7183fc50c3913bc9597b7ba3396a06c7edbed27890b397dcd8fa0 e72f3fa3594f14b79c21c616f19cbdde2c0335a59e8e1397bbb004b25a2eeb1f 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_getType.ql 7776d575c327e81c53a0c43dddc1a78ba697c46e314b6a571f8dc92591e848ea 07742d1f13bcf0f15ba46869c7a4400cd24cc2127175b29fab7d0617161f1312 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 @@ -955,31 +992,36 @@ test/extractor-tests/generated/RecordPatField/RecordPatField_getPat.ql 577187a47 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.ql 340b04df03c0a5d8e38ebf37e65e09b880e30ff450c999468ea568202c097b4a d3305655b69221dbd0a46d3ae1e10ba0d9ee25ee5676bd3b13185327def854da test/extractor-tests/generated/RefExpr/RefExpr_getAttr.ql 477fb3fee61395fabf78f76360ea27656432cb9db62e6f1dab1e9f3c75c83d39 5210f2ac54c082b616d8dcb091659cdad08a5d4ae06bf61193c33f208237482f test/extractor-tests/generated/RefExpr/RefExpr_getExpr.ql 180d6417fd7322cabf4143d0ddd7810f65506b172a5c82484b3ef398041636b2 a291f0bec1ec5b3fa6d088b3d1a658889b9a3521c39ff3bb7a5ab22a56b8b20a -test/extractor-tests/generated/RefPat/RefPat.ql ba0f0c0b12394ed80880bea7d80a58791492f1f96a26783c2b19085d11e2fd2b 22aa62c6d4b6e4354f20511f8e6d12e6da9d8b0f0b3509eefe7a0c50f7acfb49 +test/extractor-tests/generated/RefExpr/RefExpr_getType.ql 0ebf74ac5a6893bca10a7e428ebf83557d87fe26487aa861463bcbad31214bd3 eeaa58b4f32d6cbe8c6d61843a43444b712749c0e2cbcf0235343b9f49b53755 +test/extractor-tests/generated/RefPat/RefPat.ql bc97442b4525098ce9b1913ec85c5b20dcef4f0e63d4ed612b7dd95e8b73a5ed 99f969eb268f8d0451e39e51bc81f9b008717479231b9ec275ee04b0629e8cc6 test/extractor-tests/generated/RefPat/RefPat_getPat.ql 60f5e010b90c2c62d26674323d209b7e46c1c2b968a69765e1b1cde028893111 fe9e7dc6a5459250355336eca0bdf2a0be575b1e34936280fd12a76a004f7b46 +test/extractor-tests/generated/RefPat/RefPat_getType.ql 4fec5acdf6c9946b8c5a504caf769ab89f7cef419bde2e33a4b7863b0a5677e8 c35cdb3427c6225e91bbc6065bcf99b75d588db02d0fffa89b047dfa12110c35 test/extractor-tests/generated/RefType/RefType.ql f6959c993a8e401a576c785fd1be4b910be218a212eaa9363ebf8f83dc2f1950 686678725a7f9824e74ec6dda294fc2233fd94aced8e2683b7019a1ce81f345d test/extractor-tests/generated/RefType/RefType_getLifetime.ql 880434f5908752adcc02d3645a48f22399250600c19e43c2da852cb6242e6a0b b8f9b9fab827972fd318d5edcaf37e4c7d0cf92261f9744e258537e6aee5a87a test/extractor-tests/generated/RefType/RefType_getTy.ql 0d5667542ad05a0da1a6a4c36882a39014c4803a76cadb11400d747b603890fd 2e6c3a56f1a7bbb72c181819be72d85c650af1df06f8582ae61bba9e165cf764 test/extractor-tests/generated/Rename/Rename.ql c8605e5d8ebb39be238ba26e46861df493d86c9caf9aa9a791ed5ff8d65a812a 7263c2c2565e41c652eda03d1e1ddd030fea79a8e3c967909df9945e30ecbe68 test/extractor-tests/generated/Rename/Rename_getName.ql 1648191216ece0e3468823ed376292611bd3e5dbe9b3e215167d7051aa03385f 381683d4637a1a7322c9a0df2d90a30a153630965e7facbfaccd6cdb5c1de2cd -test/extractor-tests/generated/RestPat/RestPat.ql 0abc6a13ec82ebc923ce768344d468871a05a515690f0feaaf55b7967cf34a9e c2bc069de6927c6c04c89c54e694b50d6ca052230cc36668302907a7ed883e08 +test/extractor-tests/generated/RestPat/RestPat.ql d9ed665328a4cc7710e50e2f21288a3cc283a24037f09c70d2a809c211ef95d5 75ea2299cb83f96ea64ded4130dd3b2242ddcb1829c738af60bd92b27a41d24a test/extractor-tests/generated/RestPat/RestPat_getAttr.ql fb391ab265a454b10270136efd61c1ae9b29951cd28b0f585c6b6eea37c64745 6311e3ca49eb8a061684f8cebdfb11cc5ae09db6e145d1b2349a2ee80298cfe9 +test/extractor-tests/generated/RestPat/RestPat_getType.ql 15788967c710b61abfe43b2b724f2640391a5e1ce4e16f8e155fcc9a6a208fc5 2d1e9b38b92783db99a46e5577f93474cc319c0d2649ed6d15b5ad1bda50650f test/extractor-tests/generated/RetType/RetType.ql 7aca20c92e840f930aacd0ef8e70840da76c02592ac2f2fd5a9bf24dc872c30e ef3aed1090a77684773c814692cfaee9cd245d88292cd75f1b5acf9005a2cd17 test/extractor-tests/generated/RetType/RetType_getTy.ql 55118e2a41cc1a097f6a69d3b63f3ed77d5da6c02b218b69b1c93d605e7239fd b32abe7a3978fe858a53a5772faabf750b5d14880054493f5a99466092b10dce -test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 8e9eba0837a466255e8e249e62c69c613cb5a78193fe50e26a617cf9d21c995a f33f6cc874f74d1ce93a6975c88748bd5bca6dc10360f8fd59493d939be63658 +test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 874d5e7829898fdc914793e3ccc3b618a0049afe5e663ef336db444a123f699a c404d63b58ea092168439057ed93735100343141d23cba77af984a9ec60fab68 test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql 9fb7e1c79798e4f42e18785f3af17ea75f901a36abf9beb47a1eede69c613ba9 9cdb7cc4a4742865f6c92357973f84cee9229f55ff28081e5d17b6d57d6d275f test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql 7d4562efb0d26d92d11f03a0ef80338eb7d5a0c073f1f09cbb8a826f0cef33de 523ebd51b97f957afaf497e5a4d27929eed18e1d276054e3d5a7c5cfe7285c6e +test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.ql 858fb46b5c070d0ad15292725d3b01e3ff11dc6b7f247579c09d6b9c2855fd78 d0596502a269d157aad3b2aa04207f6ef6c1f41ce0ff61a365854defbe52d3e3 test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql 976ce33fe3fd34aae2028a11b4accdee122b6d82d07722488c3239f0d2c14609 906bf8c8e7769a1052196bc78947b655158dd3b2903fef2802e2031cffbc1d78 test/extractor-tests/generated/SelfParam/SelfParam.ql d051c7a2dd88382e37895f1d691f2702aed7f925d3936f51d49949463e4757c8 37f1f429093be7923a55f8b4f46b37bbf71d0dff3843c4d3686383c2863dee1a test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql 00dd5409c07e9a7b5dc51c1444e24b35d2ac3cab11320396ef70f531a3b65dc0 effbed79ad530a835e85b931389a0c8609a10ee035cb694f2e39b8539f8e54ba test/extractor-tests/generated/SelfParam/SelfParam_getLifetime.ql 0b7c243f609e005dd63fd1b3b9f0096fc13cb98fe113e6f3fefb0d5c414e9a5f f6e06de8bcddfc9bd978c058079e53174edbe7b39f18df3c0bd4e80486808eda test/extractor-tests/generated/SelfParam/SelfParam_getName.ql 69207a57b415ba590e50003d506a64fd1780b27b8832b14f9bd3c909bddb5593 56fa28ba1222f45893237052fa5a9421d960e14fbf1396b2d1049b440c2e5abe test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql 521db95ede5184298ef05f78062f6c42152ebc60f1a395e162ceda73e4fe5d36 b1e261e0bef72db4bb1a5bc294b93497e5b61ba607588444154cacdb23ac15a4 -test/extractor-tests/generated/SlicePat/SlicePat.ql c6ff3c926ebbea3d923ba8ed00bf9cc20eaaee4c6ae49ea797c0975d0535240e 1b27e0caeb793da3b82059268b83bd624e81f215de42acbb548c52bacba3ed9e +test/extractor-tests/generated/SlicePat/SlicePat.ql a02559dea020b4db7e650301bb7e608bd1753c8feb2bea5523dc002abe945d0c f24fdd84a4f469329d54f3fa35711a7cb0fe2c31b7894a50a8b1caabd535ab53 test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql e2f892a3a4c623fe3f7e64e1438128126bc4d8b8c0f657ae53bb99d3209a3b13 af835d9ec840c63e13edc6a9230a4e34cb894f4379b85b463b8068de5a8bd717 +test/extractor-tests/generated/SlicePat/SlicePat_getType.ql 646777d40392d5f8ee15d845acd8e154d28ec661161090aef2500b349ff75945 14b429a7712a3e1294a3a0a4dbc617c3af916ac7e7deee1c09f76a592532fdb7 test/extractor-tests/generated/SliceType/SliceType.ql 2c81c68b54bf21d32f94ed66765642549540d3d179ac4daa52b597a3ad862c36 1d3b21af4a62a99776f3d569be3b85cac9fdb214d04f37ffb2f9f0759f520da9 test/extractor-tests/generated/SliceType/SliceType_getTy.ql 0bc70c0e60fc3552584b07ba2a23f304b47ad24644e015674665d0182fa4d1e5 f6ec0703b013d805eec2bb11d28393fc750d000ff6c2188618aa333095c7e328 test/extractor-tests/generated/SourceFile/SourceFile.ql c30a3c2c82be3114f3857295615e2ec1e59c823f0b65ea3918be85e6b7adb921 6a5bbe96f81861c953eb89f77ea64d580f996dca5950f717dd257a0b795453e6 @@ -1029,23 +1071,27 @@ test/extractor-tests/generated/TraitAlias/TraitAlias_getName.ql e91fa621774b9467 test/extractor-tests/generated/TraitAlias/TraitAlias_getTypeBoundList.ql 9ab4c329b25ea5e1a899b8698093f404ee9c095f0b0e38011161ca6480cd10a7 95c3b93610cdc08a0e251ab1307523f8cfb5560460923c81aace8619e30746dd test/extractor-tests/generated/TraitAlias/TraitAlias_getVisibility.ql 7e86140d2e9081d46063a15d82719be315406eb4d6e6738b3cb5ba7bcbef458f 8fb1ecf6a96b1f1d4a840425139c4ad47feb8b0ff14a319c08f82535e62e23c7 test/extractor-tests/generated/TraitAlias/TraitAlias_getWhereClause.ql 129e1f10aa23f10d71f144caa4ccb923928ec1fd791b203cdba9989b079fc1e1 1fb112215bd3e39b7bc8ebc059f9cc362e5b2f04a242df053e150efa638cfea7 -test/extractor-tests/generated/TryExpr/TryExpr.ql 3beaa08f6d734e74eca32ae2e3fb6aa7694400a429cd6b3db97bfd3402b379b8 3f55bfc71e804e2ba6f02087c0808901a379b2cb30f58d5933c91becc10f3654 +test/extractor-tests/generated/TryExpr/TryExpr.ql a54ffc0fed93a4f4e5045357ff1819673571c015b2b8db849156c81356b3ee10 56c7b86545bfb2affcd123791177bc46e378e89e459b061df19be9058128aaa3 test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql a2cef886bb959ff0f47fa555e7a89075f93ab013e1766270590951bf0b14a47b 24d12c96f1c7a1ae3d0d596551fb53ef2745c890eb602e0f99db3cb70cf1e474 test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql 4ccd50eb4bdf01381eabb843b5ea3ebddec5d5852a04f10be9b9a4ef8a3005f1 0ec050d28c70322f6f280180fee998d1b6cd82db4e114db7e10758fcee2a2fca -test/extractor-tests/generated/TupleExpr/TupleExpr.ql d6caa8d9ff94f27f88d338b07cacc280289970931e101680c6574e32bc0c863e 70508104013003dcf98f22db6eb9b60d14552831714048f348f812807189e9b1 +test/extractor-tests/generated/TryExpr/TryExpr_getType.ql 22ea003989222e925b6cb770681d820998ad3dad177f1496c0a7c443f5a1a98d e097ef2b1a0334f645c4ea8b8158d1db2ca779c1c5e4fdc898c68ed2afca7db6 +test/extractor-tests/generated/TupleExpr/TupleExpr.ql c92218d0ff89e1d3516994704e320e860ff0362a3531f771e49ac912ce6d9fbd 7b34f552eb33e289fe950ebee944e21f365f8b4778b673e52e0cabef338f272f test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql b1e93069613a8cd2b49af93a5cdd1571b343571e9c3d049d8bf19b25a461f9d3 be18008a00e3b0fb786f5dd36268201fd43bf8527d8a40119b147a3a8c973b3b test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql 308cd14873afedc74e3ed61d283f72da50008ce7690510c57fe0934c92158d58 5e3e23a7221486ead6502debb5d4978fb67046c8b0a5c8a688e4e196cb1f28a1 +test/extractor-tests/generated/TupleExpr/TupleExpr_getType.ql b275572ad64a35702a2e344650f31ad855c06233d7eb4bf538f40980853e1967 2632b008d0e76327f468cb3f8867babb034aa1b46500815d3c01152f984d8a91 test/extractor-tests/generated/TupleField/TupleField.ql 2dbdb37ecb22a05007713434ac747a348266bab2863e48704fff48a10eb01c75 4309f177306f8adea929c1cff809eb26e262ae12e0d95b22597efd36c9105bfd test/extractor-tests/generated/TupleField/TupleField_getAttr.ql b6b6a5349fc6767b0081d737e818425f0c93be5bd8de47c29fd89b7812e3267d 23d82a649cb733bc8c1d1b09dde84dbfcc8f847ed35be986a9ca8717ea9e5081 test/extractor-tests/generated/TupleField/TupleField_getTy.ql 291d62ba4246acad200cd5347ed1280d80595fdf663f0ec39389996c23745fd0 d364381e5aab8aca36be354af5c41b2e8b5e95ae8cb7a14a702a28f644d567a8 test/extractor-tests/generated/TupleField/TupleField_getVisibility.ql c7af5373382394a686d12a23c4e688a7cc0dfe6b6cbee25c7e863b4713601ddb b174f30404e69eef112dedc8397ad444e968f12dde9befdccb051305d98a75d2 test/extractor-tests/generated/TupleFieldList/TupleFieldList.ql 7dc88440222ff036eb6aeabf9311568ea34f31f7c1ad19c71dd69a2dc17a6ed9 0255890d1389da004f18e8a0fc0b72d22790c36ccfacc6f452b269667f030f22 test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql ad552a9c0b9964d1770f14cabbb436db60ebedc3c569006542a8eae9ddb30f6d 3a8c49d629376a9b8326138836b05ee2366b1021ffd19f5be74ab023e70aa50d -test/extractor-tests/generated/TuplePat/TuplePat.ql 24ee56bc848537da65eb8ecef71e84cc351a2aedcc31d6fb53a5b7865f15f7c2 81db1076e2e4921ceb50933b96cd7b574caab1818de257c1e9038f3f97447d59 +test/extractor-tests/generated/TuplePat/TuplePat.ql c6c918abec68f6661ac6bc1646881f493dbd373ba849e4f8e8b6443e6ec77bac e2592b613948e63fc351d29deeeddbaaafc5eba724fc12c3f7505a83173b94ee test/extractor-tests/generated/TuplePat/TuplePat_getField.ql f000bed41af031bc56d0705ce312abe7ab3dc6745b2936798c9938781e51475e f464a84dbc36aa371d60d6db68d6251f6b275dc4ecebdc56f195637be390b067 -test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 6e6cfba0d2565782088af55ca977ada3d8093200aa180a49a67c9a176c52c254 c10c93823a9d814d694ca88fdf65a9bf8c1bb178e50c08982a97aa8d445284b3 +test/extractor-tests/generated/TuplePat/TuplePat_getType.ql 548b10c20ae92d958f06cbabd33998e9d7f6aa83fc40b5cec9a7781ce8e3c84b 8455c08ea1d56cfde04c65ea4ebff6f035b4dc010eb009a6d430947e54328dc8 +test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql 303a8239db387e666f3deb8ce815f6e2656c39cda24e5233ea35307e2ccb5527 265b774787f190b9cfc7035e70785ef541eb9b63b0b6f62fb1ba58ce931fdb1e test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql f3f2e23cc2a32aa5abc1e0fda1300dab1693230632b9eaa75bb3b1e82ee9ea1a 24b87a39ec639a26ff8c1d04dc3429b72266b2a3b1650a06a7cd4387b6f0e615 test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql 13a06696bbf1fa8d5b73107e28cdba40e93da04b27f9c54381b78a52368d2ad1 5558c35ea9bb371ad90a5b374d7530dd1936f83e6ba656ebfbfd5bd63598e088 +test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.ql 77fc351b97d6cc4f3adfc67c2961f43a43dac06a7d59be152edd36ec42027695 295da15b16eaf19baa463a0d65046f0e2d24ca9d8f539243270b2f2741843268 test/extractor-tests/generated/TupleType/TupleType.ql e5951a30817b8c51fe9cb9435f75bfdca2a1277b2094267d3205e33ef1ee9a9c 9a4d57322ed2cff57057654272981b056f833136f983141b033afaf64e19c117 test/extractor-tests/generated/TupleType/TupleType_getField.ql b73a8cdaf6ba46cf9b63d8819239d2d2c06b3496ed4768e8a387a7558178fbd8 6efbcf13c25d0ff3ed0c6d194ba44d2abfa620406badef8184953395fab92bb4 test/extractor-tests/generated/TypeAlias/TypeAlias.ql 87645d4aa0e2c789dfd7111c6150e72c65b2e108b371bb5fc247aa8d34a25893 6335b4e56d998eed57d8f026d2d1dbfc018754e87c755e1194a2ef9f7a468233 @@ -1071,8 +1117,9 @@ test/extractor-tests/generated/TypeParam/TypeParam_getAttr.ql c071639828faca21de test/extractor-tests/generated/TypeParam/TypeParam_getDefaultType.ql 705edd03cf04c030a244541de287d2acfd3842389bfc58a26cfd1577da475113 7f2680131d4bcf301e8207a4844305c459615744a83c81f2c3a245db8284df74 test/extractor-tests/generated/TypeParam/TypeParam_getName.ql 9d5b6d6a9f2a5793e2fff8dfa69d470659cc36dc417fc8b463364892f70c9d13 91dc4396c2af6c5175c188691c84b768da0d779d5d82afee19baf31e92c7dd91 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.ql 902ca2afaac7c9ca72dc9b3fcb07112726928cb15cc8fce09b83d3195113d14c 830d13fd79df43a37a2b7e2cf5e35dbfe90cf434191a4f97adee245f763f5713 test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql d8502be88bcd97465f387c410b5078a4709e32b2baa556a4918ea5e609c40dd7 b238dc37404254e3e7806d50a7b1453e17e71da122931331b16a55853d3a843f +test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.ql 93558385e350d1df44904c66394ab291f99bd2254acbc63faca750d75cbad518 e4a5bf40db67b49fac54202c6fbc8c6601f48a8d526573591e65dd5597a1fccf test/extractor-tests/generated/Union/Union.ql 1049e542ca7723490d05e20b5a7a5867f74a5126395f333eae512aeb05efefd6 1f1cd82337e7ade9d02d16123201bbff62983c537672b5c1babfe6b65d300e82 test/extractor-tests/generated/Union/Union_getAttr.ql 42fa0878a6566208863b1d884baf7b68b46089827fdb1dbbfacbfccf5966a9a2 54aa94f0281ca80d1a4bdb0e2240f4384af2ab8d50f251875d1877d0964579fc test/extractor-tests/generated/Union/Union_getCrateOrigin.ql c218308cf17b1490550229a725542d248617661b1a5fa14e9b0e18d29c5ecc00 e0489242c8ff7aa4dbfdebcd46a5e0d9bea0aa618eb0617e76b9b6f863a2907a @@ -1111,15 +1158,19 @@ test/extractor-tests/generated/WherePred/WherePred_getGenericParamList.ql 21c3aa test/extractor-tests/generated/WherePred/WherePred_getLifetime.ql e08d9d6cccf634746f42a6ee583bbb3e7e9a9edbb63242e73b2bff4463df55d8 139543750c18f88d9c1ad2cdbcf1699d597cf2264bbb6b02a7e5792444e277ef test/extractor-tests/generated/WherePred/WherePred_getTy.ql 34cee0335bbaf8946fe15e3c32449150d07a730fcca56b4faed554fbb8689e21 883976c8c27c276c402d591ebd89d076c2c4d8da4d4f738f3c860c34d4a03b97 test/extractor-tests/generated/WherePred/WherePred_getTypeBoundList.ql c78e31ff4d1822a6b76f403e5ccb8f5529b4f784e14e618833df0378adca55fc 8bb1c9b5a1cfca0f5e8335464f7439aa098063176fbd3edbaf3407169f1899e6 -test/extractor-tests/generated/WhileExpr/WhileExpr.ql 61c49414f2ed786a68b79bd9a77093e4086457edb6c136cf8a94f2ac830c2f5b 7737f724a297d011c12143e009a63926812c63c08a1067b03e8677697ab00f83 +test/extractor-tests/generated/WhileExpr/WhileExpr.ql 909ac744273c47a8145e7e54335d9509ab2b95b52c208276f37a5b9ff5390130 0619f87b3a73841e8fbf3bfe352681020904be1a8b1f280fc52db0fa8e10f780 test/extractor-tests/generated/WhileExpr/WhileExpr_getAttr.ql f8527130eb2492743c0e629c97db291abcefe3d35302c840fee327ab0d8f10fd b41bedd429e5566fd68a50140ff1f50b51e2c7c351cbc8253fbc126527073f7e test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql 84a021806423425b24eaeb9fb9967a6aadabe823c24e77a0dfefcb3509041597 147aa8bbe4dbf9b90be2467db8207dc96aed281e722eb6b9c998442a90911a6c test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql 60ef4de57d85c7df23c0518b944b3839a9b2478044326829b5bf709a8c8d7240 3916e9ff50733c58afdc09837339b72a555a043f92f1c4e09e1652866029b017 test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql cd62b7a464b5778ac925c3dbaf607e97d88ecd30f83f9106ace8e4e148d935b6 ab8027bddd6f138d3530ecd1aeb342b15015e886af1db80b75160c210a380086 -test/extractor-tests/generated/WildcardPat/WildcardPat.ql c6da9df739528763f423eac0fa537bfd524d3ea67794abdbc7f7c56193163273 42be2c5e296ad3afd05b5dcc208a4d2db2fda9323cda2df66054f921e37f6efe -test/extractor-tests/generated/YeetExpr/YeetExpr.ql 8a9f110486be12494256382374d6d5af8aa2210a84fd4452e99a3a3882b0eb59 510fa9eadeb062bd4f733ca6b6892e8908c2c6d58ec8478efc6942bd63a527f4 +test/extractor-tests/generated/WhileExpr/WhileExpr_getType.ql 6ca693366331476cd3b2f0e2f3e9dc98a7e847aebbb5a9e27090a089e3b8a3bd 4e091ebbed256e429bac27239c88ebb20b2cf71f401870cffc9a2a1924846c42 +test/extractor-tests/generated/WildcardPat/WildcardPat.ql f6b3c6da14fe17b7d6f69d66963dfdd1d6c13e826d8f1742340a71059a45ca67 923551bd8f5fcce2fdbc3622aa5f378ae54c18fbe46cfb7f083aadcd780c4688 +test/extractor-tests/generated/WildcardPat/WildcardPat_getType.ql 159261e20ed1daa46db3ecddaec755f258e73f50767bb78daa018888832ba01e fee08ec1c0e2d31088030be7a22cf9d6b2cace31b0b593cd16be33568511b4f7 +test/extractor-tests/generated/YeetExpr/YeetExpr.ql a8d93d1e6cd2673754eb2b35c02b9ebe208e44e32415709e2f8cd75ccae4b37b cc3e03957064ec3268ef141b4b4fad4d797757d8396a9e3fc2fd2dbcf494b472 test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql 84e44a1fbf1a9d18f255781a3a9aaa71583b6c05da228989471dbe03da4e817f 560332129d3341fbb1c0ea88c894033f0bde19d0adc081111f7bf8af55b61f88 test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql d77b68b621e5b903231e2dfbc53a1e1421d59a0ad2e8c346c2abc1a2dfc11efd 642eb5791eb336ff05594d06eca08735e54bdac3aecf5d31a4de1267d10cf440 -test/extractor-tests/generated/YieldExpr/YieldExpr.ql 1700b4b2660724d8dbabde5f3441424b79690e2a43dcc599dd69af255a7fc8ff a11e48d9fab0cc358c5806c01753d61e48713b740739ffc87f933754e7f103cc +test/extractor-tests/generated/YeetExpr/YeetExpr_getType.ql b02859904cde2b1c3f6c1181531277110c01f011f9358daffbd197f58f80a42a 9e7c01fba975d2f13aaedb712c4b4982e429d58f2636e900e4bd699319fae6d2 +test/extractor-tests/generated/YieldExpr/YieldExpr.ql 217a0e5070b11e75ec1bc15ee461b6cf4b3273a8754303aa209bec40f1e7ce0f 17be37de55ebde88ddc0b423a228ce636b00ba8a183ff05c58f9f4345d48f902 test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql d4c5e2710b4e41f6fcec51e74041a8af4c3e8116d42fd14fad6ae166a9c18031 cc6763b9f06a3fe6cafc672054cea8835f800f934af47c3c135b443486400394 test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql 592f8938120a036d78d180eb59634341d72d5e76854d9df48ab1b9b69db99c35 efe2955a5b4acc24257f9d79a007d39951736ce8ca11970864d1e366c4e516e6 +test/extractor-tests/generated/YieldExpr/YieldExpr_getType.ql 2d82a382b7302c40922c98572e37cba285161815c7bc821e6eb5794bffadcdd2 e3323a5e0b8339a767fb0490dcc78fbad30554243702865aa6e5ee746343fb35 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 6daad6a68c7b..77783a050f94 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -189,7 +189,6 @@ /lib/codeql/rust/elements/internal/BecomeExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/BinaryExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/BlockExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/BlockExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/BoxPatConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/BreakExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/CallExprBaseImpl.qll linguist-generated @@ -265,7 +264,6 @@ /lib/codeql/rust/elements/internal/MacroDefConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/MacroDefImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MacroExprConstructor.qll linguist-generated -/lib/codeql/rust/elements/internal/MacroExprImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MacroItemsConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/MacroItemsImpl.qll linguist-generated /lib/codeql/rust/elements/internal/MacroPatConstructor.qll linguist-generated @@ -593,12 +591,14 @@ /test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql linguist-generated /test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.ql linguist-generated /test/extractor-tests/generated/ArrayType/ArrayType.ql linguist-generated /test/extractor-tests/generated/ArrayType/ArrayType_getConstArg.ql linguist-generated /test/extractor-tests/generated/ArrayType/ArrayType_getTy.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/AsmExpr/AsmExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.ql linguist-generated /test/extractor-tests/generated/AssocTypeArg/AssocTypeArg.ql linguist-generated /test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getConstArg.ql linguist-generated /test/extractor-tests/generated/AssocTypeArg/AssocTypeArg_getGenericArgList.ql linguist-generated @@ -613,32 +613,40 @@ /test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/AwaitExpr/AwaitExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/BecomeExpr/BecomeExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr_getLhs.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr_getOperatorName.ql linguist-generated /test/extractor-tests/generated/BinaryExpr/BinaryExpr_getRhs.ql linguist-generated +/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/BlockExpr/BlockExpr_getStmtList.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.ql linguist-generated /test/extractor-tests/generated/BoxPat/BoxPat.ql linguist-generated /test/extractor-tests/generated/BoxPat/BoxPat_getPat.ql linguist-generated +/test/extractor-tests/generated/BoxPat/BoxPat_getType.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/BreakExpr/BreakExpr_getLifetime.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.ql linguist-generated /test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated /test/extractor-tests/generated/CallExpr/CallExpr_getArgList.ql linguist-generated /test/extractor-tests/generated/CallExpr/CallExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/CallExpr/CallExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getType.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/CastExpr/CastExpr_getTy.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr_getType.ql linguist-generated /test/extractor-tests/generated/ClosureBinder/ClosureBinder.ql linguist-generated /test/extractor-tests/generated/ClosureBinder/ClosureBinder_getGenericParamList.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated @@ -647,6 +655,7 @@ /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getClosureBinder.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getParamList.ql linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr_getRetType.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.ql linguist-generated /test/extractor-tests/generated/Comment/Comment.ql linguist-generated /test/extractor-tests/generated/Const/Const.ql linguist-generated /test/extractor-tests/generated/Const/Const_getAttr.ql linguist-generated @@ -660,6 +669,7 @@ /test/extractor-tests/generated/ConstArg/ConstArg_getExpr.ql linguist-generated /test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql linguist-generated /test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getBlockExpr.ql linguist-generated +/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.ql linguist-generated /test/extractor-tests/generated/ConstParam/ConstParam.ql linguist-generated /test/extractor-tests/generated/ConstParam/ConstParam_getAttr.ql linguist-generated /test/extractor-tests/generated/ConstParam/ConstParam_getDefaultVal.ql linguist-generated @@ -668,6 +678,7 @@ /test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLifetime.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.ql linguist-generated /test/extractor-tests/generated/DynTraitType/DynTraitType.ql linguist-generated /test/extractor-tests/generated/DynTraitType/DynTraitType_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/Enum/Enum.ql linguist-generated @@ -701,6 +712,7 @@ /test/extractor-tests/generated/FieldExpr/FieldExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/FieldExpr/FieldExpr_getNameRef.ql linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.ql linguist-generated /test/extractor-tests/generated/FnPtrType/FnPtrType.ql linguist-generated /test/extractor-tests/generated/FnPtrType/FnPtrType_getAbi.ql linguist-generated /test/extractor-tests/generated/FnPtrType/FnPtrType_getParamList.ql linguist-generated @@ -711,6 +723,7 @@ /test/extractor-tests/generated/ForExpr/ForExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/ForExpr/ForExpr_getLoopBody.ql linguist-generated /test/extractor-tests/generated/ForExpr/ForExpr_getPat.ql linguist-generated +/test/extractor-tests/generated/ForExpr/ForExpr_getType.ql linguist-generated /test/extractor-tests/generated/ForType/ForType.ql linguist-generated /test/extractor-tests/generated/ForType/ForType_getGenericParamList.ql linguist-generated /test/extractor-tests/generated/ForType/ForType_getTy.ql linguist-generated @@ -723,9 +736,11 @@ /test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getFormat.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getTemplate.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgument.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatArgument_getVariable.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql linguist-generated +/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.ql linguist-generated /test/extractor-tests/generated/FormatArgsExpr/Format_getArgument.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated /test/extractor-tests/generated/Function/Function_getAbi.ql linguist-generated @@ -747,11 +762,13 @@ /test/extractor-tests/generated/IdentPat/IdentPat_getAttr.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat_getName.ql linguist-generated /test/extractor-tests/generated/IdentPat/IdentPat_getPat.ql linguist-generated +/test/extractor-tests/generated/IdentPat/IdentPat_getType.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getCondition.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated /test/extractor-tests/generated/IfExpr/IfExpr_getThen.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getType.ql linguist-generated /test/extractor-tests/generated/Impl/Impl.ql linguist-generated /test/extractor-tests/generated/Impl/Impl_getAssocItemList.ql linguist-generated /test/extractor-tests/generated/Impl/Impl_getAttr.ql linguist-generated @@ -768,6 +785,7 @@ /test/extractor-tests/generated/IndexExpr/IndexExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr_getBase.ql linguist-generated /test/extractor-tests/generated/IndexExpr/IndexExpr_getIndex.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.ql linguist-generated /test/extractor-tests/generated/InferType/InferType.ql linguist-generated /test/extractor-tests/generated/ItemList/ItemList.ql linguist-generated /test/extractor-tests/generated/ItemList/ItemList_getAttr.ql linguist-generated @@ -780,6 +798,7 @@ /test/extractor-tests/generated/LetExpr/LetExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/LetExpr/LetExpr_getPat.ql linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr_getType.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getAttr.ql linguist-generated /test/extractor-tests/generated/LetStmt/LetStmt_getInitializer.ql linguist-generated @@ -797,12 +816,15 @@ /test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LiteralExpr/LiteralExpr_getTextValue.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.ql linguist-generated /test/extractor-tests/generated/LiteralPat/LiteralPat.ql linguist-generated /test/extractor-tests/generated/LiteralPat/LiteralPat_getLiteral.ql linguist-generated +/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/LoopExpr/LoopExpr_getLoopBody.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.ql linguist-generated /test/extractor-tests/generated/MacroCall/MacroCall.ql linguist-generated /test/extractor-tests/generated/MacroCall/MacroCall_getAttr.ql linguist-generated /test/extractor-tests/generated/MacroCall/MacroCall_getCrateOrigin.ql linguist-generated @@ -820,10 +842,12 @@ /test/extractor-tests/generated/MacroDef/MacroDef_getVisibility.ql linguist-generated /test/extractor-tests/generated/MacroExpr/MacroExpr.ql linguist-generated /test/extractor-tests/generated/MacroExpr/MacroExpr_getMacroCall.ql linguist-generated +/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.ql linguist-generated /test/extractor-tests/generated/MacroItems/MacroItems.ql linguist-generated /test/extractor-tests/generated/MacroItems/MacroItems_getItem.ql linguist-generated /test/extractor-tests/generated/MacroPat/MacroPat.ql linguist-generated /test/extractor-tests/generated/MacroPat/MacroPat_getMacroCall.ql linguist-generated +/test/extractor-tests/generated/MacroPat/MacroPat_getType.ql linguist-generated /test/extractor-tests/generated/MacroRules/MacroRules.ql linguist-generated /test/extractor-tests/generated/MacroRules/MacroRules_getAttr.ql linguist-generated /test/extractor-tests/generated/MacroRules/MacroRules_getCrateOrigin.ql linguist-generated @@ -848,6 +872,7 @@ /test/extractor-tests/generated/MatchExpr/MatchExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/MatchExpr/MatchExpr_getMatchArmList.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.ql linguist-generated /test/extractor-tests/generated/MatchGuard/MatchGuard.ql linguist-generated /test/extractor-tests/generated/MatchGuard/MatchGuard_getCondition.ql linguist-generated /test/extractor-tests/generated/Meta/Meta.ql linguist-generated @@ -862,6 +887,7 @@ /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getReceiver.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedCrateOrigin.ql linguist-generated /test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getResolvedPath.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.ql linguist-generated /test/extractor-tests/generated/Module/Module.ql linguist-generated /test/extractor-tests/generated/Module/Module_getAttr.ql linguist-generated /test/extractor-tests/generated/Module/Module_getCrateOrigin.ql linguist-generated @@ -878,8 +904,10 @@ /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getField.ql linguist-generated /test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getTy.ql linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat.ql linguist-generated /test/extractor-tests/generated/OrPat/OrPat_getPat.ql linguist-generated +/test/extractor-tests/generated/OrPat/OrPat_getType.ql linguist-generated /test/extractor-tests/generated/Param/Param.ql linguist-generated /test/extractor-tests/generated/Param/Param_getAttr.ql linguist-generated /test/extractor-tests/generated/Param/Param_getPat.ql linguist-generated @@ -890,16 +918,20 @@ /test/extractor-tests/generated/ParenExpr/ParenExpr.ql linguist-generated /test/extractor-tests/generated/ParenExpr/ParenExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ParenExpr/ParenExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.ql linguist-generated /test/extractor-tests/generated/ParenPat/ParenPat.ql linguist-generated /test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql linguist-generated +/test/extractor-tests/generated/ParenPat/ParenPat_getType.ql linguist-generated /test/extractor-tests/generated/ParenType/ParenType.ql linguist-generated /test/extractor-tests/generated/ParenType/ParenType_getTy.ql linguist-generated /test/extractor-tests/generated/Path/Path.ql linguist-generated /test/extractor-tests/generated/Path/PathExpr.ql linguist-generated /test/extractor-tests/generated/Path/PathExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/Path/PathExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/Path/PathExpr_getType.ql linguist-generated /test/extractor-tests/generated/Path/PathPat.ql linguist-generated /test/extractor-tests/generated/Path/PathPat_getPath.ql linguist-generated +/test/extractor-tests/generated/Path/PathPat_getType.ql linguist-generated /test/extractor-tests/generated/Path/PathSegment.ql linguist-generated /test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql linguist-generated /test/extractor-tests/generated/Path/PathSegment_getNameRef.ql linguist-generated @@ -918,6 +950,7 @@ /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getOperatorName.ql linguist-generated +/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.ql linguist-generated /test/extractor-tests/generated/PtrType/PtrType.ql linguist-generated /test/extractor-tests/generated/PtrType/PtrType_getTy.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated @@ -925,13 +958,16 @@ /test/extractor-tests/generated/RangeExpr/RangeExpr_getEnd.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getOperatorName.ql linguist-generated /test/extractor-tests/generated/RangeExpr/RangeExpr_getStart.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getEnd.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getOperatorName.ql linguist-generated /test/extractor-tests/generated/RangePat/RangePat_getStart.ql linguist-generated +/test/extractor-tests/generated/RangePat/RangePat_getType.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_getType.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 @@ -950,6 +986,7 @@ /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_getType.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 @@ -960,8 +997,10 @@ /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 +/test/extractor-tests/generated/RefExpr/RefExpr_getType.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat.ql linguist-generated /test/extractor-tests/generated/RefPat/RefPat_getPat.ql linguist-generated +/test/extractor-tests/generated/RefPat/RefPat_getType.ql linguist-generated /test/extractor-tests/generated/RefType/RefType.ql linguist-generated /test/extractor-tests/generated/RefType/RefType_getLifetime.ql linguist-generated /test/extractor-tests/generated/RefType/RefType_getTy.ql linguist-generated @@ -969,11 +1008,13 @@ /test/extractor-tests/generated/Rename/Rename_getName.ql linguist-generated /test/extractor-tests/generated/RestPat/RestPat.ql linguist-generated /test/extractor-tests/generated/RestPat/RestPat_getAttr.ql linguist-generated +/test/extractor-tests/generated/RestPat/RestPat_getType.ql linguist-generated /test/extractor-tests/generated/RetType/RetType.ql linguist-generated /test/extractor-tests/generated/RetType/RetType_getTy.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.ql linguist-generated /test/extractor-tests/generated/ReturnTypeSyntax/ReturnTypeSyntax.ql linguist-generated /test/extractor-tests/generated/SelfParam/SelfParam.ql linguist-generated /test/extractor-tests/generated/SelfParam/SelfParam_getAttr.ql linguist-generated @@ -982,6 +1023,7 @@ /test/extractor-tests/generated/SelfParam/SelfParam_getTy.ql linguist-generated /test/extractor-tests/generated/SlicePat/SlicePat.ql linguist-generated /test/extractor-tests/generated/SlicePat/SlicePat_getPat.ql linguist-generated +/test/extractor-tests/generated/SlicePat/SlicePat_getType.ql linguist-generated /test/extractor-tests/generated/SliceType/SliceType.ql linguist-generated /test/extractor-tests/generated/SliceType/SliceType_getTy.ql linguist-generated /test/extractor-tests/generated/SourceFile/SourceFile.ql linguist-generated @@ -1034,9 +1076,11 @@ /test/extractor-tests/generated/TryExpr/TryExpr.ql linguist-generated /test/extractor-tests/generated/TryExpr/TryExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/TryExpr/TryExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/TryExpr/TryExpr_getType.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/TupleExpr/TupleExpr_getField.ql linguist-generated +/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.ql linguist-generated /test/extractor-tests/generated/TupleField/TupleField.ql linguist-generated /test/extractor-tests/generated/TupleField/TupleField_getAttr.ql linguist-generated /test/extractor-tests/generated/TupleField/TupleField_getTy.ql linguist-generated @@ -1045,9 +1089,11 @@ /test/extractor-tests/generated/TupleFieldList/TupleFieldList_getField.ql linguist-generated /test/extractor-tests/generated/TuplePat/TuplePat.ql linguist-generated /test/extractor-tests/generated/TuplePat/TuplePat_getField.ql linguist-generated +/test/extractor-tests/generated/TuplePat/TuplePat_getType.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getField.ql linguist-generated /test/extractor-tests/generated/TupleStructPat/TupleStructPat_getPath.ql linguist-generated +/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.ql linguist-generated /test/extractor-tests/generated/TupleType/TupleType.ql linguist-generated /test/extractor-tests/generated/TupleType/TupleType_getField.ql linguist-generated /test/extractor-tests/generated/TypeAlias/TypeAlias.ql linguist-generated @@ -1075,6 +1121,7 @@ /test/extractor-tests/generated/TypeParam/TypeParam_getTypeBoundList.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql linguist-generated /test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.ql linguist-generated /test/extractor-tests/generated/Union/Union.ql linguist-generated /test/extractor-tests/generated/Union/Union_getAttr.ql linguist-generated /test/extractor-tests/generated/Union/Union_getCrateOrigin.ql linguist-generated @@ -1118,10 +1165,14 @@ /test/extractor-tests/generated/WhileExpr/WhileExpr_getCondition.ql linguist-generated /test/extractor-tests/generated/WhileExpr/WhileExpr_getLabel.ql linguist-generated /test/extractor-tests/generated/WhileExpr/WhileExpr_getLoopBody.ql linguist-generated +/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.ql linguist-generated /test/extractor-tests/generated/WildcardPat/WildcardPat.ql linguist-generated +/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll index b550ecf89b75..40a4f8d16725 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll @@ -757,6 +757,16 @@ module MakeCfgNodes Input> { /** Gets the underlying `Expr`. */ Expr getExpr() { result = node } + + /** + * Gets the type of this expression, if it exists. + */ + string getType() { result = node.getType() } + + /** + * Holds if `getType()` exists. + */ + predicate hasType() { exists(this.getType()) } } final private class ParentFieldExpr extends ParentAstNode, FieldExpr { @@ -2005,6 +2015,16 @@ module MakeCfgNodes Input> { /** Gets the underlying `Pat`. */ Pat getPat() { result = node } + + /** + * Gets the type of this pat, if it exists. + */ + string getType() { result = node.getType() } + + /** + * Holds if `getType()` exists. + */ + predicate hasType() { exists(this.getType()) } } final private class ParentPathExpr extends ParentAstNode, PathExpr { diff --git a/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll index 9011109b194e..039e9fe7f83a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BlockExprImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `BlockExpr`. * @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.BlockExpr * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A block expression. For example: * ```rust @@ -26,5 +26,16 @@ module Impl { * } * ``` */ - class BlockExpr extends Generated::BlockExpr { } + class BlockExpr extends Generated::BlockExpr { + override string getType() { + result = super.getType() + or + not exists(super.getType()) and + ( + result = this.getStmtList().getTailExpr().getType() + or + not exists(this.getStmtList().getTailExpr()) and result = "()" + ) + } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll index cb17fa523617..21b730bf1354 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FormatTemplateVariableAccessImpl.qll @@ -11,6 +11,7 @@ private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.elements.Format private import codeql.rust.elements.NamedFormatArgument private import codeql.Locations +private import codeql.rust.elements.Variable /** * INTERNAL: This module contains the customizable definition of `FormatTemplateVariableAccess` and should not @@ -36,5 +37,9 @@ module Impl { /** Gets the underlying `NamedFormatArgument` . */ NamedFormatArgument getArgument() { result = argument } + + override string getType() { + result = any(Variable v | v.getAnAccess() = this).getPat().getType() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll index c90ee6ccdc06..3b4d6f4c7f08 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/IfExprImpl.qll @@ -39,5 +39,13 @@ module Impl { or index = 3 and this.hasElse() and result = "else {...}" } + + override string getType() { + result = super.getType() + or + // For some reason rust-analyzer does not return a type for a chained `if`, so we use the parent's type instead. + not exists(super.getType()) and + result = any(IfExpr parent | parent.getElse() = this).getType() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll index f68c79da16b1..6005f34fd675 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll @@ -5,6 +5,8 @@ */ private import codeql.rust.elements.internal.generated.LiteralExpr +private import codeql.rust.elements.FormatArgsExpr +private import codeql.rust.elements.LiteralPat /** * INTERNAL: This module contains the customizable definition of `LiteralExpr` and should not @@ -41,5 +43,13 @@ module Impl { if v.length() > 30 then result = v.substring(0, 30) + "..." else result = v ) } + + override string getType() { + result = super.getType() + or + exists(FormatArgsExpr f | f.getTemplate() = this and result = "&str") + or + result = any(LiteralPat p | p.getLiteral() = this).getType() + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll index 42c46e9e60b6..2261b89816e0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroExprImpl.qll @@ -1,4 +1,3 @@ -// generated by codegen, remove this comment if you wish to edit this file /** * This module provides a hand-modifiable wrapper around the generated class `MacroExpr`. * @@ -6,17 +5,35 @@ */ private import codeql.rust.elements.internal.generated.MacroExpr +private import codeql.rust.elements.MacroStmts /** * INTERNAL: This module contains the customizable definition of `MacroExpr` and should not * be referenced directly. */ module Impl { + // the following QLdoc is generated: if you need to edit it, do it in the schema file /** * A MacroExpr. For example: * ```rust * todo!() * ``` */ - class MacroExpr extends Generated::MacroExpr { } + class MacroExpr extends Generated::MacroExpr { + override string getType() { + result = super.getType() + or + not exists(super.getType()) and + ( + result = this.getMacroCall().getExpanded().(Expr).getType() or + result = typeOf(this.getMacroCall().getExpanded().(MacroStmts)) + ) + } + } + + string typeOf(MacroStmts stmts) { + result = stmts.getExpr().getType() + or + not exists(stmts.getExpr()) and result = "()" + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll index 19445493c889..531682e96dc3 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll @@ -5,6 +5,7 @@ */ private import codeql.rust.elements.internal.generated.PathExpr +private import codeql.rust.elements.CallExpr /** * INTERNAL: This module contains the customizable definition of `PathExpr` and should not @@ -25,5 +26,22 @@ module Impl { override string toString() { result = this.toAbbreviatedString() } override string toAbbreviatedString() { result = this.getPath().toString() } + + override string getType() { + result = super.getType() + or + // Special case for `rustc_box`; these get translated to `box X` in the HIR layer. + // ```rust + // #[rustc_box] + // alloc.boxed::Box::new(X) + // ``` + not exists(super.getType()) and + exists(CallExpr c, string tp | + c.getAnAttr().getMeta().getPath().getPart().getNameRef().getText() = "rustc_box" and + this = c.getExpr() and + tp = c.getArgList().getArg(0).getType() and + result = "fn new(T) -> Box".replaceAll("T", tp) + ) + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll index f8cec8877515..51e76b496c9a 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Expr.qll @@ -18,5 +18,15 @@ module Generated { * INTERNAL: Do not reference the `Generated::Expr` class directly. * Use the subclass `Expr`, where the following predicates are available. */ - class Expr extends Synth::TExpr, AstNodeImpl::AstNode { } + class Expr extends Synth::TExpr, AstNodeImpl::AstNode { + /** + * Gets the type of this expression, if it exists. + */ + string getType() { result = Synth::convertExprToRaw(this).(Raw::Expr).getType() } + + /** + * Holds if `getType()` exists. + */ + final predicate hasType() { exists(this.getType()) } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll index e0725bd0212b..54244bcfee65 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Pat.qll @@ -18,5 +18,15 @@ module Generated { * INTERNAL: Do not reference the `Generated::Pat` class directly. * Use the subclass `Pat`, where the following predicates are available. */ - class Pat extends Synth::TPat, AstNodeImpl::AstNode { } + class Pat extends Synth::TPat, AstNodeImpl::AstNode { + /** + * Gets the type of this pat, if it exists. + */ + string getType() { result = Synth::convertPatToRaw(this).(Raw::Pat).getType() } + + /** + * Holds if `getType()` exists. + */ + final predicate hasType() { exists(this.getType()) } + } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index 64de46c55bb1..c9dd4fce2f1d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -156,7 +156,12 @@ module Raw { * INTERNAL: Do not use. * The base class for expressions. */ - class Expr extends @expr, AstNode { } + class Expr extends @expr, AstNode { + /** + * Gets the type of this expression, if it exists. + */ + string getType() { expr_types(this, result) } + } /** * INTERNAL: Do not use. @@ -574,7 +579,12 @@ module Raw { * INTERNAL: Do not use. * The base class for patterns. */ - class Pat extends @pat, AstNode { } + class Pat extends @pat, AstNode { + /** + * Gets the type of this pat, if it exists. + */ + string getType() { pat_types(this, result) } + } /** * INTERNAL: Do not use. diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index c9933b5b5e33..100675d4efd6 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -321,6 +321,12 @@ closure_binder_generic_param_lists( | @yield_expr ; +#keyset[id] +expr_types( + int id: @expr ref, + string type_: string ref +); + @extern_item = @function | @macro_call @@ -641,6 +647,12 @@ param_list_self_params( | @wildcard_pat ; +#keyset[id] +pat_types( + int id: @pat ref, + string type_: string ref +); + path_segments( unique int id: @path_segment ); diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected index e1ab176fe514..08d0731e8387 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.expected @@ -1,2 +1,2 @@ -| gen_array_expr.rs:5:5:5:13 | [...] | getNumberOfAttrs: | 0 | getNumberOfExprs: | 3 | -| gen_array_expr.rs:6:5:6:11 | [...] | getNumberOfAttrs: | 0 | getNumberOfExprs: | 2 | +| gen_array_expr.rs:5:5:5:13 | [...] | hasType: | yes | getNumberOfAttrs: | 0 | getNumberOfExprs: | 3 | +| gen_array_expr.rs:6:5:6:11 | [...] | hasType: | yes | getNumberOfAttrs: | 0 | getNumberOfExprs: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql index e0f2223f57bc..f3136467387c 100644 --- a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from ArrayExpr x, int getNumberOfAttrs, int getNumberOfExprs +from ArrayExpr x, string hasType, int getNumberOfAttrs, int getNumberOfExprs where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and getNumberOfExprs = x.getNumberOfExprs() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExprs:", getNumberOfExprs +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExprs:", + getNumberOfExprs diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.expected new file mode 100644 index 000000000000..29aa612fa8af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_array_expr.rs:5:5:5:13 | [...] | [i32; 3] | +| gen_array_expr.rs:6:5:6:11 | [...] | [i32; 10] | diff --git a/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.ql new file mode 100644 index 000000000000..bb7020ca9c90 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ArrayExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected index 19464c21fd6a..cabc8f7745a7 100644 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.expected @@ -1 +1 @@ -| gen_asm_expr.rs:6:9:6:24 | AsmExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_asm_expr.rs:6:9:6:24 | AsmExpr | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql index f5662fedfbb1..51bfbf314460 100644 --- a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from AsmExpr x, int getNumberOfAttrs, string hasExpr +from AsmExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.expected b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.expected new file mode 100644 index 000000000000..8def72c29591 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.expected @@ -0,0 +1 @@ +| gen_asm_expr.rs:6:9:6:24 | AsmExpr | () | diff --git a/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.ql b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.ql new file mode 100644 index 000000000000..a87a610b73f9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsmExpr/AsmExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AsmExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected index 9104ba77e5fe..7223bd518b83 100644 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected @@ -1 +1 @@ -| gen_await_expr.rs:6:17:6:27 | await ... | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_await_expr.rs:6:17:6:27 | await ... | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql index f78d81a3ec4f..4688f3b6530f 100644 --- a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from AwaitExpr x, int getNumberOfAttrs, string hasExpr +from AwaitExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.expected new file mode 100644 index 000000000000..afc11c5d8241 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.expected @@ -0,0 +1 @@ +| gen_await_expr.rs:6:17:6:27 | await ... | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.ql new file mode 100644 index 000000000000..9d77f18d522d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from AwaitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected index ce3e6a096909..025af549f142 100644 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected @@ -1 +1 @@ -| gen_become_expr.rs:8:10:8:36 | become ... | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_become_expr.rs:8:10:8:36 | become ... | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql index e297230419c4..1e04e61957c7 100644 --- a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from BecomeExpr x, int getNumberOfAttrs, string hasExpr +from BecomeExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.expected new file mode 100644 index 000000000000..efb96f702bce --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.expected @@ -0,0 +1 @@ +| gen_become_expr.rs:8:10:8:36 | become ... | ! | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.ql new file mode 100644 index 000000000000..ac71b27702e7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BecomeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected index 2f7a47933b1c..304bad9516f9 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.expected @@ -1,5 +1,5 @@ -| gen_binary_expr.rs:5:5:5:9 | ... + ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:6:5:6:10 | ... && ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:7:5:7:10 | ... <= ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:8:5:8:9 | ... = ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | -| gen_binary_expr.rs:9:5:9:10 | ... += ... | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:5:5:5:9 | ... + ... | hasType: | yes | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | hasType: | yes | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | hasType: | yes | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | hasType: | yes | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | hasType: | yes | getNumberOfAttrs: | 0 | hasLhs: | yes | hasOperatorName: | yes | hasRhs: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql index 87c00d18e3e6..cc497c6c3edb 100644 --- a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr.ql @@ -2,13 +2,16 @@ import codeql.rust.elements import TestUtils -from BinaryExpr x, int getNumberOfAttrs, string hasLhs, string hasOperatorName, string hasRhs +from + BinaryExpr x, string hasType, int getNumberOfAttrs, string hasLhs, string hasOperatorName, + string hasRhs where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasLhs() then hasLhs = "yes" else hasLhs = "no") and (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and if x.hasRhs() then hasRhs = "yes" else hasRhs = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLhs:", hasLhs, "hasOperatorName:", - hasOperatorName, "hasRhs:", hasRhs +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasLhs:", hasLhs, + "hasOperatorName:", hasOperatorName, "hasRhs:", hasRhs diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.expected b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.expected new file mode 100644 index 000000000000..acd387aa75d4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.expected @@ -0,0 +1,5 @@ +| gen_binary_expr.rs:5:5:5:9 | ... + ... | {unknown} | +| gen_binary_expr.rs:6:5:6:10 | ... && ... | bool | +| gen_binary_expr.rs:7:5:7:10 | ... <= ... | bool | +| gen_binary_expr.rs:8:5:8:9 | ... = ... | () | +| gen_binary_expr.rs:9:5:9:10 | ... += ... | () | diff --git a/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.ql b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.ql new file mode 100644 index 000000000000..2e71d35661b0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryExpr/BinaryExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BinaryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected index b6be24d0bb73..0670679fafce 100644 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected @@ -1,3 +1,3 @@ -| gen_block_expr.rs:3:28:12:1 | { ... } | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | -| gen_block_expr.rs:5:5:7:5 | { ... } | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | -| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | hasLabel: | yes | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | +| gen_block_expr.rs:3:28:12:1 | { ... } | hasType: | yes | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | +| gen_block_expr.rs:5:5:7:5 | { ... } | hasType: | yes | hasLabel: | no | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | +| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | hasType: | yes | hasLabel: | yes | getNumberOfAttrs: | 0 | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isTry: | no | isUnsafe: | no | hasStmtList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql index 992c06a605b6..846933f52112 100644 --- a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql @@ -3,11 +3,12 @@ import codeql.rust.elements import TestUtils from - BlockExpr x, string hasLabel, int getNumberOfAttrs, string isAsync, string isConst, string isGen, - string isMove, string isTry, string isUnsafe, string hasStmtList + BlockExpr x, string hasType, string hasLabel, int getNumberOfAttrs, string isAsync, + string isConst, string isGen, string isMove, string isTry, string isUnsafe, string hasStmtList where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and @@ -17,6 +18,6 @@ where (if x.isTry() then isTry = "yes" else isTry = "no") and (if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no") and if x.hasStmtList() then hasStmtList = "yes" else hasStmtList = "no" -select x, "hasLabel:", hasLabel, "getNumberOfAttrs:", getNumberOfAttrs, "isAsync:", isAsync, - "isConst:", isConst, "isGen:", isGen, "isMove:", isMove, "isTry:", isTry, "isUnsafe:", isUnsafe, - "hasStmtList:", hasStmtList +select x, "hasType:", hasType, "hasLabel:", hasLabel, "getNumberOfAttrs:", getNumberOfAttrs, + "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen, "isMove:", isMove, "isTry:", isTry, + "isUnsafe:", isUnsafe, "hasStmtList:", hasStmtList diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.expected new file mode 100644 index 000000000000..cfb909693811 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | { ... } | () | +| gen_block_expr.rs:5:5:7:5 | { ... } | () | +| gen_block_expr.rs:8:5:11:5 | 'label: { ... } | () | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.ql new file mode 100644 index 000000000000..3a6e75d1e037 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected index 8ca2412e8ff5..c25b6857909e 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.expected @@ -1,2 +1,2 @@ -| gen_box_pat.rs:6:9:6:27 | box ... | hasPat: | yes | -| gen_box_pat.rs:7:9:7:24 | box ...::None | hasPat: | yes | +| gen_box_pat.rs:6:9:6:27 | box ... | hasType: | yes | hasPat: | yes | +| gen_box_pat.rs:7:9:7:24 | box ...::None | hasType: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql index cee3b683e66d..94bfa2b21543 100644 --- a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from BoxPat x, string hasPat +from BoxPat x, string hasType, string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasPat:", hasPat +select x, "hasType:", hasType, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.expected b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.expected new file mode 100644 index 000000000000..73406b8c405c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.expected @@ -0,0 +1,2 @@ +| gen_box_pat.rs:6:9:6:27 | box ... | Box, Global> | +| gen_box_pat.rs:7:9:7:24 | box ...::None | Box, Global> | diff --git a/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.ql b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.ql new file mode 100644 index 000000000000..69a1f6b436da --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxPat/BoxPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BoxPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected index 30c734fd682d..90e433b80817 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected @@ -1,3 +1,3 @@ -| gen_break_expr.rs:7:13:7:17 | break | getNumberOfAttrs: | 0 | hasExpr: | no | hasLifetime: | no | -| gen_break_expr.rs:12:13:12:27 | break ''label 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | -| gen_break_expr.rs:17:13:17:27 | break ''label 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | +| gen_break_expr.rs:7:13:7:17 | break | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | no | hasLifetime: | no | +| gen_break_expr.rs:12:13:12:27 | break ''label 42 | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | +| gen_break_expr.rs:17:13:17:27 | break ''label 42 | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql index 1238e6e42319..d8d6d4931d13 100644 --- a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from BreakExpr x, int getNumberOfAttrs, string hasExpr, string hasLifetime +from BreakExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasLifetime where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasLifetime:", hasLifetime +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.expected new file mode 100644 index 000000000000..a06cb33d0c22 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.expected @@ -0,0 +1,3 @@ +| gen_break_expr.rs:7:13:7:17 | break | ! | +| gen_break_expr.rs:12:13:12:27 | break ''label 42 | ! | +| gen_break_expr.rs:17:13:17:27 | break ''label 42 | ! | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.ql new file mode 100644 index 000000000000..38b9c615f1e0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected index a3f108b5584e..fb476869384e 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -1,4 +1,4 @@ -| gen_call_expr.rs:5:5:5:11 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | -| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | -| gen_call_expr.rs:7:5:7:14 | ...(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | -| gen_call_expr.rs:8:5:8:10 | foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:5:5:5:11 | foo(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:7:5:7:14 | ...(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_call_expr.rs:8:5:8:10 | foo(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql index b44136c4942e..fbc0527aa3d9 100644 --- a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from CallExpr x, string hasArgList, int getNumberOfAttrs, string hasExpr +from CallExpr x, string hasType, string hasArgList, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, + "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.expected new file mode 100644 index 000000000000..13cdcf031536 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | foo(...) | {unknown} | +| gen_call_expr.rs:6:5:6:23 | foo::<...>(...) | {unknown} | +| gen_call_expr.rs:7:5:7:14 | ...(...) | {unknown} | +| gen_call_expr.rs:8:5:8:10 | foo(...) | i32 | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.ql new file mode 100644 index 000000000000..cc6dbff58c6b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected index c85e41866313..041ff576c4a3 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -1 +1 @@ -| gen_cast_expr.rs:5:5:5:16 | value as u64 | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTy: | yes | +| gen_cast_expr.rs:5:5:5:16 | value as u64 | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasTy: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql index d7db68cfdf2b..91c583b3cc70 100644 --- a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from CastExpr x, int getNumberOfAttrs, string hasExpr, string hasTy +from CastExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasTy where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasTy() then hasTy = "yes" else hasTy = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTy:", hasTy +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasTy:", + hasTy diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.expected new file mode 100644 index 000000000000..f355684ff02c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | value as u64 | u64 | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.ql new file mode 100644 index 000000000000..ee0c54e1b8f7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from CastExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected index 3ea9f463a00d..d41a5ce7aac6 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.expected @@ -1,5 +1,5 @@ -| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes | -| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | -| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no | +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasType: | yes | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasType: | yes | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | yes | isStatic: | no | hasRetType: | yes | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 0 | hasType: | yes | hasBody: | yes | hasClosureBinder: | no | isAsync: | yes | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasType: | yes | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | no | hasRetType: | no | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | hasParamList: | yes | getNumberOfAttrs: | 1 | hasType: | yes | hasBody: | yes | hasClosureBinder: | no | isAsync: | no | isConst: | no | isGen: | no | isMove: | no | isStatic: | yes | hasRetType: | no | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql index b4b3dddc6798..504f75c09b44 100644 --- a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql @@ -3,13 +3,15 @@ import codeql.rust.elements import TestUtils from - ClosureExpr x, string hasParamList, int getNumberOfAttrs, string hasBody, string hasClosureBinder, - string isAsync, string isConst, string isGen, string isMove, string isStatic, string hasRetType + ClosureExpr x, string hasParamList, int getNumberOfAttrs, string hasType, string hasBody, + string hasClosureBinder, string isAsync, string isConst, string isGen, string isMove, + string isStatic, string hasRetType where toBeTested(x) and not x.isUnknown() and (if x.hasParamList() then hasParamList = "yes" else hasParamList = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasBody() then hasBody = "yes" else hasBody = "no") and (if x.hasClosureBinder() then hasClosureBinder = "yes" else hasClosureBinder = "no") and (if x.isAsync() then isAsync = "yes" else isAsync = "no") and @@ -18,6 +20,6 @@ where (if x.isMove() then isMove = "yes" else isMove = "no") and (if x.isStatic() then isStatic = "yes" else isStatic = "no") and if x.hasRetType() then hasRetType = "yes" else hasRetType = "no" -select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, "hasBody:", hasBody, - "hasClosureBinder:", hasClosureBinder, "isAsync:", isAsync, "isConst:", isConst, "isGen:", isGen, - "isMove:", isMove, "isStatic:", isStatic, "hasRetType:", hasRetType +select x, "hasParamList:", hasParamList, "getNumberOfAttrs:", getNumberOfAttrs, "hasType:", hasType, + "hasBody:", hasBody, "hasClosureBinder:", hasClosureBinder, "isAsync:", isAsync, "isConst:", + isConst, "isGen:", isGen, "isMove:", isMove, "isStatic:", isStatic, "hasRetType:", hasRetType diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.expected new file mode 100644 index 000000000000..077c36928579 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.expected @@ -0,0 +1,5 @@ +| gen_closure_expr.rs:5:5:5:13 | \|...\| ... | impl Fn({unknown}) -> {unknown} | +| gen_closure_expr.rs:6:5:6:34 | \|...\| ... | impl Fn(i32) -> i32 | +| gen_closure_expr.rs:7:5:7:27 | \|...\| ... | impl Fn(i32, {unknown}) -> impl Future | +| gen_closure_expr.rs:8:6:9:15 | \|...\| ... | \|{unknown}\| yields {unknown} -> {unknown} | +| gen_closure_expr.rs:10:6:11:23 | \|...\| ... | \|{unknown}\| yields {unknown} -> {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.ql new file mode 100644 index 000000000000..c847fa7783fb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ClosureExpr/ClosureExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ClosureExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected index 21feba1f729f..64e4e9f27227 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.expected @@ -1 +1 @@ -| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | hasBlockExpr: | yes | isConst: | yes | +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | hasType: | yes | hasBlockExpr: | yes | isConst: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql index 005f8a752c1f..556133dd7281 100644 --- a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from ConstBlockPat x, string hasBlockExpr, string isConst +from ConstBlockPat x, string hasType, string hasBlockExpr, string isConst where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasBlockExpr() then hasBlockExpr = "yes" else hasBlockExpr = "no") and if x.isConst() then isConst = "yes" else isConst = "no" -select x, "hasBlockExpr:", hasBlockExpr, "isConst:", isConst +select x, "hasType:", hasType, "hasBlockExpr:", hasBlockExpr, "isConst:", isConst diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.expected b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.expected new file mode 100644 index 000000000000..af8fbf2022ba --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.expected @@ -0,0 +1 @@ +| gen_const_block_pat.rs:6:9:6:27 | ConstBlockPat | i32 | diff --git a/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.ql b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.ql new file mode 100644 index 000000000000..08bda3b697eb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstBlockPat/ConstBlockPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ConstBlockPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected index a09556b9a3ff..629cb93058a7 100644 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected @@ -1,2 +1,2 @@ -| gen_continue_expr.rs:7:13:7:20 | continue | getNumberOfAttrs: | 0 | hasLifetime: | no | -| gen_continue_expr.rs:12:13:12:27 | continue 'label | getNumberOfAttrs: | 0 | hasLifetime: | yes | +| gen_continue_expr.rs:7:13:7:20 | continue | hasType: | yes | getNumberOfAttrs: | 0 | hasLifetime: | no | +| gen_continue_expr.rs:12:13:12:27 | continue 'label | hasType: | yes | getNumberOfAttrs: | 0 | hasLifetime: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql index 9d2e2d5177d2..1d754b33eede 100644 --- a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from ContinueExpr x, int getNumberOfAttrs, string hasLifetime +from ContinueExpr x, string hasType, int getNumberOfAttrs, string hasLifetime where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasLifetime() then hasLifetime = "yes" else hasLifetime = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasLifetime:", hasLifetime diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.expected new file mode 100644 index 000000000000..462b42338c41 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_continue_expr.rs:7:13:7:20 | continue | ! | +| gen_continue_expr.rs:12:13:12:27 | continue 'label | ! | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.ql new file mode 100644 index 000000000000..e6ab72fa3672 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ContinueExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected index c25a0633e402..419b8ef9d157 100644 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected @@ -1 +1 @@ -| gen_field_expr.rs:5:5:5:9 | x.foo | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes | +| gen_field_expr.rs:5:5:5:9 | x.foo | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasNameRef: | yes | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql index 1de84ec34277..4f1972ae0210 100644 --- a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from FieldExpr x, int getNumberOfAttrs, string hasExpr, string hasNameRef +from FieldExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasNameRef where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasNameRef:", hasNameRef +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "hasNameRef:", hasNameRef diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.expected new file mode 100644 index 000000000000..81d239ae8959 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | x.foo | () | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.ql new file mode 100644 index 000000000000..3f49be414184 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql index 60f5ab1e0809..f66ed379ecfc 100644 --- a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr.ql @@ -3,15 +3,16 @@ import codeql.rust.elements import TestUtils from - ForExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs, string hasIterable, - string hasPat + ForExpr x, string hasType, string hasLabel, string hasLoopBody, int getNumberOfAttrs, + string hasIterable, string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasIterable() then hasIterable = "yes" else hasIterable = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs, - "hasIterable:", hasIterable, "hasPat:", hasPat +select x, "hasType:", hasType, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, + "getNumberOfAttrs:", getNumberOfAttrs, "hasIterable:", hasIterable, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getType.ql new file mode 100644 index 000000000000..4cdd98fe32a8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ForExpr/ForExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ForExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected index bed19ed26d47..2a1040344569 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.expected @@ -1,7 +1,7 @@ -| gen_format.rs:5:14:5:32 | FormatArgsExpr | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 0 | -| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | -| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | -| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | getNumberOfArgs: | 3 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | +| gen_format.rs:5:14:5:32 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 1 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | +| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 0 | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 2 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 2 | +| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 0 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | hasType: | yes | getNumberOfArgs: | 3 | getNumberOfAttrs: | 0 | hasTemplate: | yes | getNumberOfFormats: | 1 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql index 6a43bc1ea0a3..f5e43995cc2e 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr.ql @@ -3,14 +3,15 @@ import codeql.rust.elements import TestUtils from - FormatArgsExpr x, int getNumberOfArgs, int getNumberOfAttrs, string hasTemplate, + FormatArgsExpr x, string hasType, int getNumberOfArgs, int getNumberOfAttrs, string hasTemplate, int getNumberOfFormats where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfArgs = x.getNumberOfArgs() and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasTemplate() then hasTemplate = "yes" else hasTemplate = "no") and getNumberOfFormats = x.getNumberOfFormats() -select x, "getNumberOfArgs:", getNumberOfArgs, "getNumberOfAttrs:", getNumberOfAttrs, - "hasTemplate:", hasTemplate, "getNumberOfFormats:", getNumberOfFormats +select x, "hasType:", hasType, "getNumberOfArgs:", getNumberOfArgs, "getNumberOfAttrs:", + getNumberOfAttrs, "hasTemplate:", hasTemplate, "getNumberOfFormats:", getNumberOfFormats diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.expected new file mode 100644 index 000000000000..08419286d696 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.expected @@ -0,0 +1,7 @@ +| gen_format.rs:5:14:5:32 | FormatArgsExpr | Arguments<'_> | +| gen_format_args_expr.rs:5:17:5:27 | FormatArgsExpr | Arguments<'_> | +| gen_format_args_expr.rs:6:17:6:37 | FormatArgsExpr | Arguments<'_> | +| gen_format_args_expr.rs:7:17:7:43 | FormatArgsExpr | Arguments<'_> | +| gen_format_args_expr.rs:9:17:9:28 | FormatArgsExpr | Arguments<'_> | +| gen_format_argument.rs:5:14:5:47 | FormatArgsExpr | Arguments<'_> | +| gen_format_argument.rs:7:14:7:56 | FormatArgsExpr | Arguments<'_> | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.ql new file mode 100644 index 000000000000..f50717346e19 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatArgsExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatArgsExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.expected index df4fdad5c911..1ca4ea090045 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.expected +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.expected @@ -1,5 +1,5 @@ -| gen_format_args_expr.rs:9:20:9:20 | x | -| gen_format_args_expr.rs:9:25:9:25 | y | -| gen_format_argument.rs:5:22:5:26 | value | -| gen_format_argument.rs:5:29:5:33 | width | -| gen_format_argument.rs:5:36:5:44 | precision | +| gen_format_args_expr.rs:9:20:9:20 | x | hasType: | yes | +| gen_format_args_expr.rs:9:25:9:25 | y | hasType: | yes | +| gen_format_argument.rs:5:22:5:26 | value | hasType: | no | +| gen_format_argument.rs:5:29:5:33 | width | hasType: | no | +| gen_format_argument.rs:5:36:5:44 | precision | hasType: | no | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql index 4f43ca11870a..65c89aed5260 100644 --- a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess.ql @@ -2,6 +2,9 @@ import codeql.rust.elements import TestUtils -from FormatTemplateVariableAccess x -where toBeTested(x) and not x.isUnknown() -select x +from FormatTemplateVariableAccess x, string hasType +where + toBeTested(x) and + not x.isUnknown() and + if x.hasType() then hasType = "yes" else hasType = "no" +select x, "hasType:", hasType diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.expected b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.expected new file mode 100644 index 000000000000..c609c843d740 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.expected @@ -0,0 +1,2 @@ +| gen_format_args_expr.rs:9:20:9:20 | x | i32 | +| gen_format_args_expr.rs:9:25:9:25 | y | i32 | diff --git a/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.ql b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.ql new file mode 100644 index 000000000000..ffac261ab270 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FormatArgsExpr/FormatTemplateVariableAccess_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from FormatTemplateVariableAccess x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected index bdc57b38cf31..f4275a958264 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.expected @@ -1,2 +1,2 @@ -| gen_ident_pat.rs:6:22:6:22 | y | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | no | -| gen_ident_pat.rs:10:9:10:25 | y | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | yes | +| gen_ident_pat.rs:6:22:6:22 | y | hasType: | yes | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | no | +| gen_ident_pat.rs:10:9:10:25 | y | hasType: | yes | getNumberOfAttrs: | 0 | isMut: | no | isRef: | no | hasName: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql index 3587ccff9ae5..8e8083ac9268 100644 --- a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat.ql @@ -2,14 +2,17 @@ import codeql.rust.elements import TestUtils -from IdentPat x, int getNumberOfAttrs, string isMut, string isRef, string hasName, string hasPat +from + IdentPat x, string hasType, int getNumberOfAttrs, string isMut, string isRef, string hasName, + string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.isMut() then isMut = "yes" else isMut = "no") and (if x.isRef() then isRef = "yes" else isRef = "no") and (if x.hasName() then hasName = "yes" else hasName = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "isMut:", isMut, "isRef:", isRef, "hasName:", - hasName, "hasPat:", hasPat +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "isMut:", isMut, "isRef:", + isRef, "hasName:", hasName, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.expected b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.expected new file mode 100644 index 000000000000..30b3e0d9800c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.expected @@ -0,0 +1,2 @@ +| gen_ident_pat.rs:6:22:6:22 | y | i32 | +| gen_ident_pat.rs:10:9:10:25 | y | Option<{unknown}> | diff --git a/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.ql b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.ql new file mode 100644 index 000000000000..8db813472814 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IdentPat/IdentPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IdentPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected index d9a33ad74f79..d8276e94e7e2 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -1,2 +1,2 @@ -| gen_if_expr.rs:5:5:7:5 | if ... {...} | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | no | hasThen: | yes | -| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | yes | hasThen: | yes | +| gen_if_expr.rs:5:5:7:5 | if ... {...} | hasType: | yes | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | no | hasThen: | yes | +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | hasType: | yes | getNumberOfAttrs: | 0 | hasCondition: | yes | hasElse: | yes | hasThen: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql index e72816279572..d815c67353f4 100644 --- a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql @@ -2,13 +2,16 @@ import codeql.rust.elements import TestUtils -from IfExpr x, int getNumberOfAttrs, string hasCondition, string hasElse, string hasThen +from + IfExpr x, string hasType, int getNumberOfAttrs, string hasCondition, string hasElse, + string hasThen where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasCondition() then hasCondition = "yes" else hasCondition = "no") and (if x.hasElse() then hasElse = "yes" else hasElse = "no") and if x.hasThen() then hasThen = "yes" else hasThen = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition, "hasElse:", hasElse, - "hasThen:", hasThen +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition, + "hasElse:", hasElse, "hasThen:", hasThen diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.expected new file mode 100644 index 000000000000..d6d6582d9f29 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | if ... {...} | () | +| gen_if_expr.rs:8:13:12:5 | if ... {...} else {...} | i32 | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.ql new file mode 100644 index 000000000000..3398beb445ca --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected index 614afc3040f4..38150fa81e39 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -1,2 +1,2 @@ -| gen_index_expr.rs:5:5:5:12 | list[42] | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | -| gen_index_expr.rs:6:5:6:12 | list[42] | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | +| gen_index_expr.rs:5:5:5:12 | list[42] | hasType: | yes | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | +| gen_index_expr.rs:6:5:6:12 | list[42] | hasType: | yes | getNumberOfAttrs: | 0 | hasBase: | yes | hasIndex: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql index a4b7139c97e2..debb6298f1be 100644 --- a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from IndexExpr x, int getNumberOfAttrs, string hasBase, string hasIndex +from IndexExpr x, string hasType, int getNumberOfAttrs, string hasBase, string hasIndex where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasBase() then hasBase = "yes" else hasBase = "no") and if x.hasIndex() then hasIndex = "yes" else hasIndex = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasBase:", hasBase, "hasIndex:", hasIndex +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasBase:", hasBase, + "hasIndex:", hasIndex diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.expected new file mode 100644 index 000000000000..52dd80b6ac1a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | list[42] | {unknown} | +| gen_index_expr.rs:6:5:6:12 | list[42] | i32 | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.ql new file mode 100644 index 000000000000..4093b6b3495f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from IndexExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected index 7ff5ad393e19..54cda22b75bc 100644 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected @@ -1 +1 @@ -| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | getNumberOfAttrs: | 0 | hasExpr: | yes | hasPat: | yes | +| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql index 1b7648a56684..ad85a4e1bbcc 100644 --- a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from LetExpr x, int getNumberOfAttrs, string hasExpr, string hasPat +from LetExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasPat:", hasPat +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.expected new file mode 100644 index 000000000000..b621321ca61a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | let ... = maybe_some | bool | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.ql new file mode 100644 index 000000000000..2096d11b9f55 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected index afe42a48f8f0..40432b71b948 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.expected @@ -1,8 +1,8 @@ -| gen_literal_expr.rs:5:5:5:6 | 42 | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:6:5:6:8 | 42.0 | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:9:5:9:7 | 'x' | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:10:5:10:8 | b'x' | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | getNumberOfAttrs: | 0 | hasTextValue: | yes | -| gen_literal_expr.rs:12:5:12:8 | true | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:5:5:5:6 | 42 | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:6:5:6:8 | 42.0 | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:9:5:9:7 | 'x' | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:10:5:10:8 | b'x' | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | +| gen_literal_expr.rs:12:5:12:8 | true | hasType: | yes | getNumberOfAttrs: | 0 | hasTextValue: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql index c33f15d8aff2..cbe5d15f2434 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from LiteralExpr x, int getNumberOfAttrs, string hasTextValue +from LiteralExpr x, string hasType, int getNumberOfAttrs, string hasTextValue where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasTextValue() then hasTextValue = "yes" else hasTextValue = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasTextValue:", hasTextValue +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasTextValue:", hasTextValue diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.expected b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.expected new file mode 100644 index 000000000000..fa122f203617 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.expected @@ -0,0 +1,8 @@ +| gen_literal_expr.rs:5:5:5:6 | 42 | i32 | +| gen_literal_expr.rs:6:5:6:8 | 42.0 | f64 | +| gen_literal_expr.rs:7:5:7:19 | "Hello, world!" | &str | +| gen_literal_expr.rs:8:5:8:20 | b"Hello, world!" | &[u8; 13] | +| gen_literal_expr.rs:9:5:9:7 | 'x' | char | +| gen_literal_expr.rs:10:5:10:8 | b'x' | u8 | +| gen_literal_expr.rs:11:5:11:20 | r"Hello, world!" | &str | +| gen_literal_expr.rs:12:5:12:8 | true | bool | diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.ql b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.ql new file mode 100644 index 000000000000..3805297447ec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/LiteralExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected index d4734ef3dac3..7d41f8655228 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.expected @@ -1 +1 @@ -| gen_literal_pat.rs:6:9:6:10 | 42 | hasLiteral: | yes | +| gen_literal_pat.rs:6:9:6:10 | 42 | hasType: | yes | hasLiteral: | yes | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql index 6052b07a005f..ce3a50d1a616 100644 --- a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from LiteralPat x, string hasLiteral +from LiteralPat x, string hasType, string hasLiteral where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasLiteral() then hasLiteral = "yes" else hasLiteral = "no" -select x, "hasLiteral:", hasLiteral +select x, "hasType:", hasType, "hasLiteral:", hasLiteral diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.expected b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.expected new file mode 100644 index 000000000000..73c5073c25ae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.expected @@ -0,0 +1 @@ +| gen_literal_pat.rs:6:9:6:10 | 42 | i32 | diff --git a/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.ql b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.ql new file mode 100644 index 000000000000..2183e70a717b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralPat/LiteralPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LiteralPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected index b0adbe40897f..ea580be9cef0 100644 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected @@ -1,3 +1,3 @@ -| gen_loop_expr.rs:5:5:7:5 | loop { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | -| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | hasLabel: | yes | hasLoopBody: | yes | getNumberOfAttrs: | 0 | -| gen_loop_expr.rs:13:5:19:5 | loop { ... } | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | +| gen_loop_expr.rs:5:5:7:5 | loop { ... } | hasType: | yes | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | +| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | hasType: | yes | hasLabel: | yes | hasLoopBody: | yes | getNumberOfAttrs: | 0 | +| gen_loop_expr.rs:13:5:19:5 | loop { ... } | hasType: | yes | hasLabel: | no | hasLoopBody: | yes | getNumberOfAttrs: | 0 | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql index 92248ab5ec07..4293baf8b539 100644 --- a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from LoopExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs +from LoopExpr x, string hasType, string hasLabel, string hasLoopBody, int getNumberOfAttrs where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and getNumberOfAttrs = x.getNumberOfAttrs() -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs +select x, "hasType:", hasType, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, + "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.expected new file mode 100644 index 000000000000..f56a1ddf5283 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.expected @@ -0,0 +1,3 @@ +| gen_loop_expr.rs:5:5:7:5 | loop { ... } | ! | +| gen_loop_expr.rs:8:5:11:5 | 'label: loop { ... } | () | +| gen_loop_expr.rs:13:5:19:5 | loop { ... } | () | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.ql new file mode 100644 index 000000000000..15570a44e2d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from LoopExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected index 79f6d26b811b..58724d93b937 100644 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.expected @@ -1 +1 @@ -| gen_macro_expr.rs:5:5:5:11 | MacroExpr | hasMacroCall: | yes | +| gen_macro_expr.rs:5:5:5:11 | MacroExpr | hasType: | yes | hasMacroCall: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql index a2c2d4315125..a88880221ae2 100644 --- a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from MacroExpr x, string hasMacroCall +from MacroExpr x, string hasType, string hasMacroCall where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" -select x, "hasMacroCall:", hasMacroCall +select x, "hasType:", hasType, "hasMacroCall:", hasMacroCall diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.expected b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.expected new file mode 100644 index 000000000000..aea832ac9a41 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.expected @@ -0,0 +1 @@ +| gen_macro_expr.rs:5:5:5:11 | MacroExpr | ! | diff --git a/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.ql b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.ql new file mode 100644 index 000000000000..a23d448b29ec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroExpr/MacroExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql index d54889e043b4..150b6005b36f 100644 --- a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from MacroPat x, string hasMacroCall +from MacroPat x, string hasType, string hasMacroCall where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasMacroCall() then hasMacroCall = "yes" else hasMacroCall = "no" -select x, "hasMacroCall:", hasMacroCall +select x, "hasType:", hasType, "hasMacroCall:", hasMacroCall diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getType.expected b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getType.ql b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getType.ql new file mode 100644 index 000000000000..9704ae119d50 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MacroPat/MacroPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MacroPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected index b98c3de696b6..91014e693060 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.expected @@ -1,2 +1,2 @@ -| gen_match_expr.rs:5:5:8:5 | match x { ... } | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | -| gen_match_expr.rs:9:5:12:5 | match x { ... } | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | +| gen_match_expr.rs:5:5:8:5 | match x { ... } | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | +| gen_match_expr.rs:9:5:12:5 | match x { ... } | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasMatchArmList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql index b29e333d3304..f6fc619cbdfa 100644 --- a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql @@ -2,12 +2,13 @@ import codeql.rust.elements import TestUtils -from MatchExpr x, int getNumberOfAttrs, string hasExpr, string hasMatchArmList +from MatchExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasMatchArmList where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasMatchArmList() then hasMatchArmList = "yes" else hasMatchArmList = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasMatchArmList:", - hasMatchArmList +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "hasMatchArmList:", hasMatchArmList diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.expected b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.expected new file mode 100644 index 000000000000..7c1750df0c88 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_match_expr.rs:5:5:8:5 | match x { ... } | i32 | +| gen_match_expr.rs:9:5:12:5 | match x { ... } | i32 | diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.ql new file mode 100644 index 000000000000..d6f4ae83da98 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MatchExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected index d6c0d90cd750..20e71d093952 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -1,2 +1,2 @@ -| gen_method_call_expr.rs:5:5:5:13 | ... .foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasNameRef: | yes | hasReceiver: | yes | -| gen_method_call_expr.rs:6:5:6:25 | ... .foo(...) | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasNameRef: | yes | hasReceiver: | yes | +| gen_method_call_expr.rs:5:5:5:13 | ... .foo(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | no | hasNameRef: | yes | hasReceiver: | yes | +| gen_method_call_expr.rs:6:5:6:25 | ... .foo(...) | hasType: | yes | hasArgList: | yes | getNumberOfAttrs: | 0 | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasGenericArgList: | yes | hasNameRef: | yes | hasReceiver: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql index 989540265a00..5c67144d7cee 100644 --- a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -3,11 +3,12 @@ import codeql.rust.elements import TestUtils from - MethodCallExpr x, string hasArgList, int getNumberOfAttrs, string hasResolvedPath, + MethodCallExpr x, string hasType, string hasArgList, int getNumberOfAttrs, string hasResolvedPath, string hasResolvedCrateOrigin, string hasGenericArgList, string hasNameRef, string hasReceiver where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasArgList() then hasArgList = "yes" else hasArgList = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasResolvedPath() then hasResolvedPath = "yes" else hasResolvedPath = "no") and @@ -19,6 +20,6 @@ where (if x.hasGenericArgList() then hasGenericArgList = "yes" else hasGenericArgList = "no") and (if x.hasNameRef() then hasNameRef = "yes" else hasNameRef = "no") and if x.hasReceiver() then hasReceiver = "yes" else hasReceiver = "no" -select x, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, "hasResolvedPath:", - hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, "hasGenericArgList:", - hasGenericArgList, "hasNameRef:", hasNameRef, "hasReceiver:", hasReceiver +select x, "hasType:", hasType, "hasArgList:", hasArgList, "getNumberOfAttrs:", getNumberOfAttrs, + "hasResolvedPath:", hasResolvedPath, "hasResolvedCrateOrigin:", hasResolvedCrateOrigin, + "hasGenericArgList:", hasGenericArgList, "hasNameRef:", hasNameRef, "hasReceiver:", hasReceiver diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.expected new file mode 100644 index 000000000000..ee04f1fbae2a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | ... .foo(...) | {unknown} | +| gen_method_call_expr.rs:6:5:6:25 | ... .foo(...) | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.ql new file mode 100644 index 000000000000..3e9cab938736 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected index 1e53040c6cb2..fb5c852f7ffd 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.expected @@ -1 +1 @@ -| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTy: | yes | +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | hasType: | yes | getNumberOfAttrs: | 0 | getNumberOfFields: | 1 | hasTy: | yes | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql index 9161ff35a93b..972818bb1f73 100644 --- a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr.ql @@ -2,12 +2,13 @@ import codeql.rust.elements import TestUtils -from OffsetOfExpr x, int getNumberOfAttrs, int getNumberOfFields, string hasTy +from OffsetOfExpr x, string hasType, int getNumberOfAttrs, int getNumberOfFields, string hasTy where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and getNumberOfFields = x.getNumberOfFields() and if x.hasTy() then hasTy = "yes" else hasTy = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields, "hasTy:", - hasTy +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", + getNumberOfFields, "hasTy:", hasTy diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.expected b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.expected new file mode 100644 index 000000000000..39836d6f59bb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.expected @@ -0,0 +1 @@ +| gen_offset_of_expr.rs:5:5:5:38 | OffsetOfExpr | usize | diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.ql b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.ql new file mode 100644 index 000000000000..25037215d430 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/OffsetOfExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OffsetOfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected index 1d67a8509b91..bc8a40a09827 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.expected @@ -1 +1 @@ -| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | getNumberOfPats: | 2 | +| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | hasType: | yes | getNumberOfPats: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql index 11b3bb7394c3..7f6431f731ab 100644 --- a/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from OrPat x, int getNumberOfPats +from OrPat x, string hasType, int getNumberOfPats where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfPats = x.getNumberOfPats() -select x, "getNumberOfPats:", getNumberOfPats +select x, "hasType:", hasType, "getNumberOfPats:", getNumberOfPats diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.expected b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.expected new file mode 100644 index 000000000000..036f4f17e089 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.expected @@ -0,0 +1 @@ +| gen_or_pat.rs:6:9:6:38 | ... \| ...::None | Option<{unknown}> | diff --git a/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.ql b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.ql new file mode 100644 index 000000000000..0bb616e18475 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OrPat/OrPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from OrPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql index 114bf888239b..e2ccb349c38a 100644 --- a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from ParenExpr x, int getNumberOfAttrs, string hasExpr +from ParenExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.ql new file mode 100644 index 000000000000..fc996d0c1c56 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenExpr/ParenExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql index bf9724edde3a..f050703cbd42 100644 --- a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from ParenPat x, string hasPat +from ParenPat x, string hasType, string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "hasPat:", hasPat +select x, "hasType:", hasType, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getType.expected b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getType.ql b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getType.ql new file mode 100644 index 000000000000..6c9a824d481d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ParenPat/ParenPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ParenPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected index 4f6def5dd438..ebb9fbfc02d0 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected @@ -1,6 +1,6 @@ -| gen_path.rs:6:5:6:12 | ...::bar | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:5:13:5:20 | variable | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:6:13:6:20 | ...::bar | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:7:13:7:20 | ...::foo | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:8:13:8:35 | ...::foo | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_pat.rs:5:11:5:11 | x | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path.rs:6:5:6:12 | ...::bar | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:5:13:5:20 | variable | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:6:13:6:20 | ...::bar | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:7:13:7:20 | ...::foo | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:8:13:8:35 | ...::foo | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_pat.rs:5:11:5:11 | x | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql index 4d472add3366..a32a17db0cca 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from PathExpr x, int getNumberOfAttrs, string hasPath +from PathExpr x, string hasType, int getNumberOfAttrs, string hasPath where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasPath:", hasPath +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.expected new file mode 100644 index 000000000000..5cf39f3506c9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.expected @@ -0,0 +1,6 @@ +| gen_path.rs:6:5:6:12 | ...::bar | {unknown} | +| gen_path_expr.rs:5:13:5:20 | variable | {unknown} | +| gen_path_expr.rs:6:13:6:20 | ...::bar | {unknown} | +| gen_path_expr.rs:7:13:7:20 | ...::foo | {unknown} | +| gen_path_expr.rs:8:13:8:35 | ...::foo | {unknown} | +| gen_path_pat.rs:5:11:5:11 | x | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.ql new file mode 100644 index 000000000000..0b119f87d859 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected index 159f006eecb1..0eb0bee7aa53 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat.expected +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected @@ -1 +1 @@ -| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasPath: | yes | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasType: | yes | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat.ql index 3e6cce8f1512..8e51cbd9ff0e 100644 --- a/rust/ql/test/extractor-tests/generated/Path/PathPat.ql +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from PathPat x, string hasPath +from PathPat x, string hasType, string hasPath where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "hasPath:", hasPath +select x, "hasType:", hasType, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.expected new file mode 100644 index 000000000000..b71bb431d30b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | ...::Bar | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.ql new file mode 100644 index 000000000000..2c50ab17793d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PathPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/CONSISTENCY/DataFlowConsistency.expected b/rust/ql/test/extractor-tests/generated/PathExpr/CONSISTENCY/DataFlowConsistency.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected new file mode 100644 index 000000000000..e293ab630050 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | variable | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:6:13:6:20 | foo::bar | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:7:13:7:20 | ::foo | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:8:13:8:35 | ::foo | hasType: | yes | getNumberOfAttrs: | 0 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected new file mode 100644 index 000000000000..c2c9f4fcb58c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:20 | foo::bar | gen_path_expr.rs:6:13:6:20 | foo::bar | +| gen_path_expr.rs:7:13:7:20 | ::foo | gen_path_expr.rs:7:13:7:20 | ::foo | +| gen_path_expr.rs:8:13:8:35 | ::foo | gen_path_expr.rs:8:13:8:35 | ::foo | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected new file mode 100644 index 000000000000..862de7f8583d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | PathPat | hasType: | yes | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected index 01ebd0f099ca..51bee17ce683 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.expected @@ -1,3 +1,3 @@ -| gen_prefix_expr.rs:5:13:5:15 | - ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:6:13:6:17 | ! ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | -| gen_prefix_expr.rs:7:13:7:16 | * ... | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:5:13:5:15 | - ... | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | +| gen_prefix_expr.rs:7:13:7:16 | * ... | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | hasOperatorName: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql index 67d69c5363bb..7d34925c1d80 100644 --- a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql @@ -2,12 +2,13 @@ import codeql.rust.elements import TestUtils -from PrefixExpr x, int getNumberOfAttrs, string hasExpr, string hasOperatorName +from PrefixExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string hasOperatorName where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasOperatorName:", - hasOperatorName +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "hasOperatorName:", hasOperatorName diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.expected b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.expected new file mode 100644 index 000000000000..8d61655399fb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.expected @@ -0,0 +1,3 @@ +| gen_prefix_expr.rs:5:13:5:15 | - ... | i32 | +| gen_prefix_expr.rs:6:13:6:17 | ! ... | bool | +| gen_prefix_expr.rs:7:13:7:16 | * ... | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.ql b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.ql new file mode 100644 index 000000000000..1797fda6752a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PrefixExpr/PrefixExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from PrefixExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected index 7d8aeff6dfa9..c43289526770 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected @@ -1,6 +1,6 @@ -| gen_range_expr.rs:5:13:5:18 | 1..=10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:6:13:6:17 | 1..10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:7:13:7:16 | 10.. | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | -| gen_range_expr.rs:8:13:8:16 | ..10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_expr.rs:9:13:9:17 | ..=10 | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_expr.rs:10:13:10:14 | .. | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | no | +| gen_range_expr.rs:5:13:5:18 | 1..=10 | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:6:13:6:17 | 1..10 | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:7:13:7:16 | 10.. | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | +| gen_range_expr.rs:8:13:8:16 | ..10 | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_expr.rs:9:13:9:17 | ..=10 | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_expr.rs:10:13:10:14 | .. | hasType: | yes | getNumberOfAttrs: | 0 | hasEnd: | no | hasOperatorName: | yes | hasStart: | no | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql index c664f1d747e5..c29e1f475afd 100644 --- a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql @@ -2,13 +2,16 @@ import codeql.rust.elements import TestUtils -from RangeExpr x, int getNumberOfAttrs, string hasEnd, string hasOperatorName, string hasStart +from + RangeExpr x, string hasType, int getNumberOfAttrs, string hasEnd, string hasOperatorName, + string hasStart where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and if x.hasStart() then hasStart = "yes" else hasStart = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasEnd:", hasEnd, "hasOperatorName:", - hasOperatorName, "hasStart:", hasStart +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasEnd:", hasEnd, + "hasOperatorName:", hasOperatorName, "hasStart:", hasStart diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.expected new file mode 100644 index 000000000000..0fa186978cf9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.expected @@ -0,0 +1,6 @@ +| gen_range_expr.rs:5:13:5:18 | 1..=10 | RangeInclusive | +| gen_range_expr.rs:6:13:6:17 | 1..10 | Range | +| gen_range_expr.rs:7:13:7:16 | 10.. | RangeFrom | +| gen_range_expr.rs:8:13:8:16 | ..10 | RangeTo | +| gen_range_expr.rs:9:13:9:17 | ..=10 | RangeToInclusive | +| gen_range_expr.rs:10:13:10:14 | .. | RangeFull | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.ql new file mode 100644 index 000000000000..85c2c70cf73f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected index ec32f2a5a1c4..8ada2788c40c 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.expected @@ -1,3 +1,3 @@ -| gen_range_pat.rs:6:9:6:12 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | -| gen_range_pat.rs:7:9:7:15 | RangePat | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | -| gen_range_pat.rs:8:9:8:12 | RangePat | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | +| gen_range_pat.rs:6:9:6:12 | RangePat | hasType: | yes | hasEnd: | yes | hasOperatorName: | yes | hasStart: | no | +| gen_range_pat.rs:7:9:7:15 | RangePat | hasType: | yes | hasEnd: | yes | hasOperatorName: | yes | hasStart: | yes | +| gen_range_pat.rs:8:9:8:12 | RangePat | hasType: | yes | hasEnd: | no | hasOperatorName: | yes | hasStart: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql index d9b4bb413488..914d9202d8bb 100644 --- a/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat.ql @@ -2,11 +2,13 @@ import codeql.rust.elements import TestUtils -from RangePat x, string hasEnd, string hasOperatorName, string hasStart +from RangePat x, string hasType, string hasEnd, string hasOperatorName, string hasStart where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasEnd() then hasEnd = "yes" else hasEnd = "no") and (if x.hasOperatorName() then hasOperatorName = "yes" else hasOperatorName = "no") and if x.hasStart() then hasStart = "yes" else hasStart = "no" -select x, "hasEnd:", hasEnd, "hasOperatorName:", hasOperatorName, "hasStart:", hasStart +select x, "hasType:", hasType, "hasEnd:", hasEnd, "hasOperatorName:", hasOperatorName, "hasStart:", + hasStart diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.expected b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.expected new file mode 100644 index 000000000000..f8ae8c960e6c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.expected @@ -0,0 +1,3 @@ +| gen_range_pat.rs:6:9:6:12 | RangePat | {unknown} | +| gen_range_pat.rs:7:9:7:15 | RangePat | {unknown} | +| gen_range_pat.rs:8:9:8:12 | RangePat | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.ql b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.ql new file mode 100644 index 000000000000..6c54525cc3d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangePat/RangePat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RangePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected index 445b906bf88b..9330ba6de998 100644 --- a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.expected @@ -1,4 +1,4 @@ -| gen_record_expr.rs:5:17:5:34 | Foo {...} | hasPath: | yes | hasRecordExprFieldList: | yes | -| gen_record_expr.rs:6:18:6:38 | Foo {...} | hasPath: | yes | hasRecordExprFieldList: | yes | -| gen_record_expr.rs:7:5:7:22 | Foo {...} | hasPath: | yes | hasRecordExprFieldList: | yes | -| gen_record_expr.rs:8:5:8:14 | Foo {...} | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:5:17:5:34 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:6:18:6:38 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:7:5:7:22 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordExprFieldList: | yes | +| gen_record_expr.rs:8:5:8:14 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordExprFieldList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql index 41cd6a41c4b1..787cbfb8622f 100644 --- a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr.ql @@ -2,12 +2,14 @@ import codeql.rust.elements import TestUtils -from RecordExpr x, string hasPath, string hasRecordExprFieldList +from RecordExpr x, string hasType, string hasPath, string hasRecordExprFieldList where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasPath() then hasPath = "yes" else hasPath = "no") and if x.hasRecordExprFieldList() then hasRecordExprFieldList = "yes" else hasRecordExprFieldList = "no" -select x, "hasPath:", hasPath, "hasRecordExprFieldList:", hasRecordExprFieldList +select x, "hasType:", hasType, "hasPath:", hasPath, "hasRecordExprFieldList:", + hasRecordExprFieldList diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.expected b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.expected new file mode 100644 index 000000000000..ca119cd5214c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.expected @@ -0,0 +1,4 @@ +| gen_record_expr.rs:5:17:5:34 | Foo {...} | {unknown} | +| gen_record_expr.rs:6:18:6:38 | Foo {...} | {unknown} | +| gen_record_expr.rs:7:5:7:22 | Foo {...} | {unknown} | +| gen_record_expr.rs:8:5:8:14 | Foo {...} | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.ql b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.ql new file mode 100644 index 000000000000..e07b861bf218 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordExpr/RecordExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RecordExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected index 8d7f96229ad7..1dc2e608942b 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.expected @@ -1,2 +1,2 @@ -| gen_record_pat.rs:6:9:6:26 | Foo {...} | hasPath: | yes | hasRecordPatFieldList: | yes | -| gen_record_pat.rs:7:9:7:18 | Foo {...} | hasPath: | yes | hasRecordPatFieldList: | yes | +| gen_record_pat.rs:6:9:6:26 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordPatFieldList: | yes | +| gen_record_pat.rs:7:9:7:18 | Foo {...} | hasType: | yes | hasPath: | yes | hasRecordPatFieldList: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql index 19bc5ea6e3ae..fc4d3b44c66c 100644 --- a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from RecordPat x, string hasPath, string hasRecordPatFieldList +from RecordPat x, string hasType, string hasPath, string hasRecordPatFieldList where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasPath() then hasPath = "yes" else hasPath = "no") and if x.hasRecordPatFieldList() then hasRecordPatFieldList = "yes" else hasRecordPatFieldList = "no" -select x, "hasPath:", hasPath, "hasRecordPatFieldList:", hasRecordPatFieldList +select x, "hasType:", hasType, "hasPath:", hasPath, "hasRecordPatFieldList:", hasRecordPatFieldList diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.expected b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.expected new file mode 100644 index 000000000000..2efab27fcc0b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.expected @@ -0,0 +1,2 @@ +| gen_record_pat.rs:6:9:6:26 | Foo {...} | {unknown} | +| gen_record_pat.rs:7:9:7:18 | Foo {...} | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.ql b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.ql new file mode 100644 index 000000000000..be6896ac8b99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordPat/RecordPat_getType.ql @@ -0,0 +1,7 @@ +// 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.getType() diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected index 412f82142060..9bf09e78ba5f 100644 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected @@ -1,4 +1,4 @@ -| gen_ref_expr.rs:5:25:5:28 | &foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | no | isRaw: | no | -| gen_ref_expr.rs:6:23:6:30 | &mut foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | no | -| gen_ref_expr.rs:7:35:7:48 | &raw const foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | yes | isMut: | no | isRaw: | yes | -| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | yes | +| gen_ref_expr.rs:5:25:5:28 | &foo | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | no | isRaw: | no | +| gen_ref_expr.rs:6:23:6:30 | &mut foo | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | no | +| gen_ref_expr.rs:7:35:7:48 | &raw const foo | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | yes | isMut: | no | isRaw: | yes | +| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | isConst: | no | isMut: | yes | isRaw: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql index a2567b81ed75..078b31e123d1 100644 --- a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql @@ -2,14 +2,17 @@ import codeql.rust.elements import TestUtils -from RefExpr x, int getNumberOfAttrs, string hasExpr, string isConst, string isMut, string isRaw +from + RefExpr x, string hasType, int getNumberOfAttrs, string hasExpr, string isConst, string isMut, + string isRaw where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and (if x.isConst() then isConst = "yes" else isConst = "no") and (if x.isMut() then isMut = "yes" else isMut = "no") and if x.isRaw() then isRaw = "yes" else isRaw = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "isConst:", isConst, "isMut:", - isMut, "isRaw:", isRaw +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, + "isConst:", isConst, "isMut:", isMut, "isRaw:", isRaw diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.expected new file mode 100644 index 000000000000..52f7f34b8e9d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.expected @@ -0,0 +1,4 @@ +| gen_ref_expr.rs:5:25:5:28 | &foo | &{unknown} | +| gen_ref_expr.rs:6:23:6:30 | &mut foo | &mut {unknown} | +| gen_ref_expr.rs:7:35:7:48 | &raw const foo | *const {unknown} | +| gen_ref_expr.rs:8:33:8:44 | &raw mut foo | *mut {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.ql new file mode 100644 index 000000000000..dcf7a07eac22 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected index a9dfaf874561..48ff3572e79c 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.expected @@ -1,2 +1,2 @@ -| gen_ref_pat.rs:6:9:6:28 | &mut ... | isMut: | yes | hasPat: | yes | -| gen_ref_pat.rs:7:9:7:21 | &...::None | isMut: | no | hasPat: | yes | +| gen_ref_pat.rs:6:9:6:28 | &mut ... | hasType: | yes | isMut: | yes | hasPat: | yes | +| gen_ref_pat.rs:7:9:7:21 | &...::None | hasType: | yes | isMut: | no | hasPat: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql index 4ae72433dad4..ce2985562d3a 100644 --- a/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from RefPat x, string isMut, string hasPat +from RefPat x, string hasType, string isMut, string hasPat where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.isMut() then isMut = "yes" else isMut = "no") and if x.hasPat() then hasPat = "yes" else hasPat = "no" -select x, "isMut:", isMut, "hasPat:", hasPat +select x, "hasType:", hasType, "isMut:", isMut, "hasPat:", hasPat diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.expected b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.expected new file mode 100644 index 000000000000..c11912b86f4f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.expected @@ -0,0 +1,2 @@ +| gen_ref_pat.rs:6:9:6:28 | &mut ... | &mut Option | +| gen_ref_pat.rs:7:9:7:21 | &...::None | &Option | diff --git a/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.ql b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.ql new file mode 100644 index 000000000000..7522f644c155 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefPat/RefPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RefPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql index c3cb2a24f832..73bfc7076fbb 100644 --- a/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from RestPat x, int getNumberOfAttrs +from RestPat x, string hasType, int getNumberOfAttrs where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfAttrs:", getNumberOfAttrs +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getType.expected b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getType.ql b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getType.ql new file mode 100644 index 000000000000..907750cfb7f0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RestPat/RestPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from RestPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected index 83220773989e..56f766be811b 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected @@ -1,2 +1,2 @@ -| gen_return_expr.rs:5:5:5:13 | return 42 | getNumberOfAttrs: | 0 | hasExpr: | yes | -| gen_return_expr.rs:8:5:8:10 | return | getNumberOfAttrs: | 0 | hasExpr: | no | +| gen_return_expr.rs:5:5:5:13 | return 42 | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_return_expr.rs:8:5:8:10 | return | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | no | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql index aa8c4d886a7b..55f596391bc9 100644 --- a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from ReturnExpr x, int getNumberOfAttrs, string hasExpr +from ReturnExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.expected new file mode 100644 index 000000000000..af9ae6a16861 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_return_expr.rs:5:5:5:13 | return 42 | ! | +| gen_return_expr.rs:8:5:8:10 | return | ! | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.ql new file mode 100644 index 000000000000..f8a6e0e3e32a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from ReturnExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected index 0821ea233238..d1f06afeb540 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.expected @@ -1,3 +1,3 @@ -| gen_slice_pat.rs:6:9:6:23 | SlicePat | getNumberOfPats: | 5 | -| gen_slice_pat.rs:7:9:7:18 | SlicePat | getNumberOfPats: | 3 | -| gen_slice_pat.rs:8:9:8:24 | SlicePat | getNumberOfPats: | 5 | +| gen_slice_pat.rs:6:9:6:23 | SlicePat | hasType: | yes | getNumberOfPats: | 5 | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | hasType: | yes | getNumberOfPats: | 3 | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | hasType: | yes | getNumberOfPats: | 5 | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql index 2b6c51f9da6a..28c43c2d1faf 100644 --- a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from SlicePat x, int getNumberOfPats +from SlicePat x, string hasType, int getNumberOfPats where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfPats = x.getNumberOfPats() -select x, "getNumberOfPats:", getNumberOfPats +select x, "hasType:", hasType, "getNumberOfPats:", getNumberOfPats diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.expected b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.expected new file mode 100644 index 000000000000..25b4156d1ba6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.expected @@ -0,0 +1,3 @@ +| gen_slice_pat.rs:6:9:6:23 | SlicePat | [{unknown}] | +| gen_slice_pat.rs:7:9:7:18 | SlicePat | [{unknown}] | +| gen_slice_pat.rs:8:9:8:24 | SlicePat | [{unknown}] | diff --git a/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.ql b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.ql new file mode 100644 index 000000000000..d0b9ecaf62f9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/SlicePat/SlicePat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from SlicePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql index be3c70a933ce..154ea6c8f1ed 100644 --- a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from TryExpr x, int getNumberOfAttrs, string hasExpr +from TryExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getType.expected b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getType.ql b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getType.ql new file mode 100644 index 000000000000..f03cd7ce3a26 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TryExpr/TryExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TryExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected index 2bd4e57c30ed..8fbf244afb6c 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.expected @@ -1,2 +1,2 @@ -| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | -| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | hasType: | yes | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | hasType: | yes | getNumberOfAttrs: | 0 | getNumberOfFields: | 2 | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql index 573d7936d6c7..729479aebef7 100644 --- a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr.ql @@ -2,10 +2,12 @@ import codeql.rust.elements import TestUtils -from TupleExpr x, int getNumberOfAttrs, int getNumberOfFields +from TupleExpr x, string hasType, int getNumberOfAttrs, int getNumberOfFields where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", getNumberOfFields +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfFields:", + getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.expected b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.expected new file mode 100644 index 000000000000..1541d5f48e74 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.expected @@ -0,0 +1,2 @@ +| gen_tuple_expr.rs:5:5:5:14 | TupleExpr | (i32, &str) | +| gen_tuple_expr.rs:6:5:6:14 | TupleExpr | (i32, &str) | diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.ql b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.ql new file mode 100644 index 000000000000..a3ecca8b3c44 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/TupleExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected index d6522bb7bf11..b53ee7aecbe2 100644 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.expected @@ -1,2 +1,2 @@ -| gen_tuple_pat.rs:5:9:5:14 | TuplePat | getNumberOfFields: | 2 | -| gen_tuple_pat.rs:6:9:6:22 | TuplePat | getNumberOfFields: | 4 | +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | hasType: | yes | getNumberOfFields: | 2 | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | hasType: | yes | getNumberOfFields: | 4 | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql index 6e65f167985f..9be6ebe71b56 100644 --- a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from TuplePat x, int getNumberOfFields +from TuplePat x, string hasType, int getNumberOfFields where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfFields = x.getNumberOfFields() -select x, "getNumberOfFields:", getNumberOfFields +select x, "hasType:", hasType, "getNumberOfFields:", getNumberOfFields diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.expected b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.expected new file mode 100644 index 000000000000..11b1ce6f1317 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.expected @@ -0,0 +1,2 @@ +| gen_tuple_pat.rs:5:9:5:14 | TuplePat | (i32, i32) | +| gen_tuple_pat.rs:6:9:6:22 | TuplePat | (i32, i32, i32, i32, i32) | diff --git a/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.ql b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.ql new file mode 100644 index 000000000000..0d5edc621d27 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TuplePat/TuplePat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TuplePat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected index a0d12cc8509b..cd7e2947e09a 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.expected @@ -1,3 +1,3 @@ -| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | getNumberOfFields: | 4 | hasPath: | yes | -| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | getNumberOfFields: | 2 | hasPath: | yes | -| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | getNumberOfFields: | 1 | hasPath: | yes | +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | hasType: | yes | getNumberOfFields: | 4 | hasPath: | yes | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | hasType: | yes | getNumberOfFields: | 2 | hasPath: | yes | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | hasType: | yes | getNumberOfFields: | 1 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql index d12f3427df52..205ad116b0b2 100644 --- a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from TupleStructPat x, int getNumberOfFields, string hasPath +from TupleStructPat x, string hasType, int getNumberOfFields, string hasPath where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfFields = x.getNumberOfFields() and if x.hasPath() then hasPath = "yes" else hasPath = "no" -select x, "getNumberOfFields:", getNumberOfFields, "hasPath:", hasPath +select x, "hasType:", hasType, "getNumberOfFields:", getNumberOfFields, "hasPath:", hasPath diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.expected b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.expected new file mode 100644 index 000000000000..18a4188b2943 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.expected @@ -0,0 +1,3 @@ +| gen_tuple_struct_pat.rs:6:9:6:27 | TupleStructPat | {unknown} | +| gen_tuple_struct_pat.rs:7:9:7:20 | TupleStructPat | {unknown} | +| gen_tuple_struct_pat.rs:8:9:8:17 | TupleStructPat | {unknown} | diff --git a/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.ql b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.ql new file mode 100644 index 000000000000..09ca13e62245 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleStructPat/TupleStructPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from TupleStructPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected index ea89e8b29b4e..ab3228c5b693 100644 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.expected @@ -1 +1 @@ -| gen_underscore_expr.rs:5:5:5:5 | _ | getNumberOfAttrs: | 0 | +| gen_underscore_expr.rs:5:5:5:5 | _ | hasType: | yes | getNumberOfAttrs: | 0 | diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql index 1dc793e9d6e8..76aa75a46a60 100644 --- a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr.ql @@ -2,9 +2,10 @@ import codeql.rust.elements import TestUtils -from UnderscoreExpr x, int getNumberOfAttrs +from UnderscoreExpr x, string hasType, int getNumberOfAttrs where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() -select x, "getNumberOfAttrs:", getNumberOfAttrs +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.expected b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.expected new file mode 100644 index 000000000000..ea225b9d1de4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.expected @@ -0,0 +1 @@ +| gen_underscore_expr.rs:5:5:5:5 | _ | i32 | diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.ql b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.ql new file mode 100644 index 000000000000..c47cbbd80a99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/UnderscoreExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from UnderscoreExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql index 8544014e571a..149aee0f4f10 100644 --- a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr.ql @@ -2,13 +2,16 @@ import codeql.rust.elements import TestUtils -from WhileExpr x, string hasLabel, string hasLoopBody, int getNumberOfAttrs, string hasCondition +from + WhileExpr x, string hasType, string hasLabel, string hasLoopBody, int getNumberOfAttrs, + string hasCondition where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and (if x.hasLabel() then hasLabel = "yes" else hasLabel = "no") and (if x.hasLoopBody() then hasLoopBody = "yes" else hasLoopBody = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasCondition() then hasCondition = "yes" else hasCondition = "no" -select x, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, "getNumberOfAttrs:", getNumberOfAttrs, - "hasCondition:", hasCondition +select x, "hasType:", hasType, "hasLabel:", hasLabel, "hasLoopBody:", hasLoopBody, + "getNumberOfAttrs:", getNumberOfAttrs, "hasCondition:", hasCondition diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.expected b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.ql b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.ql new file mode 100644 index 000000000000..40decc07d2bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WhileExpr/WhileExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WhileExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected index b8ac989ee1c0..5cf52bca0352 100644 --- a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.expected @@ -1 +1 @@ -| gen_wildcard_pat.rs:5:9:5:9 | _ | +| gen_wildcard_pat.rs:5:9:5:9 | _ | hasType: | yes | diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql index cac335f3b7fc..17ca7c8f51df 100644 --- a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat.ql @@ -2,6 +2,9 @@ import codeql.rust.elements import TestUtils -from WildcardPat x -where toBeTested(x) and not x.isUnknown() -select x +from WildcardPat x, string hasType +where + toBeTested(x) and + not x.isUnknown() and + if x.hasType() then hasType = "yes" else hasType = "no" +select x, "hasType:", hasType diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.expected b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.expected new file mode 100644 index 000000000000..ddad790deeee --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.expected @@ -0,0 +1 @@ +| gen_wildcard_pat.rs:5:9:5:9 | _ | i32 | diff --git a/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.ql b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.ql new file mode 100644 index 000000000000..831dbad44faa --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/WildcardPat/WildcardPat_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from WildcardPat x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected index 3bce2660fe35..dfc7dafb692a 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected @@ -1 +1 @@ -| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql index 165bd667d3c8..742d270f5362 100644 --- a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from YeetExpr x, int getNumberOfAttrs, string hasExpr +from YeetExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.expected new file mode 100644 index 000000000000..cb07345c5165 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | ! | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.ql new file mode 100644 index 000000000000..2b4105e0bd94 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YeetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected index 5045b11d25d2..255200827dd7 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected @@ -1 +1 @@ -| gen_yield_expr.rs:7:13:7:19 | YieldExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | hasType: | yes | getNumberOfAttrs: | 0 | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql index 47f32503bfc1..e328a4999e53 100644 --- a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql @@ -2,10 +2,11 @@ import codeql.rust.elements import TestUtils -from YieldExpr x, int getNumberOfAttrs, string hasExpr +from YieldExpr x, string hasType, int getNumberOfAttrs, string hasExpr where toBeTested(x) and not x.isUnknown() and + (if x.hasType() then hasType = "yes" else hasType = "no") and getNumberOfAttrs = x.getNumberOfAttrs() and if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" -select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr +select x, "hasType:", hasType, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.expected new file mode 100644 index 000000000000..b663b49d74b9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | () | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.ql new file mode 100644 index 000000000000..f578d42d50c6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getType.ql @@ -0,0 +1,7 @@ +// generated by codegen, do not edit +import codeql.rust.elements +import TestUtils + +from YieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getType() diff --git a/rust/ql/test/extractor-tests/types/main.rs b/rust/ql/test/extractor-tests/types/main.rs new file mode 100644 index 000000000000..ac7773bf3b15 --- /dev/null +++ b/rust/ql/test/extractor-tests/types/main.rs @@ -0,0 +1,53 @@ +fn main() { + let who = "world"; + println!("Hello {who}!") +} + +fn empty_block() {} + +fn single_empty_block() { + {} +} + +macro_rules! block { + (Empty) => {}; + (Stmt) => { + main(); + }; + (Nested) => { + block!(Stmt) + }; +} + +fn macro_stmts() { + block!(Empty); + block!(Stmt); + block!(Nested); +} +fn format_template_variables() { + let width = 4; + let precision = 2; + let value = 10; + println!("Value {value:#width$.precision$}"); +} + +fn chained_if(x: i32) { + if x < 5 { + println!("small"); + } else if x > 10 { + println!("large"); + } else { + println!("medium"); + } +} + +fn literal_in_pat(pair: (bool, bool)) -> bool { + match pair { + (x, true) => x, + _ => false, + } +} + +fn box_new() { + vec![1]; +} diff --git a/rust/ql/test/extractor-tests/types/types.expected b/rust/ql/test/extractor-tests/types/types.expected new file mode 100644 index 000000000000..f933becc3bb3 --- /dev/null +++ b/rust/ql/test/extractor-tests/types/types.expected @@ -0,0 +1,97 @@ +exprTypes +| main.rs:1:11:4:1 | { ... } | () | +| main.rs:2:15:2:21 | "world" | &str | +| main.rs:3:5:3:28 | ...::_print | fn _print(Arguments<'_>) | +| main.rs:3:5:3:28 | MacroExpr | () | +| main.rs:3:14:3:27 | "Hello {who}!\\n" | &str | +| main.rs:3:14:3:27 | ...::_print(...) | () | +| main.rs:3:14:3:27 | FormatArgsExpr | Arguments<'_> | +| main.rs:3:14:3:27 | MacroExpr | Arguments<'_> | +| main.rs:3:14:3:27 | { ... } | () | +| main.rs:3:22:3:24 | who | &str | +| main.rs:6:18:6:19 | { ... } | () | +| main.rs:8:25:10:1 | { ... } | () | +| main.rs:9:5:9:6 | { ... } | () | +| main.rs:22:18:26:1 | { ... } | () | +| main.rs:23:5:23:17 | MacroExpr | () | +| main.rs:24:5:24:16 | MacroExpr | () | +| main.rs:24:5:24:16 | main | fn main() | +| main.rs:24:5:24:16 | main(...) | () | +| main.rs:25:5:25:18 | MacroExpr | () | +| main.rs:25:5:25:18 | MacroExpr | () | +| main.rs:25:5:25:18 | main | fn main() | +| main.rs:25:5:25:18 | main(...) | () | +| main.rs:27:32:32:1 | { ... } | () | +| main.rs:28:17:28:17 | 4 | usize | +| main.rs:29:21:29:21 | 2 | usize | +| main.rs:30:17:30:18 | 10 | i32 | +| main.rs:31:5:31:48 | ...::_print | fn _print(Arguments<'_>) | +| main.rs:31:5:31:48 | MacroExpr | () | +| main.rs:31:14:31:47 | "Value {value:#width$.precisio... | &str | +| main.rs:31:14:31:47 | ...::_print(...) | () | +| main.rs:31:14:31:47 | FormatArgsExpr | Arguments<'_> | +| main.rs:31:14:31:47 | MacroExpr | Arguments<'_> | +| main.rs:31:14:31:47 | { ... } | () | +| main.rs:31:22:31:26 | value | i32 | +| main.rs:31:29:31:33 | width | usize | +| main.rs:31:36:31:44 | precision | usize | +| main.rs:34:23:42:1 | { ... } | () | +| main.rs:35:5:41:5 | if ... {...} else {...} | () | +| main.rs:35:8:35:8 | x | i32 | +| main.rs:35:8:35:12 | ... < ... | bool | +| main.rs:35:12:35:12 | 5 | i32 | +| main.rs:35:14:37:5 | { ... } | () | +| main.rs:36:9:36:25 | ...::_print | fn _print(Arguments<'_>) | +| main.rs:36:9:36:25 | MacroExpr | () | +| main.rs:36:18:36:24 | "small\\n" | &str | +| main.rs:36:18:36:24 | ...::_print(...) | () | +| main.rs:36:18:36:24 | FormatArgsExpr | Arguments<'_> | +| main.rs:36:18:36:24 | MacroExpr | Arguments<'_> | +| main.rs:36:18:36:24 | { ... } | () | +| main.rs:37:12:41:5 | if ... {...} else {...} | () | +| main.rs:37:15:37:15 | x | i32 | +| main.rs:37:15:37:20 | ... > ... | bool | +| main.rs:37:19:37:20 | 10 | i32 | +| main.rs:37:22:39:5 | { ... } | () | +| main.rs:38:9:38:25 | ...::_print | fn _print(Arguments<'_>) | +| main.rs:38:9:38:25 | MacroExpr | () | +| main.rs:38:18:38:24 | "large\\n" | &str | +| main.rs:38:18:38:24 | ...::_print(...) | () | +| main.rs:38:18:38:24 | FormatArgsExpr | Arguments<'_> | +| main.rs:38:18:38:24 | MacroExpr | Arguments<'_> | +| main.rs:38:18:38:24 | { ... } | () | +| main.rs:39:12:41:5 | { ... } | () | +| main.rs:40:9:40:26 | ...::_print | fn _print(Arguments<'_>) | +| main.rs:40:9:40:26 | MacroExpr | () | +| main.rs:40:18:40:25 | "medium\\n" | &str | +| main.rs:40:18:40:25 | ...::_print(...) | () | +| main.rs:40:18:40:25 | FormatArgsExpr | Arguments<'_> | +| main.rs:40:18:40:25 | MacroExpr | Arguments<'_> | +| main.rs:40:18:40:25 | { ... } | () | +| main.rs:44:47:49:1 | { ... } | bool | +| main.rs:45:5:48:5 | match pair { ... } | bool | +| main.rs:45:11:45:14 | pair | (bool, bool) | +| main.rs:46:13:46:16 | true | bool | +| main.rs:46:22:46:22 | x | bool | +| main.rs:47:14:47:18 | false | bool | +| main.rs:51:14:53:1 | { ... } | () | +| main.rs:52:5:52:11 | ...::into_vec | fn into_vec(Box<[i32], Global>) -> Vec | +| main.rs:52:5:52:11 | ...::new | fn new<[i32; 1]>([i32; 1]) -> Box<[i32; 1], Global> | +| main.rs:52:5:52:11 | MacroExpr | Vec | +| main.rs:52:10:52:10 | 1 | i32 | +| main.rs:52:10:52:10 | ...::into_vec(...) | Vec | +| main.rs:52:10:52:10 | ...::new(...) | Box<[i32; 1], Global> | +| main.rs:52:10:52:10 | [...] | [i32; 1] | +patTypes +| main.rs:2:9:2:11 | who | &str | +| main.rs:28:9:28:13 | width | usize | +| main.rs:29:9:29:17 | precision | usize | +| main.rs:30:9:30:13 | value | i32 | +| main.rs:34:15:34:15 | x | i32 | +| main.rs:44:19:44:22 | pair | (bool, bool) | +| main.rs:46:9:46:17 | TuplePat | (bool, bool) | +| main.rs:46:10:46:10 | x | bool | +| main.rs:46:13:46:16 | true | bool | +| main.rs:47:9:47:9 | _ | (bool, bool) | +missingExprType +missingPatType diff --git a/rust/ql/test/extractor-tests/types/types.ql b/rust/ql/test/extractor-tests/types/types.ql new file mode 100644 index 000000000000..3b93c5efd708 --- /dev/null +++ b/rust/ql/test/extractor-tests/types/types.ql @@ -0,0 +1,9 @@ +import rust + +query predicate exprTypes(Expr e, string type) { type = e.getType() } + +query predicate patTypes(Pat e, string type) { type = e.getType() } + +query predicate missingExprType(Expr e) { not exists(e.getType()) } + +query predicate missingPatType(Pat e) { not exists(e.getType()) } diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 91a6d6add281..1dbedb0166e8 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -36,6 +36,7 @@ class _: """ The base class for expressions. """ + type: optional[string] | rust.detach @annotate(Pat, cfg = True) @@ -43,6 +44,7 @@ class _: """ The base class for patterns. """ + type: optional[string] | rust.detach @annotate(Label) @@ -76,6 +78,7 @@ class _: ``` """ + @annotate(Path, replace_bases={AstNode: Resolvable}) class _: """ @@ -1832,6 +1835,7 @@ class FormatArgument(Locatable): parent: Format variable: optional[FormatTemplateVariableAccess] | child + @annotate(Item) class _: extended_canonical_path: optional[string] | desc(""" @@ -1839,4 +1843,5 @@ class _: or `{}::name` for addressable items defined in an anonymous block (and only addressable there-in). """) | rust.detach | ql.internal - crate_origin: optional[string] | desc("One of `rustc:`, `repo::` or `lang:`.") | rust.detach | ql.internal + crate_origin: optional[string] | desc( + "One of `rustc:`, `repo::` or `lang:`.") | rust.detach | ql.internal