From 7c15ea7b9f9eb6d23e2560e0dfd86adb928d915c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:11 +0000 Subject: [PATCH 1/8] Cargo: Upgrade dependencies --- Cargo.lock | 133 ++++++++++++------------ ruby/extractor/Cargo.toml | 2 +- rust/ast-generator/Cargo.toml | 2 +- rust/extractor/Cargo.toml | 36 +++---- shared/tree-sitter-extractor/Cargo.toml | 2 +- unified/extractor/Cargo.toml | 2 +- 6 files changed, 89 insertions(+), 88 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0de69a005f91..4b3418e72f3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1184,9 +1184,9 @@ checksum = "3752f229dcc5a481d60f385fa479ff46818033d881d2d801aa27dffcfb5e8306" [[package]] name = "lazy_static" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" [[package]] name = "libc" @@ -1683,9 +1683,9 @@ dependencies = [ [[package]] name = "ra_ap_base_db" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce5c7b9d3f79c6275948b067cddc352b56c7e3f33fc204a66520b7c7fe7d9ca" +checksum = "3eb95e4dff88ec2fbfc65fee6a0ec3f7c4bc5cb2cf2c7b7774c85c0c9372c7a4" dependencies = [ "dashmap", "indexmap 2.14.2", @@ -1704,9 +1704,9 @@ dependencies = [ [[package]] name = "ra_ap_cfg" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240877d981ec19422427c3587451f0df2cb926e3cce1035d9b5f1dedad821ee6" +checksum = "8ade9ce3b057c84c422cf32abcb6942dbeca138afc7d0d811694aac330f144a8" dependencies = [ "ra_ap_intern", "ra_ap_syntax", @@ -1717,15 +1717,15 @@ dependencies = [ [[package]] name = "ra_ap_edition" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceff3f2017143089b7350dd75b8a64548fb4474500ff400aaaca2f8f9990f4db" +checksum = "a49e66405855c4b24d7f5868d6a898ab7d807e9d00a7c2637631b55a3f062e3a" [[package]] name = "ra_ap_hir" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85f8f5db51a515c46e33f5ff427c6ca6d877e36df931849b8e21056c6bf93d5" +checksum = "23a4721acb093e05cac8cd360c3fcf8de24d00199a7ea98817a3d9f73895fa51" dependencies = [ "arrayvec", "either", @@ -1752,9 +1752,9 @@ dependencies = [ [[package]] name = "ra_ap_hir_def" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b677c3aa89a9b9200d14ea84ecf9cd196c1480ba48e76c5b155eabfd1a0da5" +checksum = "6c356af460f77f31a4ca74f11d8e310a00caebc38be2a49c148d101018f4bb2e" dependencies = [ "arrayvec", "bitflags 2.13.2", @@ -1783,13 +1783,14 @@ dependencies = [ "thin-vec", "tracing", "triomphe", + "unicode-ident", ] [[package]] name = "ra_ap_hir_expand" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e584a4031c431db6a20e76e83e64ffa3e1a31e442247d8b298addffbc234232" +checksum = "61073c026c6037d36baacc950f7f8a976963dd500da96c0568e29686bd1f560e" dependencies = [ "cov-mark", "either", @@ -1814,9 +1815,9 @@ dependencies = [ [[package]] name = "ra_ap_hir_ty" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd74cde2cb4d0dc9f000517673611f80e5a3488a6ac87d1d9a82780968c3a9e7" +checksum = "96f89cfec8a5469d0b7a3bd87fdebf821f135c38ea0c5c3294f95b4885618a44" dependencies = [ "arrayvec", "bitflags 2.13.2", @@ -1858,9 +1859,9 @@ dependencies = [ [[package]] name = "ra_ap_ide_db" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56fbf064962bf4687b46a811594da007bf7300718916aaf0b09b6d2af509f018" +checksum = "631cdbb6578ed254c73cc8cda71b7142f7778ba167eec4c7271aefea46a71c1e" dependencies = [ "arrayvec", "bitflags 2.13.2", @@ -1893,9 +1894,9 @@ dependencies = [ [[package]] name = "ra_ap_intern" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c899ecc5f85ec4730108084662383454fd8123bc32dcbf996ce42fcc7be0bb5e" +checksum = "2a0b96dd9cd22c3288474e6136fe8beac7a26c23f20bb8a7fb086383ba1050b9" dependencies = [ "arrayvec", "dashmap", @@ -1907,9 +1908,9 @@ dependencies = [ [[package]] name = "ra_ap_load-cargo" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714cbf4632c3722c144dae74c8c454497b902d9fd2e25328163c509fbc3d8c47" +checksum = "5020c839f202e0d03b4188d17c1553f8ec876cab3c0737a636bfa849777dfe10" dependencies = [ "anyhow", "crossbeam-channel", @@ -1928,9 +1929,9 @@ dependencies = [ [[package]] name = "ra_ap_macros" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1006951e9805e69861cca620a7f80efca9cbcce86baaf5084939af0920143a14" +checksum = "6da80860b3ed783b989f64b94f4a6290273942e1c47ebcab25542d452983bede" dependencies = [ "proc-macro2", "quote", @@ -1940,9 +1941,9 @@ dependencies = [ [[package]] name = "ra_ap_mbe" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b52a6f4b0984e7993cbb81ce5c8931587af7b85b0a902ef26541011ce91fe1be" +checksum = "86ef569e04737ad276217ad2641968f63de25d1fe6dd0ed1fac8c6af2259bee3" dependencies = [ "arrayvec", "bitflags 2.13.2", @@ -1961,9 +1962,9 @@ dependencies = [ [[package]] name = "ra_ap_parser" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f172691cbb8df836e924dc947c1de36f019c2d17ec6ccca207f2aa5a835954" +checksum = "665a0ff94e8be7170aeb3ecf23e1a9ffb5b418daf2c6999646efd8bc9ac13271" dependencies = [ "drop_bomb", "ra-ap-rustc_lexer", @@ -1975,18 +1976,18 @@ dependencies = [ [[package]] name = "ra_ap_paths" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e69103304937ae61bd3d263995644181727a3ae4c42921565a27fbf9bb57fe" +checksum = "279e964f404e9c61f660c96523991b9f512b8c32edc40644158f95b76e0c79bc" dependencies = [ "camino", ] [[package]] name = "ra_ap_proc_macro_api" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4d6d4881bf719b42bd2c135d3b5ba7dd562e01a67213b3bbded9d38a646a79" +checksum = "ba42ae3ec871209817b6a15eeb98c315aaba0bb6fa11cee871601d35db9d7dc2" dependencies = [ "indexmap 2.14.2", "postcard", @@ -2006,9 +2007,9 @@ dependencies = [ [[package]] name = "ra_ap_profile" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d92fa966e335de22063067675ace026e5cceab1bc4ea8bbf51916339fac94f" +checksum = "6ea59e9a25dbe33bcb88a2268b30e40ad072d8ae1f7fc5ccee14a5bcfb630abd" dependencies = [ "libc", "perf-event", @@ -2017,9 +2018,9 @@ dependencies = [ [[package]] name = "ra_ap_project_model" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660a998bb108bb7a8a561eabd43f23879c7d9959e4cae3318635f754e47bed22" +checksum = "7e1b36fbc675aa161bbe9fa089d624a932d0c7ed7bb10868e5c59307c172ddf7" dependencies = [ "anyhow", "cargo_metadata", @@ -2044,9 +2045,9 @@ dependencies = [ [[package]] name = "ra_ap_span" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17d3d8c8f801c233bb6c942ca2288443b1e79955f3e8ae980ef2f9ee3e55aa9" +checksum = "06524ac7a55ee076413f9df64762aff68de970a005f3fdb3dd47b9f2557b264a" dependencies = [ "hashbrown 0.17.1", "la-arena", @@ -2060,9 +2061,9 @@ dependencies = [ [[package]] name = "ra_ap_stdx" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a5a19381d885e40fe3c02d7b173cbff222a82b1da90f885c41fc6c69257f97" +checksum = "129586548f6f9f0021f832089fdea89540402199cd81e185aa007c3b600e6880" dependencies = [ "crossbeam-channel", "crossbeam-utils", @@ -2076,9 +2077,9 @@ dependencies = [ [[package]] name = "ra_ap_syntax" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b5c51a7fed9b29b940f3b2d50017892f56bf85666240443b6ef2aa05ad6f2" +checksum = "91a2308fdfc18a9ebb897e82c0fa283ef2684160b6a9d4f388dd4ce3aada51b6" dependencies = [ "either", "itertools", @@ -2096,9 +2097,9 @@ dependencies = [ [[package]] name = "ra_ap_syntax-bridge" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd31f53e3e657011d69dda697fd19607d16741d8d8e117a049b275256a21a067" +checksum = "695083eef9a8b66a8cdfb08c830240b44a9d4607648da1f840f8a0a9e9525f1b" dependencies = [ "ra_ap_intern", "ra_ap_parser", @@ -2111,9 +2112,9 @@ dependencies = [ [[package]] name = "ra_ap_test_fixture" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602da840e556d286430fab93aedf5390cdf54773f474986321cec2b8efa8b9f2" +checksum = "b6aaa7a363bcd498a4709701ea082a12cefef5903c2ccc3cf9574cb73e535d47" dependencies = [ "ra_ap_base_db", "ra_ap_cfg", @@ -2129,9 +2130,9 @@ dependencies = [ [[package]] name = "ra_ap_test_utils" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64326dacef1a87e56027d2532d009dcfb980503fda7f36b03c25042c73fd76b" +checksum = "2e6998e88778877701f883fc656d512e78e1049bc95c756d78aafdfcd779fa3d" dependencies = [ "dissimilar", "ra_ap_paths", @@ -2143,9 +2144,9 @@ dependencies = [ [[package]] name = "ra_ap_toolchain" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1d2639ab9d049523009f2af20946dbededdef734c6053b5507b268cc001d95" +checksum = "63b8f2ee94686922a9492aeabe65ef7ca13363b3a186ab5fa509d5b446ec736f" dependencies = [ "camino", "semver", @@ -2153,9 +2154,9 @@ dependencies = [ [[package]] name = "ra_ap_tt" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c332ea9061ad6d121e4bcc5bef25537061a63bae9935877ae75c69d388356a" +checksum = "f9557893ca77252ba9ed064c943d3bc2dc36a8af1685d7f2137198ec00bb76a8" dependencies = [ "arrayvec", "ra-ap-rustc_lexer", @@ -2168,9 +2169,9 @@ dependencies = [ [[package]] name = "ra_ap_vfs" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4477f25432c5b720619f88ecc97b9b30137d4c7d2c78f83384d46a0f65263895" +checksum = "c86360f4d0d06b478aa0444023cfdafdaebf6b773bed2fbc91e39238fddef3dc" dependencies = [ "crossbeam-channel", "fst", @@ -2184,9 +2185,9 @@ dependencies = [ [[package]] name = "ra_ap_vfs-notify" -version = "0.0.352" +version = "0.0.356" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc737c1fc099fb5e6c1dd79d6aa32b97df6fa801355e79238a6805b484888b42" +checksum = "8531017d325179dd3b30e36ca45e1ec3ce773d0e1e3b73bd3fa552a3db45f7c8" dependencies = [ "crossbeam-channel", "notify", @@ -2363,9 +2364,9 @@ checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "salsa" -version = "0.28.2" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf0e374215cd2db2b5c75d7b3a99cb0cc052c0595335dfdefc03d4eb08f4aa81" +checksum = "27d2e6e19e39591cd99c01ac4141544b4d012cfd0831348629b8187fa9fe6d34" dependencies = [ "boxcar", "crossbeam-queue", @@ -2390,15 +2391,15 @@ dependencies = [ [[package]] name = "salsa-macro-rules" -version = "0.28.2" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85f4b7d4405540bbd6d4ffa52d4322d983f3781954d3073067ac1bdb028459b3" +checksum = "baf90a551c38f25ed8489111d3d5827aa18e1b85963f5e6a298505b1d1e2cb7e" [[package]] name = "salsa-macros" -version = "0.28.2" +version = "0.28.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445be2bfbb2f67cb663225ecd7bc5a25370c0250fca30f9d8cbad9a913650370" +checksum = "69dd77f86ec10e72e314f4ddf7c44c8d349e73cdff1aad524ba9668603fb0549" dependencies = [ "proc-macro2", "quote", @@ -2509,9 +2510,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935177bb8c0cd8ca1a4e6d1a2ac8988bea69cab4f9d3a31311e012ad27868ea4" +checksum = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f" dependencies = [ "base64", "bs58", @@ -2530,9 +2531,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d607aa01a3cb0ad757d6fd216136910db3c97b102fe686585689615a02dbcdc" +checksum = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49" dependencies = [ "darling", "proc-macro2", diff --git a/ruby/extractor/Cargo.toml b/ruby/extractor/Cargo.toml index db5cd433fe9d..d1f03ac1a05c 100644 --- a/ruby/extractor/Cargo.toml +++ b/ruby/extractor/Cargo.toml @@ -16,7 +16,7 @@ tracing-subscriber = { version = "0.3.23", features = ["env-filter"] } rayon = "1.12.0" regex = "1.13.1" encoding = "0.2" -lazy_static = "1.5.0" +lazy_static = "1.5.1" serde_json = "1.0.151" codeql-extractor = { path = "../../shared/tree-sitter-extractor" } diff --git a/rust/ast-generator/Cargo.toml b/rust/ast-generator/Cargo.toml index 29400a3f5d78..f1899800ac4a 100644 --- a/rust/ast-generator/Cargo.toml +++ b/rust/ast-generator/Cargo.toml @@ -10,7 +10,7 @@ ungrammar = "1.16.1" proc-macro2 = "1.0.107" quote = "1.0.47" either = "1.18.0" -stdx = {package = "ra_ap_stdx", version = "0.0.352"} +stdx = {package = "ra_ap_stdx", version = "0.0.356"} itertools = "0.15.0" mustache = "0.9.0" serde = { version = "1.0.229", features = ["derive"] } diff --git a/rust/extractor/Cargo.toml b/rust/extractor/Cargo.toml index a6387ebbcee3..69ad1c6bb82c 100644 --- a/rust/extractor/Cargo.toml +++ b/rust/extractor/Cargo.toml @@ -10,25 +10,25 @@ anyhow = "1.0.104" clap = { version = "4.6.7", features = ["derive"] } figment = { version = "0.10.19", features = ["env", "yaml"] } num-traits = "0.2.19" -ra_ap_base_db = "0.0.352" -ra_ap_hir = "0.0.352" -ra_ap_hir_def = "0.0.352" -ra_ap_ide_db = "0.0.352" -ra_ap_hir_ty = "0.0.352" -ra_ap_hir_expand = "0.0.352" -ra_ap_load-cargo = "0.0.352" -ra_ap_paths = "0.0.352" -ra_ap_project_model = "0.0.352" -ra_ap_syntax = "0.0.352" -ra_ap_syntax-bridge = "0.0.352" -ra_ap_toolchain = "0.0.352" -ra_ap_vfs = "0.0.352" -ra_ap_parser = "0.0.352" -ra_ap_span = "0.0.352" -ra_ap_cfg = "0.0.352" -ra_ap_intern = "0.0.352" +ra_ap_base_db = "0.0.356" +ra_ap_hir = "0.0.356" +ra_ap_hir_def = "0.0.356" +ra_ap_ide_db = "0.0.356" +ra_ap_hir_ty = "0.0.356" +ra_ap_hir_expand = "0.0.356" +ra_ap_load-cargo = "0.0.356" +ra_ap_paths = "0.0.356" +ra_ap_project_model = "0.0.356" +ra_ap_syntax = "0.0.356" +ra_ap_syntax-bridge = "0.0.356" +ra_ap_toolchain = "0.0.356" +ra_ap_vfs = "0.0.356" +ra_ap_parser = "0.0.356" +ra_ap_span = "0.0.356" +ra_ap_cfg = "0.0.356" +ra_ap_intern = "0.0.356" serde = "1.0.229" -serde_with = "3.23.0" +serde_with = "3.24.0" triomphe = "0.1.16" argfile = "1.0.0" codeql-extractor = { path = "../../shared/tree-sitter-extractor" } diff --git a/shared/tree-sitter-extractor/Cargo.toml b/shared/tree-sitter-extractor/Cargo.toml index be9548b3029e..ac78bd4c7a6c 100644 --- a/shared/tree-sitter-extractor/Cargo.toml +++ b/shared/tree-sitter-extractor/Cargo.toml @@ -14,7 +14,7 @@ tracing-subscriber = { version = "0.3.23", features = ["env-filter"] } rayon = "1.12.0" regex = "1.13.1" encoding = "0.2" -lazy_static = "1.5.0" +lazy_static = "1.5.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" chrono = { version = "0.4.45", features = ["serde"] } diff --git a/unified/extractor/Cargo.toml b/unified/extractor/Cargo.toml index 2d801bf5c584..4938c795e387 100644 --- a/unified/extractor/Cargo.toml +++ b/unified/extractor/Cargo.toml @@ -13,7 +13,7 @@ tracing-subscriber = { version = "0.3.23", features = ["env-filter"] } rayon = "1.12.0" regex = "1.13.1" encoding = "0.2" -lazy_static = "1.5.0" +lazy_static = "1.5.1" serde = "1.0.229" serde_json = { version = "1.0.151", features = ["unbounded_depth"] } From 97c5104c4ca74e181a71a26c0c4f9b1c1451b5d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:14 +0000 Subject: [PATCH 2/8] Rust: Update rust-analyzer sources --- MODULE.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 903a35ac0544..51fea834285d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -169,9 +169,9 @@ http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "ht # rust-analyzer sources needed by the rust ast-generator (see `rust/ast-generator/README.md`). # These should be updated through the `rust/scripts/update_rust_analyzer.py` script. -RUST_ANALYZER_SRC_TAG = "2026-09-14" +RUST_ANALYZER_SRC_TAG = "2026-09-28" -RUST_ANALYZER_SRC_INTEGRITY = "sha256-X08+CNiaj0xCaqv01pODxfdcroEMKuhsg2CvBQmWldU=" +RUST_ANALYZER_SRC_INTEGRITY = "sha256-xEyUq4Fnpq/WSdQw6L2oeyvBrw9BZej5h8IcvptSEpc=" http_archive( name = "rust-analyzer-src", From 3d81f3b72a27a69ae0c8292a1920852804b3198e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:16 +0000 Subject: [PATCH 3/8] Bazel: Regenerate vendored cargo dependencies --- MODULE.bazel | 40 +- .../tree_sitter_extractors_deps/BUILD.bazel | 124 +++--- ....0.bazel => BUILD.lazy_static-1.5.1.bazel} | 2 +- ...azel => BUILD.ra_ap_base_db-0.0.356.bazel} | 24 +- ...52.bazel => BUILD.ra_ap_cfg-0.0.356.bazel} | 14 +- ...azel => BUILD.ra_ap_edition-0.0.356.bazel} | 2 +- ...52.bazel => BUILD.ra_ap_hir-0.0.356.bazel} | 44 +- ...azel => BUILD.ra_ap_hir_def-0.0.356.bazel} | 41 +- ...l => BUILD.ra_ap_hir_expand-0.0.356.bazel} | 44 +- ...bazel => BUILD.ra_ap_hir_ty-0.0.356.bazel} | 36 +- ...bazel => BUILD.ra_ap_ide_db-0.0.356.bazel} | 48 +- ...bazel => BUILD.ra_ap_intern-0.0.356.bazel} | 2 +- ...l => BUILD.ra_ap_load-cargo-0.0.356.bazel} | 38 +- ...bazel => BUILD.ra_ap_macros-0.0.356.bazel} | 2 +- ...52.bazel => BUILD.ra_ap_mbe-0.0.356.bazel} | 28 +- ...bazel => BUILD.ra_ap_parser-0.0.356.bazel} | 6 +- ....bazel => BUILD.ra_ap_paths-0.0.356.bazel} | 2 +- ... BUILD.ra_ap_proc_macro_api-0.0.356.bazel} | 22 +- ...azel => BUILD.ra_ap_profile-0.0.356.bazel} | 2 +- ...> BUILD.ra_ap_project_model-0.0.356.bazel} | 30 +- ...2.bazel => BUILD.ra_ap_span-0.0.356.bazel} | 16 +- ...2.bazel => BUILD.ra_ap_stdx-0.0.356.bazel} | 2 +- ...bazel => BUILD.ra_ap_syntax-0.0.356.bazel} | 10 +- ...> BUILD.ra_ap_syntax-bridge-0.0.356.bazel} | 26 +- ...=> BUILD.ra_ap_test_fixture-0.0.356.bazel} | 38 +- ...l => BUILD.ra_ap_test_utils-0.0.356.bazel} | 14 +- ...el => BUILD.ra_ap_toolchain-0.0.356.bazel} | 2 +- ...352.bazel => BUILD.ra_ap_tt-0.0.356.bazel} | 14 +- ...52.bazel => BUILD.ra_ap_vfs-0.0.356.bazel} | 10 +- ...l => BUILD.ra_ap_vfs-notify-0.0.356.bazel} | 14 +- ...-0.28.2.bazel => BUILD.salsa-0.28.5.bazel} | 6 +- ...l => BUILD.salsa-macro-rules-0.28.5.bazel} | 2 +- ....bazel => BUILD.salsa-macros-0.28.5.bazel} | 2 +- ....0.bazel => BUILD.serde_with-3.24.0.bazel} | 4 +- ...l => BUILD.serde_with_macros-3.24.0.bazel} | 2 +- .../BUILD.sharded-slab-0.1.7.bazel | 2 +- .../BUILD.tracing-flame-0.2.0.bazel | 2 +- .../tree_sitter_extractors_deps/crates.bzl | 416 +++++++++--------- .../BUILD.bazel | 4 +- .../lazy_static/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_base_db/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_cfg/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_hir/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_hir_def/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_hir_expand/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_hir_ty/BUILD.bazel | 2 +- .../ra_ap_ide_db-0.0.352/BUILD.bazel | 15 - .../ra_ap_ide_db-0.0.356/BUILD.bazel | 15 + .../ra_ap_ide_db/BUILD.bazel | 2 +- .../ra_ap_intern-0.0.352/BUILD.bazel | 15 - .../ra_ap_intern-0.0.356/BUILD.bazel | 15 + .../ra_ap_intern/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_load-cargo/BUILD.bazel | 2 +- .../ra_ap_parser-0.0.352/BUILD.bazel | 15 - .../ra_ap_parser-0.0.356/BUILD.bazel | 15 + .../ra_ap_parser/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_paths/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_project_model/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_span/BUILD.bazel | 2 +- .../ra_ap_stdx-0.0.352/BUILD.bazel | 15 - .../ra_ap_stdx-0.0.356/BUILD.bazel | 15 + .../ra_ap_syntax-0.0.352/BUILD.bazel | 15 - .../ra_ap_syntax-0.0.356/BUILD.bazel | 15 + .../BUILD.bazel | 4 +- .../ra_ap_syntax-bridge/BUILD.bazel | 2 +- .../ra_ap_syntax/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_toolchain/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../ra_ap_vfs/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../serde_with/BUILD.bazel | 2 +- .../BUILD.bazel | 4 +- .../stdx/BUILD.bazel | 2 +- 84 files changed, 694 insertions(+), 693 deletions(-) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.lazy_static-1.5.0.bazel => BUILD.lazy_static-1.5.1.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_base_db-0.0.352.bazel => BUILD.ra_ap_base_db-0.0.356.bazel} (89%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_cfg-0.0.352.bazel => BUILD.ra_ap_cfg-0.0.356.bazel} (93%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_edition-0.0.352.bazel => BUILD.ra_ap_edition-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_hir-0.0.352.bazel => BUILD.ra_ap_hir-0.0.356.bazel} (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_hir_def-0.0.352.bazel => BUILD.ra_ap_hir_def-0.0.356.bazel} (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_hir_expand-0.0.352.bazel => BUILD.ra_ap_hir_expand-0.0.356.bazel} (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_hir_ty-0.0.352.bazel => BUILD.ra_ap_hir_ty-0.0.356.bazel} (86%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_ide_db-0.0.352.bazel => BUILD.ra_ap_ide_db-0.0.356.bazel} (80%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_intern-0.0.352.bazel => BUILD.ra_ap_intern-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_load-cargo-0.0.352.bazel => BUILD.ra_ap_load-cargo-0.0.356.bazel} (82%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_macros-0.0.352.bazel => BUILD.ra_ap_macros-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_mbe-0.0.352.bazel => BUILD.ra_ap_mbe-0.0.356.bazel} (87%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_parser-0.0.352.bazel => BUILD.ra_ap_parser-0.0.356.bazel} (97%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_paths-0.0.352.bazel => BUILD.ra_ap_paths-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_proc_macro_api-0.0.352.bazel => BUILD.ra_ap_proc_macro_api-0.0.356.bazel} (90%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_profile-0.0.352.bazel => BUILD.ra_ap_profile-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_project_model-0.0.352.bazel => BUILD.ra_ap_project_model-0.0.356.bazel} (86%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_span-0.0.352.bazel => BUILD.ra_ap_span-0.0.356.bazel} (92%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_stdx-0.0.352.bazel => BUILD.ra_ap_stdx-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_syntax-0.0.352.bazel => BUILD.ra_ap_syntax-0.0.356.bazel} (95%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_syntax-bridge-0.0.352.bazel => BUILD.ra_ap_syntax-bridge-0.0.356.bazel} (87%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_test_fixture-0.0.352.bazel => BUILD.ra_ap_test_fixture-0.0.356.bazel} (82%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_test_utils-0.0.352.bazel => BUILD.ra_ap_test_utils-0.0.356.bazel} (92%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_toolchain-0.0.352.bazel => BUILD.ra_ap_toolchain-0.0.356.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_tt-0.0.352.bazel => BUILD.ra_ap_tt-0.0.356.bazel} (93%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_vfs-0.0.352.bazel => BUILD.ra_ap_vfs-0.0.356.bazel} (95%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.ra_ap_vfs-notify-0.0.352.bazel => BUILD.ra_ap_vfs-notify-0.0.356.bazel} (93%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.salsa-0.28.2.bazel => BUILD.salsa-0.28.5.bazel} (97%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.salsa-macro-rules-0.28.2.bazel => BUILD.salsa-macro-rules-0.28.5.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.salsa-macros-0.28.2.bazel => BUILD.salsa-macros-0.28.5.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.serde_with-3.23.0.bazel => BUILD.serde_with-3.24.0.bazel} (98%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{BUILD.serde_with_macros-3.23.0.bazel => BUILD.serde_with_macros-3.24.0.bazel} (99%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{lazy_static-1.5.0 => lazy_static-1.5.1}/BUILD.bazel (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_hir_def-0.0.352 => ra_ap_base_db-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_vfs-0.0.352 => ra_ap_cfg-0.0.356}/BUILD.bazel (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_cfg-0.0.352 => ra_ap_hir-0.0.356}/BUILD.bazel (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_base_db-0.0.352 => ra_ap_hir_def-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_hir_expand-0.0.352 => ra_ap_hir_expand-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_hir_ty-0.0.352 => ra_ap_hir_ty-0.0.356}/BUILD.bazel (81%) delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.352/BUILD.bazel create mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.356/BUILD.bazel delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.352/BUILD.bazel create mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.356/BUILD.bazel rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_load-cargo-0.0.352 => ra_ap_load-cargo-0.0.356}/BUILD.bazel (81%) delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.352/BUILD.bazel create mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.356/BUILD.bazel rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_paths-0.0.352 => ra_ap_paths-0.0.356}/BUILD.bazel (82%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_project_model-0.0.352 => ra_ap_project_model-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_span-0.0.352 => ra_ap_span-0.0.356}/BUILD.bazel (82%) delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.352/BUILD.bazel create mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.356/BUILD.bazel delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.352/BUILD.bazel create mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.356/BUILD.bazel rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_syntax-bridge-0.0.352 => ra_ap_syntax-bridge-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_toolchain-0.0.352 => ra_ap_toolchain-0.0.356}/BUILD.bazel (81%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{ra_ap_hir-0.0.352 => ra_ap_vfs-0.0.356}/BUILD.bazel (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{serde_with-3.23.0 => serde_with-3.24.0}/BUILD.bazel (83%) rename misc/bazel/3rdparty/tree_sitter_extractors_deps/{stdx-0.0.352 => stdx-0.0.356}/BUILD.bazel (83%) diff --git a/MODULE.bazel b/MODULE.bazel index 51fea834285d..bf4cfb544c85 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -118,36 +118,36 @@ use_repo( "vendor_ts__glob-0.3.4", "vendor_ts__globset-0.4.18", "vendor_ts__itertools-0.15.0", - "vendor_ts__lazy_static-1.5.0", + "vendor_ts__lazy_static-1.5.1", "vendor_ts__mustache-0.9.0", "vendor_ts__num-traits-0.2.19", "vendor_ts__num_cpus-1.17.0", "vendor_ts__proc-macro2-1.0.107", "vendor_ts__quote-1.0.47", - "vendor_ts__ra_ap_base_db-0.0.352", - "vendor_ts__ra_ap_cfg-0.0.352", - "vendor_ts__ra_ap_hir-0.0.352", - "vendor_ts__ra_ap_hir_def-0.0.352", - "vendor_ts__ra_ap_hir_expand-0.0.352", - "vendor_ts__ra_ap_hir_ty-0.0.352", - "vendor_ts__ra_ap_ide_db-0.0.352", - "vendor_ts__ra_ap_intern-0.0.352", - "vendor_ts__ra_ap_load-cargo-0.0.352", - "vendor_ts__ra_ap_parser-0.0.352", - "vendor_ts__ra_ap_paths-0.0.352", - "vendor_ts__ra_ap_project_model-0.0.352", - "vendor_ts__ra_ap_span-0.0.352", - "vendor_ts__ra_ap_stdx-0.0.352", - "vendor_ts__ra_ap_syntax-0.0.352", - "vendor_ts__ra_ap_syntax-bridge-0.0.352", - "vendor_ts__ra_ap_toolchain-0.0.352", - "vendor_ts__ra_ap_vfs-0.0.352", + "vendor_ts__ra_ap_base_db-0.0.356", + "vendor_ts__ra_ap_cfg-0.0.356", + "vendor_ts__ra_ap_hir-0.0.356", + "vendor_ts__ra_ap_hir_def-0.0.356", + "vendor_ts__ra_ap_hir_expand-0.0.356", + "vendor_ts__ra_ap_hir_ty-0.0.356", + "vendor_ts__ra_ap_ide_db-0.0.356", + "vendor_ts__ra_ap_intern-0.0.356", + "vendor_ts__ra_ap_load-cargo-0.0.356", + "vendor_ts__ra_ap_parser-0.0.356", + "vendor_ts__ra_ap_paths-0.0.356", + "vendor_ts__ra_ap_project_model-0.0.356", + "vendor_ts__ra_ap_span-0.0.356", + "vendor_ts__ra_ap_stdx-0.0.356", + "vendor_ts__ra_ap_syntax-0.0.356", + "vendor_ts__ra_ap_syntax-bridge-0.0.356", + "vendor_ts__ra_ap_toolchain-0.0.356", + "vendor_ts__ra_ap_vfs-0.0.356", "vendor_ts__rand-0.10.3", "vendor_ts__rayon-1.12.0", "vendor_ts__regex-1.13.1", "vendor_ts__serde-1.0.229", "vendor_ts__serde_json-1.0.151", - "vendor_ts__serde_with-3.23.0", + "vendor_ts__serde_with-3.24.0", "vendor_ts__serde_yaml-0.9.34-deprecated", "vendor_ts__syn-3.0.6", "vendor_ts__toml-1.1.6-spec-1.1.0", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel index fdc2c922dd91..cd588fb53a8d 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel @@ -188,14 +188,14 @@ alias( ) alias( - name = "lazy_static-1.5.0", - actual = "@vendor_ts__lazy_static-1.5.0//:lazy_static", + name = "lazy_static-1.5.1", + actual = "@vendor_ts__lazy_static-1.5.1//:lazy_static", tags = ["manual"], ) alias( name = "lazy_static", - actual = "@vendor_ts__lazy_static-1.5.0//:lazy_static", + actual = "@vendor_ts__lazy_static-1.5.1//:lazy_static", tags = ["manual"], ) @@ -260,224 +260,224 @@ alias( ) alias( - name = "ra_ap_base_db-0.0.352", - actual = "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", + name = "ra_ap_base_db-0.0.356", + actual = "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", tags = ["manual"], ) alias( name = "ra_ap_base_db", - actual = "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", + actual = "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", tags = ["manual"], ) alias( - name = "ra_ap_cfg-0.0.352", - actual = "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", + name = "ra_ap_cfg-0.0.356", + actual = "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", tags = ["manual"], ) alias( name = "ra_ap_cfg", - actual = "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", + actual = "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", tags = ["manual"], ) alias( - name = "ra_ap_hir-0.0.352", - actual = "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir", + name = "ra_ap_hir-0.0.356", + actual = "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir", tags = ["manual"], ) alias( name = "ra_ap_hir", - actual = "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir", + actual = "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir", tags = ["manual"], ) alias( - name = "ra_ap_hir_def-0.0.352", - actual = "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", + name = "ra_ap_hir_def-0.0.356", + actual = "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", tags = ["manual"], ) alias( name = "ra_ap_hir_def", - actual = "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", + actual = "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", tags = ["manual"], ) alias( - name = "ra_ap_hir_expand-0.0.352", - actual = "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", + name = "ra_ap_hir_expand-0.0.356", + actual = "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", tags = ["manual"], ) alias( name = "ra_ap_hir_expand", - actual = "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", + actual = "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", tags = ["manual"], ) alias( - name = "ra_ap_hir_ty-0.0.352", - actual = "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty", + name = "ra_ap_hir_ty-0.0.356", + actual = "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty", tags = ["manual"], ) alias( name = "ra_ap_hir_ty", - actual = "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty", + actual = "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty", tags = ["manual"], ) alias( - name = "ra_ap_ide_db-0.0.352", - actual = "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db", + name = "ra_ap_ide_db-0.0.356", + actual = "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db", tags = ["manual"], ) alias( name = "ra_ap_ide_db", - actual = "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db", + actual = "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db", tags = ["manual"], ) alias( - name = "ra_ap_intern-0.0.352", - actual = "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", + name = "ra_ap_intern-0.0.356", + actual = "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", tags = ["manual"], ) alias( name = "ra_ap_intern", - actual = "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", + actual = "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", tags = ["manual"], ) alias( - name = "ra_ap_load-cargo-0.0.352", - actual = "@vendor_ts__ra_ap_load-cargo-0.0.352//:ra_ap_load_cargo", + name = "ra_ap_load-cargo-0.0.356", + actual = "@vendor_ts__ra_ap_load-cargo-0.0.356//:ra_ap_load_cargo", tags = ["manual"], ) alias( name = "ra_ap_load-cargo", - actual = "@vendor_ts__ra_ap_load-cargo-0.0.352//:ra_ap_load_cargo", + actual = "@vendor_ts__ra_ap_load-cargo-0.0.356//:ra_ap_load_cargo", tags = ["manual"], ) alias( - name = "ra_ap_parser-0.0.352", - actual = "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", + name = "ra_ap_parser-0.0.356", + actual = "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", tags = ["manual"], ) alias( name = "ra_ap_parser", - actual = "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", + actual = "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", tags = ["manual"], ) alias( - name = "ra_ap_paths-0.0.352", - actual = "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", + name = "ra_ap_paths-0.0.356", + actual = "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", tags = ["manual"], ) alias( name = "ra_ap_paths", - actual = "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", + actual = "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", tags = ["manual"], ) alias( - name = "ra_ap_project_model-0.0.352", - actual = "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model", + name = "ra_ap_project_model-0.0.356", + actual = "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model", tags = ["manual"], ) alias( name = "ra_ap_project_model", - actual = "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model", + actual = "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model", tags = ["manual"], ) alias( - name = "ra_ap_span-0.0.352", - actual = "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", + name = "ra_ap_span-0.0.356", + actual = "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", tags = ["manual"], ) alias( name = "ra_ap_span", - actual = "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", + actual = "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", tags = ["manual"], ) alias( - name = "ra_ap_stdx-0.0.352", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + name = "ra_ap_stdx-0.0.356", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", tags = ["manual"], ) alias( - name = "stdx-0.0.352", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + name = "stdx-0.0.356", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", tags = ["manual"], ) alias( name = "stdx", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", tags = ["manual"], ) alias( - name = "ra_ap_syntax-0.0.352", - actual = "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", + name = "ra_ap_syntax-0.0.356", + actual = "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", tags = ["manual"], ) alias( name = "ra_ap_syntax", - actual = "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", + actual = "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", tags = ["manual"], ) alias( - name = "ra_ap_syntax-bridge-0.0.352", - actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", + name = "ra_ap_syntax-bridge-0.0.356", + actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", tags = ["manual"], ) alias( name = "ra_ap_syntax-bridge", - actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", + actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", tags = ["manual"], ) alias( - name = "ra_ap_toolchain-0.0.352", - actual = "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain", + name = "ra_ap_toolchain-0.0.356", + actual = "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain", tags = ["manual"], ) alias( name = "ra_ap_toolchain", - actual = "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain", + actual = "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain", tags = ["manual"], ) alias( - name = "ra_ap_vfs-0.0.352", - actual = "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + name = "ra_ap_vfs-0.0.356", + actual = "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", tags = ["manual"], ) alias( name = "ra_ap_vfs", - actual = "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + actual = "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", tags = ["manual"], ) @@ -542,14 +542,14 @@ alias( ) alias( - name = "serde_with-3.23.0", - actual = "@vendor_ts__serde_with-3.23.0//:serde_with", + name = "serde_with-3.24.0", + actual = "@vendor_ts__serde_with-3.24.0//:serde_with", tags = ["manual"], ) alias( name = "serde_with", - actual = "@vendor_ts__serde_with-3.23.0//:serde_with", + actual = "@vendor_ts__serde_with-3.24.0//:serde_with", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.0.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.1.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.0.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.1.bazel index e95f849bdc8d..5eca4475d5d0 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.0.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.lazy_static-1.5.1.bazel @@ -106,5 +106,5 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "1.5.0", + version = "1.5.1", ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.356.bazel similarity index 89% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.356.bazel index e2ad282eb43f..e842827d3e21 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_base_db-0.0.356.bazel @@ -23,11 +23,11 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs": "vfs", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs": "vfs", }, compile_data = glob( include = ["**"], @@ -116,18 +116,18 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__dashmap-6.2.1//:dashmap", "@vendor_ts__indexmap-2.14.2//:indexmap", "@vendor_ts__la-arena-0.3.1//:la_arena", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__semver-1.0.28//:semver", "@vendor_ts__tracing-0.1.44//:tracing", "@vendor_ts__triomphe-0.1.16//:triomphe", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.356.bazel similarity index 93% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.356.bazel index e6f4644c374b..ea6e27be0f6e 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_cfg-0.0.356.bazel @@ -23,9 +23,9 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -116,11 +116,11 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__tracing-0.1.44//:tracing", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.356.bazel index fb7bf8a71ab6..19975158a40b 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_edition-0.0.356.bazel @@ -106,5 +106,5 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.356.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.356.bazel index 39817ffee598..8887d5c8119f 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir-0.0.356.bazel @@ -23,16 +23,16 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def": "hir_def", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand": "hir_expand", - "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty": "hir_ty", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def": "hir_def", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand": "hir_expand", + "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty": "hir_ty", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -118,25 +118,25 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__either-1.18.0//:either", "@vendor_ts__itertools-0.15.0//:itertools", "@vendor_ts__la-arena-0.3.1//:la_arena", "@vendor_ts__ra-ap-rustc_type_ir-0.166.0//:ra_ap_rustc_type_ir", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", - "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", + "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__serde_json-1.0.151//:serde_json", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__tracing-0.1.44//:tracing", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.356.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.356.bazel index 06dbebab7fcd..88a4710b9dee 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_def-0.0.356.bazel @@ -23,15 +23,15 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand": "hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge": "syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand": "hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge": "syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -117,7 +117,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__bitflags-2.13.2//:bitflags", @@ -130,21 +130,22 @@ rust_library( "@vendor_ts__la-arena-0.3.1//:la_arena", "@vendor_ts__ra-ap-rustc_abi-0.166.0//:ra_ap_rustc_abi", "@vendor_ts__ra-ap-rustc_parse_format-0.166.0//:ra_ap_rustc_parse_format", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__rustc_apfloat-0.2.3-llvm-462a31f5a5ab//:rustc_apfloat", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__thin-vec-0.2.19//:thin_vec", "@vendor_ts__tracing-0.1.44//:tracing", "@vendor_ts__triomphe-0.1.16//:triomphe", + "@vendor_ts__unicode-ident-1.0.24//:unicode_ident", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.356.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.356.bazel index ab8417b862f3..4c1c2f2d62d5 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_expand-0.0.356.bazel @@ -23,16 +23,16 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_mbe-0.0.352//:ra_ap_mbe": "mbe", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser": "parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge": "syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_mbe-0.0.356//:ra_ap_mbe": "mbe", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser": "parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge": "syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -118,23 +118,23 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__cov-mark-2.2.0//:cov_mark", "@vendor_ts__either-1.18.0//:either", "@vendor_ts__itertools-0.15.0//:itertools", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_mbe-0.0.352//:ra_ap_mbe", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_mbe-0.0.356//:ra_ap_mbe", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__thin-vec-0.2.19//:thin_vec", "@vendor_ts__tracing-0.1.44//:tracing", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.356.bazel similarity index 86% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.356.bazel index 887262bcd8a9..f0794477b16c 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_hir_ty-0.0.356.bazel @@ -23,14 +23,14 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def": "hir_def", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand": "hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_macros-0.0.352//:ra_ap_macros": "macros", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def": "hir_def", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand": "hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_macros-0.0.356//:ra_ap_macros": "macros", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", }, compile_data = glob( include = ["**"], @@ -47,7 +47,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2024", proc_macro_deps = [ - "@vendor_ts__ra_ap_macros-0.0.352//:ra_ap_macros", + "@vendor_ts__ra_ap_macros-0.0.356//:ra_ap_macros", "@vendor_ts__serde_derive-1.0.229//:serde_derive", ], rustc_env_files = [ @@ -120,7 +120,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__bitflags-2.13.2//:bitflags", @@ -138,16 +138,16 @@ rust_library( "@vendor_ts__ra-ap-rustc_next_trait_solver-0.166.0//:ra_ap_rustc_next_trait_solver", "@vendor_ts__ra-ap-rustc_pattern_analysis-0.166.0//:ra_ap_rustc_pattern_analysis", "@vendor_ts__ra-ap-rustc_type_ir-0.166.0//:ra_ap_rustc_type_ir", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__rustc_apfloat-0.2.3-llvm-462a31f5a5ab//:rustc_apfloat", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__serde-1.0.229//:serde", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__thin-vec-0.2.19//:thin_vec", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.356.bazel similarity index 80% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.356.bazel index bab336411e76..83f1ddcc42f1 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_ide_db-0.0.356.bazel @@ -23,17 +23,17 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir": "hir", - "@vendor_ts__ra_ap_macros-0.0.352//:ra_ap_macros": "macros", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser": "parser", - "@vendor_ts__ra_ap_profile-0.0.352//:ra_ap_profile": "profile", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_test_fixture-0.0.352//:ra_ap_test_fixture": "test_fixture", - "@vendor_ts__ra_ap_test_utils-0.0.352//:ra_ap_test_utils": "test_utils", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs": "vfs", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir": "hir", + "@vendor_ts__ra_ap_macros-0.0.356//:ra_ap_macros": "macros", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser": "parser", + "@vendor_ts__ra_ap_profile-0.0.356//:ra_ap_profile": "profile", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_test_fixture-0.0.356//:ra_ap_test_fixture": "test_fixture", + "@vendor_ts__ra_ap_test_utils-0.0.356//:ra_ap_test_utils": "test_utils", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs": "vfs", }, compile_data = glob( include = ["**"], @@ -53,7 +53,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2024", proc_macro_deps = [ - "@vendor_ts__ra_ap_macros-0.0.352//:ra_ap_macros", + "@vendor_ts__ra_ap_macros-0.0.356//:ra_ap_macros", ], rustc_env_files = [ ":cargo_toml_env_vars", @@ -125,7 +125,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__bitflags-2.13.2//:bitflags", @@ -137,19 +137,19 @@ rust_library( "@vendor_ts__line-index-0.1.2//:line_index", "@vendor_ts__memchr-2.8.3//:memchr", "@vendor_ts__nohash-hasher-0.2.0//:nohash_hasher", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - "@vendor_ts__ra_ap_profile-0.0.352//:ra_ap_profile", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_test_fixture-0.0.352//:ra_ap_test_fixture", - "@vendor_ts__ra_ap_test_utils-0.0.352//:ra_ap_test_utils", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + "@vendor_ts__ra_ap_profile-0.0.356//:ra_ap_profile", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_test_fixture-0.0.356//:ra_ap_test_fixture", + "@vendor_ts__ra_ap_test_utils-0.0.356//:ra_ap_test_utils", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", "@vendor_ts__rayon-1.12.0//:rayon", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__tracing-0.1.44//:tracing", "@vendor_ts__triomphe-0.1.16//:triomphe", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.356.bazel index cadf454953ac..3b21d46acbb8 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_intern-0.0.356.bazel @@ -106,7 +106,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__dashmap-6.2.1//:dashmap", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.356.bazel similarity index 82% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.356.bazel index f20b265668f8..c1f443091623 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_load-cargo-0.0.356.bazel @@ -23,15 +23,15 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand": "hir_expand", - "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db": "ide_db", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_proc_macro_api-0.0.352//:ra_ap_proc_macro_api": "proc_macro_api", - "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model": "project_model", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs": "vfs", - "@vendor_ts__ra_ap_vfs-notify-0.0.352//:ra_ap_vfs_notify": "vfs_notify", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand": "hir_expand", + "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db": "ide_db", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_proc_macro_api-0.0.356//:ra_ap_proc_macro_api": "proc_macro_api", + "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model": "project_model", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs": "vfs", + "@vendor_ts__ra_ap_vfs-notify-0.0.356//:ra_ap_vfs_notify": "vfs_notify", }, compile_data = glob( include = ["**"], @@ -117,20 +117,20 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__anyhow-1.0.104//:anyhow", "@vendor_ts__crossbeam-channel-0.5.17//:crossbeam_channel", "@vendor_ts__itertools-0.15.0//:itertools", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", - "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_proc_macro_api-0.0.352//:ra_ap_proc_macro_api", - "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", - "@vendor_ts__ra_ap_vfs-notify-0.0.352//:ra_ap_vfs_notify", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", + "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_proc_macro_api-0.0.356//:ra_ap_proc_macro_api", + "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", + "@vendor_ts__ra_ap_vfs-notify-0.0.356//:ra_ap_vfs_notify", "@vendor_ts__tracing-0.1.44//:tracing", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.356.bazel index 8be987e6ea71..17cdd4479fa0 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_macros-0.0.356.bazel @@ -106,7 +106,7 @@ rust_proc_macro( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__proc-macro2-1.0.107//:proc_macro2", "@vendor_ts__quote-1.0.47//:quote", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.356.bazel similarity index 87% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.356.bazel index bb9110b6e3b5..50ec70e1eb09 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_mbe-0.0.356.bazel @@ -23,12 +23,12 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser": "parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge": "syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser": "parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge": "syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -114,20 +114,20 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__bitflags-2.13.2//:bitflags", "@vendor_ts__cov-mark-2.2.0//:cov_mark", "@vendor_ts__ra-ap-rustc_lexer-0.166.0//:ra_ap_rustc_lexer", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__smallvec-1.16.1//:smallvec", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.356.bazel similarity index 97% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.356.bazel index b5ef7eadc8ff..4bd66c30f733 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_parser-0.0.356.bazel @@ -23,7 +23,7 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_edition-0.0.352//:ra_ap_edition": "edition", + "@vendor_ts__ra_ap_edition-0.0.356//:ra_ap_edition": "edition", }, compile_data = glob( include = ["**"], @@ -112,11 +112,11 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__drop_bomb-0.1.5//:drop_bomb", "@vendor_ts__ra-ap-rustc_lexer-0.166.0//:ra_ap_rustc_lexer", - "@vendor_ts__ra_ap_edition-0.0.352//:ra_ap_edition", + "@vendor_ts__ra_ap_edition-0.0.356//:ra_ap_edition", "@vendor_ts__rustc-literal-escaper-0.0.7//:rustc_literal_escaper", "@vendor_ts__tracing-0.1.44//:tracing", "@vendor_ts__winnow-0.7.13//:winnow", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.356.bazel index 914fc3b33793..0e0163c3f865 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_paths-0.0.356.bazel @@ -109,7 +109,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__camino-1.2.6//:camino", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.356.bazel similarity index 90% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.356.bazel index 71bba24cef5d..3bd74468d862 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_proc_macro_api-0.0.356.bazel @@ -23,11 +23,11 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -119,15 +119,15 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__indexmap-2.14.2//:indexmap", "@vendor_ts__postcard-1.1.3//:postcard", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rayon-1.12.0//:rayon", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__semver-1.0.28//:semver", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.356.bazel index adbeeb0de318..b0f8df14f1d1 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_profile-0.0.356.bazel @@ -106,7 +106,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = select({ "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ "@vendor_ts__windows-sys-0.61.2//:windows_sys", # cfg(windows) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.356.bazel similarity index 86% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.356.bazel index 8a4cdcf92c4d..eb48a0e7f7b5 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_project_model-0.0.356.bazel @@ -23,13 +23,13 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain": "toolchain", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain": "toolchain", }, compile_data = glob( include = ["**"], @@ -121,19 +121,19 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__anyhow-1.0.104//:anyhow", "@vendor_ts__cargo_metadata-0.23.1//:cargo_metadata", "@vendor_ts__itertools-0.15.0//:itertools", "@vendor_ts__la-arena-0.3.1//:la_arena", - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__semver-1.0.28//:semver", "@vendor_ts__serde-1.0.229//:serde", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.356.bazel similarity index 92% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.356.bazel index 063975e1b8bc..5ded34d30746 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_span-0.0.356.bazel @@ -23,9 +23,9 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs": "vfs", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs": "vfs", }, compile_data = glob( include = ["**"], @@ -115,15 +115,15 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__hashbrown-0.17.1//:hashbrown", "@vendor_ts__la-arena-0.3.1//:la_arena", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-0.28.2//:salsa", + "@vendor_ts__salsa-0.28.5//:salsa", "@vendor_ts__text-size-1.1.1//:text_size", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.356.bazel index fbbba4a86a71..85e917cb1df2 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_stdx-0.0.356.bazel @@ -106,7 +106,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__crossbeam-channel-0.5.17//:crossbeam_channel", "@vendor_ts__crossbeam-utils-0.8.23//:crossbeam_utils", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.356.bazel similarity index 95% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.356.bazel index 06d35ec9e336..2b7c7ddb71cd 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-0.0.356.bazel @@ -23,8 +23,8 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser": "parser", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser": "parser", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", }, compile_data = glob( include = ["**"], @@ -113,13 +113,13 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__either-1.18.0//:either", "@vendor_ts__itertools-0.15.0//:itertools", "@vendor_ts__ra-ap-rustc_lexer-0.166.0//:ra_ap_rustc_lexer", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", "@vendor_ts__rowan-0.17.0//:rowan", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__rustc-literal-escaper-0.0.7//:rustc_literal_escaper", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.356.bazel similarity index 87% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.356.bazel index c2d330be5e8a..874d7e0b070d 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_syntax-bridge-0.0.356.bazel @@ -23,12 +23,12 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser": "parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax": "syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser": "parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax": "syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -114,14 +114,14 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.356.bazel similarity index 82% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.356.bazel index d90d13261666..80783c91a31e 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_fixture-0.0.356.bazel @@ -23,15 +23,15 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db": "base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg": "cfg", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand": "hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_test_utils-0.0.352//:ra_ap_test_utils": "test_utils", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt": "tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db": "base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg": "cfg", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand": "hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_test_utils-0.0.356//:ra_ap_test_utils": "test_utils", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt": "tt", }, compile_data = glob( include = ["**"], @@ -120,17 +120,17 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ - "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", - "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", - "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_test_utils-0.0.352//:ra_ap_test_utils", - "@vendor_ts__ra_ap_tt-0.0.352//:ra_ap_tt", + "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", + "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", + "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_test_utils-0.0.356//:ra_ap_test_utils", + "@vendor_ts__ra_ap_tt-0.0.356//:ra_ap_tt", "@vendor_ts__triomphe-0.1.16//:triomphe", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.356.bazel similarity index 92% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.356.bazel index 7c860313ebce..f21453ce2e37 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_test_utils-0.0.356.bazel @@ -23,9 +23,9 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_profile-0.0.352//:ra_ap_profile": "profile", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_profile-0.0.356//:ra_ap_profile": "profile", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", }, compile_data = glob( include = ["**"], @@ -111,12 +111,12 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__dissimilar-1.0.11//:dissimilar", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_profile-0.0.352//:ra_ap_profile", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_profile-0.0.356//:ra_ap_profile", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__text-size-1.1.1//:text_size", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.356.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.356.bazel index d2d447fe7f45..b1fdb3dcb7a4 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_toolchain-0.0.356.bazel @@ -106,7 +106,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__camino-1.2.6//:camino", "@vendor_ts__semver-1.0.28//:semver", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.356.bazel similarity index 93% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.356.bazel index 6171bef2ceee..fb2287992c1d 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_tt-0.0.356.bazel @@ -23,9 +23,9 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern": "intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span": "span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern": "intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span": "span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", }, compile_data = glob( include = ["**"], @@ -111,13 +111,13 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__arrayvec-0.7.8//:arrayvec", "@vendor_ts__ra-ap-rustc_lexer-0.166.0//:ra_ap_rustc_lexer", - "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__text-size-1.1.1//:text_size", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.356.bazel similarity index 95% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.356.bazel index e0d5a70a5e99..4f1e5a336400 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-0.0.356.bazel @@ -23,8 +23,8 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", }, compile_data = glob( include = ["**"], @@ -110,14 +110,14 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__crossbeam-channel-0.5.17//:crossbeam_channel", "@vendor_ts__fst-0.4.7//:fst", "@vendor_ts__indexmap-2.14.2//:indexmap", "@vendor_ts__nohash-hasher-0.2.0//:nohash_hasher", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__tracing-0.1.44//:tracing", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.352.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.356.bazel similarity index 93% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.352.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.356.bazel index 8163b829ff82..9f3da1efdbad 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.352.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.ra_ap_vfs-notify-0.0.356.bazel @@ -23,9 +23,9 @@ rust_library( allow_empty = True, ), aliases = { - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths": "paths", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx": "stdx", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs": "vfs", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths": "paths", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx": "stdx", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs": "vfs", }, compile_data = glob( include = ["**"], @@ -111,13 +111,13 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.0.352", + version = "0.0.356", deps = [ "@vendor_ts__crossbeam-channel-0.5.17//:crossbeam_channel", "@vendor_ts__notify-8.2.0//:notify", - "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", - "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", + "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", "@vendor_ts__rayon-1.12.0//:rayon", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", "@vendor_ts__tracing-0.1.44//:tracing", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.2.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.5.bazel similarity index 97% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.2.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.5.bazel index 058d967e96f1..d28105e2da58 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.2.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-0.28.5.bazel @@ -44,7 +44,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2024", proc_macro_deps = [ - "@vendor_ts__salsa-macros-0.28.2//:salsa_macros", + "@vendor_ts__salsa-macros-0.28.5//:salsa_macros", ], rustc_env_files = [ ":cargo_toml_env_vars", @@ -116,7 +116,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.28.2", + version = "0.28.5", deps = [ "@vendor_ts__boxcar-0.2.14//:boxcar", "@vendor_ts__crossbeam-queue-0.3.14//:crossbeam_queue", @@ -130,7 +130,7 @@ rust_library( "@vendor_ts__portable-atomic-1.15.0//:portable_atomic", "@vendor_ts__rayon-1.12.0//:rayon", "@vendor_ts__rustc-hash-2.1.3//:rustc_hash", - "@vendor_ts__salsa-macro-rules-0.28.2//:salsa_macro_rules", + "@vendor_ts__salsa-macro-rules-0.28.5//:salsa_macro_rules", "@vendor_ts__smallvec-1.16.1//:smallvec", "@vendor_ts__thin-vec-0.2.19//:thin_vec", "@vendor_ts__tracing-0.1.44//:tracing", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.2.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.5.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.2.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.5.bazel index f39d94e97364..9c4ab7d45c66 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.2.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macro-rules-0.28.5.bazel @@ -106,5 +106,5 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.28.2", + version = "0.28.5", ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.2.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.5.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.2.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.5.bazel index 14d6089a06a9..62ba21bbcf28 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.2.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.salsa-macros-0.28.5.bazel @@ -109,7 +109,7 @@ rust_proc_macro( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.28.2", + version = "0.28.5", deps = [ "@vendor_ts__proc-macro2-1.0.107//:proc_macro2", "@vendor_ts__quote-1.0.47//:quote", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.23.0.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.24.0.bazel similarity index 98% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.23.0.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.24.0.bazel index 7b9636cd8c6b..7e43c9d34a35 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.23.0.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with-3.24.0.bazel @@ -43,7 +43,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2021", proc_macro_deps = [ - "@vendor_ts__serde_with_macros-3.23.0//:serde_with_macros", + "@vendor_ts__serde_with_macros-3.24.0//:serde_with_macros", ], rustc_env_files = [ ":cargo_toml_env_vars", @@ -115,7 +115,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "3.23.0", + version = "3.24.0", deps = [ "@vendor_ts__serde_core-1.0.229//:serde_core", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.23.0.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.24.0.bazel similarity index 99% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.23.0.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.24.0.bazel index 0616a0ff7ff1..dea954975998 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.23.0.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_with_macros-3.24.0.bazel @@ -106,7 +106,7 @@ rust_proc_macro( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "3.23.0", + version = "3.24.0", deps = [ "@vendor_ts__darling-0.24.1//:darling", "@vendor_ts__proc-macro2-1.0.107//:proc_macro2", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.sharded-slab-0.1.7.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.sharded-slab-0.1.7.bazel index ff8fc1fbef23..f59925e6b776 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.sharded-slab-0.1.7.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.sharded-slab-0.1.7.bazel @@ -108,6 +108,6 @@ rust_library( }), version = "0.1.7", deps = [ - "@vendor_ts__lazy_static-1.5.0//:lazy_static", + "@vendor_ts__lazy_static-1.5.1//:lazy_static", ], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tracing-flame-0.2.0.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tracing-flame-0.2.0.bazel index 0402a58f0438..3dbeee28c51c 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tracing-flame-0.2.0.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tracing-flame-0.2.0.bazel @@ -112,7 +112,7 @@ rust_library( }), version = "0.2.0", deps = [ - "@vendor_ts__lazy_static-1.5.0//:lazy_static", + "@vendor_ts__lazy_static-1.5.1//:lazy_static", "@vendor_ts__tracing-0.1.44//:tracing", "@vendor_ts__tracing-subscriber-0.3.23//:tracing_subscriber", ], diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl b/misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl index 9738663d0027..7e458cb84346 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl @@ -331,7 +331,7 @@ _NORMAL_DEPENDENCIES = { _COMMON_CONDITION: { "clap": Label("@vendor_ts//clap-4.6.7"), "encoding": Label("@vendor_ts//encoding-0.2.33"), - "lazy_static": Label("@vendor_ts//lazy_static-1.5.0"), + "lazy_static": Label("@vendor_ts//lazy_static-1.5.1"), "rayon": Label("@vendor_ts//rayon-1.12.0"), "regex": Label("@vendor_ts//regex-1.13.1"), "serde_json": Label("@vendor_ts//serde_json-1.0.151"), @@ -351,7 +351,7 @@ _NORMAL_DEPENDENCIES = { "proc-macro2": Label("@vendor_ts//proc-macro2-1.0.107"), "quote": Label("@vendor_ts//quote-1.0.47"), "serde": Label("@vendor_ts//serde-1.0.229"), - "stdx": Label("@vendor_ts//ra_ap_stdx-0.0.352"), + "stdx": Label("@vendor_ts//ra_ap_stdx-0.0.356"), "ungrammar": Label("@vendor_ts//ungrammar-1.16.1"), }, }, @@ -370,26 +370,26 @@ _NORMAL_DEPENDENCIES = { "itertools": Label("@vendor_ts//itertools-0.15.0"), "mustache": Label("@vendor_ts//mustache-0.9.0"), "num-traits": Label("@vendor_ts//num-traits-0.2.19"), - "ra_ap_base_db": Label("@vendor_ts//ra_ap_base_db-0.0.352"), - "ra_ap_cfg": Label("@vendor_ts//ra_ap_cfg-0.0.352"), - "ra_ap_hir": Label("@vendor_ts//ra_ap_hir-0.0.352"), - "ra_ap_hir_def": Label("@vendor_ts//ra_ap_hir_def-0.0.352"), - "ra_ap_hir_expand": Label("@vendor_ts//ra_ap_hir_expand-0.0.352"), - "ra_ap_hir_ty": Label("@vendor_ts//ra_ap_hir_ty-0.0.352"), - "ra_ap_ide_db": Label("@vendor_ts//ra_ap_ide_db-0.0.352"), - "ra_ap_intern": Label("@vendor_ts//ra_ap_intern-0.0.352"), - "ra_ap_load-cargo": Label("@vendor_ts//ra_ap_load-cargo-0.0.352"), - "ra_ap_parser": Label("@vendor_ts//ra_ap_parser-0.0.352"), - "ra_ap_paths": Label("@vendor_ts//ra_ap_paths-0.0.352"), - "ra_ap_project_model": Label("@vendor_ts//ra_ap_project_model-0.0.352"), - "ra_ap_span": Label("@vendor_ts//ra_ap_span-0.0.352"), - "ra_ap_syntax": Label("@vendor_ts//ra_ap_syntax-0.0.352"), - "ra_ap_syntax-bridge": Label("@vendor_ts//ra_ap_syntax-bridge-0.0.352"), - "ra_ap_toolchain": Label("@vendor_ts//ra_ap_toolchain-0.0.352"), - "ra_ap_vfs": Label("@vendor_ts//ra_ap_vfs-0.0.352"), + "ra_ap_base_db": Label("@vendor_ts//ra_ap_base_db-0.0.356"), + "ra_ap_cfg": Label("@vendor_ts//ra_ap_cfg-0.0.356"), + "ra_ap_hir": Label("@vendor_ts//ra_ap_hir-0.0.356"), + "ra_ap_hir_def": Label("@vendor_ts//ra_ap_hir_def-0.0.356"), + "ra_ap_hir_expand": Label("@vendor_ts//ra_ap_hir_expand-0.0.356"), + "ra_ap_hir_ty": Label("@vendor_ts//ra_ap_hir_ty-0.0.356"), + "ra_ap_ide_db": Label("@vendor_ts//ra_ap_ide_db-0.0.356"), + "ra_ap_intern": Label("@vendor_ts//ra_ap_intern-0.0.356"), + "ra_ap_load-cargo": Label("@vendor_ts//ra_ap_load-cargo-0.0.356"), + "ra_ap_parser": Label("@vendor_ts//ra_ap_parser-0.0.356"), + "ra_ap_paths": Label("@vendor_ts//ra_ap_paths-0.0.356"), + "ra_ap_project_model": Label("@vendor_ts//ra_ap_project_model-0.0.356"), + "ra_ap_span": Label("@vendor_ts//ra_ap_span-0.0.356"), + "ra_ap_syntax": Label("@vendor_ts//ra_ap_syntax-0.0.356"), + "ra_ap_syntax-bridge": Label("@vendor_ts//ra_ap_syntax-bridge-0.0.356"), + "ra_ap_toolchain": Label("@vendor_ts//ra_ap_toolchain-0.0.356"), + "ra_ap_vfs": Label("@vendor_ts//ra_ap_vfs-0.0.356"), "serde": Label("@vendor_ts//serde-1.0.229"), "serde_json": Label("@vendor_ts//serde_json-1.0.151"), - "serde_with": Label("@vendor_ts//serde_with-3.23.0"), + "serde_with": Label("@vendor_ts//serde_with-3.24.0"), "toml": Label("@vendor_ts//toml-1.1.6+spec-1.1.0"), "tracing": Label("@vendor_ts//tracing-0.1.44"), "tracing-flame": Label("@vendor_ts//tracing-flame-0.2.0"), @@ -409,7 +409,7 @@ _NORMAL_DEPENDENCIES = { "encoding": Label("@vendor_ts//encoding-0.2.33"), "flate2": Label("@vendor_ts//flate2-1.1.9"), "globset": Label("@vendor_ts//globset-0.4.18"), - "lazy_static": Label("@vendor_ts//lazy_static-1.5.0"), + "lazy_static": Label("@vendor_ts//lazy_static-1.5.1"), "num_cpus": Label("@vendor_ts//num_cpus-1.17.0"), "rayon": Label("@vendor_ts//rayon-1.12.0"), "regex": Label("@vendor_ts//regex-1.13.1"), @@ -450,7 +450,7 @@ _NORMAL_DEPENDENCIES = { _COMMON_CONDITION: { "clap": Label("@vendor_ts//clap-4.6.7"), "encoding": Label("@vendor_ts//encoding-0.2.33"), - "lazy_static": Label("@vendor_ts//lazy_static-1.5.0"), + "lazy_static": Label("@vendor_ts//lazy_static-1.5.1"), "rayon": Label("@vendor_ts//rayon-1.12.0"), "regex": Label("@vendor_ts//regex-1.13.1"), "serde": Label("@vendor_ts//serde-1.0.229"), @@ -470,7 +470,7 @@ _NORMAL_ALIASES = { }, "rust/ast-generator": { _COMMON_CONDITION: { - Label("@vendor_ts//ra_ap_stdx-0.0.352"): "stdx", + Label("@vendor_ts//ra_ap_stdx-0.0.356"): "stdx", }, }, "rust/autobuild": { @@ -2105,12 +2105,12 @@ def crate_repositories(): maybe( http_archive, - name = "vendor_ts__lazy_static-1.5.0", - sha256 = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe", + name = "vendor_ts__lazy_static-1.5.1", + sha256 = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb", type = "tar.gz", - urls = ["https://static.crates.io/crates/lazy_static/1.5.0/download"], - strip_prefix = "lazy_static-1.5.0", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.lazy_static-1.5.0.bazel"), + urls = ["https://static.crates.io/crates/lazy_static/1.5.1/download"], + strip_prefix = "lazy_static-1.5.1", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.lazy_static-1.5.1.bazel"), ) maybe( @@ -2635,272 +2635,272 @@ def crate_repositories(): maybe( http_archive, - name = "vendor_ts__ra_ap_base_db-0.0.352", - sha256 = "4ce5c7b9d3f79c6275948b067cddc352b56c7e3f33fc204a66520b7c7fe7d9ca", + name = "vendor_ts__ra_ap_base_db-0.0.356", + sha256 = "3eb95e4dff88ec2fbfc65fee6a0ec3f7c4bc5cb2cf2c7b7774c85c0c9372c7a4", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_base_db/0.0.352/download"], - strip_prefix = "ra_ap_base_db-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_base_db-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_base_db/0.0.356/download"], + strip_prefix = "ra_ap_base_db-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_base_db-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_cfg-0.0.352", - sha256 = "240877d981ec19422427c3587451f0df2cb926e3cce1035d9b5f1dedad821ee6", + name = "vendor_ts__ra_ap_cfg-0.0.356", + sha256 = "8ade9ce3b057c84c422cf32abcb6942dbeca138afc7d0d811694aac330f144a8", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_cfg/0.0.352/download"], - strip_prefix = "ra_ap_cfg-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_cfg-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_cfg/0.0.356/download"], + strip_prefix = "ra_ap_cfg-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_cfg-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_edition-0.0.352", - sha256 = "ceff3f2017143089b7350dd75b8a64548fb4474500ff400aaaca2f8f9990f4db", + name = "vendor_ts__ra_ap_edition-0.0.356", + sha256 = "a49e66405855c4b24d7f5868d6a898ab7d807e9d00a7c2637631b55a3f062e3a", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_edition/0.0.352/download"], - strip_prefix = "ra_ap_edition-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_edition-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_edition/0.0.356/download"], + strip_prefix = "ra_ap_edition-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_edition-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_hir-0.0.352", - sha256 = "d85f8f5db51a515c46e33f5ff427c6ca6d877e36df931849b8e21056c6bf93d5", + name = "vendor_ts__ra_ap_hir-0.0.356", + sha256 = "23a4721acb093e05cac8cd360c3fcf8de24d00199a7ea98817a3d9f73895fa51", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_hir/0.0.352/download"], - strip_prefix = "ra_ap_hir-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_hir/0.0.356/download"], + strip_prefix = "ra_ap_hir-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_hir_def-0.0.352", - sha256 = "75b677c3aa89a9b9200d14ea84ecf9cd196c1480ba48e76c5b155eabfd1a0da5", + name = "vendor_ts__ra_ap_hir_def-0.0.356", + sha256 = "6c356af460f77f31a4ca74f11d8e310a00caebc38be2a49c148d101018f4bb2e", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_hir_def/0.0.352/download"], - strip_prefix = "ra_ap_hir_def-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_def-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_hir_def/0.0.356/download"], + strip_prefix = "ra_ap_hir_def-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_def-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_hir_expand-0.0.352", - sha256 = "2e584a4031c431db6a20e76e83e64ffa3e1a31e442247d8b298addffbc234232", + name = "vendor_ts__ra_ap_hir_expand-0.0.356", + sha256 = "61073c026c6037d36baacc950f7f8a976963dd500da96c0568e29686bd1f560e", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_hir_expand/0.0.352/download"], - strip_prefix = "ra_ap_hir_expand-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_expand-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_hir_expand/0.0.356/download"], + strip_prefix = "ra_ap_hir_expand-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_expand-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_hir_ty-0.0.352", - sha256 = "dd74cde2cb4d0dc9f000517673611f80e5a3488a6ac87d1d9a82780968c3a9e7", + name = "vendor_ts__ra_ap_hir_ty-0.0.356", + sha256 = "96f89cfec8a5469d0b7a3bd87fdebf821f135c38ea0c5c3294f95b4885618a44", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_hir_ty/0.0.352/download"], - strip_prefix = "ra_ap_hir_ty-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_ty-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_hir_ty/0.0.356/download"], + strip_prefix = "ra_ap_hir_ty-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_hir_ty-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_ide_db-0.0.352", - sha256 = "56fbf064962bf4687b46a811594da007bf7300718916aaf0b09b6d2af509f018", + name = "vendor_ts__ra_ap_ide_db-0.0.356", + sha256 = "631cdbb6578ed254c73cc8cda71b7142f7778ba167eec4c7271aefea46a71c1e", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_ide_db/0.0.352/download"], - strip_prefix = "ra_ap_ide_db-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_ide_db-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_ide_db/0.0.356/download"], + strip_prefix = "ra_ap_ide_db-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_ide_db-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_intern-0.0.352", - sha256 = "c899ecc5f85ec4730108084662383454fd8123bc32dcbf996ce42fcc7be0bb5e", + name = "vendor_ts__ra_ap_intern-0.0.356", + sha256 = "2a0b96dd9cd22c3288474e6136fe8beac7a26c23f20bb8a7fb086383ba1050b9", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_intern/0.0.352/download"], - strip_prefix = "ra_ap_intern-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_intern-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_intern/0.0.356/download"], + strip_prefix = "ra_ap_intern-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_intern-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_load-cargo-0.0.352", - sha256 = "714cbf4632c3722c144dae74c8c454497b902d9fd2e25328163c509fbc3d8c47", + name = "vendor_ts__ra_ap_load-cargo-0.0.356", + sha256 = "5020c839f202e0d03b4188d17c1553f8ec876cab3c0737a636bfa849777dfe10", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_load-cargo/0.0.352/download"], - strip_prefix = "ra_ap_load-cargo-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_load-cargo-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_load-cargo/0.0.356/download"], + strip_prefix = "ra_ap_load-cargo-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_load-cargo-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_macros-0.0.352", - sha256 = "1006951e9805e69861cca620a7f80efca9cbcce86baaf5084939af0920143a14", + name = "vendor_ts__ra_ap_macros-0.0.356", + sha256 = "6da80860b3ed783b989f64b94f4a6290273942e1c47ebcab25542d452983bede", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_macros/0.0.352/download"], - strip_prefix = "ra_ap_macros-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_macros-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_macros/0.0.356/download"], + strip_prefix = "ra_ap_macros-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_macros-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_mbe-0.0.352", - sha256 = "b52a6f4b0984e7993cbb81ce5c8931587af7b85b0a902ef26541011ce91fe1be", + name = "vendor_ts__ra_ap_mbe-0.0.356", + sha256 = "86ef569e04737ad276217ad2641968f63de25d1fe6dd0ed1fac8c6af2259bee3", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_mbe/0.0.352/download"], - strip_prefix = "ra_ap_mbe-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_mbe-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_mbe/0.0.356/download"], + strip_prefix = "ra_ap_mbe-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_mbe-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_parser-0.0.352", - sha256 = "41f172691cbb8df836e924dc947c1de36f019c2d17ec6ccca207f2aa5a835954", + name = "vendor_ts__ra_ap_parser-0.0.356", + sha256 = "665a0ff94e8be7170aeb3ecf23e1a9ffb5b418daf2c6999646efd8bc9ac13271", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_parser/0.0.352/download"], - strip_prefix = "ra_ap_parser-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_parser-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_parser/0.0.356/download"], + strip_prefix = "ra_ap_parser-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_parser-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_paths-0.0.352", - sha256 = "27e69103304937ae61bd3d263995644181727a3ae4c42921565a27fbf9bb57fe", + name = "vendor_ts__ra_ap_paths-0.0.356", + sha256 = "279e964f404e9c61f660c96523991b9f512b8c32edc40644158f95b76e0c79bc", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_paths/0.0.352/download"], - strip_prefix = "ra_ap_paths-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_paths-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_paths/0.0.356/download"], + strip_prefix = "ra_ap_paths-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_paths-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_proc_macro_api-0.0.352", - sha256 = "3a4d6d4881bf719b42bd2c135d3b5ba7dd562e01a67213b3bbded9d38a646a79", + name = "vendor_ts__ra_ap_proc_macro_api-0.0.356", + sha256 = "ba42ae3ec871209817b6a15eeb98c315aaba0bb6fa11cee871601d35db9d7dc2", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_proc_macro_api/0.0.352/download"], - strip_prefix = "ra_ap_proc_macro_api-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_proc_macro_api-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_proc_macro_api/0.0.356/download"], + strip_prefix = "ra_ap_proc_macro_api-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_proc_macro_api-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_profile-0.0.352", - sha256 = "d0d92fa966e335de22063067675ace026e5cceab1bc4ea8bbf51916339fac94f", + name = "vendor_ts__ra_ap_profile-0.0.356", + sha256 = "6ea59e9a25dbe33bcb88a2268b30e40ad072d8ae1f7fc5ccee14a5bcfb630abd", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_profile/0.0.352/download"], - strip_prefix = "ra_ap_profile-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_profile-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_profile/0.0.356/download"], + strip_prefix = "ra_ap_profile-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_profile-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_project_model-0.0.352", - sha256 = "660a998bb108bb7a8a561eabd43f23879c7d9959e4cae3318635f754e47bed22", + name = "vendor_ts__ra_ap_project_model-0.0.356", + sha256 = "7e1b36fbc675aa161bbe9fa089d624a932d0c7ed7bb10868e5c59307c172ddf7", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_project_model/0.0.352/download"], - strip_prefix = "ra_ap_project_model-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_project_model-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_project_model/0.0.356/download"], + strip_prefix = "ra_ap_project_model-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_project_model-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_span-0.0.352", - sha256 = "a17d3d8c8f801c233bb6c942ca2288443b1e79955f3e8ae980ef2f9ee3e55aa9", + name = "vendor_ts__ra_ap_span-0.0.356", + sha256 = "06524ac7a55ee076413f9df64762aff68de970a005f3fdb3dd47b9f2557b264a", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_span/0.0.352/download"], - strip_prefix = "ra_ap_span-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_span-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_span/0.0.356/download"], + strip_prefix = "ra_ap_span-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_span-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_stdx-0.0.352", - sha256 = "d3a5a19381d885e40fe3c02d7b173cbff222a82b1da90f885c41fc6c69257f97", + name = "vendor_ts__ra_ap_stdx-0.0.356", + sha256 = "129586548f6f9f0021f832089fdea89540402199cd81e185aa007c3b600e6880", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_stdx/0.0.352/download"], - strip_prefix = "ra_ap_stdx-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_stdx-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_stdx/0.0.356/download"], + strip_prefix = "ra_ap_stdx-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_stdx-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_syntax-0.0.352", - sha256 = "8d9b5c51a7fed9b29b940f3b2d50017892f56bf85666240443b6ef2aa05ad6f2", + name = "vendor_ts__ra_ap_syntax-0.0.356", + sha256 = "91a2308fdfc18a9ebb897e82c0fa283ef2684160b6a9d4f388dd4ce3aada51b6", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_syntax/0.0.352/download"], - strip_prefix = "ra_ap_syntax-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_syntax-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_syntax/0.0.356/download"], + strip_prefix = "ra_ap_syntax-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_syntax-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_syntax-bridge-0.0.352", - sha256 = "cd31f53e3e657011d69dda697fd19607d16741d8d8e117a049b275256a21a067", + name = "vendor_ts__ra_ap_syntax-bridge-0.0.356", + sha256 = "695083eef9a8b66a8cdfb08c830240b44a9d4607648da1f840f8a0a9e9525f1b", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_syntax-bridge/0.0.352/download"], - strip_prefix = "ra_ap_syntax-bridge-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_syntax-bridge-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_syntax-bridge/0.0.356/download"], + strip_prefix = "ra_ap_syntax-bridge-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_syntax-bridge-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_test_fixture-0.0.352", - sha256 = "602da840e556d286430fab93aedf5390cdf54773f474986321cec2b8efa8b9f2", + name = "vendor_ts__ra_ap_test_fixture-0.0.356", + sha256 = "b6aaa7a363bcd498a4709701ea082a12cefef5903c2ccc3cf9574cb73e535d47", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_test_fixture/0.0.352/download"], - strip_prefix = "ra_ap_test_fixture-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_test_fixture-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_test_fixture/0.0.356/download"], + strip_prefix = "ra_ap_test_fixture-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_test_fixture-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_test_utils-0.0.352", - sha256 = "a64326dacef1a87e56027d2532d009dcfb980503fda7f36b03c25042c73fd76b", + name = "vendor_ts__ra_ap_test_utils-0.0.356", + sha256 = "2e6998e88778877701f883fc656d512e78e1049bc95c756d78aafdfcd779fa3d", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_test_utils/0.0.352/download"], - strip_prefix = "ra_ap_test_utils-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_test_utils-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_test_utils/0.0.356/download"], + strip_prefix = "ra_ap_test_utils-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_test_utils-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_toolchain-0.0.352", - sha256 = "ff1d2639ab9d049523009f2af20946dbededdef734c6053b5507b268cc001d95", + name = "vendor_ts__ra_ap_toolchain-0.0.356", + sha256 = "63b8f2ee94686922a9492aeabe65ef7ca13363b3a186ab5fa509d5b446ec736f", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_toolchain/0.0.352/download"], - strip_prefix = "ra_ap_toolchain-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_toolchain-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_toolchain/0.0.356/download"], + strip_prefix = "ra_ap_toolchain-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_toolchain-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_tt-0.0.352", - sha256 = "a4c332ea9061ad6d121e4bcc5bef25537061a63bae9935877ae75c69d388356a", + name = "vendor_ts__ra_ap_tt-0.0.356", + sha256 = "f9557893ca77252ba9ed064c943d3bc2dc36a8af1685d7f2137198ec00bb76a8", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_tt/0.0.352/download"], - strip_prefix = "ra_ap_tt-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_tt-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_tt/0.0.356/download"], + strip_prefix = "ra_ap_tt-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_tt-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_vfs-0.0.352", - sha256 = "4477f25432c5b720619f88ecc97b9b30137d4c7d2c78f83384d46a0f65263895", + name = "vendor_ts__ra_ap_vfs-0.0.356", + sha256 = "c86360f4d0d06b478aa0444023cfdafdaebf6b773bed2fbc91e39238fddef3dc", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_vfs/0.0.352/download"], - strip_prefix = "ra_ap_vfs-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_vfs-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_vfs/0.0.356/download"], + strip_prefix = "ra_ap_vfs-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_vfs-0.0.356.bazel"), ) maybe( http_archive, - name = "vendor_ts__ra_ap_vfs-notify-0.0.352", - sha256 = "dc737c1fc099fb5e6c1dd79d6aa32b97df6fa801355e79238a6805b484888b42", + name = "vendor_ts__ra_ap_vfs-notify-0.0.356", + sha256 = "8531017d325179dd3b30e36ca45e1ec3ce773d0e1e3b73bd3fa552a3db45f7c8", type = "tar.gz", - urls = ["https://static.crates.io/crates/ra_ap_vfs-notify/0.0.352/download"], - strip_prefix = "ra_ap_vfs-notify-0.0.352", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_vfs-notify-0.0.352.bazel"), + urls = ["https://static.crates.io/crates/ra_ap_vfs-notify/0.0.356/download"], + strip_prefix = "ra_ap_vfs-notify-0.0.356", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.ra_ap_vfs-notify-0.0.356.bazel"), ) maybe( @@ -3085,32 +3085,32 @@ def crate_repositories(): maybe( http_archive, - name = "vendor_ts__salsa-0.28.2", - sha256 = "cf0e374215cd2db2b5c75d7b3a99cb0cc052c0595335dfdefc03d4eb08f4aa81", + name = "vendor_ts__salsa-0.28.5", + sha256 = "27d2e6e19e39591cd99c01ac4141544b4d012cfd0831348629b8187fa9fe6d34", type = "tar.gz", - urls = ["https://static.crates.io/crates/salsa/0.28.2/download"], - strip_prefix = "salsa-0.28.2", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-0.28.2.bazel"), + urls = ["https://static.crates.io/crates/salsa/0.28.5/download"], + strip_prefix = "salsa-0.28.5", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-0.28.5.bazel"), ) maybe( http_archive, - name = "vendor_ts__salsa-macro-rules-0.28.2", - sha256 = "85f4b7d4405540bbd6d4ffa52d4322d983f3781954d3073067ac1bdb028459b3", + name = "vendor_ts__salsa-macro-rules-0.28.5", + sha256 = "baf90a551c38f25ed8489111d3d5827aa18e1b85963f5e6a298505b1d1e2cb7e", type = "tar.gz", - urls = ["https://static.crates.io/crates/salsa-macro-rules/0.28.2/download"], - strip_prefix = "salsa-macro-rules-0.28.2", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-macro-rules-0.28.2.bazel"), + urls = ["https://static.crates.io/crates/salsa-macro-rules/0.28.5/download"], + strip_prefix = "salsa-macro-rules-0.28.5", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-macro-rules-0.28.5.bazel"), ) maybe( http_archive, - name = "vendor_ts__salsa-macros-0.28.2", - sha256 = "445be2bfbb2f67cb663225ecd7bc5a25370c0250fca30f9d8cbad9a913650370", + name = "vendor_ts__salsa-macros-0.28.5", + sha256 = "69dd77f86ec10e72e314f4ddf7c44c8d349e73cdff1aad524ba9668603fb0549", type = "tar.gz", - urls = ["https://static.crates.io/crates/salsa-macros/0.28.2/download"], - strip_prefix = "salsa-macros-0.28.2", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-macros-0.28.2.bazel"), + urls = ["https://static.crates.io/crates/salsa-macros/0.28.5/download"], + strip_prefix = "salsa-macros-0.28.5", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.salsa-macros-0.28.5.bazel"), ) maybe( @@ -3215,22 +3215,22 @@ def crate_repositories(): maybe( http_archive, - name = "vendor_ts__serde_with-3.23.0", - sha256 = "935177bb8c0cd8ca1a4e6d1a2ac8988bea69cab4f9d3a31311e012ad27868ea4", + name = "vendor_ts__serde_with-3.24.0", + sha256 = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f", type = "tar.gz", - urls = ["https://static.crates.io/crates/serde_with/3.23.0/download"], - strip_prefix = "serde_with-3.23.0", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_with-3.23.0.bazel"), + urls = ["https://static.crates.io/crates/serde_with/3.24.0/download"], + strip_prefix = "serde_with-3.24.0", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_with-3.24.0.bazel"), ) maybe( http_archive, - name = "vendor_ts__serde_with_macros-3.23.0", - sha256 = "1d607aa01a3cb0ad757d6fd216136910db3c97b102fe686585689615a02dbcdc", + name = "vendor_ts__serde_with_macros-3.24.0", + sha256 = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49", type = "tar.gz", - urls = ["https://static.crates.io/crates/serde_with_macros/3.23.0/download"], - strip_prefix = "serde_with_macros-3.23.0", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_with_macros-3.23.0.bazel"), + urls = ["https://static.crates.io/crates/serde_with_macros/3.24.0/download"], + strip_prefix = "serde_with_macros-3.24.0", + build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_with_macros-3.24.0.bazel"), ) maybe( @@ -4068,35 +4068,35 @@ def crate_repositories(): struct(repo = "vendor_ts__glob-0.3.4", is_dev_dep = False), struct(repo = "vendor_ts__globset-0.4.18", is_dev_dep = False), struct(repo = "vendor_ts__itertools-0.15.0", is_dev_dep = False), - struct(repo = "vendor_ts__lazy_static-1.5.0", is_dev_dep = False), + struct(repo = "vendor_ts__lazy_static-1.5.1", is_dev_dep = False), struct(repo = "vendor_ts__mustache-0.9.0", is_dev_dep = False), struct(repo = "vendor_ts__num-traits-0.2.19", is_dev_dep = False), struct(repo = "vendor_ts__num_cpus-1.17.0", is_dev_dep = False), struct(repo = "vendor_ts__proc-macro2-1.0.107", is_dev_dep = False), struct(repo = "vendor_ts__quote-1.0.47", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_base_db-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_cfg-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_hir-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_hir_def-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_hir_expand-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_hir_ty-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_ide_db-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_intern-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_load-cargo-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_parser-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_paths-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_project_model-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_span-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_stdx-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_syntax-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_syntax-bridge-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_toolchain-0.0.352", is_dev_dep = False), - struct(repo = "vendor_ts__ra_ap_vfs-0.0.352", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_base_db-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_cfg-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_hir-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_hir_def-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_hir_expand-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_hir_ty-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_ide_db-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_intern-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_load-cargo-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_parser-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_paths-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_project_model-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_span-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_stdx-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_syntax-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_syntax-bridge-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_toolchain-0.0.356", is_dev_dep = False), + struct(repo = "vendor_ts__ra_ap_vfs-0.0.356", is_dev_dep = False), struct(repo = "vendor_ts__rayon-1.12.0", is_dev_dep = False), struct(repo = "vendor_ts__regex-1.13.1", is_dev_dep = False), struct(repo = "vendor_ts__serde-1.0.229", is_dev_dep = False), struct(repo = "vendor_ts__serde_json-1.0.151", is_dev_dep = False), - struct(repo = "vendor_ts__serde_with-3.23.0", is_dev_dep = False), + struct(repo = "vendor_ts__serde_with-3.24.0", is_dev_dep = False), struct(repo = "vendor_ts__serde_yaml-0.9.34-deprecated", is_dev_dep = False), struct(repo = "vendor_ts__syn-3.0.6", is_dev_dep = False), struct(repo = "vendor_ts__toml-1.1.6-spec-1.1.0", is_dev_dep = False), diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.0/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.1/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.0/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.1/BUILD.bazel index 90bcdad60bd0..25498c7c5079 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.0/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static-1.5.1/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "lazy_static-1.5.0", - actual = "@vendor_ts__lazy_static-1.5.0//:lazy_static", + name = "lazy_static-1.5.1", + actual = "@vendor_ts__lazy_static-1.5.1//:lazy_static", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static/BUILD.bazel index aa48e3ca0d71..206948748f1f 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/lazy_static/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "lazy_static", - actual = "@vendor_ts__lazy_static-1.5.0//:lazy_static", + actual = "@vendor_ts__lazy_static-1.5.1//:lazy_static", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.356/BUILD.bazel index 033c995d299b..baa6a261a414 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_hir_def-0.0.352", - actual = "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", + name = "ra_ap_base_db-0.0.356", + actual = "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db/BUILD.bazel index f445f16a4793..af263eb8438f 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_base_db", - actual = "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", + actual = "@vendor_ts__ra_ap_base_db-0.0.356//:ra_ap_base_db", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.356/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.356/BUILD.bazel index 72a367dd2aef..5d86e4dee6eb 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_vfs-0.0.352", - actual = "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + name = "ra_ap_cfg-0.0.356", + actual = "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg/BUILD.bazel index a03d5b140ca2..b1548725d85d 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_cfg", - actual = "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", + actual = "@vendor_ts__ra_ap_cfg-0.0.356//:ra_ap_cfg", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.356/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.356/BUILD.bazel index 96c4fbde3f3c..7f63588fb3fa 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_cfg-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_cfg-0.0.352", - actual = "@vendor_ts__ra_ap_cfg-0.0.352//:ra_ap_cfg", + name = "ra_ap_hir-0.0.356", + actual = "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir/BUILD.bazel index 5b47c9e5736b..e7c275270cd1 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_hir", - actual = "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir", + actual = "@vendor_ts__ra_ap_hir-0.0.356//:ra_ap_hir", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.356/BUILD.bazel index 8ff01678fae5..c9ccc989eb5b 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_base_db-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_base_db-0.0.352", - actual = "@vendor_ts__ra_ap_base_db-0.0.352//:ra_ap_base_db", + name = "ra_ap_hir_def-0.0.356", + actual = "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def/BUILD.bazel index 73b8d69fb954..3fad8f999124 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_def/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_hir_def", - actual = "@vendor_ts__ra_ap_hir_def-0.0.352//:ra_ap_hir_def", + actual = "@vendor_ts__ra_ap_hir_def-0.0.356//:ra_ap_hir_def", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.356/BUILD.bazel index 4873657b0f8d..a78d1ebb571d 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_hir_expand-0.0.352", - actual = "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", + name = "ra_ap_hir_expand-0.0.356", + actual = "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand/BUILD.bazel index 94cb53e6c194..8c5cf27d78b9 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_expand/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_hir_expand", - actual = "@vendor_ts__ra_ap_hir_expand-0.0.352//:ra_ap_hir_expand", + actual = "@vendor_ts__ra_ap_hir_expand-0.0.356//:ra_ap_hir_expand", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.356/BUILD.bazel index 7bf822acd85e..ceef50cbb58b 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_hir_ty-0.0.352", - actual = "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty", + name = "ra_ap_hir_ty-0.0.356", + actual = "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty/BUILD.bazel index 95d03c39eaed..8edc83cc3f99 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir_ty/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_hir_ty", - actual = "@vendor_ts__ra_ap_hir_ty-0.0.352//:ra_ap_hir_ty", + actual = "@vendor_ts__ra_ap_hir_ty-0.0.356//:ra_ap_hir_ty", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.352/BUILD.bazel deleted file mode 100644 index 5962ec9c4cc9..000000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.352/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors -############################################################################### - -package(default_visibility = ["//visibility:public"]) - -alias( - name = "ra_ap_ide_db-0.0.352", - actual = "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.356/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.356/BUILD.bazel new file mode 100644 index 000000000000..1925ca53517f --- /dev/null +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db-0.0.356/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ra_ap_ide_db-0.0.356", + actual = "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db", + tags = ["manual"], +) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db/BUILD.bazel index 1b07ae230442..2d8c81eb8459 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_ide_db/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_ide_db", - actual = "@vendor_ts__ra_ap_ide_db-0.0.352//:ra_ap_ide_db", + actual = "@vendor_ts__ra_ap_ide_db-0.0.356//:ra_ap_ide_db", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.352/BUILD.bazel deleted file mode 100644 index e24408e9f036..000000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.352/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors -############################################################################### - -package(default_visibility = ["//visibility:public"]) - -alias( - name = "ra_ap_intern-0.0.352", - actual = "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.356/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.356/BUILD.bazel new file mode 100644 index 000000000000..8b83f43e10e5 --- /dev/null +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern-0.0.356/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ra_ap_intern-0.0.356", + actual = "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", + tags = ["manual"], +) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern/BUILD.bazel index d5706a5bf095..03b78b10d76b 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_intern/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_intern", - actual = "@vendor_ts__ra_ap_intern-0.0.352//:ra_ap_intern", + actual = "@vendor_ts__ra_ap_intern-0.0.356//:ra_ap_intern", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.356/BUILD.bazel index dfb5fa018132..3becfecb3c42 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_load-cargo-0.0.352", - actual = "@vendor_ts__ra_ap_load-cargo-0.0.352//:ra_ap_load_cargo", + name = "ra_ap_load-cargo-0.0.356", + actual = "@vendor_ts__ra_ap_load-cargo-0.0.356//:ra_ap_load_cargo", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo/BUILD.bazel index 1109f708ce29..cbe75d331582 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_load-cargo/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_load-cargo", - actual = "@vendor_ts__ra_ap_load-cargo-0.0.352//:ra_ap_load_cargo", + actual = "@vendor_ts__ra_ap_load-cargo-0.0.356//:ra_ap_load_cargo", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.352/BUILD.bazel deleted file mode 100644 index e8e8351d7783..000000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.352/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors -############################################################################### - -package(default_visibility = ["//visibility:public"]) - -alias( - name = "ra_ap_parser-0.0.352", - actual = "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.356/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.356/BUILD.bazel new file mode 100644 index 000000000000..2bccfc36fd87 --- /dev/null +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser-0.0.356/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ra_ap_parser-0.0.356", + actual = "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", + tags = ["manual"], +) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser/BUILD.bazel index 0b2b9f29a687..1c7af965d120 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_parser/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_parser", - actual = "@vendor_ts__ra_ap_parser-0.0.352//:ra_ap_parser", + actual = "@vendor_ts__ra_ap_parser-0.0.356//:ra_ap_parser", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.356/BUILD.bazel similarity index 82% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.356/BUILD.bazel index 650837a6f6e6..4a1dd0027361 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_paths-0.0.352", - actual = "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", + name = "ra_ap_paths-0.0.356", + actual = "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths/BUILD.bazel index 396bc8a32459..7ddbb1d59309 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_paths/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_paths", - actual = "@vendor_ts__ra_ap_paths-0.0.352//:ra_ap_paths", + actual = "@vendor_ts__ra_ap_paths-0.0.356//:ra_ap_paths", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.356/BUILD.bazel index 6a998e05d234..2917f797fca1 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_project_model-0.0.352", - actual = "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model", + name = "ra_ap_project_model-0.0.356", + actual = "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model/BUILD.bazel index eb4feff1694e..13695a41717e 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_project_model/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_project_model", - actual = "@vendor_ts__ra_ap_project_model-0.0.352//:ra_ap_project_model", + actual = "@vendor_ts__ra_ap_project_model-0.0.356//:ra_ap_project_model", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.356/BUILD.bazel similarity index 82% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.356/BUILD.bazel index 37cad81073e9..bb8008b4eba0 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_span-0.0.352", - actual = "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", + name = "ra_ap_span-0.0.356", + actual = "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span/BUILD.bazel index 8fc99794e30c..0a57a98f3c87 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_span/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_span", - actual = "@vendor_ts__ra_ap_span-0.0.352//:ra_ap_span", + actual = "@vendor_ts__ra_ap_span-0.0.356//:ra_ap_span", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.352/BUILD.bazel deleted file mode 100644 index 4c897c2ef387..000000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.352/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors -############################################################################### - -package(default_visibility = ["//visibility:public"]) - -alias( - name = "ra_ap_stdx-0.0.352", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.356/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.356/BUILD.bazel new file mode 100644 index 000000000000..efaa86c2f976 --- /dev/null +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_stdx-0.0.356/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ra_ap_stdx-0.0.356", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", + tags = ["manual"], +) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.352/BUILD.bazel deleted file mode 100644 index e396af13c059..000000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.352/BUILD.bazel +++ /dev/null @@ -1,15 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors -############################################################################### - -package(default_visibility = ["//visibility:public"]) - -alias( - name = "ra_ap_syntax-0.0.352", - actual = "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.356/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.356/BUILD.bazel new file mode 100644 index 000000000000..a78b737b0c01 --- /dev/null +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-0.0.356/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ra_ap_syntax-0.0.356", + actual = "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", + tags = ["manual"], +) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.356/BUILD.bazel index c22fefc3a5c1..7b1ed49df2d3 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_syntax-bridge-0.0.352", - actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", + name = "ra_ap_syntax-bridge-0.0.356", + actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge/BUILD.bazel index 0d9c2340f1bc..78b8a0b231f3 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax-bridge/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_syntax-bridge", - actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.352//:ra_ap_syntax_bridge", + actual = "@vendor_ts__ra_ap_syntax-bridge-0.0.356//:ra_ap_syntax_bridge", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax/BUILD.bazel index c880d886a630..66cc58f9ab32 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_syntax/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_syntax", - actual = "@vendor_ts__ra_ap_syntax-0.0.352//:ra_ap_syntax", + actual = "@vendor_ts__ra_ap_syntax-0.0.356//:ra_ap_syntax", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.356/BUILD.bazel similarity index 81% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.356/BUILD.bazel index f3e683e4ee56..0b2188b26cf2 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_toolchain-0.0.352", - actual = "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain", + name = "ra_ap_toolchain-0.0.356", + actual = "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain/BUILD.bazel index 8451be6a5848..fea1a16c1a12 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_toolchain/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_toolchain", - actual = "@vendor_ts__ra_ap_toolchain-0.0.352//:ra_ap_toolchain", + actual = "@vendor_ts__ra_ap_toolchain-0.0.356//:ra_ap_toolchain", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.356/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.356/BUILD.bazel index e5f24f2207ae..35a547802561 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_hir-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "ra_ap_hir-0.0.352", - actual = "@vendor_ts__ra_ap_hir-0.0.352//:ra_ap_hir", + name = "ra_ap_vfs-0.0.356", + actual = "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs/BUILD.bazel index 2e4b121d5181..ad048f95f466 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/ra_ap_vfs/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "ra_ap_vfs", - actual = "@vendor_ts__ra_ap_vfs-0.0.352//:ra_ap_vfs", + actual = "@vendor_ts__ra_ap_vfs-0.0.356//:ra_ap_vfs", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.23.0/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.24.0/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.23.0/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.24.0/BUILD.bazel index 3207d32950d8..db827ed8cd50 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.23.0/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with-3.24.0/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "serde_with-3.23.0", - actual = "@vendor_ts__serde_with-3.23.0//:serde_with", + name = "serde_with-3.24.0", + actual = "@vendor_ts__serde_with-3.24.0//:serde_with", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with/BUILD.bazel index 8fce692a7f07..683145788e91 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/serde_with/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "serde_with", - actual = "@vendor_ts__serde_with-3.23.0//:serde_with", + actual = "@vendor_ts__serde_with-3.24.0//:serde_with", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.352/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.356/BUILD.bazel similarity index 83% rename from misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.352/BUILD.bazel rename to misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.356/BUILD.bazel index bd9610fb7a16..5003b59cf0c3 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.352/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx-0.0.356/BUILD.bazel @@ -9,7 +9,7 @@ package(default_visibility = ["//visibility:public"]) alias( - name = "stdx-0.0.352", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + name = "stdx-0.0.356", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", tags = ["manual"], ) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx/BUILD.bazel index 822b18f9930b..7391024eceae 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/stdx/BUILD.bazel @@ -10,6 +10,6 @@ package(default_visibility = ["//visibility:public"]) alias( name = "stdx", - actual = "@vendor_ts__ra_ap_stdx-0.0.352//:ra_ap_stdx", + actual = "@vendor_ts__ra_ap_stdx-0.0.356//:ra_ap_stdx", tags = ["manual"], ) From cc2c541d298d38e97e965968241edd43122cd2b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:20 +0000 Subject: [PATCH 4/8] Rust: Run codegen (unformatted: codeql CLI unavailable) --- rust/extractor/src/translate/generated.rs | 32 + rust/ql/.generated.list | 6 - rust/ql/.gitattributes | 6 - .../internal/generated/CfgNodes.qll | 5340 ++++++---- rust/ql/lib/codeql/rust/elements.qll | 2 + .../lib/codeql/rust/elements/CfgPredExpr.qll | 10 + .../lib/codeql/rust/elements/CfgPredPat.qll | 10 + .../internal/CfgPredExprConstructor.qll | 16 + .../elements/internal/CfgPredExprImpl.qll | 16 + .../internal/CfgPredPatConstructor.qll | 16 + .../rust/elements/internal/CfgPredPatImpl.qll | 16 + .../internal/generated/CfgPredExpr.qll | 40 + .../internal/generated/CfgPredPat.qll | 40 + .../internal/generated/ParentChild.qll | 6566 ++++++------ .../rust/elements/internal/generated/Raw.qll | 9478 ++++++++++------- .../elements/internal/generated/Synth.qll | 2463 +++-- .../internal/generated/SynthConstructors.qll | 2 + rust/ql/lib/rust.dbscheme | 22 + .../generated/CfgPredExpr/MISSING_SOURCE.txt | 4 + .../generated/CfgPredPat/MISSING_SOURCE.txt | 4 + rust/schema/ast.py | 6 + 21 files changed, 13706 insertions(+), 10389 deletions(-) create mode 100644 rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll create mode 100644 rust/ql/lib/codeql/rust/elements/CfgPredPat.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll create mode 100644 rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll create mode 100644 rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt create mode 100644 rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt diff --git a/rust/extractor/src/translate/generated.rs b/rust/extractor/src/translate/generated.rs index f1a38d5996ce..0cf7a9e61c8f 100644 --- a/rust/extractor/src/translate/generated.rs +++ b/rust/extractor/src/translate/generated.rs @@ -86,6 +86,7 @@ impl Translator<'_> { ast::Expr::BreakExpr(inner) => self.emit_break_expr(inner).map(Into::into), ast::Expr::CallExpr(inner) => self.emit_call_expr(inner).map(Into::into), ast::Expr::CastExpr(inner) => self.emit_cast_expr(inner).map(Into::into), + ast::Expr::CfgPredExpr(inner) => self.emit_cfg_pred_expr(inner).map(Into::into), ast::Expr::ClosureExpr(inner) => self.emit_closure_expr(inner).map(Into::into), ast::Expr::ContinueExpr(inner) => self.emit_continue_expr(inner).map(Into::into), ast::Expr::FieldExpr(inner) => self.emit_field_expr(inner).map(Into::into), @@ -192,6 +193,7 @@ impl Translator<'_> { pub(crate) fn emit_pat(&mut self, node: &ast::Pat) -> Option> { let label = match node { ast::Pat::BoxPat(inner) => self.emit_box_pat(inner).map(Into::into), + ast::Pat::CfgPredPat(inner) => self.emit_cfg_pred_pat(inner).map(Into::into), ast::Pat::ConstBlockPat(inner) => self.emit_const_block_pat(inner).map(Into::into), ast::Pat::DerefPat(inner) => self.emit_deref_pat(inner).map(Into::into), ast::Pat::IdentPat(inner) => self.emit_ident_pat(inner).map(Into::into), @@ -843,6 +845,36 @@ impl Translator<'_> { self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); Some(label) } + pub(crate) fn emit_cfg_pred_expr( + &mut self, + node: &ast::CfgPredExpr, + ) -> Option> { + let cfg_predicate = node + .cfg_predicate() + .and_then(|x| self.emit_cfg_predicate(&x)); + let label = self.trap.emit(generated::CfgPredExpr { + id: TrapId::Star, + cfg_predicate, + }); + self.emit_location(label, node); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); + Some(label) + } + pub(crate) fn emit_cfg_pred_pat( + &mut self, + node: &ast::CfgPredPat, + ) -> Option> { + let cfg_predicate = node + .cfg_predicate() + .and_then(|x| self.emit_cfg_predicate(&x)); + let label = self.trap.emit(generated::CfgPredPat { + id: TrapId::Star, + cfg_predicate, + }); + self.emit_location(label, node); + self.emit_tokens(node, label.into(), node.syntax().children_with_tokens()); + Some(label) + } pub(crate) fn emit_closure_expr( &mut self, node: &ast::ClosureExpr, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 87f5e7e299e3..829b493891c7 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,3 @@ -lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 6ba130ff4aecc1c2dac03b551334ae83825c0bc14f801e77d84644669f7e74cc e443991a6e5fded7f8b70109b098151ac0b73b3a2bff51fb05069843bcde05c3 lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be lib/codeql/rust/elements/AnyAttr.qll 31536ed6ba02c538ff192089dc40c6f984ce808406f0522eed49539b9ae8a0da c6df96292f0f96415af4e8b3736e870475c21829ab08a8fe56d221ee4bb4cbd7 @@ -619,7 +618,6 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll d8e73957983491302faa56 lib/codeql/rust/elements/internal/generated/ParenExpr.qll b978629328318874e4e7044dc0ed07ee44f96f426e06848e7a3ea499f2b99f9a 84a1ba59e38460bd16d82881f409084ea35fa55f2f1c52296c510abf3694076f lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126 -lib/codeql/rust/elements/internal/generated/ParentChild.qll 8a8c63e4dafffdd4fcd1673a8750ae8456f4f182b1ae2156be626e839a5c1baf fc3bbfa0e70823605fd0eaf677854a419fd8545b16ac5297e6523ca14f2eb167 lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll 4e85b4bcabdbde71602d557fa0dd5ccbab09d2360d2bb470384cb85437e1611f 688af26f360655ee6454fa45b3169cc9db6ed46d8f58c2470111703e1e7a117f lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd @@ -636,7 +634,6 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll d7a400b238d7edf2b465 lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f lib/codeql/rust/elements/internal/generated/RangeExpr.qll 7a1ff277e5e8a6731d6cb664a09da07cce2bd6ca3541008b381cd5a5a636a15f 2a9d51363a1a55a080d39575c623ba11cb0f259c04f40351fbb5b89358b31aa6 lib/codeql/rust/elements/internal/generated/RangePat.qll a0c805eb31a773e16806384bd11592563c61b720e694bd444b93c28b5cf00d65 4b82088a62e7e5027f5930a697a18b5d4fd2a831a7bb6123d1b3f8ff4a9255ea -lib/codeql/rust/elements/internal/generated/Raw.qll 42e6f57ce059dafd7adf274e96c24cc3151fa0823bff79037c092e4f2c72120f 3fed204f061e77a8167dfb0b81585d1ab52193117fa3771cddd33340811b2890 lib/codeql/rust/elements/internal/generated/RefExpr.qll c7b711ac05f7fe8fb97b81b09e794e7756141570265e3a995e40e7c79bb2b49d 11b572508c010e79a7edb0f1b349a4ea3e2fc68f6d7bc3f38fbeacf0c91d68e2 lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05 lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll fbab8bae4d3eac10338a9bc5743f3ac9c0feab11107d6d28825f4e97bcd59bad 224f6aec466ddcde526ce8df23d2f925887232b462730af078815a68b47c133d @@ -661,8 +658,6 @@ lib/codeql/rust/elements/internal/generated/StructFieldList.qll 2abf0688ca9659d2 lib/codeql/rust/elements/internal/generated/StructPat.qll c76fa005c2fd0448a8803233e1e8818c4123301eb66ac5cf69d0b9eaafc61e98 6e0dffccdce24bca20e87d5ba0f0995c9a1ae8983283e71e7dbfcf6fffc67a58 lib/codeql/rust/elements/internal/generated/StructPatField.qll 65fd5e42e0cb513ee2d5179d37169c02fcf91360aa2294a61657892939187b4a df48d60618f3319f544123fc615178689ceff848078bbb7b5d2c4d9f8feb0dd0 lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll 342ca25fbd8bf8fef84d06e263f59f010e21418658c1f79f40c52e5ce76ca158 c950a39a946904b84a2557fb1febd59906e42e5de4903e88d0da67ba3e14a250 -lib/codeql/rust/elements/internal/generated/Synth.qll fd3206c70d50b307e165d9c2d94e28449598b7a073e59cd8d719256dd1c5d93b d5dab955fc35bed61a339c8d92d25e85ab0e0bacf716e6722d795e02340811ef -lib/codeql/rust/elements/internal/generated/SynthConstructors.qll fe4e204ee73e85cc07731f3ff0245f48dee0993e4824172485666ab3cb73d33a fe4e204ee73e85cc07731f3ff0245f48dee0993e4824172485666ab3cb73d33a lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b lib/codeql/rust/elements/internal/generated/TokenTree.qll 3d855014747ae2996375f05bdaef1dd07464692ea09f47174a92f705a5ef63bb b85fed50862f97bce98fb4cbd3f275b553ef3e8dedf215915736197078867427 lib/codeql/rust/elements/internal/generated/TokenTreeMeta.qll 390121812f4f16753747d1eca17580a16385332e49fa93de89a5a5dc029a3a36 fa1e30306690fef85c6f455f4b51b1b14efd046b862e0160b311469da14ac98d @@ -702,7 +697,6 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll e45b9ceafee6e933e37d70 lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499 lib/codeql/rust/elements/internal/generated/YeetExpr.qll c45a2a3c691b03c80aff5d1fdebe94c46856c1a00d42d6eaefec7f17222751d5 6c8e54035a6454a91f93d94e325f79dad275c7b86cdad2295248c94ebb0c5b00 lib/codeql/rust/elements/internal/generated/YieldExpr.qll ff60cf5a7c074117c3ea6721567944caa3d77034373d2fb31db8307aa9ffb4e6 39ec18ce5702bbac2580ab464dee1f6afc0a7dfbb7cc314b6ec8fb4efacba69e -lib/codeql/rust/elements.qll ae7eed6b57bf010ff258ae1f3799997519d58566abd117f94150470f59edcb10 ae7eed6b57bf010ff258ae1f3799997519d58566abd117f94150470f59edcb10 test/extractor-tests/generated/Abi/Abi.ql 086ed104ab1a7e7fe5c1ed29e03f1719a797c7096c738868bf6ebe872ab8fdaa fe23fe67ab0d9201e1177ea3f844b18ed428e13e3ce77381bf2b6910adfa3a0e test/extractor-tests/generated/ArgList/ArgList.ql da97b5b25418b2aa8cb8df793f48870c89fa00759cdade8ddba60d7f1f4bbc01 acfd5d2caf67282ad2d57b961068472100482d0f770a52a3c00214c647d18c75 test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql 97d27b10e3b76f90538102014b45b254bc223e9bac17bd8059bdaeb063b2f734 b28efee84fdb8a4a0290110fc7820dfdbc934d02ab38813dd1074f9dcf5a6b03 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 96a02aa21413..6763474c2118 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -1,6 +1,5 @@ /.generated.list linguist-generated /.gitattributes linguist-generated -/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll linguist-generated /lib/codeql/rust/elements/Abi.qll linguist-generated /lib/codeql/rust/elements/Addressable.qll linguist-generated /lib/codeql/rust/elements/AnyAttr.qll linguist-generated @@ -621,7 +620,6 @@ /lib/codeql/rust/elements/internal/generated/ParenExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll linguist-generated -/lib/codeql/rust/elements/internal/generated/ParentChild.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Pat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Path.qll linguist-generated @@ -638,7 +636,6 @@ /lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RangeExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RangePat.qll linguist-generated -/lib/codeql/rust/elements/internal/generated/Raw.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll linguist-generated @@ -663,8 +660,6 @@ /lib/codeql/rust/elements/internal/generated/StructPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/StructPatField.qll linguist-generated /lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll linguist-generated -/lib/codeql/rust/elements/internal/generated/Synth.qll linguist-generated -/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Token.qll linguist-generated /lib/codeql/rust/elements/internal/generated/TokenTree.qll linguist-generated /lib/codeql/rust/elements/internal/generated/TokenTreeMeta.qll linguist-generated @@ -704,7 +699,6 @@ /lib/codeql/rust/elements/internal/generated/WildcardPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/YieldExpr.qll linguist-generated -/lib/codeql/rust/elements.qll linguist-generated /test/extractor-tests/generated/Abi/Abi.ql linguist-generated /test/extractor-tests/generated/ArgList/ArgList.ql linguist-generated /test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.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 c50d696e64ca..15718c868990 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll @@ -72,7 +72,7 @@ module MakeCfgNodes Input> { /** Provides sub classes of `CfgNode`. */ module Nodes { - final private class ParentArrayExpr extends ParentAstNode, ArrayExpr { + private final class ParentArrayExpr extends ParentAstNode, ArrayExpr { override predicate relevantChild(AstNode child) { none() or @@ -81,73 +81,91 @@ module MakeCfgNodes Input> { } /** - * The base class for array expressions. For example: - * ```rust - * [1, 2, 3]; - * [1; 10]; - * ``` - */ + * The base class for array expressions. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` + */ final class ArrayExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ArrayExpr node; - ArrayExprCfgNode() { node = this.getAstNode() } + ArrayExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ArrayExpr`. */ ArrayExpr getArrayExpr() { result = node } - + /** - * Gets the `index`th expression of this array expression (0-based). - */ + * Gets the `index`th expression of this array expression (0-based). + * + */ ExprCfgNode getExpr(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(index), this, result) } - /** - * Gets any of the expressions of this array expression. - */ - ExprCfgNode getAnExpr() { result = this.getExpr(_) } /** - * Gets the number of expressions of this array expression. - */ - int getNumberOfExprs() { result = count(int i | exists(this.getExpr(i))) } + * Gets any of the expressions of this array expression. + */ + ExprCfgNode getAnExpr() { + result = this.getExpr(_) + } /** - * Gets the `index`th attr of this array expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the number of expressions of this array expression. + */ + int getNumberOfExprs() { + result = count(int i | exists(this.getExpr(i))) + } + /** + * Gets the `index`th attr of this array expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets any of the attrs of this array expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets any of the attrs of this array expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the number of attrs of this array expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets the number of attrs of this array expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } } - - final private class ParentArrayListExpr extends ParentAstNode, ArrayListExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentArrayListExpr extends ParentAstNode, ArrayListExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * An array expression with a list of elements. For example: - * ```rust - * [1, 2, 3]; - * ``` - */ + * An array expression with a list of elements. For example: + * ```rust + * [1, 2, 3]; + * ``` + */ final class ArrayListExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode { private ArrayListExpr node; - ArrayListExprCfgNode() { node = this.getAstNode() } + ArrayListExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ArrayListExpr`. */ ArrayListExpr getArrayListExpr() { result = node } + } - - final private class ParentArrayRepeatExpr extends ParentAstNode, ArrayRepeatExpr { + private final class ParentArrayRepeatExpr extends ParentAstNode, ArrayRepeatExpr { override predicate relevantChild(AstNode child) { none() or @@ -158,35 +176,39 @@ module MakeCfgNodes Input> { } /** - * An array expression with a repeat operand and a repeat length. For example: - * ```rust - * [1; 10]; - * ``` - */ + * An array expression with a repeat operand and a repeat length. For example: + * ```rust + * [1; 10]; + * ``` + */ final class ArrayRepeatExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode { private ArrayRepeatExpr node; - ArrayRepeatExprCfgNode() { node = this.getAstNode() } + ArrayRepeatExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ArrayRepeatExpr`. */ ArrayRepeatExpr getArrayRepeatExpr() { result = node } - + /** - * Gets the repeat operand of this array repeat expression. - */ + * Gets the repeat operand of this array repeat expression. + * + */ ExprCfgNode getRepeatOperand() { any(ChildMapping mapping).hasCfgChild(node, node.getRepeatOperand(), this, result) } /** - * Gets the repeat length of this array repeat expression. - */ + * Gets the repeat length of this array repeat expression. + * + */ ExprCfgNode getRepeatLength() { any(ChildMapping mapping).hasCfgChild(node, node.getRepeatLength(), this, result) } - } - final private class ParentAsmExpr extends ParentAstNode, AsmExpr { + } + private final class ParentAsmExpr extends ParentAstNode, AsmExpr { override predicate relevantChild(AstNode child) { none() or @@ -195,71 +217,92 @@ module MakeCfgNodes Input> { } /** - * An inline assembly expression. For example: - * ```rust - * unsafe { - * #[inline(always)] - * builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b); - * } - * ``` - */ + * An inline assembly expression. For example: + * ```rust + * unsafe { + * #[inline(always)] + * builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b); + * } + * ``` + */ final class AsmExprCfgNode extends CfgNodeFinal, ExprCfgNode { private AsmExpr node; - AsmExprCfgNode() { node = this.getAstNode() } + AsmExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `AsmExpr`. */ AsmExpr getAsmExpr() { result = node } - + /** - * Gets the `index`th asm piece of this asm expression (0-based). - */ - AsmPiece getAsmPiece(int index) { result = node.getAsmPiece(index) } + * Gets the `index`th asm piece of this asm expression (0-based). + * + */ + AsmPiece getAsmPiece(int index) { + result = node.getAsmPiece(index) + } - /** - * Gets any of the asm pieces of this asm expression. - */ - AsmPiece getAnAsmPiece() { result = this.getAsmPiece(_) } /** - * Gets the number of asm pieces of this asm expression. - */ - int getNumberOfAsmPieces() { result = count(int i | exists(this.getAsmPiece(i))) } + * Gets any of the asm pieces of this asm expression. + */ + AsmPiece getAnAsmPiece() { + result = this.getAsmPiece(_) + } /** - * Gets the `index`th attr of this asm expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } - + * Gets the number of asm pieces of this asm expression. + */ + int getNumberOfAsmPieces() { + result = count(int i | exists(this.getAsmPiece(i))) + } /** - * Gets any of the attrs of this asm expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets the `index`th attr of this asm expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets the number of attrs of this asm expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this asm expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the `index`th template of this asm expression (0-based). - */ + * Gets the number of attrs of this asm expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the `index`th template of this asm expression (0-based). + * + */ ExprCfgNode getTemplate(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getTemplate(index), this, result) } + /** - * Gets any of the templates of this asm expression. - */ - ExprCfgNode getATemplate() { result = this.getTemplate(_) } + * Gets any of the templates of this asm expression. + */ + ExprCfgNode getATemplate() { + result = this.getTemplate(_) + } /** - * Gets the number of templates of this asm expression. - */ - int getNumberOfTemplates() { result = count(int i | exists(this.getTemplate(i))) } + * Gets the number of templates of this asm expression. + */ + int getNumberOfTemplates() { + result = count(int i | exists(this.getTemplate(i))) + } } - - final private class ParentAwaitExpr extends ParentAstNode, AwaitExpr { + private final class ParentAwaitExpr extends ParentAstNode, AwaitExpr { override predicate relevantChild(AstNode child) { none() or @@ -268,51 +311,62 @@ module MakeCfgNodes Input> { } /** - * An `await` expression. For example: - * ```rust - * async { - * let x = foo().await; - * x - * } - * ``` - */ + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` + */ final class AwaitExprCfgNode extends CfgNodeFinal, ExprCfgNode { private AwaitExpr node; - AwaitExprCfgNode() { node = this.getAstNode() } + AwaitExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `AwaitExpr`. */ AwaitExpr getAwaitExpr() { result = node } - + /** - * Gets the `index`th attr of this await expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this await expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this await expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this await expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this await expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this await expression, if it exists. - */ + * Gets the number of attrs of this await expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this await expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } - - final private class ParentBecomeExpr extends ParentAstNode, BecomeExpr { + private final class ParentBecomeExpr extends ParentAstNode, BecomeExpr { override predicate relevantChild(AstNode child) { none() or @@ -321,54 +375,65 @@ module MakeCfgNodes Input> { } /** - * A `become` expression. For example: - * ```rust - * fn fact_a(n: i32, a: i32) -> i32 { - * if n == 0 { - * a - * } else { - * become fact_a(n - 1, n * a) - * } - * } - * ``` - */ + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` + */ final class BecomeExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BecomeExpr node; - BecomeExprCfgNode() { node = this.getAstNode() } + BecomeExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `BecomeExpr`. */ BecomeExpr getBecomeExpr() { result = node } - + /** - * Gets the `index`th attr of this become expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this become expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this become expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this become expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this become expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this become expression, if it exists. - */ + * Gets the number of attrs of this become expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this become expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } - - final private class ParentBinaryExpr extends ParentAstNode, BinaryExpr { + private final class ParentBinaryExpr extends ParentAstNode, BinaryExpr { override predicate relevantChild(AstNode child) { none() or @@ -379,161 +444,212 @@ module MakeCfgNodes Input> { } /** - * A binary operation expression. For example: - * ```rust - * x + y; - * x && y; - * x <= y; - * x = y; - * x += y; - * ``` - */ + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ final class BinaryExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BinaryExpr node; - BinaryExprCfgNode() { node = this.getAstNode() } + BinaryExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `BinaryExpr`. */ BinaryExpr getBinaryExpr() { result = node } - + /** - * Gets the `index`th attr of this binary expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this binary expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this binary expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this binary expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this binary expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the lhs of this binary expression, if it exists. - */ + * Gets the number of attrs of this binary expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the lhs of this binary expression, if it exists. + * + */ ExprCfgNode getLhs() { any(ChildMapping mapping).hasCfgChild(node, node.getLhs(), this, result) } /** - * Holds if `getLhs()` exists. - */ - predicate hasLhs() { exists(this.getLhs()) } - + * Holds if `getLhs()` exists. + */ + predicate hasLhs() { + exists(this.getLhs()) + } /** - * Gets the operator name of this binary expression, if it exists. - */ - string getOperatorName() { result = node.getOperatorName() } + * Gets the operator name of this binary expression, if it exists. + * + */ + string getOperatorName() { + result = node.getOperatorName() + } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { exists(this.getOperatorName()) } - + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { + exists(this.getOperatorName()) + } /** - * Gets the rhs of this binary expression, if it exists. - */ + * Gets the rhs of this binary expression, if it exists. + * + */ ExprCfgNode getRhs() { any(ChildMapping mapping).hasCfgChild(node, node.getRhs(), this, result) } /** - * Holds if `getRhs()` exists. - */ - predicate hasRhs() { exists(this.getRhs()) } + * Holds if `getRhs()` exists. + */ + predicate hasRhs() { + exists(this.getRhs()) + } } - - final private class ParentBlockExpr extends ParentAstNode, BlockExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentBlockExpr extends ParentAstNode, BlockExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A block expression. For example: - * ```rust - * { - * let x = 42; - * } - * ``` - * ```rust - * 'label: { - * let x = 42; - * x - * } - * ``` - */ + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` + */ final class BlockExprCfgNode extends CfgNodeFinal, LabelableExprCfgNode { private BlockExpr node; - BlockExprCfgNode() { node = this.getAstNode() } + BlockExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `BlockExpr`. */ BlockExpr getBlockExpr() { result = node } - + /** - * Gets the `index`th attr of this block expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this block expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this block expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this block expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this block expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Holds if this block expression is async. - */ - predicate isAsync() { node.isAsync() } - + * Gets the number of attrs of this block expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } /** - * Holds if this block expression is const. - */ - predicate isConst() { node.isConst() } + * Holds if this block expression is async. + * + */ + predicate isAsync() { + node.isAsync() + } /** - * Holds if this block expression is gen. - */ - predicate isGen() { node.isGen() } + * Holds if this block expression is const. + * + */ + predicate isConst() { + node.isConst() + } /** - * Holds if this block expression is move. - */ - predicate isMove() { node.isMove() } + * Holds if this block expression is gen. + * + */ + predicate isGen() { + node.isGen() + } /** - * Holds if this block expression is unsafe. - */ - predicate isUnsafe() { node.isUnsafe() } + * Holds if this block expression is move. + * + */ + predicate isMove() { + node.isMove() + } /** - * Gets the statement list of this block expression, if it exists. - */ - StmtList getStmtList() { result = node.getStmtList() } + * Holds if this block expression is unsafe. + * + */ + predicate isUnsafe() { + node.isUnsafe() + } /** - * Holds if `getStmtList()` exists. - */ - predicate hasStmtList() { exists(this.getStmtList()) } + * Gets the statement list of this block expression, if it exists. + * + */ + StmtList getStmtList() { + result = node.getStmtList() + } /** - * Gets the try block modifier of this block expression, if it exists. - */ - TryBlockModifier getTryBlockModifier() { result = node.getTryBlockModifier() } + * Holds if `getStmtList()` exists. + */ + predicate hasStmtList() { + exists(this.getStmtList()) + } + /** + * Gets the try block modifier of this block expression, if it exists. + * + */ + TryBlockModifier getTryBlockModifier() { + result = node.getTryBlockModifier() + } /** - * Holds if `getTryBlockModifier()` exists. - */ - predicate hasTryBlockModifier() { exists(this.getTryBlockModifier()) } + * Holds if `getTryBlockModifier()` exists. + */ + predicate hasTryBlockModifier() { + exists(this.getTryBlockModifier()) + } } - - final private class ParentBoxPat extends ParentAstNode, BoxPat { + private final class ParentBoxPat extends ParentAstNode, BoxPat { override predicate relevantChild(AstNode child) { none() or @@ -542,36 +658,40 @@ module MakeCfgNodes Input> { } /** - * A box pattern. For example: - * ```rust - * match x { - * box Option::Some(y) => y, - * box Option::None => 0, - * }; - * ``` - */ + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` + */ final class BoxPatCfgNode extends CfgNodeFinal, PatCfgNode { private BoxPat node; - BoxPatCfgNode() { node = this.getAstNode() } + BoxPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `BoxPat`. */ BoxPat getBoxPat() { result = node } - + /** - * Gets the pattern of this box pattern, if it exists. - */ + * Gets the pattern of this box pattern, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentBreakExpr extends ParentAstNode, BreakExpr { + private final class ParentBreakExpr extends ParentAstNode, BreakExpr { override predicate relevantChild(AstNode child) { none() or @@ -580,77 +700,92 @@ module MakeCfgNodes Input> { } /** - * A break expression. For example: - * ```rust - * loop { - * if not_ready() { - * break; - * } - * } - * ``` - * ```rust - * let x = 'label: loop { - * if done() { - * break 'label 42; - * } - * }; - * ``` - * ```rust - * let x = 'label: { - * if exit() { - * break 'label 42; - * } - * 0; - * }; - * ``` - */ + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + * ```rust + * let x = 'label: { + * if exit() { + * break 'label 42; + * } + * 0; + * }; + * ``` + */ final class BreakExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BreakExpr node; - BreakExprCfgNode() { node = this.getAstNode() } + BreakExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `BreakExpr`. */ BreakExpr getBreakExpr() { result = node } - + /** - * Gets the `index`th attr of this break expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this break expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this break expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this break expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this break expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this break expression, if it exists. - */ + * Gets the number of attrs of this break expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this break expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } - + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } /** - * Gets the lifetime of this break expression, if it exists. - */ - Lifetime getLifetime() { result = node.getLifetime() } + * Gets the lifetime of this break expression, if it exists. + * + */ + Lifetime getLifetime() { + result = node.getLifetime() + } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { exists(this.getLifetime()) } + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { + exists(this.getLifetime()) + } } - - final private class ParentCallExpr extends ParentAstNode, CallExpr { + private final class ParentCallExpr extends ParentAstNode, CallExpr { override predicate relevantChild(AstNode child) { none() or @@ -659,64 +794,79 @@ module MakeCfgNodes Input> { } /** - * NOTE: Consider using `Call` instead, as that excludes call expressions that are - * instantiations of tuple structs and tuple variants. - * - * A call expression. For example: - * ```rust - * foo(42); - * foo::(42); - * foo[0](42); - * Option::Some(42); // tuple variant instantiation - * ``` - */ + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * Option::Some(42); // tuple variant instantiation + * ``` + */ final class CallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CallExpr node; - CallExprCfgNode() { node = this.getAstNode() } + CallExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `CallExpr`. */ CallExpr getCallExpr() { result = node } - + /** - * Gets the argument list of this call expression, if it exists. - */ - ArgList getArgList() { result = node.getArgList() } + * Gets the argument list of this call expression, if it exists. + * + */ + ArgList getArgList() { + result = node.getArgList() + } /** - * Holds if `getArgList()` exists. - */ - predicate hasArgList() { exists(this.getArgList()) } - + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { + exists(this.getArgList()) + } /** - * Gets the `index`th attr of this call expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this call expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this call expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this call expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this call expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the function of this call expression, if it exists. - */ + * Gets the number of attrs of this call expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the function of this call expression, if it exists. + * + */ ExprCfgNode getFunction() { any(ChildMapping mapping).hasCfgChild(node, node.getFunction(), this, result) } /** - * Holds if `getFunction()` exists. - */ - predicate hasFunction() { exists(this.getFunction()) } + * Holds if `getFunction()` exists. + */ + predicate hasFunction() { + exists(this.getFunction()) + } } - - final private class ParentCastExpr extends ParentAstNode, CastExpr { + private final class ParentCastExpr extends ParentAstNode, CastExpr { override predicate relevantChild(AstNode child) { none() or @@ -725,58 +875,139 @@ module MakeCfgNodes Input> { } /** - * A type cast expression. For example: - * ```rust - * value as u64; - * ``` - */ + * A type cast expression. For example: + * ```rust + * value as u64; + * ``` + */ final class CastExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CastExpr node; - CastExprCfgNode() { node = this.getAstNode() } + CastExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `CastExpr`. */ CastExpr getCastExpr() { result = node } - + /** - * Gets the `index`th attr of this cast expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this cast expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this cast expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this cast expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this cast expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this cast expression, if it exists. - */ + * Gets the number of attrs of this cast expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this cast expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } + /** + * Gets the type representation of this cast expression, if it exists. + * + */ + TypeRepr getTypeRepr() { + result = node.getTypeRepr() + } /** - * Gets the type representation of this cast expression, if it exists. - */ - TypeRepr getTypeRepr() { result = node.getTypeRepr() } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { + exists(this.getTypeRepr()) + } + } + private final class ParentCfgPredExpr extends ParentAstNode, CfgPredExpr { + override predicate relevantChild(AstNode child) { + none() + } + } + + /** + */ + final class CfgPredExprCfgNode extends CfgNodeFinal, ExprCfgNode { + private CfgPredExpr node; + + CfgPredExprCfgNode() { + node = this.getAstNode() + } + + /** Gets the underlying `CfgPredExpr`. */ + CfgPredExpr getCfgPredExpr() { result = node } + + /** + * Gets the cfg predicate of this cfg pred expression, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + result = node.getCfgPredicate() + } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { exists(this.getTypeRepr()) } + * Holds if `getCfgPredicate()` exists. + */ + predicate hasCfgPredicate() { + exists(this.getCfgPredicate()) + } } + private final class ParentCfgPredPat extends ParentAstNode, CfgPredPat { + override predicate relevantChild(AstNode child) { + none() + } + } + + /** + */ + final class CfgPredPatCfgNode extends CfgNodeFinal, PatCfgNode { + private CfgPredPat node; - final private class ParentConstBlockPat extends ParentAstNode, ConstBlockPat { + CfgPredPatCfgNode() { + node = this.getAstNode() + } + + /** Gets the underlying `CfgPredPat`. */ + CfgPredPat getCfgPredPat() { result = node } + + /** + * Gets the cfg predicate of this cfg pred pattern, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + result = node.getCfgPredicate() + } + + /** + * Holds if `getCfgPredicate()` exists. + */ + predicate hasCfgPredicate() { + exists(this.getCfgPredicate()) + } + } + private final class ParentConstBlockPat extends ParentAstNode, ConstBlockPat { override predicate relevantChild(AstNode child) { none() or @@ -785,96 +1016,118 @@ module MakeCfgNodes Input> { } /** - * A const block pattern. For example: - * ```rust - * match x { - * const { 1 + 2 + 3 } => "ok", - * _ => "fail", - * }; - * ``` - */ + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` + */ final class ConstBlockPatCfgNode extends CfgNodeFinal, PatCfgNode { private ConstBlockPat node; - ConstBlockPatCfgNode() { node = this.getAstNode() } + ConstBlockPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ConstBlockPat`. */ ConstBlockPat getConstBlockPat() { result = node } - + /** - * Gets the block expression of this const block pattern, if it exists. - */ + * Gets the block expression of this const block pattern, if it exists. + * + */ BlockExprCfgNode getBlockExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getBlockExpr(), this, result) } /** - * Holds if `getBlockExpr()` exists. - */ - predicate hasBlockExpr() { exists(this.getBlockExpr()) } - + * Holds if `getBlockExpr()` exists. + */ + predicate hasBlockExpr() { + exists(this.getBlockExpr()) + } /** - * Holds if this const block pattern is const. - */ - predicate isConst() { node.isConst() } - } + * Holds if this const block pattern is const. + * + */ + predicate isConst() { + node.isConst() + } - final private class ParentContinueExpr extends ParentAstNode, ContinueExpr { - override predicate relevantChild(AstNode child) { none() } + } + private final class ParentContinueExpr extends ParentAstNode, ContinueExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A continue expression. For example: - * ```rust - * loop { - * if not_ready() { - * continue; - * } - * } - * ``` - * ```rust - * 'label: loop { - * if not_ready() { - * continue 'label; - * } - * } - * ``` - */ + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ final class ContinueExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ContinueExpr node; - ContinueExprCfgNode() { node = this.getAstNode() } + ContinueExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ContinueExpr`. */ ContinueExpr getContinueExpr() { result = node } - + /** - * Gets the `index`th attr of this continue expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this continue expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this continue expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this continue expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this continue expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the lifetime of this continue expression, if it exists. - */ - Lifetime getLifetime() { result = node.getLifetime() } + * Gets the number of attrs of this continue expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the lifetime of this continue expression, if it exists. + * + */ + Lifetime getLifetime() { + result = node.getLifetime() + } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { exists(this.getLifetime()) } + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { + exists(this.getLifetime()) + } } - - final private class ParentDerefPat extends ParentAstNode, DerefPat { + private final class ParentDerefPat extends ParentAstNode, DerefPat { override predicate relevantChild(AstNode child) { none() or @@ -883,54 +1136,62 @@ module MakeCfgNodes Input> { } /** - * A deref pattern, matching the value behind a smart pointer. This is an experimental - * Rust feature that cannot be written directly in stable Rust; the example below uses - * rust-analyzer's canonical `builtin#deref` syntax for such patterns: - * ```rust - * match x { - * builtin#deref(y) => y, - * _ => 0, - * }; - * ``` - */ + * A deref pattern, matching the value behind a smart pointer. This is an experimental + * Rust feature that cannot be written directly in stable Rust; the example below uses + * rust-analyzer's canonical `builtin#deref` syntax for such patterns: + * ```rust + * match x { + * builtin#deref(y) => y, + * _ => 0, + * }; + * ``` + */ final class DerefPatCfgNode extends CfgNodeFinal, PatCfgNode { private DerefPat node; - DerefPatCfgNode() { node = this.getAstNode() } + DerefPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `DerefPat`. */ DerefPat getDerefPat() { result = node } - + /** - * Gets the pattern of this deref pattern, if it exists. - */ + * Gets the pattern of this deref pattern, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentExpr extends ParentAstNode, Expr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentExpr extends ParentAstNode, Expr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * The base class for expressions. - */ + * The base class for expressions. + */ final class ExprCfgNode extends CfgNodeFinal { private Expr node; - ExprCfgNode() { node = this.getAstNode() } + ExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `Expr`. */ Expr getExpr() { result = node } + } - - final private class ParentFieldExpr extends ParentAstNode, FieldExpr { + private final class ParentFieldExpr extends ParentAstNode, FieldExpr { override predicate relevantChild(AstNode child) { none() or @@ -939,58 +1200,73 @@ module MakeCfgNodes Input> { } /** - * A field access expression. For example: - * ```rust - * x.foo - * ``` - */ + * A field access expression. For example: + * ```rust + * x.foo + * ``` + */ final class FieldExprCfgNode extends CfgNodeFinal, ExprCfgNode { private FieldExpr node; - FieldExprCfgNode() { node = this.getAstNode() } + FieldExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `FieldExpr`. */ FieldExpr getFieldExpr() { result = node } - + /** - * Gets the `index`th attr of this field expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this field expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this field expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this field expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this field expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the container of this field expression, if it exists. - */ + * Gets the number of attrs of this field expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the container of this field expression, if it exists. + * + */ ExprCfgNode getContainer() { any(ChildMapping mapping).hasCfgChild(node, node.getContainer(), this, result) } /** - * Holds if `getContainer()` exists. - */ - predicate hasContainer() { exists(this.getContainer()) } - + * Holds if `getContainer()` exists. + */ + predicate hasContainer() { + exists(this.getContainer()) + } /** - * Gets the identifier of this field expression, if it exists. - */ - NameRef getIdentifier() { result = node.getIdentifier() } + * Gets the identifier of this field expression, if it exists. + * + */ + NameRef getIdentifier() { + result = node.getIdentifier() + } /** - * Holds if `getIdentifier()` exists. - */ - predicate hasIdentifier() { exists(this.getIdentifier()) } + * Holds if `getIdentifier()` exists. + */ + predicate hasIdentifier() { + exists(this.getIdentifier()) + } } - - final private class ParentForExpr extends ParentAstNode, ForExpr { + private final class ParentForExpr extends ParentAstNode, ForExpr { override predicate relevantChild(AstNode child) { none() or @@ -1001,64 +1277,77 @@ module MakeCfgNodes Input> { } /** - * A for loop expression. - * - * For example: - * ```rust - * for x in 0..10 { - * println!("{}", x); - * } - * ``` - */ + * A for loop expression. + * + * For example: + * ```rust + * for x in 0..10 { + * println!("{}", x); + * } + * ``` + */ final class ForExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private ForExpr node; - ForExprCfgNode() { node = this.getAstNode() } + ForExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ForExpr`. */ ForExpr getForExpr() { result = node } - + /** - * Gets the `index`th attr of this for expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this for expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this for expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this for expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this for expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the iterable of this for expression, if it exists. - */ + * Gets the number of attrs of this for expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the iterable of this for expression, if it exists. + * + */ ExprCfgNode getIterable() { any(ChildMapping mapping).hasCfgChild(node, node.getIterable(), this, result) } /** - * Holds if `getIterable()` exists. - */ - predicate hasIterable() { exists(this.getIterable()) } - + * Holds if `getIterable()` exists. + */ + predicate hasIterable() { + exists(this.getIterable()) + } /** - * Gets the pattern of this for expression, if it exists. - */ + * Gets the pattern of this for expression, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentFormatArgsArg extends ParentAstNode, FormatArgsArg { + private final class ParentFormatArgsArg extends ParentAstNode, FormatArgsArg { override predicate relevantChild(AstNode child) { none() or @@ -1069,45 +1358,51 @@ module MakeCfgNodes Input> { } /** - * A FormatArgsArg. For example the `"world"` in: - * ```rust - * format_args!("Hello, {}!", "world") - * ``` - */ + * A FormatArgsArg. For example the `"world"` in: + * ```rust + * format_args!("Hello, {}!", "world") + * ``` + */ final class FormatArgsArgCfgNode extends CfgNodeFinal { private FormatArgsArg node; - FormatArgsArgCfgNode() { node = this.getAstNode() } + FormatArgsArgCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `FormatArgsArg`. */ FormatArgsArg getFormatArgsArg() { result = node } - + /** - * Gets the expression of this format arguments argument, if it exists. - */ + * Gets the expression of this format arguments argument, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } - + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } /** - * Gets the name of this format arguments argument, if it exists. - */ + * Gets the name of this format arguments argument, if it exists. + * + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { exists(this.getName()) } + * Holds if `getName()` exists. + */ + predicate hasName() { + exists(this.getName()) + } } - - final private class ParentFormatArgsExpr extends ParentAstNode, FormatArgsExpr { + private final class ParentFormatArgsExpr extends ParentAstNode, FormatArgsExpr { override predicate relevantChild(AstNode child) { none() or @@ -1118,101 +1413,126 @@ module MakeCfgNodes Input> { } /** - * A FormatArgsExpr. For example: - * ```rust - * format_args!("no args"); - * format_args!("{} foo {:?}", 1, 2); - * format_args!("{b} foo {a:?}", a=1, b=2); - * let (x, y) = (1, 42); - * format_args!("{x}, {y}"); - * ``` - */ + * A FormatArgsExpr. For example: + * ```rust + * format_args!("no args"); + * format_args!("{} foo {:?}", 1, 2); + * format_args!("{b} foo {a:?}", a=1, b=2); + * let (x, y) = (1, 42); + * format_args!("{x}, {y}"); + * ``` + */ final class FormatArgsExprCfgNode extends CfgNodeFinal, ExprCfgNode { private FormatArgsExpr node; - FormatArgsExprCfgNode() { node = this.getAstNode() } + FormatArgsExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `FormatArgsExpr`. */ FormatArgsExpr getFormatArgsExpr() { result = node } - + /** - * Gets the `index`th argument of this format arguments expression (0-based). - */ + * Gets the `index`th argument of this format arguments expression (0-based). + * + */ FormatArgsArgCfgNode getArg(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getArg(index), this, result) } - /** - * Gets any of the arguments of this format arguments expression. - */ - FormatArgsArgCfgNode getAnArg() { result = this.getArg(_) } /** - * Gets the number of arguments of this format arguments expression. - */ - int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) } + * Gets any of the arguments of this format arguments expression. + */ + FormatArgsArgCfgNode getAnArg() { + result = this.getArg(_) + } /** - * Gets the `index`th attr of this format arguments expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } - + * Gets the number of arguments of this format arguments expression. + */ + int getNumberOfArgs() { + result = count(int i | exists(this.getArg(i))) + } /** - * Gets any of the attrs of this format arguments expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets the `index`th attr of this format arguments expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets the number of attrs of this format arguments expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this format arguments expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the template of this format arguments expression, if it exists. - */ + * Gets the number of attrs of this format arguments expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the template of this format arguments expression, if it exists. + * + */ ExprCfgNode getTemplate() { any(ChildMapping mapping).hasCfgChild(node, node.getTemplate(), this, result) } /** - * Holds if `getTemplate()` exists. - */ - predicate hasTemplate() { exists(this.getTemplate()) } - + * Holds if `getTemplate()` exists. + */ + predicate hasTemplate() { + exists(this.getTemplate()) + } /** - * Gets the `index`th format of this format arguments expression (0-based). - */ - Format getFormat(int index) { result = node.getFormat(index) } + * Gets the `index`th format of this format arguments expression (0-based). + * + */ + Format getFormat(int index) { + result = node.getFormat(index) + } + /** - * Gets any of the formats of this format arguments expression. - */ - Format getAFormat() { result = this.getFormat(_) } + * Gets any of the formats of this format arguments expression. + */ + Format getAFormat() { + result = this.getFormat(_) + } /** - * Gets the number of formats of this format arguments expression. - */ - int getNumberOfFormats() { result = count(int i | exists(this.getFormat(i))) } + * Gets the number of formats of this format arguments expression. + */ + int getNumberOfFormats() { + result = count(int i | exists(this.getFormat(i))) + } } - - final private class ParentFormatTemplateVariableAccess extends ParentAstNode, - FormatTemplateVariableAccess - { - override predicate relevantChild(AstNode child) { none() } + private final class ParentFormatTemplateVariableAccess extends ParentAstNode, FormatTemplateVariableAccess { + override predicate relevantChild(AstNode child) { + none() + } } /** - */ + */ final class FormatTemplateVariableAccessCfgNode extends CfgNodeFinal, PathExprBaseCfgNode { private FormatTemplateVariableAccess node; - FormatTemplateVariableAccessCfgNode() { node = this.getAstNode() } + FormatTemplateVariableAccessCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `FormatTemplateVariableAccess`. */ FormatTemplateVariableAccess getFormatTemplateVariableAccess() { result = node } + } - - final private class ParentIdentPat extends ParentAstNode, IdentPat { + private final class ParentIdentPat extends ParentAstNode, IdentPat { override predicate relevantChild(AstNode child) { none() or @@ -1223,79 +1543,98 @@ module MakeCfgNodes Input> { } /** - * A binding pattern. For example: - * ```rust - * match x { - * Option::Some(y) => y, - * Option::None => 0, - * }; - * ``` - * ```rust - * match x { - * y@Option::Some(_) => y, - * Option::None => 0, - * }; - * ``` - */ + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` + */ final class IdentPatCfgNode extends CfgNodeFinal, PatCfgNode { private IdentPat node; - IdentPatCfgNode() { node = this.getAstNode() } + IdentPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `IdentPat`. */ IdentPat getIdentPat() { result = node } - + /** - * Gets the `index`th attr of this ident pattern (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this ident pattern (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this ident pattern. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this ident pattern. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this ident pattern. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Holds if this ident pattern is mut. - */ - predicate isMut() { node.isMut() } + * Gets the number of attrs of this ident pattern. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Holds if this ident pattern is mut. + * + */ + predicate isMut() { + node.isMut() + } /** - * Holds if this ident pattern is reference. - */ - predicate isRef() { node.isRef() } + * Holds if this ident pattern is reference. + * + */ + predicate isRef() { + node.isRef() + } /** - * Gets the name of this ident pattern, if it exists. - */ + * Gets the name of this ident pattern, if it exists. + * + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { exists(this.getName()) } - + * Holds if `getName()` exists. + */ + predicate hasName() { + exists(this.getName()) + } /** - * Gets the pattern of this ident pattern, if it exists. - */ + * Gets the pattern of this ident pattern, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentIfExpr extends ParentAstNode, IfExpr { + private final class ParentIfExpr extends ParentAstNode, IfExpr { override predicate relevantChild(AstNode child) { none() or @@ -1308,100 +1647,119 @@ module MakeCfgNodes Input> { } /** - * An `if` expression. For example: - * ```rust - * if x == 42 { - * println!("that's the answer"); - * } - * ``` - * ```rust - * let y = if x > 0 { - * 1 - * } else { - * 0 - * }; - * ``` - */ + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * }; + * ``` + */ final class IfExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IfExpr node; - IfExprCfgNode() { node = this.getAstNode() } + IfExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `IfExpr`. */ IfExpr getIfExpr() { result = node } - + /** - * Gets the `index`th attr of this if expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this if expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this if expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this if expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this if expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the condition of this if expression, if it exists. - */ + * Gets the number of attrs of this if expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the condition of this if expression, if it exists. + * + */ ExprCfgNode getCondition() { any(ChildMapping mapping).hasCfgChild(node, node.getCondition(), this, result) } /** - * Holds if `getCondition()` exists. - */ - predicate hasCondition() { exists(this.getCondition()) } - + * Holds if `getCondition()` exists. + */ + predicate hasCondition() { + exists(this.getCondition()) + } /** - * Gets the else of this if expression, if it exists. - */ + * Gets the else of this if expression, if it exists. + * + */ ExprCfgNode getElse() { any(ChildMapping mapping).hasCfgChild(node, node.getElse(), this, result) } /** - * Holds if `getElse()` exists. - */ - predicate hasElse() { exists(this.getElse()) } - + * Holds if `getElse()` exists. + */ + predicate hasElse() { + exists(this.getElse()) + } /** - * Gets the then of this if expression, if it exists. - */ + * Gets the then of this if expression, if it exists. + * + */ BlockExprCfgNode getThen() { any(ChildMapping mapping).hasCfgChild(node, node.getThen(), this, result) } /** - * Holds if `getThen()` exists. - */ - predicate hasThen() { exists(this.getThen()) } + * Holds if `getThen()` exists. + */ + predicate hasThen() { + exists(this.getThen()) + } } - - final private class ParentIncludeBytesExpr extends ParentAstNode, IncludeBytesExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentIncludeBytesExpr extends ParentAstNode, IncludeBytesExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * An expression produced by the built-in `include_bytes!` macro, embedding the contents of a file as a byte array. For example: - * ```rust - * let data = include_bytes!("data.bin"); - * ``` - */ + * An expression produced by the built-in `include_bytes!` macro, embedding the contents of a file as a byte array. For example: + * ```rust + * let data = include_bytes!("data.bin"); + * ``` + */ final class IncludeBytesExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IncludeBytesExpr node; - IncludeBytesExprCfgNode() { node = this.getAstNode() } + IncludeBytesExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `IncludeBytesExpr`. */ IncludeBytesExpr getIncludeBytesExpr() { result = node } + } - - final private class ParentIndexExpr extends ParentAstNode, IndexExpr { + private final class ParentIndexExpr extends ParentAstNode, IndexExpr { override predicate relevantChild(AstNode child) { none() or @@ -1412,87 +1770,108 @@ module MakeCfgNodes Input> { } /** - * An index expression. For example: - * ```rust - * list[42]; - * list[42] = 1; - * ``` - */ + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` + */ final class IndexExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IndexExpr node; - IndexExprCfgNode() { node = this.getAstNode() } + IndexExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `IndexExpr`. */ IndexExpr getIndexExpr() { result = node } - + /** - * Gets the `index`th attr of this index expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this index expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this index expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this index expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this index expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the base of this index expression, if it exists. - */ + * Gets the number of attrs of this index expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the base of this index expression, if it exists. + * + */ ExprCfgNode getBase() { any(ChildMapping mapping).hasCfgChild(node, node.getBase(), this, result) } /** - * Holds if `getBase()` exists. - */ - predicate hasBase() { exists(this.getBase()) } - + * Holds if `getBase()` exists. + */ + predicate hasBase() { + exists(this.getBase()) + } /** - * Gets the index of this index expression, if it exists. - */ + * Gets the index of this index expression, if it exists. + * + */ ExprCfgNode getIndex() { any(ChildMapping mapping).hasCfgChild(node, node.getIndex(), this, result) } /** - * Holds if `getIndex()` exists. - */ - predicate hasIndex() { exists(this.getIndex()) } + * Holds if `getIndex()` exists. + */ + predicate hasIndex() { + exists(this.getIndex()) + } } - - final private class ParentLabelableExpr extends ParentAstNode, LabelableExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentLabelableExpr extends ParentAstNode, LabelableExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). - */ + * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). + */ final class LabelableExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LabelableExpr node; - LabelableExprCfgNode() { node = this.getAstNode() } + LabelableExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LabelableExpr`. */ LabelableExpr getLabelableExpr() { result = node } - + /** - * Gets the label of this labelable expression, if it exists. - */ - Label getLabel() { result = node.getLabel() } + * Gets the label of this labelable expression, if it exists. + * + */ + Label getLabel() { + result = node.getLabel() + } /** - * Holds if `getLabel()` exists. - */ - predicate hasLabel() { exists(this.getLabel()) } + * Holds if `getLabel()` exists. + */ + predicate hasLabel() { + exists(this.getLabel()) + } } - - final private class ParentLetExpr extends ParentAstNode, LetExpr { + private final class ParentLetExpr extends ParentAstNode, LetExpr { override predicate relevantChild(AstNode child) { none() or @@ -1503,62 +1882,75 @@ module MakeCfgNodes Input> { } /** - * A `let` expression. For example: - * ```rust - * if let Some(x) = maybe_some { - * println!("{}", x); - * } - * ``` - */ + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ final class LetExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LetExpr node; - LetExprCfgNode() { node = this.getAstNode() } + LetExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LetExpr`. */ LetExpr getLetExpr() { result = node } - + /** - * Gets the `index`th attr of this let expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this let expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this let expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this let expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this let expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the scrutinee of this let expression, if it exists. - */ + * Gets the number of attrs of this let expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the scrutinee of this let expression, if it exists. + * + */ ExprCfgNode getScrutinee() { any(ChildMapping mapping).hasCfgChild(node, node.getScrutinee(), this, result) } /** - * Holds if `getScrutinee()` exists. - */ - predicate hasScrutinee() { exists(this.getScrutinee()) } - + * Holds if `getScrutinee()` exists. + */ + predicate hasScrutinee() { + exists(this.getScrutinee()) + } /** - * Gets the pattern of this let expression, if it exists. - */ + * Gets the pattern of this let expression, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentLetStmt extends ParentAstNode, LetStmt { + private final class ParentLetStmt extends ParentAstNode, LetStmt { override predicate relevantChild(AstNode child) { none() or @@ -1569,138 +1961,174 @@ module MakeCfgNodes Input> { } /** - * A let statement. For example: - * ```rust - * let x = 42; - * let x: i32 = 42; - * let x: i32; - * let x; - * let (x, y) = (1, 2); - * let Some(x) = std::env::var("FOO") else { - * return; - * }; - * ``` - */ + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` + */ final class LetStmtCfgNode extends CfgNodeFinal { private LetStmt node; - LetStmtCfgNode() { node = this.getAstNode() } + LetStmtCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LetStmt`. */ LetStmt getLetStmt() { result = node } - + /** - * Gets the `index`th attr of this let statement (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this let statement (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this let statement. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this let statement. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this let statement. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the initializer of this let statement, if it exists. - */ + * Gets the number of attrs of this let statement. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the initializer of this let statement, if it exists. + * + */ ExprCfgNode getInitializer() { any(ChildMapping mapping).hasCfgChild(node, node.getInitializer(), this, result) } /** - * Holds if `getInitializer()` exists. - */ - predicate hasInitializer() { exists(this.getInitializer()) } - + * Holds if `getInitializer()` exists. + */ + predicate hasInitializer() { + exists(this.getInitializer()) + } /** - * Gets the let else of this let statement, if it exists. - */ - LetElse getLetElse() { result = node.getLetElse() } + * Gets the let else of this let statement, if it exists. + * + */ + LetElse getLetElse() { + result = node.getLetElse() + } /** - * Holds if `getLetElse()` exists. - */ - predicate hasLetElse() { exists(this.getLetElse()) } - + * Holds if `getLetElse()` exists. + */ + predicate hasLetElse() { + exists(this.getLetElse()) + } /** - * Gets the pattern of this let statement, if it exists. - */ + * Gets the pattern of this let statement, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } - + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } /** - * Gets the type representation of this let statement, if it exists. - */ - TypeRepr getTypeRepr() { result = node.getTypeRepr() } + * Gets the type representation of this let statement, if it exists. + * + */ + TypeRepr getTypeRepr() { + result = node.getTypeRepr() + } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { exists(this.getTypeRepr()) } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { + exists(this.getTypeRepr()) + } } - - final private class ParentLiteralExpr extends ParentAstNode, LiteralExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentLiteralExpr extends ParentAstNode, LiteralExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A literal expression. For example: - * ```rust - * 42; - * 42.0; - * "Hello, world!"; - * b"Hello, world!"; - * 'x'; - * b'x'; - * r"Hello, world!"; - * true; - * ``` - */ + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` + */ final class LiteralExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LiteralExpr node; - LiteralExprCfgNode() { node = this.getAstNode() } + LiteralExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LiteralExpr`. */ LiteralExpr getLiteralExpr() { result = node } - + /** - * Gets the `index`th attr of this literal expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this literal expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this literal expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this literal expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this literal expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the text value of this literal expression, if it exists. - */ - string getTextValue() { result = node.getTextValue() } + * Gets the number of attrs of this literal expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the text value of this literal expression, if it exists. + * + */ + string getTextValue() { + result = node.getTextValue() + } /** - * Holds if `getTextValue()` exists. - */ - predicate hasTextValue() { exists(this.getTextValue()) } + * Holds if `getTextValue()` exists. + */ + predicate hasTextValue() { + exists(this.getTextValue()) + } } - - final private class ParentLiteralPat extends ParentAstNode, LiteralPat { + private final class ParentLiteralPat extends ParentAstNode, LiteralPat { override predicate relevantChild(AstNode child) { none() or @@ -1709,88 +2137,103 @@ module MakeCfgNodes Input> { } /** - * A literal pattern. For example: - * ```rust - * match x { - * 42 => "ok", - * _ => "fail", - * } - * ``` - */ + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ final class LiteralPatCfgNode extends CfgNodeFinal, PatCfgNode { private LiteralPat node; - LiteralPatCfgNode() { node = this.getAstNode() } + LiteralPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LiteralPat`. */ LiteralPat getLiteralPat() { result = node } - + /** - * Gets the literal of this literal pattern, if it exists. - */ + * Gets the literal of this literal pattern, if it exists. + * + */ LiteralExprCfgNode getLiteral() { any(ChildMapping mapping).hasCfgChild(node, node.getLiteral(), this, result) } /** - * Holds if `getLiteral()` exists. - */ - predicate hasLiteral() { exists(this.getLiteral()) } + * Holds if `getLiteral()` exists. + */ + predicate hasLiteral() { + exists(this.getLiteral()) + } } - - final private class ParentLoopExpr extends ParentAstNode, LoopExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentLoopExpr extends ParentAstNode, LoopExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A loop expression. For example: - * ```rust - * loop { - * println!("Hello, world (again)!"); - * }; - * ``` - * ```rust - * 'label: loop { - * println!("Hello, world (once)!"); - * break 'label; - * }; - * ``` - * ```rust - * let mut x = 0; - * loop { - * if x < 10 { - * x += 1; - * } else { - * break; - * } - * }; - * ``` - */ + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ final class LoopExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private LoopExpr node; - LoopExprCfgNode() { node = this.getAstNode() } + LoopExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LoopExpr`. */ LoopExpr getLoopExpr() { result = node } - + /** - * Gets the `index`th attr of this loop expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this loop expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets any of the attrs of this loop expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets any of the attrs of this loop expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the number of attrs of this loop expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets the number of attrs of this loop expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } } - - final private class ParentLoopingExpr extends ParentAstNode, LoopingExpr { + private final class ParentLoopingExpr extends ParentAstNode, LoopingExpr { override predicate relevantChild(AstNode child) { none() or @@ -1799,96 +2242,123 @@ module MakeCfgNodes Input> { } /** - * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). - */ + * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). + */ final class LoopingExprCfgNode extends CfgNodeFinal, LabelableExprCfgNode { private LoopingExpr node; - LoopingExprCfgNode() { node = this.getAstNode() } + LoopingExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `LoopingExpr`. */ LoopingExpr getLoopingExpr() { result = node } - + /** - * Gets the loop body of this looping expression, if it exists. - */ + * Gets the loop body of this looping expression, if it exists. + * + */ BlockExprCfgNode getLoopBody() { any(ChildMapping mapping).hasCfgChild(node, node.getLoopBody(), this, result) } /** - * Holds if `getLoopBody()` exists. - */ - predicate hasLoopBody() { exists(this.getLoopBody()) } + * Holds if `getLoopBody()` exists. + */ + predicate hasLoopBody() { + exists(this.getLoopBody()) + } } - - final private class ParentMacroCall extends ParentAstNode, MacroCall { - override predicate relevantChild(AstNode child) { none() } + private final class ParentMacroCall extends ParentAstNode, MacroCall { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A macro invocation. - * - * For example: - * ```rust - * println!("Hello, world!"); - * ``` - */ + * A macro invocation. + * + * For example: + * ```rust + * println!("Hello, world!"); + * ``` + */ final class MacroCallCfgNode extends CfgNodeFinal { private MacroCall node; - MacroCallCfgNode() { node = this.getAstNode() } + MacroCallCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `MacroCall`. */ MacroCall getMacroCall() { result = node } - + /** - * Gets the `index`th attr of this macro call (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this macro call (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this macro call. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this macro call. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this macro call. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the path of this macro call, if it exists. - */ - Path getPath() { result = node.getPath() } - + * Gets the number of attrs of this macro call. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } /** - * Holds if `getPath()` exists. - */ - predicate hasPath() { exists(this.getPath()) } + * Gets the path of this macro call, if it exists. + * + */ + Path getPath() { + result = node.getPath() + } /** - * Gets the token tree of this macro call, if it exists. - */ - TokenTree getTokenTree() { result = node.getTokenTree() } - + * Holds if `getPath()` exists. + */ + predicate hasPath() { + exists(this.getPath()) + } /** - * Holds if `getTokenTree()` exists. - */ - predicate hasTokenTree() { exists(this.getTokenTree()) } + * Gets the token tree of this macro call, if it exists. + * + */ + TokenTree getTokenTree() { + result = node.getTokenTree() + } /** - * Gets the macro call expansion of this macro call, if it exists. - */ - AstNode getMacroCallExpansion() { result = node.getMacroCallExpansion() } + * Holds if `getTokenTree()` exists. + */ + predicate hasTokenTree() { + exists(this.getTokenTree()) + } + /** + * Gets the macro call expansion of this macro call, if it exists. + * + */ + AstNode getMacroCallExpansion() { + result = node.getMacroCallExpansion() + } /** - * Holds if `getMacroCallExpansion()` exists. - */ - predicate hasMacroCallExpansion() { exists(this.getMacroCallExpansion()) } + * Holds if `getMacroCallExpansion()` exists. + */ + predicate hasMacroCallExpansion() { + exists(this.getMacroCallExpansion()) + } } - - final private class ParentMacroExpr extends ParentAstNode, MacroExpr { + private final class ParentMacroExpr extends ParentAstNode, MacroExpr { override predicate relevantChild(AstNode child) { none() or @@ -1897,35 +2367,39 @@ module MakeCfgNodes Input> { } /** - * A macro expression, representing the invocation of a macro that produces an expression. - * - * For example: - * ```rust - * let y = vec![1, 2, 3]; - * ``` - */ + * A macro expression, representing the invocation of a macro that produces an expression. + * + * For example: + * ```rust + * let y = vec![1, 2, 3]; + * ``` + */ final class MacroExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MacroExpr node; - MacroExprCfgNode() { node = this.getAstNode() } + MacroExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `MacroExpr`. */ MacroExpr getMacroExpr() { result = node } - + /** - * Gets the macro call of this macro expression, if it exists. - */ + * Gets the macro call of this macro expression, if it exists. + * + */ MacroCallCfgNode getMacroCall() { any(ChildMapping mapping).hasCfgChild(node, node.getMacroCall(), this, result) } /** - * Holds if `getMacroCall()` exists. - */ - predicate hasMacroCall() { exists(this.getMacroCall()) } + * Holds if `getMacroCall()` exists. + */ + predicate hasMacroCall() { + exists(this.getMacroCall()) + } } - - final private class ParentMacroPat extends ParentAstNode, MacroPat { + private final class ParentMacroPat extends ParentAstNode, MacroPat { override predicate relevantChild(AstNode child) { none() or @@ -1934,44 +2408,48 @@ module MakeCfgNodes Input> { } /** - * A macro pattern, representing the invocation of a macro that produces a pattern. - * - * For example: - * ```rust - * macro_rules! my_macro { - * () => { - * Ok(_) - * }; - * } - * match x { - * my_macro!() => "matched", - * // ^^^^^^^^^^^ - * _ => "not matched", - * } - * ``` - */ + * A macro pattern, representing the invocation of a macro that produces a pattern. + * + * For example: + * ```rust + * macro_rules! my_macro { + * () => { + * Ok(_) + * }; + * } + * match x { + * my_macro!() => "matched", + * // ^^^^^^^^^^^ + * _ => "not matched", + * } + * ``` + */ final class MacroPatCfgNode extends CfgNodeFinal, PatCfgNode { private MacroPat node; - MacroPatCfgNode() { node = this.getAstNode() } + MacroPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `MacroPat`. */ MacroPat getMacroPat() { result = node } - + /** - * Gets the macro call of this macro pattern, if it exists. - */ + * Gets the macro call of this macro pattern, if it exists. + * + */ MacroCallCfgNode getMacroCall() { any(ChildMapping mapping).hasCfgChild(node, node.getMacroCall(), this, result) } /** - * Holds if `getMacroCall()` exists. - */ - predicate hasMacroCall() { exists(this.getMacroCall()) } + * Holds if `getMacroCall()` exists. + */ + predicate hasMacroCall() { + exists(this.getMacroCall()) + } } - - final private class ParentMatchExpr extends ParentAstNode, MatchExpr { + private final class ParentMatchExpr extends ParentAstNode, MatchExpr { override predicate relevantChild(AstNode child) { none() or @@ -1980,67 +2458,82 @@ module MakeCfgNodes Input> { } /** - * A match expression. For example: - * ```rust - * match x { - * Option::Some(y) => y, - * Option::None => 0, - * } - * ``` - * ```rust - * match x { - * Some(y) if y != 0 => 1 / y, - * _ => 0, - * } - * ``` - */ + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ final class MatchExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MatchExpr node; - MatchExprCfgNode() { node = this.getAstNode() } + MatchExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `MatchExpr`. */ MatchExpr getMatchExpr() { result = node } - + /** - * Gets the `index`th attr of this match expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this match expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this match expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this match expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this match expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the scrutinee (the expression being matched) of this match expression, if it exists. - */ + * Gets the number of attrs of this match expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the scrutinee (the expression being matched) of this match expression, if it exists. + * + */ ExprCfgNode getScrutinee() { any(ChildMapping mapping).hasCfgChild(node, node.getScrutinee(), this, result) } /** - * Holds if `getScrutinee()` exists. - */ - predicate hasScrutinee() { exists(this.getScrutinee()) } - + * Holds if `getScrutinee()` exists. + */ + predicate hasScrutinee() { + exists(this.getScrutinee()) + } /** - * Gets the match arm list of this match expression, if it exists. - */ - MatchArmList getMatchArmList() { result = node.getMatchArmList() } + * Gets the match arm list of this match expression, if it exists. + * + */ + MatchArmList getMatchArmList() { + result = node.getMatchArmList() + } /** - * Holds if `getMatchArmList()` exists. - */ - predicate hasMatchArmList() { exists(this.getMatchArmList()) } + * Holds if `getMatchArmList()` exists. + */ + predicate hasMatchArmList() { + exists(this.getMatchArmList()) + } } - - final private class ParentMethodCallExpr extends ParentAstNode, MethodCallExpr { + private final class ParentMethodCallExpr extends ParentAstNode, MethodCallExpr { override predicate relevantChild(AstNode child) { none() or @@ -2049,196 +2542,253 @@ module MakeCfgNodes Input> { } /** - * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using - * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and - * indexing syntax (such as `x[y]`). - * - * A method call expression. For example: - * ```rust - * x.foo(42); - * x.foo::(42); - * ``` - */ + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` + */ final class MethodCallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MethodCallExpr node; - MethodCallExprCfgNode() { node = this.getAstNode() } + MethodCallExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `MethodCallExpr`. */ MethodCallExpr getMethodCallExpr() { result = node } - + /** - * Gets the argument list of this method call expression, if it exists. - */ - ArgList getArgList() { result = node.getArgList() } + * Gets the argument list of this method call expression, if it exists. + * + */ + ArgList getArgList() { + result = node.getArgList() + } /** - * Holds if `getArgList()` exists. - */ - predicate hasArgList() { exists(this.getArgList()) } - + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { + exists(this.getArgList()) + } /** - * Gets the `index`th attr of this method call expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this method call expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this method call expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this method call expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this method call expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the generic argument list of this method call expression, if it exists. - */ - GenericArgList getGenericArgList() { result = node.getGenericArgList() } - + * Gets the number of attrs of this method call expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } /** - * Holds if `getGenericArgList()` exists. - */ - predicate hasGenericArgList() { exists(this.getGenericArgList()) } + * Gets the generic argument list of this method call expression, if it exists. + * + */ + GenericArgList getGenericArgList() { + result = node.getGenericArgList() + } /** - * Gets the identifier of this method call expression, if it exists. - */ - NameRef getIdentifier() { result = node.getIdentifier() } - + * Holds if `getGenericArgList()` exists. + */ + predicate hasGenericArgList() { + exists(this.getGenericArgList()) + } /** - * Holds if `getIdentifier()` exists. - */ - predicate hasIdentifier() { exists(this.getIdentifier()) } + * Gets the identifier of this method call expression, if it exists. + * + */ + NameRef getIdentifier() { + result = node.getIdentifier() + } /** - * Gets the receiver of this method call expression, if it exists. - */ + * Holds if `getIdentifier()` exists. + */ + predicate hasIdentifier() { + exists(this.getIdentifier()) + } + /** + * Gets the receiver of this method call expression, if it exists. + * + */ ExprCfgNode getReceiver() { any(ChildMapping mapping).hasCfgChild(node, node.getReceiver(), this, result) } /** - * Holds if `getReceiver()` exists. - */ - predicate hasReceiver() { exists(this.getReceiver()) } + * Holds if `getReceiver()` exists. + */ + predicate hasReceiver() { + exists(this.getReceiver()) + } } - - final private class ParentName extends ParentAstNode, Name { - override predicate relevantChild(AstNode child) { none() } + private final class ParentName extends ParentAstNode, Name { + override predicate relevantChild(AstNode child) { + none() + } } /** - * An identifier name. - * - * For example: - * ```rust - * let foo = 1; - * // ^^^ - * ``` - */ + * An identifier name. + * + * For example: + * ```rust + * let foo = 1; + * // ^^^ + * ``` + */ final class NameCfgNode extends CfgNodeFinal { private Name node; - NameCfgNode() { node = this.getAstNode() } + NameCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `Name`. */ Name getName() { result = node } - + /** - * Gets the text of this name, if it exists. - */ - string getText() { result = node.getText() } + * Gets the text of this name, if it exists. + * + */ + string getText() { + result = node.getText() + } /** - * Holds if `getText()` exists. - */ - predicate hasText() { exists(this.getText()) } + * Holds if `getText()` exists. + */ + predicate hasText() { + exists(this.getText()) + } } - - final private class ParentNotNull extends ParentAstNode, NotNull { - override predicate relevantChild(AstNode child) { none() } + private final class ParentNotNull extends ParentAstNode, NotNull { + override predicate relevantChild(AstNode child) { + none() + } } /** - * The `!null` pattern used in a pattern type to denote a non-null value. Pattern types - * are an experimental, mostly compiler-internal feature (used in the standard library for - * types such as `NonZero` and `NonNull`) and cannot be written directly in stable Rust; - * the example below uses rust-analyzer's canonical `builtin#pattern_type` syntax: - * ```rust - * type NonNull = builtin#pattern_type(*const () is !null); - * ``` - */ + * The `!null` pattern used in a pattern type to denote a non-null value. Pattern types + * are an experimental, mostly compiler-internal feature (used in the standard library for + * types such as `NonZero` and `NonNull`) and cannot be written directly in stable Rust; + * the example below uses rust-analyzer's canonical `builtin#pattern_type` syntax: + * ```rust + * type NonNull = builtin#pattern_type(*const () is !null); + * ``` + */ final class NotNullCfgNode extends CfgNodeFinal, PatCfgNode { private NotNull node; - NotNullCfgNode() { node = this.getAstNode() } + NotNullCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `NotNull`. */ NotNull getNotNull() { result = node } + } - - final private class ParentOffsetOfExpr extends ParentAstNode, OffsetOfExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentOffsetOfExpr extends ParentAstNode, OffsetOfExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * An `offset_of` expression. For example: - * ```rust - * builtin # offset_of(Struct, field); - * ``` - */ + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` + */ final class OffsetOfExprCfgNode extends CfgNodeFinal, ExprCfgNode { private OffsetOfExpr node; - OffsetOfExprCfgNode() { node = this.getAstNode() } + OffsetOfExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `OffsetOfExpr`. */ OffsetOfExpr getOffsetOfExpr() { result = node } - + /** - * Gets the `index`th attr of this offset of expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this offset of expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this offset of expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this offset of expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this offset of expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the `index`th field of this offset of expression (0-based). - */ - NameRef getField(int index) { result = node.getField(index) } - + * Gets the number of attrs of this offset of expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } /** - * Gets any of the fields of this offset of expression. - */ - NameRef getAField() { result = this.getField(_) } + * Gets the `index`th field of this offset of expression (0-based). + * + */ + NameRef getField(int index) { + result = node.getField(index) + } + /** - * Gets the number of fields of this offset of expression. - */ - int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + * Gets any of the fields of this offset of expression. + */ + NameRef getAField() { + result = this.getField(_) + } /** - * Gets the type representation of this offset of expression, if it exists. - */ - TypeRepr getTypeRepr() { result = node.getTypeRepr() } + * Gets the number of fields of this offset of expression. + */ + int getNumberOfFields() { + result = count(int i | exists(this.getField(i))) + } + /** + * Gets the type representation of this offset of expression, if it exists. + * + */ + TypeRepr getTypeRepr() { + result = node.getTypeRepr() + } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { exists(this.getTypeRepr()) } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { + exists(this.getTypeRepr()) + } } - - final private class ParentOrPat extends ParentAstNode, OrPat { + private final class ParentOrPat extends ParentAstNode, OrPat { override predicate relevantChild(AstNode child) { none() or @@ -2247,40 +2797,47 @@ module MakeCfgNodes Input> { } /** - * An or pattern. For example: - * ```rust - * match x { - * Option::Some(y) | Option::None => 0, - * } - * ``` - */ + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` + */ final class OrPatCfgNode extends CfgNodeFinal, PatCfgNode { private OrPat node; - OrPatCfgNode() { node = this.getAstNode() } + OrPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `OrPat`. */ OrPat getOrPat() { result = node } - + /** - * Gets the `index`th pattern of this or pattern (0-based). - */ + * Gets the `index`th pattern of this or pattern (0-based). + * + */ PatCfgNode getPat(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getPat(index), this, result) } + /** - * Gets any of the patterns of this or pattern. - */ - PatCfgNode getAPat() { result = this.getPat(_) } + * Gets any of the patterns of this or pattern. + */ + PatCfgNode getAPat() { + result = this.getPat(_) + } /** - * Gets the number of patterns of this or pattern. - */ - int getNumberOfPats() { result = count(int i | exists(this.getPat(i))) } + * Gets the number of patterns of this or pattern. + */ + int getNumberOfPats() { + result = count(int i | exists(this.getPat(i))) + } } - - final private class ParentParam extends ParentAstNode, Param { + private final class ParentParam extends ParentAstNode, Param { override predicate relevantChild(AstNode child) { none() or @@ -2289,167 +2846,209 @@ module MakeCfgNodes Input> { } /** - * A parameter in a function or method. For example `x` in: - * ```rust - * fn new(x: T) -> Foo { - * // ... - * } - * ``` - */ + * A parameter in a function or method. For example `x` in: + * ```rust + * fn new(x: T) -> Foo { + * // ... + * } + * ``` + */ final class ParamCfgNode extends CfgNodeFinal, ParamBaseCfgNode { private Param node; - ParamCfgNode() { node = this.getAstNode() } + ParamCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `Param`. */ Param getParam() { result = node } - + /** - * Gets the pattern of this parameter, if it exists. - */ + * Gets the pattern of this parameter, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentParamBase extends ParentAstNode, ParamBase { - override predicate relevantChild(AstNode child) { none() } + private final class ParentParamBase extends ParentAstNode, ParamBase { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A normal parameter, `Param`, or a self parameter `SelfParam`. - */ + * A normal parameter, `Param`, or a self parameter `SelfParam`. + */ final class ParamBaseCfgNode extends CfgNodeFinal { private ParamBase node; - ParamBaseCfgNode() { node = this.getAstNode() } + ParamBaseCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ParamBase`. */ ParamBase getParamBase() { result = node } - + /** - * Gets the `index`th attr of this parameter base (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this parameter base (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this parameter base. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this parameter base. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this parameter base. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the type representation of this parameter base, if it exists. - */ - TypeRepr getTypeRepr() { result = node.getTypeRepr() } + * Gets the number of attrs of this parameter base. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the type representation of this parameter base, if it exists. + * + */ + TypeRepr getTypeRepr() { + result = node.getTypeRepr() + } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { exists(this.getTypeRepr()) } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { + exists(this.getTypeRepr()) + } } - - final private class ParentPat extends ParentAstNode, Pat { - override predicate relevantChild(AstNode child) { none() } + private final class ParentPat extends ParentAstNode, Pat { + override predicate relevantChild(AstNode child) { + none() + } } /** - * The base class for patterns. - */ + * The base class for patterns. + */ final class PatCfgNode extends CfgNodeFinal { private Pat node; - PatCfgNode() { node = this.getAstNode() } + PatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `Pat`. */ Pat getPat() { result = node } + } - - final private class ParentPathExpr extends ParentAstNode, PathExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentPathExpr extends ParentAstNode, PathExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A path expression. For example: - * ```rust - * let x = variable; - * let x = foo::bar; - * let y = ::foo; - * let z = ::foo; - * ``` - */ + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` + */ final class PathExprCfgNode extends CfgNodeFinal, PathExprBaseCfgNode { private PathExpr node; - PathExprCfgNode() { node = this.getAstNode() } + PathExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `PathExpr`. */ PathExpr getPathExpr() { result = node } - + /** - * Gets the `index`th attr of this path expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this path expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets any of the attrs of this path expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets any of the attrs of this path expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the number of attrs of this path expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets the number of attrs of this path expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } } - - final private class ParentPathExprBase extends ParentAstNode, PathExprBase { - override predicate relevantChild(AstNode child) { none() } + private final class ParentPathExprBase extends ParentAstNode, PathExprBase { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. - */ + * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. + */ final class PathExprBaseCfgNode extends CfgNodeFinal, ExprCfgNode { private PathExprBase node; - PathExprBaseCfgNode() { node = this.getAstNode() } + PathExprBaseCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `PathExprBase`. */ PathExprBase getPathExprBase() { result = node } + } - - final private class ParentPathPat extends ParentAstNode, PathPat { - override predicate relevantChild(AstNode child) { none() } + private final class ParentPathPat extends ParentAstNode, PathPat { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A path pattern. For example: - * ```rust - * match x { - * Foo::Bar => "ok", - * _ => "fail", - * } - * ``` - */ + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` + */ final class PathPatCfgNode extends CfgNodeFinal, PatCfgNode { private PathPat node; - PathPatCfgNode() { node = this.getAstNode() } + PathPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `PathPat`. */ PathPat getPathPat() { result = node } + } - - final private class ParentPrefixExpr extends ParentAstNode, PrefixExpr { + private final class ParentPrefixExpr extends ParentAstNode, PrefixExpr { override predicate relevantChild(AstNode child) { none() or @@ -2458,60 +3057,75 @@ module MakeCfgNodes Input> { } /** - * A unary operation expression. For example: - * ```rust - * let x = -42; - * let y = !true; - * let z = *ptr; - * ``` - */ + * A unary operation expression. For example: + * ```rust + * let x = -42; + * let y = !true; + * let z = *ptr; + * ``` + */ final class PrefixExprCfgNode extends CfgNodeFinal, ExprCfgNode { private PrefixExpr node; - PrefixExprCfgNode() { node = this.getAstNode() } + PrefixExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `PrefixExpr`. */ PrefixExpr getPrefixExpr() { result = node } - + /** - * Gets the `index`th attr of this prefix expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this prefix expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this prefix expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this prefix expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this prefix expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this prefix expression, if it exists. - */ + * Gets the number of attrs of this prefix expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this prefix expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } - + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } /** - * Gets the operator name of this prefix expression, if it exists. - */ - string getOperatorName() { result = node.getOperatorName() } + * Gets the operator name of this prefix expression, if it exists. + * + */ + string getOperatorName() { + result = node.getOperatorName() + } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { exists(this.getOperatorName()) } + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { + exists(this.getOperatorName()) + } } - - final private class ParentRangeExpr extends ParentAstNode, RangeExpr { + private final class ParentRangeExpr extends ParentAstNode, RangeExpr { override predicate relevantChild(AstNode child) { none() or @@ -2522,75 +3136,92 @@ module MakeCfgNodes Input> { } /** - * A range expression. For example: - * ```rust - * let x = 1..=10; - * let x = 1..10; - * let x = 10..; - * let x = ..10; - * let x = ..=10; - * let x = ..; - * ``` - */ + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ final class RangeExprCfgNode extends CfgNodeFinal, ExprCfgNode { private RangeExpr node; - RangeExprCfgNode() { node = this.getAstNode() } + RangeExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `RangeExpr`. */ RangeExpr getRangeExpr() { result = node } - + /** - * Gets the `index`th attr of this range expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this range expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this range expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this range expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this range expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the end of this range expression, if it exists. - */ + * Gets the number of attrs of this range expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the end of this range expression, if it exists. + * + */ ExprCfgNode getEnd() { any(ChildMapping mapping).hasCfgChild(node, node.getEnd(), this, result) } /** - * Holds if `getEnd()` exists. - */ - predicate hasEnd() { exists(this.getEnd()) } - + * Holds if `getEnd()` exists. + */ + predicate hasEnd() { + exists(this.getEnd()) + } /** - * Gets the operator name of this range expression, if it exists. - */ - string getOperatorName() { result = node.getOperatorName() } + * Gets the operator name of this range expression, if it exists. + * + */ + string getOperatorName() { + result = node.getOperatorName() + } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { exists(this.getOperatorName()) } - + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { + exists(this.getOperatorName()) + } /** - * Gets the start of this range expression, if it exists. - */ + * Gets the start of this range expression, if it exists. + * + */ ExprCfgNode getStart() { any(ChildMapping mapping).hasCfgChild(node, node.getStart(), this, result) } /** - * Holds if `getStart()` exists. - */ - predicate hasStart() { exists(this.getStart()) } + * Holds if `getStart()` exists. + */ + predicate hasStart() { + exists(this.getStart()) + } } - - final private class ParentRangePat extends ParentAstNode, RangePat { + private final class ParentRangePat extends ParentAstNode, RangePat { override predicate relevantChild(AstNode child) { none() or @@ -2601,59 +3232,69 @@ module MakeCfgNodes Input> { } /** - * A range pattern. For example: - * ```rust - * match x { - * ..15 => "too cold", - * 16..=25 => "just right", - * 26.. => "too hot", - * } - * ``` - */ + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` + */ final class RangePatCfgNode extends CfgNodeFinal, PatCfgNode { private RangePat node; - RangePatCfgNode() { node = this.getAstNode() } + RangePatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `RangePat`. */ RangePat getRangePat() { result = node } - + /** - * Gets the end of this range pattern, if it exists. - */ + * Gets the end of this range pattern, if it exists. + * + */ PatCfgNode getEnd() { any(ChildMapping mapping).hasCfgChild(node, node.getEnd(), this, result) } /** - * Holds if `getEnd()` exists. - */ - predicate hasEnd() { exists(this.getEnd()) } - + * Holds if `getEnd()` exists. + */ + predicate hasEnd() { + exists(this.getEnd()) + } /** - * Gets the operator name of this range pattern, if it exists. - */ - string getOperatorName() { result = node.getOperatorName() } + * Gets the operator name of this range pattern, if it exists. + * + */ + string getOperatorName() { + result = node.getOperatorName() + } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { exists(this.getOperatorName()) } - + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { + exists(this.getOperatorName()) + } /** - * Gets the start of this range pattern, if it exists. - */ + * Gets the start of this range pattern, if it exists. + * + */ PatCfgNode getStart() { any(ChildMapping mapping).hasCfgChild(node, node.getStart(), this, result) } /** - * Holds if `getStart()` exists. - */ - predicate hasStart() { exists(this.getStart()) } + * Holds if `getStart()` exists. + */ + predicate hasStart() { + exists(this.getStart()) + } } - - final private class ParentRefExpr extends ParentAstNode, RefExpr { + private final class ParentRefExpr extends ParentAstNode, RefExpr { override predicate relevantChild(AstNode child) { none() or @@ -2662,66 +3303,86 @@ module MakeCfgNodes Input> { } /** - * A reference expression. For example: - * ```rust - * let ref_const = &foo; - * let ref_mut = &mut foo; - * let raw_const: &mut i32 = &raw const foo; - * let raw_mut: &mut i32 = &raw mut foo; - * ``` - */ + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` + */ final class RefExprCfgNode extends CfgNodeFinal, ExprCfgNode { private RefExpr node; - RefExprCfgNode() { node = this.getAstNode() } + RefExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `RefExpr`. */ RefExpr getRefExpr() { result = node } - + /** - * Gets the `index`th attr of this reference expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this reference expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this reference expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this reference expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this reference expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this reference expression, if it exists. - */ + * Gets the number of attrs of this reference expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this reference expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } - + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } /** - * Holds if this reference expression is const. - */ - predicate isConst() { node.isConst() } + * Holds if this reference expression is const. + * + */ + predicate isConst() { + node.isConst() + } /** - * Holds if this reference expression is mut. - */ - predicate isMut() { node.isMut() } + * Holds if this reference expression is mut. + * + */ + predicate isMut() { + node.isMut() + } /** - * Holds if this reference expression is raw. - */ - predicate isRaw() { node.isRaw() } - } + * Holds if this reference expression is raw. + * + */ + predicate isRaw() { + node.isRaw() + } - final private class ParentRefPat extends ParentAstNode, RefPat { + } + private final class ParentRefPat extends ParentAstNode, RefPat { override predicate relevantChild(AstNode child) { none() or @@ -2730,78 +3391,96 @@ module MakeCfgNodes Input> { } /** - * A reference pattern. For example: - * ```rust - * match x { - * &mut Option::Some(y) => y, - * &Option::None => 0, - * }; - * ``` - */ + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` + */ final class RefPatCfgNode extends CfgNodeFinal, PatCfgNode { private RefPat node; - RefPatCfgNode() { node = this.getAstNode() } + RefPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `RefPat`. */ RefPat getRefPat() { result = node } - + /** - * Holds if this reference pattern is mut. - */ - predicate isMut() { node.isMut() } + * Holds if this reference pattern is mut. + * + */ + predicate isMut() { + node.isMut() + } /** - * Gets the pattern of this reference pattern, if it exists. - */ + * Gets the pattern of this reference pattern, if it exists. + * + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { exists(this.getPat()) } + * Holds if `getPat()` exists. + */ + predicate hasPat() { + exists(this.getPat()) + } } - - final private class ParentRestPat extends ParentAstNode, RestPat { - override predicate relevantChild(AstNode child) { none() } + private final class ParentRestPat extends ParentAstNode, RestPat { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A rest pattern (`..`) in a tuple, slice, or struct pattern. - * - * For example: - * ```rust - * let (a, .., z) = (1, 2, 3); - * // ^^ - * ``` - */ + * A rest pattern (`..`) in a tuple, slice, or struct pattern. + * + * For example: + * ```rust + * let (a, .., z) = (1, 2, 3); + * // ^^ + * ``` + */ final class RestPatCfgNode extends CfgNodeFinal, PatCfgNode { private RestPat node; - RestPatCfgNode() { node = this.getAstNode() } + RestPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `RestPat`. */ RestPat getRestPat() { result = node } - + /** - * Gets the `index`th attr of this rest pattern (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this rest pattern (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets any of the attrs of this rest pattern. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets any of the attrs of this rest pattern. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the number of attrs of this rest pattern. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets the number of attrs of this rest pattern. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } } - - final private class ParentReturnExpr extends ParentAstNode, ReturnExpr { + private final class ParentReturnExpr extends ParentAstNode, ReturnExpr { override predicate relevantChild(AstNode child) { none() or @@ -2810,55 +3489,66 @@ module MakeCfgNodes Input> { } /** - * A return expression. For example: - * ```rust - * fn some_value() -> i32 { - * return 42; - * } - * ``` - * ```rust - * fn no_value() -> () { - * return; - * } - * ``` - */ + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` + */ final class ReturnExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ReturnExpr node; - ReturnExprCfgNode() { node = this.getAstNode() } + ReturnExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `ReturnExpr`. */ ReturnExpr getReturnExpr() { result = node } - + /** - * Gets the `index`th attr of this return expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this return expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this return expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this return expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this return expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this return expression, if it exists. - */ + * Gets the number of attrs of this return expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this return expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } - - final private class ParentSelfParam extends ParentAstNode, SelfParam { + private final class ParentSelfParam extends ParentAstNode, SelfParam { override predicate relevantChild(AstNode child) { none() or @@ -2867,60 +3557,74 @@ module MakeCfgNodes Input> { } /** - * A `self` parameter. For example `self` in: - * ```rust - * struct X; - * impl X { - * fn one(&self) {} - * fn two(&mut self) {} - * fn three(self) {} - * fn four(mut self) {} - * fn five<'a>(&'a self) {} - * } - * ``` - */ + * A `self` parameter. For example `self` in: + * ```rust + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} + * } + * ``` + */ final class SelfParamCfgNode extends CfgNodeFinal, ParamBaseCfgNode { private SelfParam node; - SelfParamCfgNode() { node = this.getAstNode() } + SelfParamCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `SelfParam`. */ SelfParam getSelfParam() { result = node } - + /** - * Holds if this self parameter is reference. - */ - predicate isRef() { node.isRef() } + * Holds if this self parameter is reference. + * + */ + predicate isRef() { + node.isRef() + } /** - * Holds if this self parameter is mut. - */ - predicate isMut() { node.isMut() } + * Holds if this self parameter is mut. + * + */ + predicate isMut() { + node.isMut() + } /** - * Gets the lifetime of this self parameter, if it exists. - */ - Lifetime getLifetime() { result = node.getLifetime() } + * Gets the lifetime of this self parameter, if it exists. + * + */ + Lifetime getLifetime() { + result = node.getLifetime() + } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { exists(this.getLifetime()) } - + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { + exists(this.getLifetime()) + } /** - * Gets the name of this self parameter, if it exists. - */ + * Gets the name of this self parameter, if it exists. + * + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { exists(this.getName()) } + * Holds if `getName()` exists. + */ + predicate hasName() { + exists(this.getName()) + } } - - final private class ParentSlicePat extends ParentAstNode, SlicePat { + private final class ParentSlicePat extends ParentAstNode, SlicePat { override predicate relevantChild(AstNode child) { none() or @@ -2929,106 +3633,129 @@ module MakeCfgNodes Input> { } /** - * A slice pattern. For example: - * ```rust - * match x { - * [1, 2, 3, 4, 5] => "ok", - * [1, 2, ..] => "fail", - * [x, y, .., z, 7] => "fail", - * } - * ``` - */ + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` + */ final class SlicePatCfgNode extends CfgNodeFinal, PatCfgNode { private SlicePat node; - SlicePatCfgNode() { node = this.getAstNode() } + SlicePatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `SlicePat`. */ SlicePat getSlicePat() { result = node } - + /** - * Gets the `index`th pattern of this slice pattern (0-based). - */ + * Gets the `index`th pattern of this slice pattern (0-based). + * + */ PatCfgNode getPat(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getPat(index), this, result) } + /** - * Gets any of the patterns of this slice pattern. - */ - PatCfgNode getAPat() { result = this.getPat(_) } + * Gets any of the patterns of this slice pattern. + */ + PatCfgNode getAPat() { + result = this.getPat(_) + } /** - * Gets the number of patterns of this slice pattern. - */ - int getNumberOfPats() { result = count(int i | exists(this.getPat(i))) } + * Gets the number of patterns of this slice pattern. + */ + int getNumberOfPats() { + result = count(int i | exists(this.getPat(i))) + } } - - final private class ParentStructExpr extends ParentAstNode, StructExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentStructExpr extends ParentAstNode, StructExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A struct expression. For example: - * ```rust - * let first = Foo { a: 1, b: 2 }; - * let second = Foo { a: 2, ..first }; - * let n = Foo { a: 1, b: 2 }.b; - * Foo { a: m, .. } = second; - * ``` - */ + * A struct expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * let n = Foo { a: 1, b: 2 }.b; + * Foo { a: m, .. } = second; + * ``` + */ final class StructExprCfgNode extends CfgNodeFinal, ExprCfgNode { private StructExpr node; - StructExprCfgNode() { node = this.getAstNode() } + StructExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `StructExpr`. */ StructExpr getStructExpr() { result = node } - + /** - * Gets the struct expression field list of this struct expression, if it exists. - */ - StructExprFieldList getStructExprFieldList() { result = node.getStructExprFieldList() } + * Gets the struct expression field list of this struct expression, if it exists. + * + */ + StructExprFieldList getStructExprFieldList() { + result = node.getStructExprFieldList() + } /** - * Holds if `getStructExprFieldList()` exists. - */ - predicate hasStructExprFieldList() { exists(this.getStructExprFieldList()) } + * Holds if `getStructExprFieldList()` exists. + */ + predicate hasStructExprFieldList() { + exists(this.getStructExprFieldList()) + } } - - final private class ParentStructPat extends ParentAstNode, StructPat { - override predicate relevantChild(AstNode child) { none() } + private final class ParentStructPat extends ParentAstNode, StructPat { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A struct pattern. For example: - * ```rust - * match x { - * Foo { a: 1, b: 2 } => "ok", - * Foo { .. } => "fail", - * } - * ``` - */ + * A struct pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` + */ final class StructPatCfgNode extends CfgNodeFinal, PatCfgNode { private StructPat node; - StructPatCfgNode() { node = this.getAstNode() } + StructPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `StructPat`. */ StructPat getStructPat() { result = node } - + /** - * Gets the struct pattern field list of this struct pattern, if it exists. - */ - StructPatFieldList getStructPatFieldList() { result = node.getStructPatFieldList() } + * Gets the struct pattern field list of this struct pattern, if it exists. + * + */ + StructPatFieldList getStructPatFieldList() { + result = node.getStructPatFieldList() + } /** - * Holds if `getStructPatFieldList()` exists. - */ - predicate hasStructPatFieldList() { exists(this.getStructPatFieldList()) } + * Holds if `getStructPatFieldList()` exists. + */ + predicate hasStructPatFieldList() { + exists(this.getStructPatFieldList()) + } } - - final private class ParentTryExpr extends ParentAstNode, TryExpr { + private final class ParentTryExpr extends ParentAstNode, TryExpr { override predicate relevantChild(AstNode child) { none() or @@ -3037,51 +3764,62 @@ module MakeCfgNodes Input> { } /** - * A try expression using the `?` operator. - * - * For example: - * ```rust - * let x = foo()?; - * // ^ - * ``` - */ + * A try expression using the `?` operator. + * + * For example: + * ```rust + * let x = foo()?; + * // ^ + * ``` + */ final class TryExprCfgNode extends CfgNodeFinal, ExprCfgNode { private TryExpr node; - TryExprCfgNode() { node = this.getAstNode() } + TryExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `TryExpr`. */ TryExpr getTryExpr() { result = node } - + /** - * Gets the `index`th attr of this try expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this try expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this try expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this try expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this try expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this try expression, if it exists. - */ + * Gets the number of attrs of this try expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this try expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } - - final private class ParentTupleExpr extends ParentAstNode, TupleExpr { + private final class ParentTupleExpr extends ParentAstNode, TupleExpr { override predicate relevantChild(AstNode child) { none() or @@ -3090,55 +3828,69 @@ module MakeCfgNodes Input> { } /** - * A tuple expression. For example: - * ```rust - * let tuple = (1, "one"); - * let n = (2, "two").0; - * let (a, b) = tuple; - * ``` - */ + * A tuple expression. For example: + * ```rust + * let tuple = (1, "one"); + * let n = (2, "two").0; + * let (a, b) = tuple; + * ``` + */ final class TupleExprCfgNode extends CfgNodeFinal, ExprCfgNode { private TupleExpr node; - TupleExprCfgNode() { node = this.getAstNode() } + TupleExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `TupleExpr`. */ TupleExpr getTupleExpr() { result = node } - + /** - * Gets the `index`th attr of this tuple expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this tuple expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this tuple expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this tuple expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this tuple expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the `index`th field of this tuple expression (0-based). - */ + * Gets the number of attrs of this tuple expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the `index`th field of this tuple expression (0-based). + * + */ ExprCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } + /** - * Gets any of the fields of this tuple expression. - */ - ExprCfgNode getAField() { result = this.getField(_) } + * Gets any of the fields of this tuple expression. + */ + ExprCfgNode getAField() { + result = this.getField(_) + } /** - * Gets the number of fields of this tuple expression. - */ - int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + * Gets the number of fields of this tuple expression. + */ + int getNumberOfFields() { + result = count(int i | exists(this.getField(i))) + } } - - final private class ParentTuplePat extends ParentAstNode, TuplePat { + private final class ParentTuplePat extends ParentAstNode, TuplePat { override predicate relevantChild(AstNode child) { none() or @@ -3147,39 +3899,46 @@ module MakeCfgNodes Input> { } /** - * A tuple pattern. For example: - * ```rust - * let (x, y) = (1, 2); - * let (a, b, .., z) = (1, 2, 3, 4, 5); - * ``` - */ + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` + */ final class TuplePatCfgNode extends CfgNodeFinal, PatCfgNode { private TuplePat node; - TuplePatCfgNode() { node = this.getAstNode() } + TuplePatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `TuplePat`. */ TuplePat getTuplePat() { result = node } - + /** - * Gets the `index`th field of this tuple pattern (0-based). - */ + * Gets the `index`th field of this tuple pattern (0-based). + * + */ PatCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } + /** - * Gets any of the fields of this tuple pattern. - */ - PatCfgNode getAField() { result = this.getField(_) } + * Gets any of the fields of this tuple pattern. + */ + PatCfgNode getAField() { + result = this.getField(_) + } /** - * Gets the number of fields of this tuple pattern. - */ - int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + * Gets the number of fields of this tuple pattern. + */ + int getNumberOfFields() { + result = count(int i | exists(this.getField(i))) + } } - - final private class ParentTupleStructPat extends ParentAstNode, TupleStructPat { + private final class ParentTupleStructPat extends ParentAstNode, TupleStructPat { override predicate relevantChild(AstNode child) { none() or @@ -3188,76 +3947,94 @@ module MakeCfgNodes Input> { } /** - * A tuple struct pattern. For example: - * ```rust - * match x { - * Tuple("a", 1, 2, 3) => "great", - * Tuple(.., 3) => "fine", - * Tuple(..) => "fail", - * }; - * ``` - */ + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` + */ final class TupleStructPatCfgNode extends CfgNodeFinal, PatCfgNode { private TupleStructPat node; - TupleStructPatCfgNode() { node = this.getAstNode() } + TupleStructPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `TupleStructPat`. */ TupleStructPat getTupleStructPat() { result = node } - + /** - * Gets the `index`th field of this tuple struct pattern (0-based). - */ + * Gets the `index`th field of this tuple struct pattern (0-based). + * + */ PatCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } + /** - * Gets any of the fields of this tuple struct pattern. - */ - PatCfgNode getAField() { result = this.getField(_) } + * Gets any of the fields of this tuple struct pattern. + */ + PatCfgNode getAField() { + result = this.getField(_) + } /** - * Gets the number of fields of this tuple struct pattern. - */ - int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + * Gets the number of fields of this tuple struct pattern. + */ + int getNumberOfFields() { + result = count(int i | exists(this.getField(i))) + } } - - final private class ParentUnderscoreExpr extends ParentAstNode, UnderscoreExpr { - override predicate relevantChild(AstNode child) { none() } + private final class ParentUnderscoreExpr extends ParentAstNode, UnderscoreExpr { + override predicate relevantChild(AstNode child) { + none() + } } /** - * An underscore expression. For example: - * ```rust - * _ = 42; - * ``` - */ + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` + */ final class UnderscoreExprCfgNode extends CfgNodeFinal, ExprCfgNode { private UnderscoreExpr node; - UnderscoreExprCfgNode() { node = this.getAstNode() } + UnderscoreExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `UnderscoreExpr`. */ UnderscoreExpr getUnderscoreExpr() { result = node } - + /** - * Gets the `index`th attr of this underscore expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this underscore expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } + /** - * Gets any of the attrs of this underscore expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } + * Gets any of the attrs of this underscore expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the number of attrs of this underscore expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets the number of attrs of this underscore expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } } - - final private class ParentWhileExpr extends ParentAstNode, WhileExpr { + private final class ParentWhileExpr extends ParentAstNode, WhileExpr { override predicate relevantChild(AstNode child) { none() or @@ -3266,71 +4043,86 @@ module MakeCfgNodes Input> { } /** - * A while loop expression. - * - * For example: - * ```rust - * while x < 10 { - * x += 1; - * } - * ``` - */ + * A while loop expression. + * + * For example: + * ```rust + * while x < 10 { + * x += 1; + * } + * ``` + */ final class WhileExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private WhileExpr node; - WhileExprCfgNode() { node = this.getAstNode() } + WhileExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `WhileExpr`. */ WhileExpr getWhileExpr() { result = node } - + /** - * Gets the `index`th attr of this while expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this while expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this while expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this while expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this while expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the condition of this while expression, if it exists. - */ + * Gets the number of attrs of this while expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the condition of this while expression, if it exists. + * + */ ExprCfgNode getCondition() { any(ChildMapping mapping).hasCfgChild(node, node.getCondition(), this, result) } /** - * Holds if `getCondition()` exists. - */ - predicate hasCondition() { exists(this.getCondition()) } + * Holds if `getCondition()` exists. + */ + predicate hasCondition() { + exists(this.getCondition()) + } } - - final private class ParentWildcardPat extends ParentAstNode, WildcardPat { - override predicate relevantChild(AstNode child) { none() } + private final class ParentWildcardPat extends ParentAstNode, WildcardPat { + override predicate relevantChild(AstNode child) { + none() + } } /** - * A wildcard pattern. For example: - * ```rust - * let _ = 42; - * ``` - */ + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` + */ final class WildcardPatCfgNode extends CfgNodeFinal, PatCfgNode { private WildcardPat node; - WildcardPatCfgNode() { node = this.getAstNode() } + WildcardPatCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `WildcardPat`. */ WildcardPat getWildcardPat() { result = node } + } - - final private class ParentYeetExpr extends ParentAstNode, YeetExpr { + private final class ParentYeetExpr extends ParentAstNode, YeetExpr { override predicate relevantChild(AstNode child) { none() or @@ -3339,50 +4131,61 @@ module MakeCfgNodes Input> { } /** - * A `yeet` expression. For example: - * ```rust - * if x < size { - * do yeet "index out of bounds"; - * } - * ``` - */ + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ final class YeetExprCfgNode extends CfgNodeFinal, ExprCfgNode { private YeetExpr node; - YeetExprCfgNode() { node = this.getAstNode() } + YeetExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `YeetExpr`. */ YeetExpr getYeetExpr() { result = node } - + /** - * Gets the `index`th attr of this yeet expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this yeet expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this yeet expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this yeet expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this yeet expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this yeet expression, if it exists. - */ + * Gets the number of attrs of this yeet expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this yeet expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } - - final private class ParentYieldExpr extends ParentAstNode, YieldExpr { + private final class ParentYieldExpr extends ParentAstNode, YieldExpr { override predicate relevantChild(AstNode child) { none() or @@ -3391,732 +4194,697 @@ module MakeCfgNodes Input> { } /** - * A `yield` expression. For example: - * ```rust - * let one = #[coroutine] - * || { - * yield 1; - * }; - * ``` - */ + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ final class YieldExprCfgNode extends CfgNodeFinal, ExprCfgNode { private YieldExpr node; - YieldExprCfgNode() { node = this.getAstNode() } + YieldExprCfgNode() { + node = this.getAstNode() + } /** Gets the underlying `YieldExpr`. */ YieldExpr getYieldExpr() { result = node } - + /** - * Gets the `index`th attr of this yield expression (0-based). - */ - AnyAttr getAttr(int index) { result = node.getAttr(index) } + * Gets the `index`th attr of this yield expression (0-based). + * + */ + AnyAttr getAttr(int index) { + result = node.getAttr(index) + } - /** - * Gets any of the attrs of this yield expression. - */ - AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this yield expression. - */ - int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + * Gets any of the attrs of this yield expression. + */ + AnyAttr getAnAttr() { + result = this.getAttr(_) + } /** - * Gets the expression of this yield expression, if it exists. - */ + * Gets the number of attrs of this yield expression. + */ + int getNumberOfAttrs() { + result = count(int i | exists(this.getAttr(i))) + } + /** + * Gets the expression of this yield expression, if it exists. + * + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { exists(this.getExpr()) } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { + exists(this.getExpr()) + } } } module Consistency { - private predicate hasCfgNode(AstNode astNode) { astNode = any(CfgNode cfgNode).getAstNode() } + private predicate hasCfgNode(AstNode astNode) { + astNode = any(CfgNode cfgNode).getAstNode() + } query predicate missingCfgChild(CfgNode parent, string pred, int i, AstNode child) { none() or pred = "getExpr" and - parent = - any(Nodes::ArrayExprCfgNode cfgNode, ArrayExpr astNode | - astNode = cfgNode.getArrayExpr() and - child = getDesugared(astNode.getExpr(i)) and - hasCfgNode(child) and - not child = cfgNode.getExpr(i).getAstNode() + parent = any(Nodes::ArrayExprCfgNode cfgNode, ArrayExpr astNode | + astNode = cfgNode.getArrayExpr() and + child = getDesugared(astNode.getExpr(i)) + and + hasCfgNode(child) and + not child = cfgNode.getExpr(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRepeatOperand" and - parent = - any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | - astNode = cfgNode.getArrayRepeatExpr() and - child = getDesugared(astNode.getRepeatOperand()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRepeatOperand().getAstNode() + parent = any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | + astNode = cfgNode.getArrayRepeatExpr() and + child = getDesugared(astNode.getRepeatOperand()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRepeatOperand().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRepeatLength" and - parent = - any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | - astNode = cfgNode.getArrayRepeatExpr() and - child = getDesugared(astNode.getRepeatLength()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRepeatLength().getAstNode() + parent = any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | + astNode = cfgNode.getArrayRepeatExpr() and + child = getDesugared(astNode.getRepeatLength()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRepeatLength().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getTemplate" and - parent = - any(Nodes::AsmExprCfgNode cfgNode, AsmExpr astNode | - astNode = cfgNode.getAsmExpr() and - child = getDesugared(astNode.getTemplate(i)) and - hasCfgNode(child) and - not child = cfgNode.getTemplate(i).getAstNode() + parent = any(Nodes::AsmExprCfgNode cfgNode, AsmExpr astNode | + astNode = cfgNode.getAsmExpr() and + child = getDesugared(astNode.getTemplate(i)) + and + hasCfgNode(child) and + not child = cfgNode.getTemplate(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::AwaitExprCfgNode cfgNode, AwaitExpr astNode | - astNode = cfgNode.getAwaitExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::AwaitExprCfgNode cfgNode, AwaitExpr astNode | + astNode = cfgNode.getAwaitExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::BecomeExprCfgNode cfgNode, BecomeExpr astNode | - astNode = cfgNode.getBecomeExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::BecomeExprCfgNode cfgNode, BecomeExpr astNode | + astNode = cfgNode.getBecomeExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLhs" and - parent = - any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | - astNode = cfgNode.getBinaryExpr() and - child = getDesugared(astNode.getLhs()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLhs().getAstNode() + parent = any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | + astNode = cfgNode.getBinaryExpr() and + child = getDesugared(astNode.getLhs()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLhs().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRhs" and - parent = - any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | - astNode = cfgNode.getBinaryExpr() and - child = getDesugared(astNode.getRhs()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRhs().getAstNode() + parent = any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | + astNode = cfgNode.getBinaryExpr() and + child = getDesugared(astNode.getRhs()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRhs().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::BoxPatCfgNode cfgNode, BoxPat astNode | - astNode = cfgNode.getBoxPat() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::BoxPatCfgNode cfgNode, BoxPat astNode | + astNode = cfgNode.getBoxPat() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::BreakExprCfgNode cfgNode, BreakExpr astNode | - astNode = cfgNode.getBreakExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::BreakExprCfgNode cfgNode, BreakExpr astNode | + astNode = cfgNode.getBreakExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getFunction" and - parent = - any(Nodes::CallExprCfgNode cfgNode, CallExpr astNode | - astNode = cfgNode.getCallExpr() and - child = getDesugared(astNode.getFunction()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getFunction().getAstNode() + parent = any(Nodes::CallExprCfgNode cfgNode, CallExpr astNode | + astNode = cfgNode.getCallExpr() and + child = getDesugared(astNode.getFunction()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getFunction().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::CastExprCfgNode cfgNode, CastExpr astNode | - astNode = cfgNode.getCastExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::CastExprCfgNode cfgNode, CastExpr astNode | + astNode = cfgNode.getCastExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getBlockExpr" and - parent = - any(Nodes::ConstBlockPatCfgNode cfgNode, ConstBlockPat astNode | - astNode = cfgNode.getConstBlockPat() and - child = getDesugared(astNode.getBlockExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getBlockExpr().getAstNode() + parent = any(Nodes::ConstBlockPatCfgNode cfgNode, ConstBlockPat astNode | + astNode = cfgNode.getConstBlockPat() and + child = getDesugared(astNode.getBlockExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getBlockExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::DerefPatCfgNode cfgNode, DerefPat astNode | - astNode = cfgNode.getDerefPat() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::DerefPatCfgNode cfgNode, DerefPat astNode | + astNode = cfgNode.getDerefPat() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getContainer" and - parent = - any(Nodes::FieldExprCfgNode cfgNode, FieldExpr astNode | - astNode = cfgNode.getFieldExpr() and - child = getDesugared(astNode.getContainer()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getContainer().getAstNode() + parent = any(Nodes::FieldExprCfgNode cfgNode, FieldExpr astNode | + astNode = cfgNode.getFieldExpr() and + child = getDesugared(astNode.getContainer()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getContainer().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getIterable" and - parent = - any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | - astNode = cfgNode.getForExpr() and - child = getDesugared(astNode.getIterable()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getIterable().getAstNode() + parent = any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | + astNode = cfgNode.getForExpr() and + child = getDesugared(astNode.getIterable()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getIterable().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | - astNode = cfgNode.getForExpr() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | + astNode = cfgNode.getForExpr() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | - astNode = cfgNode.getFormatArgsArg() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | + astNode = cfgNode.getFormatArgsArg() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = - any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | - astNode = cfgNode.getFormatArgsArg() and - child = getDesugared(astNode.getName()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | + astNode = cfgNode.getFormatArgsArg() and + child = getDesugared(astNode.getName()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getArg" and - parent = - any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | - astNode = cfgNode.getFormatArgsExpr() and - child = getDesugared(astNode.getArg(i)) and - hasCfgNode(child) and - not child = cfgNode.getArg(i).getAstNode() + parent = any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | + astNode = cfgNode.getFormatArgsExpr() and + child = getDesugared(astNode.getArg(i)) + and + hasCfgNode(child) and + not child = cfgNode.getArg(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getTemplate" and - parent = - any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | - astNode = cfgNode.getFormatArgsExpr() and - child = getDesugared(astNode.getTemplate()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getTemplate().getAstNode() + parent = any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | + astNode = cfgNode.getFormatArgsExpr() and + child = getDesugared(astNode.getTemplate()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getTemplate().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = - any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | - astNode = cfgNode.getIdentPat() and - child = getDesugared(astNode.getName()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | + astNode = cfgNode.getIdentPat() and + child = getDesugared(astNode.getName()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | - astNode = cfgNode.getIdentPat() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | + astNode = cfgNode.getIdentPat() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getCondition" and - parent = - any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getCondition()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getCondition().getAstNode() + parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getCondition()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getCondition().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getElse" and - parent = - any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getElse()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getElse().getAstNode() + parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getElse()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getElse().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getThen" and - parent = - any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getThen()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getThen().getAstNode() + parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getThen()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getThen().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getBase" and - parent = - any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | - astNode = cfgNode.getIndexExpr() and - child = getDesugared(astNode.getBase()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getBase().getAstNode() + parent = any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | + astNode = cfgNode.getIndexExpr() and + child = getDesugared(astNode.getBase()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getBase().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getIndex" and - parent = - any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | - astNode = cfgNode.getIndexExpr() and - child = getDesugared(astNode.getIndex()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getIndex().getAstNode() + parent = any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | + astNode = cfgNode.getIndexExpr() and + child = getDesugared(astNode.getIndex()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getIndex().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getScrutinee" and - parent = - any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | - astNode = cfgNode.getLetExpr() and - child = getDesugared(astNode.getScrutinee()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getScrutinee().getAstNode() + parent = any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | + astNode = cfgNode.getLetExpr() and + child = getDesugared(astNode.getScrutinee()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getScrutinee().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | - astNode = cfgNode.getLetExpr() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | + astNode = cfgNode.getLetExpr() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getInitializer" and - parent = - any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | - astNode = cfgNode.getLetStmt() and - child = getDesugared(astNode.getInitializer()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getInitializer().getAstNode() + parent = any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | + astNode = cfgNode.getLetStmt() and + child = getDesugared(astNode.getInitializer()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getInitializer().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | - astNode = cfgNode.getLetStmt() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | + astNode = cfgNode.getLetStmt() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLiteral" and - parent = - any(Nodes::LiteralPatCfgNode cfgNode, LiteralPat astNode | - astNode = cfgNode.getLiteralPat() and - child = getDesugared(astNode.getLiteral()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLiteral().getAstNode() + parent = any(Nodes::LiteralPatCfgNode cfgNode, LiteralPat astNode | + astNode = cfgNode.getLiteralPat() and + child = getDesugared(astNode.getLiteral()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLiteral().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLoopBody" and - parent = - any(Nodes::LoopingExprCfgNode cfgNode, LoopingExpr astNode | - astNode = cfgNode.getLoopingExpr() and - child = getDesugared(astNode.getLoopBody()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLoopBody().getAstNode() + parent = any(Nodes::LoopingExprCfgNode cfgNode, LoopingExpr astNode | + astNode = cfgNode.getLoopingExpr() and + child = getDesugared(astNode.getLoopBody()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLoopBody().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getMacroCall" and - parent = - any(Nodes::MacroExprCfgNode cfgNode, MacroExpr astNode | - astNode = cfgNode.getMacroExpr() and - child = getDesugared(astNode.getMacroCall()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getMacroCall().getAstNode() + parent = any(Nodes::MacroExprCfgNode cfgNode, MacroExpr astNode | + astNode = cfgNode.getMacroExpr() and + child = getDesugared(astNode.getMacroCall()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getMacroCall().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getMacroCall" and - parent = - any(Nodes::MacroPatCfgNode cfgNode, MacroPat astNode | - astNode = cfgNode.getMacroPat() and - child = getDesugared(astNode.getMacroCall()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getMacroCall().getAstNode() + parent = any(Nodes::MacroPatCfgNode cfgNode, MacroPat astNode | + astNode = cfgNode.getMacroPat() and + child = getDesugared(astNode.getMacroCall()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getMacroCall().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getScrutinee" and - parent = - any(Nodes::MatchExprCfgNode cfgNode, MatchExpr astNode | - astNode = cfgNode.getMatchExpr() and - child = getDesugared(astNode.getScrutinee()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getScrutinee().getAstNode() + parent = any(Nodes::MatchExprCfgNode cfgNode, MatchExpr astNode | + astNode = cfgNode.getMatchExpr() and + child = getDesugared(astNode.getScrutinee()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getScrutinee().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getReceiver" and - parent = - any(Nodes::MethodCallExprCfgNode cfgNode, MethodCallExpr astNode | - astNode = cfgNode.getMethodCallExpr() and - child = getDesugared(astNode.getReceiver()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getReceiver().getAstNode() + parent = any(Nodes::MethodCallExprCfgNode cfgNode, MethodCallExpr astNode | + astNode = cfgNode.getMethodCallExpr() and + child = getDesugared(astNode.getReceiver()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getReceiver().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::OrPatCfgNode cfgNode, OrPat astNode | - astNode = cfgNode.getOrPat() and - child = getDesugared(astNode.getPat(i)) and - hasCfgNode(child) and - not child = cfgNode.getPat(i).getAstNode() + parent = any(Nodes::OrPatCfgNode cfgNode, OrPat astNode | + astNode = cfgNode.getOrPat() and + child = getDesugared(astNode.getPat(i)) + and + hasCfgNode(child) and + not child = cfgNode.getPat(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::ParamCfgNode cfgNode, Param astNode | - astNode = cfgNode.getParam() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::ParamCfgNode cfgNode, Param astNode | + astNode = cfgNode.getParam() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::PrefixExprCfgNode cfgNode, PrefixExpr astNode | - astNode = cfgNode.getPrefixExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::PrefixExprCfgNode cfgNode, PrefixExpr astNode | + astNode = cfgNode.getPrefixExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getEnd" and - parent = - any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | - astNode = cfgNode.getRangeExpr() and - child = getDesugared(astNode.getEnd()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getEnd().getAstNode() + parent = any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | + astNode = cfgNode.getRangeExpr() and + child = getDesugared(astNode.getEnd()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getEnd().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getStart" and - parent = - any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | - astNode = cfgNode.getRangeExpr() and - child = getDesugared(astNode.getStart()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getStart().getAstNode() + parent = any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | + astNode = cfgNode.getRangeExpr() and + child = getDesugared(astNode.getStart()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getStart().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getEnd" and - parent = - any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | - astNode = cfgNode.getRangePat() and - child = getDesugared(astNode.getEnd()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getEnd().getAstNode() + parent = any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | + astNode = cfgNode.getRangePat() and + child = getDesugared(astNode.getEnd()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getEnd().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getStart" and - parent = - any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | - astNode = cfgNode.getRangePat() and - child = getDesugared(astNode.getStart()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getStart().getAstNode() + parent = any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | + astNode = cfgNode.getRangePat() and + child = getDesugared(astNode.getStart()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getStart().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::RefExprCfgNode cfgNode, RefExpr astNode | - astNode = cfgNode.getRefExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::RefExprCfgNode cfgNode, RefExpr astNode | + astNode = cfgNode.getRefExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::RefPatCfgNode cfgNode, RefPat astNode | - astNode = cfgNode.getRefPat() and - child = getDesugared(astNode.getPat()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = any(Nodes::RefPatCfgNode cfgNode, RefPat astNode | + astNode = cfgNode.getRefPat() and + child = getDesugared(astNode.getPat()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::ReturnExprCfgNode cfgNode, ReturnExpr astNode | - astNode = cfgNode.getReturnExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::ReturnExprCfgNode cfgNode, ReturnExpr astNode | + astNode = cfgNode.getReturnExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = - any(Nodes::SelfParamCfgNode cfgNode, SelfParam astNode | - astNode = cfgNode.getSelfParam() and - child = getDesugared(astNode.getName()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = any(Nodes::SelfParamCfgNode cfgNode, SelfParam astNode | + astNode = cfgNode.getSelfParam() and + child = getDesugared(astNode.getName()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = - any(Nodes::SlicePatCfgNode cfgNode, SlicePat astNode | - astNode = cfgNode.getSlicePat() and - child = getDesugared(astNode.getPat(i)) and - hasCfgNode(child) and - not child = cfgNode.getPat(i).getAstNode() + parent = any(Nodes::SlicePatCfgNode cfgNode, SlicePat astNode | + astNode = cfgNode.getSlicePat() and + child = getDesugared(astNode.getPat(i)) + and + hasCfgNode(child) and + not child = cfgNode.getPat(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::TryExprCfgNode cfgNode, TryExpr astNode | - astNode = cfgNode.getTryExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::TryExprCfgNode cfgNode, TryExpr astNode | + astNode = cfgNode.getTryExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = - any(Nodes::TupleExprCfgNode cfgNode, TupleExpr astNode | - astNode = cfgNode.getTupleExpr() and - child = getDesugared(astNode.getField(i)) and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = any(Nodes::TupleExprCfgNode cfgNode, TupleExpr astNode | + astNode = cfgNode.getTupleExpr() and + child = getDesugared(astNode.getField(i)) + and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = - any(Nodes::TuplePatCfgNode cfgNode, TuplePat astNode | - astNode = cfgNode.getTuplePat() and - child = getDesugared(astNode.getField(i)) and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = any(Nodes::TuplePatCfgNode cfgNode, TuplePat astNode | + astNode = cfgNode.getTuplePat() and + child = getDesugared(astNode.getField(i)) + and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = - any(Nodes::TupleStructPatCfgNode cfgNode, TupleStructPat astNode | - astNode = cfgNode.getTupleStructPat() and - child = getDesugared(astNode.getField(i)) and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = any(Nodes::TupleStructPatCfgNode cfgNode, TupleStructPat astNode | + astNode = cfgNode.getTupleStructPat() and + child = getDesugared(astNode.getField(i)) + and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getCondition" and - parent = - any(Nodes::WhileExprCfgNode cfgNode, WhileExpr astNode | - astNode = cfgNode.getWhileExpr() and - child = getDesugared(astNode.getCondition()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getCondition().getAstNode() + parent = any(Nodes::WhileExprCfgNode cfgNode, WhileExpr astNode | + astNode = cfgNode.getWhileExpr() and + child = getDesugared(astNode.getCondition()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getCondition().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::YeetExprCfgNode cfgNode, YeetExpr astNode | - astNode = cfgNode.getYeetExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::YeetExprCfgNode cfgNode, YeetExpr astNode | + astNode = cfgNode.getYeetExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = - any(Nodes::YieldExprCfgNode cfgNode, YieldExpr astNode | - astNode = cfgNode.getYieldExpr() and - child = getDesugared(astNode.getExpr()) and - i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = any(Nodes::YieldExprCfgNode cfgNode, YieldExpr astNode | + astNode = cfgNode.getYieldExpr() and + child = getDesugared(astNode.getExpr()) + and i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) } } -} +} \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/elements.qll b/rust/ql/lib/codeql/rust/elements.qll index 2d1868dd915d..10107841d52d 100644 --- a/rust/ql/lib/codeql/rust/elements.qll +++ b/rust/ql/lib/codeql/rust/elements.qll @@ -44,6 +44,8 @@ import codeql.rust.elements.CfgAtom import codeql.rust.elements.CfgAttrMeta import codeql.rust.elements.CfgComposite import codeql.rust.elements.CfgMeta +import codeql.rust.elements.CfgPredExpr +import codeql.rust.elements.CfgPredPat import codeql.rust.elements.CfgPredicate import codeql.rust.elements.ClosureExpr import codeql.rust.elements.Comment diff --git a/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll b/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll new file mode 100644 index 000000000000..8277d4b631a1 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +/** + * This module provides the public class `CfgPredExpr`. + */ + +private import internal.CfgPredExprImpl +import codeql.rust.elements.CfgPredicate +import codeql.rust.elements.Expr + +final class CfgPredExpr = Impl::CfgPredExpr; \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll b/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll new file mode 100644 index 000000000000..b540149aedbe --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll @@ -0,0 +1,10 @@ +// generated by codegen, do not edit +/** + * This module provides the public class `CfgPredPat`. + */ + +private import internal.CfgPredPatImpl +import codeql.rust.elements.CfgPredicate +import codeql.rust.elements.Pat + +final class CfgPredPat = Impl::CfgPredPat; \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll new file mode 100644 index 000000000000..7b613ff28f66 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll @@ -0,0 +1,16 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `CfgPredExpr` synthesized instances. + * INTERNAL: Do not use. + */ +private import codeql.rust.elements.internal.generated.Raw + +/** + * The characteristic predicate of `CfgPredExpr` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructCfgPredExpr(Raw::CfgPredExpr id) { + + any() +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll new file mode 100644 index 000000000000..0942dac25de1 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll @@ -0,0 +1,16 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `CfgPredExpr`. + * + * INTERNAL: Do not use. + */ +private import codeql.rust.elements.internal.generated.CfgPredExpr + +/** + * INTERNAL: This module contains the customizable definition of `CfgPredExpr` and should not + * be referenced directly. + */ +module Impl { + class CfgPredExpr extends Generated::CfgPredExpr { + } +} \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll new file mode 100644 index 000000000000..7035ea40a4f6 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll @@ -0,0 +1,16 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module defines the hook used internally to tweak the characteristic predicate of + * `CfgPredPat` synthesized instances. + * INTERNAL: Do not use. + */ +private import codeql.rust.elements.internal.generated.Raw + +/** + * The characteristic predicate of `CfgPredPat` synthesized instances. + * INTERNAL: Do not use. + */ +predicate constructCfgPredPat(Raw::CfgPredPat id) { + + any() +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll new file mode 100644 index 000000000000..5e1a8de6ef22 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll @@ -0,0 +1,16 @@ +// generated by codegen, remove this comment if you wish to edit this file +/** + * This module provides a hand-modifiable wrapper around the generated class `CfgPredPat`. + * + * INTERNAL: Do not use. + */ +private import codeql.rust.elements.internal.generated.CfgPredPat + +/** + * INTERNAL: This module contains the customizable definition of `CfgPredPat` and should not + * be referenced directly. + */ +module Impl { + class CfgPredPat extends Generated::CfgPredPat { + } +} \ No newline at end of file diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll new file mode 100644 index 000000000000..4c45bce54835 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll @@ -0,0 +1,40 @@ +// generated by codegen, do not edit +/** + * This module provides the generated definition of `CfgPredExpr`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.elements.internal.generated.Synth +private import codeql.rust.elements.internal.generated.Raw +import codeql.rust.elements.CfgPredicate +import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl +/** + * INTERNAL: This module contains the fully generated definition of `CfgPredExpr` and should not + * be referenced directly. + */ +module Generated { + /** + * INTERNAL: Do not reference the `Generated::CfgPredExpr` class directly. + * Use the subclass `CfgPredExpr`, where the following predicates are available. + */ + class CfgPredExpr extends Synth::TCfgPredExpr, ExprImpl::Expr { + override string getAPrimaryQlClass() { result = "CfgPredExpr" } + + override string toStringImpl() { result = this.getAPrimaryQlClass() } + + /** + * Gets the cfg predicate of this cfg pred expression, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + result = Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredExprToRaw(this).(Raw::CfgPredExpr).getCfgPredicate()) + } + + /** + * Holds if `getCfgPredicate()` exists. + */ + final predicate hasCfgPredicate() { + exists(this.getCfgPredicate()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll new file mode 100644 index 000000000000..b295474b2e46 --- /dev/null +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll @@ -0,0 +1,40 @@ +// generated by codegen, do not edit +/** + * This module provides the generated definition of `CfgPredPat`. + * INTERNAL: Do not import directly. + */ + +private import codeql.rust.elements.internal.generated.Synth +private import codeql.rust.elements.internal.generated.Raw +import codeql.rust.elements.CfgPredicate +import codeql.rust.elements.internal.PatImpl::Impl as PatImpl +/** + * INTERNAL: This module contains the fully generated definition of `CfgPredPat` and should not + * be referenced directly. + */ +module Generated { + /** + * INTERNAL: Do not reference the `Generated::CfgPredPat` class directly. + * Use the subclass `CfgPredPat`, where the following predicates are available. + */ + class CfgPredPat extends Synth::TCfgPredPat, PatImpl::Pat { + override string getAPrimaryQlClass() { result = "CfgPredPat" } + + override string toStringImpl() { result = this.getAPrimaryQlClass() } + + /** + * Gets the cfg predicate of this cfg pred pattern, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + result = Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredPatToRaw(this).(Raw::CfgPredPat).getCfgPredicate()) + } + + /** + * Holds if `getCfgPredicate()` exists. + */ + final predicate hasCfgPredicate() { + exists(this.getCfgPredicate()) + } + } +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll index 5e4964413257..90224b4f7cba 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll @@ -9,3588 +9,3382 @@ import codeql.rust.elements.internal.ExtractorStep import codeql.rust.elements.internal.NamedCrate private module Impl { - private Element getImmediateChildOfExtractorStep( - ExtractorStep e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfNamedCrate(NamedCrate e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfCrate(Crate e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfFormat(Format e, int index, string partialPredicateCall) { - exists(int n, int nArgumentRef, int nWidthArgument, int nPrecisionArgument | - n = 0 and - nArgumentRef = n + 1 and - nWidthArgument = nArgumentRef + 1 and - nPrecisionArgument = nWidthArgument + 1 and - ( - none() - or - index = n and result = e.getArgumentRef() and partialPredicateCall = "ArgumentRef()" - or - index = nArgumentRef and - result = e.getWidthArgument() and - partialPredicateCall = "WidthArgument()" - or - index = nWidthArgument and - result = e.getPrecisionArgument() and - partialPredicateCall = "PrecisionArgument()" - ) - ) - } - - private Element getImmediateChildOfFormatArgument( - FormatArgument e, int index, string partialPredicateCall - ) { - exists(int n, int nVariable | - n = 0 and - nVariable = n + 1 and - ( - none() - or - index = n and result = e.getVariable() and partialPredicateCall = "Variable()" - ) - ) - } - - private Element getImmediateChildOfMissing(Missing e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfUnimplemented( - Unimplemented e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfAbi(Abi e, int index, string partialPredicateCall) { none() } - - private Element getImmediateChildOfArgList(ArgList e, int index, string partialPredicateCall) { - exists(int n, int nArg | - n = 0 and - nArg = n + e.getNumberOfArgs() and - ( - none() - or - result = e.getArg(index - n) and - partialPredicateCall = "Arg(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfAsmOperandExpr( - AsmOperandExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nInExpr, int nOutExpr | - n = 0 and - nInExpr = n + 1 and - nOutExpr = nInExpr + 1 and - ( - none() - or - index = n and result = e.getInExpr() and partialPredicateCall = "InExpr()" - or - index = nInExpr and result = e.getOutExpr() and partialPredicateCall = "OutExpr()" - ) - ) - } - - private Element getImmediateChildOfAsmOption(AsmOption e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index, string partialPredicateCall) { - exists(int n, int nIdentifier | - n = 0 and - nIdentifier = n + 1 and - ( - none() - or - index = n and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - ) - ) - } - - private Element getImmediateChildOfAssocItemList( - AssocItemList e, int index, string partialPredicateCall - ) { - exists(int n, int nAssocItem, int nAttr | - n = 0 and - nAssocItem = n + e.getNumberOfAssocItems() and - nAttr = nAssocItem + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAssocItem(index - n) and - partialPredicateCall = "AssocItem(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nAssocItem) and - partialPredicateCall = "Attr(" + (index - nAssocItem).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfExternItemList( - ExternItemList e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nExternItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExternItem = nAttr + e.getNumberOfExternItems() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getExternItem(index - nAttr) and - partialPredicateCall = "ExternItem(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfForBinder(ForBinder e, int index, string partialPredicateCall) { - exists(int n, int nGenericParamList | - n = 0 and - nGenericParamList = n + 1 and - ( - none() - or - index = n and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" - ) - ) - } - - private Element getImmediateChildOfFormatArgsArg( - FormatArgsArg e, int index, string partialPredicateCall - ) { - exists(int n, int nExpr, int nName | - n = 0 and - nExpr = n + 1 and - nName = nExpr + 1 and - ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getName() and partialPredicateCall = "Name()" - ) - ) - } - - private Element getImmediateChildOfGenericArgList( - GenericArgList e, int index, string partialPredicateCall - ) { - exists(int n, int nGenericArg | - n = 0 and - nGenericArg = n + e.getNumberOfGenericArgs() and - ( - none() - or - result = e.getGenericArg(index - n) and - partialPredicateCall = "GenericArg(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfGenericParamList( - GenericParamList e, int index, string partialPredicateCall - ) { - exists(int n, int nGenericParam | - n = 0 and - nGenericParam = n + e.getNumberOfGenericParams() and - ( - none() - or - result = e.getGenericParam(index - n) and - partialPredicateCall = "GenericParam(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfImplRestriction( - ImplRestriction e, int index, string partialPredicateCall - ) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - ) - ) - } - - private Element getImmediateChildOfItemList(ItemList e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nItem = nAttr + e.getNumberOfItems() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getItem(index - nAttr) and - partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfLabel(Label e, int index, string partialPredicateCall) { - exists(int n, int nLifetime | - n = 0 and - nLifetime = n + 1 and - ( - none() - or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - ) - ) - } - - private Element getImmediateChildOfLetElse(LetElse e, int index, string partialPredicateCall) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - ) - ) - } - - private Element getImmediateChildOfMacroItems(MacroItems e, int index, string partialPredicateCall) { - exists(int n, int nItem | - n = 0 and - nItem = n + e.getNumberOfItems() and - ( - none() - or - result = e.getItem(index - n) and - partialPredicateCall = "Item(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfMatchArm(MatchArm e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr, int nGuard, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nGuard = nExpr + 1 and - nPat = nGuard + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getGuard() and partialPredicateCall = "Guard()" - or - index = nGuard and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfMatchArmList( - MatchArmList e, int index, string partialPredicateCall - ) { - exists(int n, int nArm, int nAttr | - n = 0 and - nArm = n + e.getNumberOfArms() and - nAttr = nArm + e.getNumberOfAttrs() and - ( - none() - or - result = e.getArm(index - n) and - partialPredicateCall = "Arm(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nArm) and - partialPredicateCall = "Attr(" + (index - nArm).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfMatchGuard(MatchGuard e, int index, string partialPredicateCall) { - exists(int n, int nCondition | - n = 0 and - nCondition = n + 1 and - ( - none() - or - index = n and result = e.getCondition() and partialPredicateCall = "Condition()" - ) - ) - } - - private Element getImmediateChildOfMutRestriction( - MutRestriction e, int index, string partialPredicateCall - ) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - ) - ) - } - - private Element getImmediateChildOfName(Name e, int index, string partialPredicateCall) { none() } - - private Element getImmediateChildOfParamList(ParamList e, int index, string partialPredicateCall) { - exists(int n, int nParam, int nSelfParam | - n = 0 and - nParam = n + e.getNumberOfParams() and - nSelfParam = nParam + 1 and - ( - none() - or - result = e.getParam(index - n) and - partialPredicateCall = "Param(" + (index - n).toString() + ")" - or - index = nParam and result = e.getSelfParam() and partialPredicateCall = "SelfParam()" - ) - ) - } - - private Element getImmediateChildOfParenthesizedArgList( - ParenthesizedArgList e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeArg | - n = 0 and - nTypeArg = n + e.getNumberOfTypeArgs() and - ( - none() - or - result = e.getTypeArg(index - n) and - partialPredicateCall = "TypeArg(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfPath(Path e, int index, string partialPredicateCall) { - exists(int n, int nQualifier, int nSegment | - n = 0 and - nQualifier = n + 1 and - nSegment = nQualifier + 1 and - ( - none() - or - index = n and result = e.getQualifier() and partialPredicateCall = "Qualifier()" - or - index = nQualifier and result = e.getSegment() and partialPredicateCall = "Segment()" - ) - ) - } - - private Element getImmediateChildOfPathSegment( - PathSegment e, int index, string partialPredicateCall - ) { - exists( - int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, - int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr - | - n = 0 and - nGenericArgList = n + 1 and - nIdentifier = nGenericArgList + 1 and - nParenthesizedArgList = nIdentifier + 1 and - nRetType = nParenthesizedArgList + 1 and - nReturnTypeSyntax = nRetType + 1 and - nTypeRepr = nReturnTypeSyntax + 1 and - nTraitTypeRepr = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and - result = e.getIdentifier() and - partialPredicateCall = "Identifier()" - or - index = nIdentifier and - result = e.getParenthesizedArgList() and - partialPredicateCall = "ParenthesizedArgList()" - or - index = nParenthesizedArgList and - result = e.getRetType() and - partialPredicateCall = "RetType()" - or - index = nRetType and - result = e.getReturnTypeSyntax() and - partialPredicateCall = "ReturnTypeSyntax()" - or - index = nReturnTypeSyntax and - result = e.getTypeRepr() and - partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and - result = e.getTraitTypeRepr() and - partialPredicateCall = "TraitTypeRepr()" - ) - ) - } - - private Element getImmediateChildOfRename(Rename e, int index, string partialPredicateCall) { - exists(int n, int nName | - n = 0 and - nName = n + 1 and - ( - none() - or - index = n and result = e.getName() and partialPredicateCall = "Name()" - ) - ) - } - - private Element getImmediateChildOfRetTypeRepr( - RetTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfReturnTypeSyntax( - ReturnTypeSyntax e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfSourceFile(SourceFile e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nItem = nAttr + e.getNumberOfItems() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getItem(index - nAttr) and - partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfStmtList(StmtList e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nStatement, int nTailExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nStatement = nAttr + e.getNumberOfStatements() and - nTailExpr = nStatement + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getStatement(index - nAttr) and - partialPredicateCall = "Statement(" + (index - nAttr).toString() + ")" - or - index = nStatement and result = e.getTailExpr() and partialPredicateCall = "TailExpr()" - ) - ) - } - - private Element getImmediateChildOfStructExprField( - StructExprField e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nExpr, int nIdentifier | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nIdentifier = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - ) - ) - } - - private Element getImmediateChildOfStructExprFieldList( - StructExprFieldList e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nField, int nSpread | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - nSpread = nField + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getField(index - nAttr) and - partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - or - index = nField and result = e.getSpread() and partialPredicateCall = "Spread()" - ) - ) - } - - private Element getImmediateChildOfStructField( - StructField e, int index, string partialPredicateCall - ) { - exists( - int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, - int nVisibility - | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultVal = nAttr + 1 and - nMutRestriction = nDefaultVal + 1 and - nName = nMutRestriction + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" - or - index = nDefaultVal and - result = e.getMutRestriction() and - partialPredicateCall = "MutRestriction()" - or - index = nMutRestriction and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfStructPatField( - StructPatField e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nIdentifier, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nIdentifier = nAttr + 1 and - nPat = nIdentifier + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfStructPatFieldList( - StructPatFieldList e, int index, string partialPredicateCall - ) { - exists(int n, int nField, int nRestPat | - n = 0 and - nField = n + e.getNumberOfFields() and - nRestPat = nField + 1 and - ( - none() - or - result = e.getField(index - n) and - partialPredicateCall = "Field(" + (index - n).toString() + ")" - or - index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()" - ) - ) - } - - private Element getImmediateChildOfTokenTree(TokenTree e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfTryBlockModifier( - TryBlockModifier e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfTupleField(TupleField e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nMutRestriction = nAttr + 1 and - nTypeRepr = nMutRestriction + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and - result = e.getMutRestriction() and - partialPredicateCall = "MutRestriction()" - or - index = nMutRestriction and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfTypeBound(TypeBound e, int index, string partialPredicateCall) { - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | - n = 0 and - nForBinder = n + 1 and - nLifetime = nForBinder + 1 and - nTypeRepr = nLifetime + 1 and - nUseBoundGenericArgs = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and - result = e.getUseBoundGenericArgs() and - partialPredicateCall = "UseBoundGenericArgs()" - ) - ) - } - - private Element getImmediateChildOfTypeBoundList( - TypeBoundList e, int index, string partialPredicateCall - ) { - exists(int n, int nBound | - n = 0 and - nBound = n + e.getNumberOfBounds() and - ( - none() - or - result = e.getBound(index - n) and - partialPredicateCall = "Bound(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfUseBoundGenericArgs( - UseBoundGenericArgs e, int index, string partialPredicateCall - ) { - exists(int n, int nUseBoundGenericArg | - n = 0 and - nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() and - ( - none() - or - result = e.getUseBoundGenericArg(index - n) and - partialPredicateCall = "UseBoundGenericArg(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfUseTree(UseTree e, int index, string partialPredicateCall) { - exists(int n, int nPath, int nRename, int nUseTreeList | - n = 0 and - nPath = n + 1 and - nRename = nPath + 1 and - nUseTreeList = nRename + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getRename() and partialPredicateCall = "Rename()" - or - index = nRename and result = e.getUseTreeList() and partialPredicateCall = "UseTreeList()" - ) - ) - } - - private Element getImmediateChildOfUseTreeList( - UseTreeList e, int index, string partialPredicateCall - ) { - exists(int n, int nUseTree | - n = 0 and - nUseTree = n + e.getNumberOfUseTrees() and - ( - none() - or - result = e.getUseTree(index - n) and - partialPredicateCall = "UseTree(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfVariantList( - VariantList e, int index, string partialPredicateCall - ) { - exists(int n, int nVariant | - n = 0 and - nVariant = n + e.getNumberOfVariants() and - ( - none() - or - result = e.getVariant(index - n) and - partialPredicateCall = "Variant(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfVisibility(Visibility e, int index, string partialPredicateCall) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - ) - ) - } - - private Element getImmediateChildOfVisibilityInner( - VisibilityInner e, int index, string partialPredicateCall - ) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfWhereClause( - WhereClause e, int index, string partialPredicateCall - ) { - exists(int n, int nPredicate | - n = 0 and - nPredicate = n + e.getNumberOfPredicates() and - ( - none() - or - result = e.getPredicate(index - n) and - partialPredicateCall = "Predicate(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfWherePred(WherePred e, int index, string partialPredicateCall) { - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | - n = 0 and - nForBinder = n + 1 and - nLifetime = nForBinder + 1 and - nTypeRepr = nLifetime + 1 and - nTypeBoundList = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and - result = e.getTypeBoundList() and - partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfArrayExprInternal( - ArrayExprInternal e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + e.getNumberOfExprs() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getExpr(index - nAttr) and - partialPredicateCall = "Expr(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfArrayTypeRepr( - ArrayTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nConstArg, int nElementTypeRepr | - n = 0 and - nConstArg = n + 1 and - nElementTypeRepr = nConstArg + 1 and - ( - none() - or - index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" - or - index = nConstArg and - result = e.getElementTypeRepr() and - partialPredicateCall = "ElementTypeRepr()" - ) - ) - } - - private Element getImmediateChildOfAsmClobberAbi( - AsmClobberAbi e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfAsmConst(AsmConst e, int index, string partialPredicateCall) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfAsmLabel(AsmLabel e, int index, string partialPredicateCall) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - ) - ) - } - - private Element getImmediateChildOfAsmOperandNamed( - AsmOperandNamed e, int index, string partialPredicateCall - ) { - exists(int n, int nAsmOperand, int nAttr, int nName | - n = 0 and - nAsmOperand = n + 1 and - nAttr = nAsmOperand + e.getNumberOfAttrs() and - nName = nAttr + 1 and - ( - none() - or - index = n and result = e.getAsmOperand() and partialPredicateCall = "AsmOperand()" - or - result = e.getAttr(index - nAsmOperand) and - partialPredicateCall = "Attr(" + (index - nAsmOperand).toString() + ")" - or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" - ) - ) - } - - private Element getImmediateChildOfAsmOptionsList( - AsmOptionsList e, int index, string partialPredicateCall - ) { - exists(int n, int nAsmOption, int nAttr | - n = 0 and - nAsmOption = n + e.getNumberOfAsmOptions() and - nAttr = nAsmOption + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAsmOption(index - n) and - partialPredicateCall = "AsmOption(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nAsmOption) and - partialPredicateCall = "Attr(" + (index - nAsmOption).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfAsmRegOperand( - AsmRegOperand e, int index, string partialPredicateCall - ) { - exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | - n = 0 and - nAsmDirSpec = n + 1 and - nAsmOperandExpr = nAsmDirSpec + 1 and - nAsmRegSpec = nAsmOperandExpr + 1 and - ( - none() - or - index = n and result = e.getAsmDirSpec() and partialPredicateCall = "AsmDirSpec()" - or - index = nAsmDirSpec and - result = e.getAsmOperandExpr() and - partialPredicateCall = "AsmOperandExpr()" - or - index = nAsmOperandExpr and - result = e.getAsmRegSpec() and - partialPredicateCall = "AsmRegSpec()" - ) - ) - } - - private Element getImmediateChildOfAsmSym(AsmSym e, int index, string partialPredicateCall) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfAssocTypeArg( - AssocTypeArg e, int index, string partialPredicateCall - ) { - exists( - int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, - int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList - | - n = 0 and - nConstArg = n + 1 and - nGenericArgList = nConstArg + 1 and - nIdentifier = nGenericArgList + 1 and - nParamList = nIdentifier + 1 and - nRetType = nParamList + 1 and - nReturnTypeSyntax = nRetType + 1 and - nTypeRepr = nReturnTypeSyntax + 1 and - nTypeBoundList = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" - or - index = nConstArg and - result = e.getGenericArgList() and - partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and - result = e.getIdentifier() and - partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" - or - index = nRetType and - result = e.getReturnTypeSyntax() and - partialPredicateCall = "ReturnTypeSyntax()" - or - index = nReturnTypeSyntax and - result = e.getTypeRepr() and - partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and - result = e.getTypeBoundList() and - partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfAttr(Attr e, int index, string partialPredicateCall) { - exists(int n, int nMeta | - n = 0 and - nMeta = n + 1 and - ( - none() - or - index = n and result = e.getMeta() and partialPredicateCall = "Meta()" - ) - ) - } - - private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nLhs, int nRhs | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLhs = nAttr + 1 and - nRhs = nLhs + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLhs() and partialPredicateCall = "Lhs()" - or - index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" - ) - ) - } - - private Element getImmediateChildOfBoxPat(BoxPat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfBreakExpr(BreakExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr, int nLifetime | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nLifetime = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - ) - ) - } - - private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nFunction = nAttr + 1 and - ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and - partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" - ) - ) - } - - private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nTypeRepr = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfCfgAtom(CfgAtom e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfCfgAttrMeta( - CfgAttrMeta e, int index, string partialPredicateCall - ) { - exists(int n, int nCfgPredicate, int nMeta | - n = 0 and - nCfgPredicate = n + 1 and - nMeta = nCfgPredicate + e.getNumberOfMetas() and - ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - or - result = e.getMeta(index - nCfgPredicate) and - partialPredicateCall = "Meta(" + (index - nCfgPredicate).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfCfgComposite( - CfgComposite e, int index, string partialPredicateCall - ) { - exists(int n, int nCfgPredicate | - n = 0 and - nCfgPredicate = n + e.getNumberOfCfgPredicates() and - ( - none() - or - result = e.getCfgPredicate(index - n) and - partialPredicateCall = "CfgPredicate(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfCfgMeta(CfgMeta e, int index, string partialPredicateCall) { - exists(int n, int nCfgPredicate | - n = 0 and - nCfgPredicate = n + 1 and - ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - ) - ) - } - - private Element getImmediateChildOfClosureExpr( - ClosureExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | - n = 0 and - nParamList = n + 1 and - nAttr = nParamList + e.getNumberOfAttrs() and - nClosureBody = nAttr + 1 and - nForBinder = nClosureBody + 1 and - nRetType = nForBinder + 1 and - ( - none() - or - index = n and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - result = e.getAttr(index - nParamList) and - partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" - or - index = nAttr and result = e.getClosureBody() and partialPredicateCall = "ClosureBody()" - or - index = nClosureBody and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getRetType() and partialPredicateCall = "RetType()" - ) - ) - } - - private Element getImmediateChildOfComment(Comment e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfConstArg(ConstArg e, int index, string partialPredicateCall) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfConstBlockPat( - ConstBlockPat e, int index, string partialPredicateCall - ) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - ) - ) - } - - private Element getImmediateChildOfConstParam(ConstParam e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultVal = nAttr + 1 and - nName = nDefaultVal + 1 and - nTypeRepr = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" - or - index = nDefaultVal and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfContinueExpr( - ContinueExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nLifetime | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLifetime = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - ) - ) - } - - private Element getImmediateChildOfDerefPat(DerefPat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfDocComment(DocComment e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfDynTraitTypeRepr( - DynTraitTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeBoundList | - n = 0 and - nTypeBoundList = n + 1 and - ( - none() - or - index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfExprStmt(ExprStmt e, int index, string partialPredicateCall) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfFieldExpr(FieldExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nContainer, int nIdentifier | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nContainer = nAttr + 1 and - nIdentifier = nContainer + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getContainer() and partialPredicateCall = "Container()" - or - index = nContainer and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - ) - ) - } - - private Element getImmediateChildOfFnPtrTypeRepr( - FnPtrTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nAbi, int nParamList, int nRetType | - n = 0 and - nAbi = n + 1 and - nParamList = nAbi + 1 and - nRetType = nParamList + 1 and - ( - none() - or - index = n and result = e.getAbi() and partialPredicateCall = "Abi()" - or - index = nAbi and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" - ) - ) - } - - private Element getImmediateChildOfForTypeRepr( - ForTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nForBinder, int nTypeRepr | - n = 0 and - nForBinder = n + 1 and - nTypeRepr = nForBinder + 1 and - ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfFormatArgsExpr( - FormatArgsExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | - n = 0 and - nArg = n + e.getNumberOfArgs() and - nAttr = nArg + e.getNumberOfAttrs() and - nTemplate = nAttr + 1 and - nFormat = nTemplate + e.getNumberOfFormats() and - ( - none() - or - result = e.getArg(index - n) and - partialPredicateCall = "Arg(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nArg) and - partialPredicateCall = "Attr(" + (index - nArg).toString() + ")" - or - index = nAttr and result = e.getTemplate() and partialPredicateCall = "Template()" - or - result = e.getFormat(index - nTemplate) and - partialPredicateCall = "Format(" + (index - nTemplate).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nName, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nName = nAttr + 1 and - nPat = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfIfExpr(IfExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nCondition, int nElse, int nThen | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nCondition = nAttr + 1 and - nElse = nCondition + 1 and - nThen = nElse + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" - or - index = nCondition and result = e.getElse() and partialPredicateCall = "Else()" - or - index = nElse and result = e.getThen() and partialPredicateCall = "Then()" - ) - ) - } - - private Element getImmediateChildOfImplTraitTypeRepr( - ImplTraitTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeBoundList | - n = 0 and - nTypeBoundList = n + 1 and - ( - none() - or - index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfIncludeBytesExpr( - IncludeBytesExpr e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfIndexExpr(IndexExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nBase, int nIndex | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nBase = nAttr + 1 and - nIndex = nBase + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getBase() and partialPredicateCall = "Base()" - or - index = nBase and result = e.getIndex() and partialPredicateCall = "Index()" - ) - ) - } - - private Element getImmediateChildOfInferTypeRepr( - InferTypeRepr e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfKeyValueMeta( - KeyValueMeta e, int index, string partialPredicateCall - ) { - exists(int n, int nExpr, int nPath | - n = 0 and - nExpr = n + 1 and - nPath = nExpr + 1 and - ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfLetExpr(LetExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nScrutinee, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nScrutinee = nAttr + 1 and - nPat = nScrutinee + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" - or - index = nScrutinee and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfLetStmt(LetStmt e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nInitializer = nAttr + 1 and - nLetElse = nInitializer + 1 and - nPat = nLetElse + 1 and - nTypeRepr = nPat + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getInitializer() and partialPredicateCall = "Initializer()" - or - index = nInitializer and result = e.getLetElse() and partialPredicateCall = "LetElse()" - or - index = nLetElse and result = e.getPat() and partialPredicateCall = "Pat()" - or - index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfLifetime(Lifetime e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfLifetimeArg( - LifetimeArg e, int index, string partialPredicateCall - ) { - exists(int n, int nLifetime | - n = 0 and - nLifetime = n + 1 and - ( - none() - or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - ) - ) - } - - private Element getImmediateChildOfLifetimeParam( - LifetimeParam e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nLifetime, int nTypeBoundList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLifetime = nAttr + 1 and - nTypeBoundList = nLifetime + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and - result = e.getTypeBoundList() and - partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfLiteralExpr( - LiteralExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfLiteralPat(LiteralPat e, int index, string partialPredicateCall) { - exists(int n, int nLiteral | - n = 0 and - nLiteral = n + 1 and - ( - none() - or - index = n and result = e.getLiteral() and partialPredicateCall = "Literal()" - ) - ) - } - - private Element getImmediateChildOfMacroExpr(MacroExpr e, int index, string partialPredicateCall) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - ) - ) - } - - private Element getImmediateChildOfMacroPat(MacroPat e, int index, string partialPredicateCall) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - ) - ) - } - - private Element getImmediateChildOfMacroTypeRepr( - MacroTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - ) - ) - } - - private Element getImmediateChildOfMatchExpr(MatchExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nScrutinee, int nMatchArmList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nScrutinee = nAttr + 1 and - nMatchArmList = nScrutinee + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" - or - index = nScrutinee and - result = e.getMatchArmList() and - partialPredicateCall = "MatchArmList()" - ) - ) - } - - private Element getImmediateChildOfMethodCallExpr( - MethodCallExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nGenericArgList = nAttr + 1 and - nIdentifier = nGenericArgList + 1 and - nReceiver = nIdentifier + 1 and - ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and - partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and - result = e.getGenericArgList() and - partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and - result = e.getIdentifier() and - partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" - ) - ) - } - - private Element getImmediateChildOfNameRef(NameRef e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfNeverTypeRepr( - NeverTypeRepr e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfNotNull(NotNull e, int index, string partialPredicateCall) { - none() - } - - private Element getImmediateChildOfOffsetOfExpr( - OffsetOfExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr, int nField, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - nTypeRepr = nField + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getField(index - nAttr) and - partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - or - index = nField and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfOrPat(OrPat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + e.getNumberOfPats() and - ( - none() - or - result = e.getPat(index - n) and - partialPredicateCall = "Pat(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfParam(Param e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nTypeRepr, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nTypeRepr = nAttr + 1 and - nPat = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfParenExpr(ParenExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfParenPat(ParenPat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfParenTypeRepr( - ParenTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfPathMeta(PathMeta e, int index, string partialPredicateCall) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfPathPat(PathPat e, int index, string partialPredicateCall) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfPathTypeRepr( - PathTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - ) - ) - } - - private Element getImmediateChildOfPatternTypeRepr( - PatternTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nPat, int nTypeRepr | - n = 0 and - nPat = n + 1 and - nTypeRepr = nPat + 1 and - ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - or - index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfPtrTypeRepr( - PtrTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfRangeExpr(RangeExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nEnd, int nStart | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nEnd = nAttr + 1 and - nStart = nEnd + 1 and - ( - none() - or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getEnd() and partialPredicateCall = "End()" - or - index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" - ) - ) - } - - private Element getImmediateChildOfRangePat(RangePat e, int index, string partialPredicateCall) { - exists(int n, int nEnd, int nStart | - n = 0 and - nEnd = n + 1 and - nStart = nEnd + 1 and - ( - none() - or - index = n and result = e.getEnd() and partialPredicateCall = "End()" - or - index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" - ) - ) - } - - private Element getImmediateChildOfRefExpr(RefExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() + private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfNamedCrate(NamedCrate e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfCrate(Crate e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfFormat(Format e, int index, string partialPredicateCall) { + + exists(int n, int nArgumentRef, int nWidthArgument, int nPrecisionArgument | + n = 0 + and + nArgumentRef = n + 1 + and + nWidthArgument = nArgumentRef + 1 + and + nPrecisionArgument = nWidthArgument + 1 + and ( + none() + or + index = n and result = e.getArgumentRef() and partialPredicateCall = "ArgumentRef()" + or + index = nArgumentRef and result = e.getWidthArgument() and partialPredicateCall = "WidthArgument()" + or + index = nWidthArgument and result = e.getPrecisionArgument() and partialPredicateCall = "PrecisionArgument()" + )) + } + private Element getImmediateChildOfFormatArgument(FormatArgument e, int index, string partialPredicateCall) { + + exists(int n, int nVariable | + n = 0 + and + nVariable = n + 1 + and ( + none() + or + index = n and result = e.getVariable() and partialPredicateCall = "Variable()" + )) + } + private Element getImmediateChildOfMissing(Missing e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfUnimplemented(Unimplemented e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfAbi(Abi e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfArgList(ArgList e, int index, string partialPredicateCall) { + + exists(int n, int nArg | + n = 0 + and + nArg = n + e.getNumberOfArgs() + and ( + none() + or + result = e.getArg(index - n) and partialPredicateCall = "Arg(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfAsmOperandExpr(AsmOperandExpr e, int index, string partialPredicateCall) { + + exists(int n, int nInExpr, int nOutExpr | + n = 0 + and + nInExpr = n + 1 + and + nOutExpr = nInExpr + 1 + and ( + none() + or + index = n and result = e.getInExpr() and partialPredicateCall = "InExpr()" + or + index = nInExpr and result = e.getOutExpr() and partialPredicateCall = "OutExpr()" + )) + } + private Element getImmediateChildOfAsmOption(AsmOption e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index, string partialPredicateCall) { + + exists(int n, int nIdentifier | + n = 0 + and + nIdentifier = n + 1 + and ( + none() + or + index = n and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + )) + } + private Element getImmediateChildOfAssocItemList(AssocItemList e, int index, string partialPredicateCall) { + + exists(int n, int nAssocItem, int nAttr | + n = 0 + and + nAssocItem = n + e.getNumberOfAssocItems() + and + nAttr = nAssocItem + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAssocItem(index - n) and partialPredicateCall = "AssocItem(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nAssocItem) and partialPredicateCall = "Attr(" + (index - nAssocItem).toString() + ")" + )) + } + private Element getImmediateChildOfExternItemList(ExternItemList e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExternItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExternItem = nAttr + e.getNumberOfExternItems() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getExternItem(index - nAttr) and partialPredicateCall = "ExternItem(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfForBinder(ForBinder e, int index, string partialPredicateCall) { + + exists(int n, int nGenericParamList | + n = 0 + and + nGenericParamList = n + 1 + and ( + none() + or + index = n and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + )) + } + private Element getImmediateChildOfFormatArgsArg(FormatArgsArg e, int index, string partialPredicateCall) { + + exists(int n, int nExpr, int nName | + n = 0 + and + nExpr = n + 1 + and + nName = nExpr + 1 + and ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getName() and partialPredicateCall = "Name()" + )) + } + private Element getImmediateChildOfGenericArgList(GenericArgList e, int index, string partialPredicateCall) { + + exists(int n, int nGenericArg | + n = 0 + and + nGenericArg = n + e.getNumberOfGenericArgs() + and ( + none() + or + result = e.getGenericArg(index - n) and partialPredicateCall = "GenericArg(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfGenericParamList(GenericParamList e, int index, string partialPredicateCall) { + + exists(int n, int nGenericParam | + n = 0 + and + nGenericParam = n + e.getNumberOfGenericParams() + and ( + none() + or + result = e.getGenericParam(index - n) and partialPredicateCall = "GenericParam(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfImplRestriction(ImplRestriction e, int index, string partialPredicateCall) { + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + )) + } + private Element getImmediateChildOfItemList(ItemList e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nItem = nAttr + e.getNumberOfItems() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getItem(index - nAttr) and partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfLabel(Label e, int index, string partialPredicateCall) { + + exists(int n, int nLifetime | + n = 0 + and + nLifetime = n + 1 + and ( + none() + or + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + )) + } + private Element getImmediateChildOfLetElse(LetElse e, int index, string partialPredicateCall) { + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + )) + } + private Element getImmediateChildOfMacroItems(MacroItems e, int index, string partialPredicateCall) { + + exists(int n, int nItem | + n = 0 + and + nItem = n + e.getNumberOfItems() + and ( + none() + or + result = e.getItem(index - n) and partialPredicateCall = "Item(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfMatchArm(MatchArm e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr, int nGuard, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nGuard = nExpr + 1 + and + nPat = nGuard + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getGuard() and partialPredicateCall = "Guard()" + or + index = nGuard and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfMatchArmList(MatchArmList e, int index, string partialPredicateCall) { + + exists(int n, int nArm, int nAttr | + n = 0 + and + nArm = n + e.getNumberOfArms() + and + nAttr = nArm + e.getNumberOfAttrs() + and ( + none() + or + result = e.getArm(index - n) and partialPredicateCall = "Arm(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nArm) and partialPredicateCall = "Attr(" + (index - nArm).toString() + ")" + )) + } + private Element getImmediateChildOfMatchGuard(MatchGuard e, int index, string partialPredicateCall) { + + exists(int n, int nCondition | + n = 0 + and + nCondition = n + 1 + and ( + none() + or + index = n and result = e.getCondition() and partialPredicateCall = "Condition()" + )) + } + private Element getImmediateChildOfMutRestriction(MutRestriction e, int index, string partialPredicateCall) { + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + )) + } + private Element getImmediateChildOfName(Name e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfParamList(ParamList e, int index, string partialPredicateCall) { + + exists(int n, int nParam, int nSelfParam | + n = 0 + and + nParam = n + e.getNumberOfParams() + and + nSelfParam = nParam + 1 + and ( + none() + or + result = e.getParam(index - n) and partialPredicateCall = "Param(" + (index - n).toString() + ")" + or + index = nParam and result = e.getSelfParam() and partialPredicateCall = "SelfParam()" + )) + } + private Element getImmediateChildOfParenthesizedArgList(ParenthesizedArgList e, int index, string partialPredicateCall) { + + exists(int n, int nTypeArg | + n = 0 + and + nTypeArg = n + e.getNumberOfTypeArgs() + and ( + none() + or + result = e.getTypeArg(index - n) and partialPredicateCall = "TypeArg(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfPath(Path e, int index, string partialPredicateCall) { + + exists(int n, int nQualifier, int nSegment | + n = 0 + and + nQualifier = n + 1 + and + nSegment = nQualifier + 1 + and ( + none() + or + index = n and result = e.getQualifier() and partialPredicateCall = "Qualifier()" + or + index = nQualifier and result = e.getSegment() and partialPredicateCall = "Segment()" + )) + } + private Element getImmediateChildOfPathSegment(PathSegment e, int index, string partialPredicateCall) { + + exists(int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr | + n = 0 + and + nGenericArgList = n + 1 + and + nIdentifier = nGenericArgList + 1 + and + nParenthesizedArgList = nIdentifier + 1 + and + nRetType = nParenthesizedArgList + 1 + and + nReturnTypeSyntax = nRetType + 1 + and + nTypeRepr = nReturnTypeSyntax + 1 + and + nTraitTypeRepr = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getParenthesizedArgList() and partialPredicateCall = "ParenthesizedArgList()" + or + index = nParenthesizedArgList and result = e.getRetType() and partialPredicateCall = "RetType()" + or + index = nRetType and result = e.getReturnTypeSyntax() and partialPredicateCall = "ReturnTypeSyntax()" + or + index = nReturnTypeSyntax and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getTraitTypeRepr() and partialPredicateCall = "TraitTypeRepr()" + )) + } + private Element getImmediateChildOfRename(Rename e, int index, string partialPredicateCall) { + + exists(int n, int nName | + n = 0 + and + nName = n + 1 + and ( + none() + or + index = n and result = e.getName() and partialPredicateCall = "Name()" + )) + } + private Element getImmediateChildOfRetTypeRepr(RetTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfSourceFile(SourceFile e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nItem = nAttr + e.getNumberOfItems() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getItem(index - nAttr) and partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfStmtList(StmtList e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nStatement, int nTailExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nStatement = nAttr + e.getNumberOfStatements() + and + nTailExpr = nStatement + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getStatement(index - nAttr) and partialPredicateCall = "Statement(" + (index - nAttr).toString() + ")" + or + index = nStatement and result = e.getTailExpr() and partialPredicateCall = "TailExpr()" + )) + } + private Element getImmediateChildOfStructExprField(StructExprField e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr, int nIdentifier | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nIdentifier = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + )) + } + private Element getImmediateChildOfStructExprFieldList(StructExprFieldList e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nField, int nSpread | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and + nSpread = nField + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + or + index = nField and result = e.getSpread() and partialPredicateCall = "Spread()" + )) + } + private Element getImmediateChildOfStructField(StructField e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultVal = nAttr + 1 + and + nMutRestriction = nDefaultVal + 1 + and + nName = nMutRestriction + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" + or + index = nDefaultVal and result = e.getMutRestriction() and partialPredicateCall = "MutRestriction()" + or + index = nMutRestriction and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfStructPatField(StructPatField e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nIdentifier, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nIdentifier = nAttr + 1 + and + nPat = nIdentifier + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfStructPatFieldList(StructPatFieldList e, int index, string partialPredicateCall) { + + exists(int n, int nField, int nRestPat | + n = 0 + and + nField = n + e.getNumberOfFields() + and + nRestPat = nField + 1 + and ( + none() + or + result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" + or + index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()" + )) + } + private Element getImmediateChildOfTokenTree(TokenTree e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfTryBlockModifier(TryBlockModifier e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfTupleField(TupleField e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nMutRestriction = nAttr + 1 + and + nTypeRepr = nMutRestriction + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getMutRestriction() and partialPredicateCall = "MutRestriction()" + or + index = nMutRestriction and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfTypeBound(TypeBound e, int index, string partialPredicateCall) { + + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | + n = 0 + and + nForBinder = n + 1 + and + nLifetime = nForBinder + 1 + and + nTypeRepr = nLifetime + 1 + and + nUseBoundGenericArgs = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getUseBoundGenericArgs() and partialPredicateCall = "UseBoundGenericArgs()" + )) + } + private Element getImmediateChildOfTypeBoundList(TypeBoundList e, int index, string partialPredicateCall) { + + exists(int n, int nBound | + n = 0 + and + nBound = n + e.getNumberOfBounds() + and ( + none() + or + result = e.getBound(index - n) and partialPredicateCall = "Bound(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfUseBoundGenericArgs(UseBoundGenericArgs e, int index, string partialPredicateCall) { + + exists(int n, int nUseBoundGenericArg | + n = 0 + and + nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() + and ( + none() + or + result = e.getUseBoundGenericArg(index - n) and partialPredicateCall = "UseBoundGenericArg(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfUseTree(UseTree e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nRename, int nUseTreeList | + n = 0 + and + nPath = n + 1 + and + nRename = nPath + 1 + and + nUseTreeList = nRename + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getRename() and partialPredicateCall = "Rename()" + or + index = nRename and result = e.getUseTreeList() and partialPredicateCall = "UseTreeList()" + )) + } + private Element getImmediateChildOfUseTreeList(UseTreeList e, int index, string partialPredicateCall) { + + exists(int n, int nUseTree | + n = 0 + and + nUseTree = n + e.getNumberOfUseTrees() + and ( + none() + or + result = e.getUseTree(index - n) and partialPredicateCall = "UseTree(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfVariantList(VariantList e, int index, string partialPredicateCall) { + + exists(int n, int nVariant | + n = 0 + and + nVariant = n + e.getNumberOfVariants() + and ( + none() + or + result = e.getVariant(index - n) and partialPredicateCall = "Variant(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfVisibility(Visibility e, int index, string partialPredicateCall) { + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + )) + } + private Element getImmediateChildOfVisibilityInner(VisibilityInner e, int index, string partialPredicateCall) { + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfWhereClause(WhereClause e, int index, string partialPredicateCall) { + + exists(int n, int nPredicate | + n = 0 + and + nPredicate = n + e.getNumberOfPredicates() + and ( + none() + or + result = e.getPredicate(index - n) and partialPredicateCall = "Predicate(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfWherePred(WherePred e, int index, string partialPredicateCall) { + + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | + n = 0 + and + nForBinder = n + 1 + and + nLifetime = nForBinder + 1 + and + nTypeRepr = nLifetime + 1 + and + nTypeBoundList = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfArrayExprInternal(ArrayExprInternal e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + e.getNumberOfExprs() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getExpr(index - nAttr) and partialPredicateCall = "Expr(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfArrayTypeRepr(ArrayTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nConstArg, int nElementTypeRepr | + n = 0 + and + nConstArg = n + 1 + and + nElementTypeRepr = nConstArg + 1 + and ( + none() + or + index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + or + index = nConstArg and result = e.getElementTypeRepr() and partialPredicateCall = "ElementTypeRepr()" + )) + } + private Element getImmediateChildOfAsmClobberAbi(AsmClobberAbi e, int index, string partialPredicateCall) { + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfAsmConst(AsmConst e, int index, string partialPredicateCall) { + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfAsmLabel(AsmLabel e, int index, string partialPredicateCall) { + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + )) + } + private Element getImmediateChildOfAsmOperandNamed(AsmOperandNamed e, int index, string partialPredicateCall) { + + exists(int n, int nAsmOperand, int nAttr, int nName | + n = 0 + and + nAsmOperand = n + 1 + and + nAttr = nAsmOperand + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and ( + none() + or + index = n and result = e.getAsmOperand() and partialPredicateCall = "AsmOperand()" + or + result = e.getAttr(index - nAsmOperand) and partialPredicateCall = "Attr(" + (index - nAsmOperand).toString() + ")" + or + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + )) + } + private Element getImmediateChildOfAsmOptionsList(AsmOptionsList e, int index, string partialPredicateCall) { + + exists(int n, int nAsmOption, int nAttr | + n = 0 + and + nAsmOption = n + e.getNumberOfAsmOptions() + and + nAttr = nAsmOption + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAsmOption(index - n) and partialPredicateCall = "AsmOption(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nAsmOption) and partialPredicateCall = "Attr(" + (index - nAsmOption).toString() + ")" + )) + } + private Element getImmediateChildOfAsmRegOperand(AsmRegOperand e, int index, string partialPredicateCall) { + + exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | + n = 0 + and + nAsmDirSpec = n + 1 + and + nAsmOperandExpr = nAsmDirSpec + 1 + and + nAsmRegSpec = nAsmOperandExpr + 1 + and ( + none() + or + index = n and result = e.getAsmDirSpec() and partialPredicateCall = "AsmDirSpec()" + or + index = nAsmDirSpec and result = e.getAsmOperandExpr() and partialPredicateCall = "AsmOperandExpr()" + or + index = nAsmOperandExpr and result = e.getAsmRegSpec() and partialPredicateCall = "AsmRegSpec()" + )) + } + private Element getImmediateChildOfAsmSym(AsmSym e, int index, string partialPredicateCall) { + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfAssocTypeArg(AssocTypeArg e, int index, string partialPredicateCall) { + + exists(int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList | + n = 0 + and + nConstArg = n + 1 + and + nGenericArgList = nConstArg + 1 + and + nIdentifier = nGenericArgList + 1 + and + nParamList = nIdentifier + 1 + and + nRetType = nParamList + 1 + and + nReturnTypeSyntax = nRetType + 1 + and + nTypeRepr = nReturnTypeSyntax + 1 + and + nTypeBoundList = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + or + index = nConstArg and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" + or + index = nRetType and result = e.getReturnTypeSyntax() and partialPredicateCall = "ReturnTypeSyntax()" + or + index = nReturnTypeSyntax and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfAttr(Attr e, int index, string partialPredicateCall) { + + exists(int n, int nMeta | + n = 0 + and + nMeta = n + 1 + and ( + none() + or + index = n and result = e.getMeta() and partialPredicateCall = "Meta()" + )) + } + private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nLhs, int nRhs | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLhs = nAttr + 1 + and + nRhs = nLhs + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLhs() and partialPredicateCall = "Lhs()" + or + index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" + )) + } + private Element getImmediateChildOfBoxPat(BoxPat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfBreakExpr(BreakExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr, int nLifetime | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nLifetime = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + )) + } + private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { + + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 + and + nArgList = n + 1 + and + nAttr = nArgList + e.getNumberOfAttrs() + and + nFunction = nAttr + 1 + and ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" + )) + } + private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nTypeRepr = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfCfgAtom(CfgAtom e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfCfgAttrMeta(CfgAttrMeta e, int index, string partialPredicateCall) { + + exists(int n, int nCfgPredicate, int nMeta | + n = 0 + and + nCfgPredicate = n + 1 + and + nMeta = nCfgPredicate + e.getNumberOfMetas() + and ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + or + result = e.getMeta(index - nCfgPredicate) and partialPredicateCall = "Meta(" + (index - nCfgPredicate).toString() + ")" + )) + } + private Element getImmediateChildOfCfgComposite(CfgComposite e, int index, string partialPredicateCall) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + e.getNumberOfCfgPredicates() + and ( + none() + or + result = e.getCfgPredicate(index - n) and partialPredicateCall = "CfgPredicate(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfCfgMeta(CfgMeta e, int index, string partialPredicateCall) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + )) + } + private Element getImmediateChildOfCfgPredExpr(CfgPredExpr e, int index, string partialPredicateCall) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + )) + } + private Element getImmediateChildOfCfgPredPat(CfgPredPat e, int index, string partialPredicateCall) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + )) + } + private Element getImmediateChildOfClosureExpr(ClosureExpr e, int index, string partialPredicateCall) { + + exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | + n = 0 + and + nParamList = n + 1 + and + nAttr = nParamList + e.getNumberOfAttrs() + and + nClosureBody = nAttr + 1 + and + nForBinder = nClosureBody + 1 + and + nRetType = nForBinder + 1 + and ( + none() + or + index = n and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + result = e.getAttr(index - nParamList) and partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" + or + index = nAttr and result = e.getClosureBody() and partialPredicateCall = "ClosureBody()" + or + index = nClosureBody and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getRetType() and partialPredicateCall = "RetType()" + )) + } + private Element getImmediateChildOfComment(Comment e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfConstArg(ConstArg e, int index, string partialPredicateCall) { + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfConstBlockPat(ConstBlockPat e, int index, string partialPredicateCall) { + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + )) + } + private Element getImmediateChildOfConstParam(ConstParam e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultVal = nAttr + 1 + and + nName = nDefaultVal + 1 + and + nTypeRepr = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" + or + index = nDefaultVal and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfContinueExpr(ContinueExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nLifetime | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLifetime = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + )) + } + private Element getImmediateChildOfDerefPat(DerefPat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfDocComment(DocComment e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfDynTraitTypeRepr(DynTraitTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeBoundList | + n = 0 + and + nTypeBoundList = n + 1 + and ( + none() + or + index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfExprStmt(ExprStmt e, int index, string partialPredicateCall) { + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfFieldExpr(FieldExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nContainer, int nIdentifier | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nContainer = nAttr + 1 + and + nIdentifier = nContainer + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getContainer() and partialPredicateCall = "Container()" + or + index = nContainer and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + )) + } + private Element getImmediateChildOfFnPtrTypeRepr(FnPtrTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nAbi, int nParamList, int nRetType | + n = 0 + and + nAbi = n + 1 + and + nParamList = nAbi + 1 + and + nRetType = nParamList + 1 + and ( + none() + or + index = n and result = e.getAbi() and partialPredicateCall = "Abi()" + or + index = nAbi and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" + )) + } + private Element getImmediateChildOfForTypeRepr(ForTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nForBinder, int nTypeRepr | + n = 0 + and + nForBinder = n + 1 + and + nTypeRepr = nForBinder + 1 + and ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfFormatArgsExpr(FormatArgsExpr e, int index, string partialPredicateCall) { + + exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | + n = 0 + and + nArg = n + e.getNumberOfArgs() + and + nAttr = nArg + e.getNumberOfAttrs() + and + nTemplate = nAttr + 1 + and + nFormat = nTemplate + e.getNumberOfFormats() + and ( + none() + or + result = e.getArg(index - n) and partialPredicateCall = "Arg(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nArg) and partialPredicateCall = "Attr(" + (index - nArg).toString() + ")" + or + index = nAttr and result = e.getTemplate() and partialPredicateCall = "Template()" + or + result = e.getFormat(index - nTemplate) and partialPredicateCall = "Format(" + (index - nTemplate).toString() + ")" + )) + } + private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nName, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and + nPat = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfIfExpr(IfExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nCondition, int nElse, int nThen | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nCondition = nAttr + 1 + and + nElse = nCondition + 1 + and + nThen = nElse + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" + or + index = nCondition and result = e.getElse() and partialPredicateCall = "Else()" + or + index = nElse and result = e.getThen() and partialPredicateCall = "Then()" + )) + } + private Element getImmediateChildOfImplTraitTypeRepr(ImplTraitTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeBoundList | + n = 0 + and + nTypeBoundList = n + 1 + and ( + none() + or + index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfIndexExpr(IndexExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nBase, int nIndex | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nBase = nAttr + 1 + and + nIndex = nBase + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getBase() and partialPredicateCall = "Base()" + or + index = nBase and result = e.getIndex() and partialPredicateCall = "Index()" + )) + } + private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfKeyValueMeta(KeyValueMeta e, int index, string partialPredicateCall) { + + exists(int n, int nExpr, int nPath | + n = 0 + and + nExpr = n + 1 + and + nPath = nExpr + 1 + and ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfLetExpr(LetExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nScrutinee, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nScrutinee = nAttr + 1 + and + nPat = nScrutinee + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" + or + index = nScrutinee and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfLetStmt(LetStmt e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nInitializer = nAttr + 1 + and + nLetElse = nInitializer + 1 + and + nPat = nLetElse + 1 + and + nTypeRepr = nPat + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getInitializer() and partialPredicateCall = "Initializer()" + or + index = nInitializer and result = e.getLetElse() and partialPredicateCall = "LetElse()" + or + index = nLetElse and result = e.getPat() and partialPredicateCall = "Pat()" + or + index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfLifetime(Lifetime e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfLifetimeArg(LifetimeArg e, int index, string partialPredicateCall) { + + exists(int n, int nLifetime | + n = 0 + and + nLifetime = n + 1 + and ( + none() + or + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + )) + } + private Element getImmediateChildOfLifetimeParam(LifetimeParam e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nLifetime, int nTypeBoundList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLifetime = nAttr + 1 + and + nTypeBoundList = nLifetime + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfLiteralExpr(LiteralExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfLiteralPat(LiteralPat e, int index, string partialPredicateCall) { + + exists(int n, int nLiteral | + n = 0 + and + nLiteral = n + 1 + and ( + none() + or + index = n and result = e.getLiteral() and partialPredicateCall = "Literal()" + )) + } + private Element getImmediateChildOfMacroExpr(MacroExpr e, int index, string partialPredicateCall) { + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + )) + } + private Element getImmediateChildOfMacroPat(MacroPat e, int index, string partialPredicateCall) { + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + )) + } + private Element getImmediateChildOfMacroTypeRepr(MacroTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + )) + } + private Element getImmediateChildOfMatchExpr(MatchExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nScrutinee, int nMatchArmList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nScrutinee = nAttr + 1 + and + nMatchArmList = nScrutinee + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" + or + index = nScrutinee and result = e.getMatchArmList() and partialPredicateCall = "MatchArmList()" + )) + } + private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index, string partialPredicateCall) { + + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 + and + nArgList = n + 1 + and + nAttr = nArgList + e.getNumberOfAttrs() + and + nGenericArgList = nAttr + 1 + and + nIdentifier = nGenericArgList + 1 + and + nReceiver = nIdentifier + 1 + and ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" + )) + } + private Element getImmediateChildOfNameRef(NameRef e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfNotNull(NotNull e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfOffsetOfExpr(OffsetOfExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nField, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and + nTypeRepr = nField + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + or + index = nField and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfOrPat(OrPat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + e.getNumberOfPats() + and ( + none() + or + result = e.getPat(index - n) and partialPredicateCall = "Pat(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfParam(Param e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nTypeRepr, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nTypeRepr = nAttr + 1 + and + nPat = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfParenExpr(ParenExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfParenPat(ParenPat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfParenTypeRepr(ParenTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfPathMeta(PathMeta e, int index, string partialPredicateCall) { + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfPathPat(PathPat e, int index, string partialPredicateCall) { + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfPathTypeRepr(PathTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + )) + } + private Element getImmediateChildOfPatternTypeRepr(PatternTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nPat, int nTypeRepr | + n = 0 + and + nPat = n + 1 + and + nTypeRepr = nPat + 1 + and ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + or + index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfPtrTypeRepr(PtrTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfRangeExpr(RangeExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nEnd, int nStart | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nEnd = nAttr + 1 + and + nStart = nEnd + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getEnd() and partialPredicateCall = "End()" + or + index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" + )) + } + private Element getImmediateChildOfRangePat(RangePat e, int index, string partialPredicateCall) { + + exists(int n, int nEnd, int nStart | + n = 0 + and + nEnd = n + 1 + and + nStart = nEnd + 1 + and ( + none() + or + index = n and result = e.getEnd() and partialPredicateCall = "End()" + or + index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" + )) + } + private Element getImmediateChildOfRefExpr(RefExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfRefPat(RefPat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfRefTypeRepr(RefTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nLifetime, int nTypeRepr | + n = 0 + and + nLifetime = n + 1 + and + nTypeRepr = nLifetime + 1 + and ( + none() + or + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfRestPat(RestPat e, int index, string partialPredicateCall) { + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfSelfParam(SelfParam e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nTypeRepr = nAttr + 1 + and + nLifetime = nTypeRepr + 1 + and + nName = nLifetime + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getName() and partialPredicateCall = "Name()" + )) + } + private Element getImmediateChildOfSlicePat(SlicePat e, int index, string partialPredicateCall) { + + exists(int n, int nPat | + n = 0 + and + nPat = n + e.getNumberOfPats() + and ( + none() + or + result = e.getPat(index - n) and partialPredicateCall = "Pat(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfSliceTypeRepr(SliceTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfStructExpr(StructExpr e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nStructExprFieldList | + n = 0 + and + nPath = n + 1 + and + nStructExprFieldList = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getStructExprFieldList() and partialPredicateCall = "StructExprFieldList()" + )) + } + private Element getImmediateChildOfStructFieldList(StructFieldList e, int index, string partialPredicateCall) { + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfStructPat(StructPat e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nStructPatFieldList | + n = 0 + and + nPath = n + 1 + and + nStructPatFieldList = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getStructPatFieldList() and partialPredicateCall = "StructPatFieldList()" + )) + } + private Element getImmediateChildOfTokenTreeMeta(TokenTreeMeta e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nTokenTree | + n = 0 + and + nPath = n + 1 + and + nTokenTree = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + )) + } + private Element getImmediateChildOfTryExpr(TryExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfTupleExpr(TupleExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nField | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfTupleFieldList(TupleFieldList e, int index, string partialPredicateCall) { + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfTuplePat(TuplePat e, int index, string partialPredicateCall) { + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfTupleStructPat(TupleStructPat e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nField | + n = 0 + and + nPath = n + 1 + and + nField = nPath + e.getNumberOfFields() + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + result = e.getField(index - nPath) and partialPredicateCall = "Field(" + (index - nPath).toString() + ")" + )) + } + private Element getImmediateChildOfTupleTypeRepr(TupleTypeRepr e, int index, string partialPredicateCall) { + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfTypeArg(TypeArg e, int index, string partialPredicateCall) { + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + )) + } + private Element getImmediateChildOfTypeParam(TypeParam e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultType = nAttr + 1 + and + nName = nDefaultType + 1 + and + nTypeBoundList = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getDefaultType() and partialPredicateCall = "DefaultType()" + or + index = nDefaultType and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + )) + } + private Element getImmediateChildOfUnderscoreExpr(UnderscoreExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + )) + } + private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index, string partialPredicateCall) { + + exists(int n, int nMeta | + n = 0 + and + nMeta = n + 1 + and ( + none() + or + index = n and result = e.getMeta() and partialPredicateCall = "Meta()" + )) + } + private Element getImmediateChildOfVariant(Variant e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nConstArg = nAttr + 1 + and + nFieldList = nConstArg + 1 + and + nName = nFieldList + 1 + and + nVisibility = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + or + index = nConstArg and result = e.getFieldList() and partialPredicateCall = "FieldList()" + or + index = nFieldList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfWildcardPat(WildcardPat e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfYeetExpr(YeetExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfYieldExpr(YieldExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + )) + } + private Element getImmediateChildOfArrayListExpr(ArrayListExpr e, int index, string partialPredicateCall) { + + exists(int n, int nExpr, int nAttr | + n = 0 + and + nExpr = n + e.getNumberOfExprs() + and + nAttr = nExpr + e.getNumberOfAttrs() + and ( + none() + or + result = e.getExpr(index - n) and partialPredicateCall = "Expr(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nExpr) and partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" + )) + } + private Element getImmediateChildOfArrayRepeatExpr(ArrayRepeatExpr e, int index, string partialPredicateCall) { + + exists(int n, int nExpr, int nAttr, int nRepeatOperand, int nRepeatLength | + n = 0 + and + nExpr = n + e.getNumberOfExprs() + and + nAttr = nExpr + e.getNumberOfAttrs() + and + nRepeatOperand = nAttr + 1 + and + nRepeatLength = nRepeatOperand + 1 + and ( + none() + or + result = e.getExpr(index - n) and partialPredicateCall = "Expr(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nExpr) and partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" + or + index = nAttr and result = e.getRepeatOperand() and partialPredicateCall = "RepeatOperand()" + or + index = nRepeatOperand and result = e.getRepeatLength() and partialPredicateCall = "RepeatLength()" + )) + } + private Element getImmediateChildOfAsmExpr(AsmExpr e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() + and + nAttr = nAsmPiece + e.getNumberOfAttrs() + and + nTemplate = nAttr + e.getNumberOfTemplates() + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAsmPiece(index - nAttributeMacroExpansion) and partialPredicateCall = "AsmPiece(" + (index - nAttributeMacroExpansion).toString() + ")" + or + result = e.getAttr(index - nAsmPiece) and partialPredicateCall = "Attr(" + (index - nAsmPiece).toString() + ")" + or + result = e.getTemplate(index - nAttr) and partialPredicateCall = "Template(" + (index - nAttr).toString() + ")" + )) + } + private Element getImmediateChildOfBlockExpr(BlockExpr e, int index, string partialPredicateCall) { + + exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | + n = 0 + and + nLabel = n + 1 + and + nAttr = nLabel + e.getNumberOfAttrs() + and + nStmtList = nAttr + 1 + and + nTryBlockModifier = nStmtList + 1 + and ( + none() + or + index = n and result = e.getLabel() and partialPredicateCall = "Label()" + or + result = e.getAttr(index - nLabel) and partialPredicateCall = "Attr(" + (index - nLabel).toString() + ")" + or + index = nAttr and result = e.getStmtList() and partialPredicateCall = "StmtList()" + or + index = nStmtList and result = e.getTryBlockModifier() and partialPredicateCall = "TryBlockModifier()" + )) + } + private Element getImmediateChildOfExternBlock(ExternBlock e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAbi = nAttributeMacroExpansion + 1 + and + nAttr = nAbi + e.getNumberOfAttrs() + and + nExternItemList = nAttr + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + index = nAttributeMacroExpansion and result = e.getAbi() and partialPredicateCall = "Abi()" + or + result = e.getAttr(index - nAbi) and partialPredicateCall = "Attr(" + (index - nAbi).toString() + ")" + or + index = nAttr and result = e.getExternItemList() and partialPredicateCall = "ExternItemList()" + )) + } + private Element getImmediateChildOfExternCrate(ExternCrate e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nIdentifier = nAttr + 1 + and + nRename = nIdentifier + 1 + and + nVisibility = nRename + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getRename() and partialPredicateCall = "Rename()" + or + index = nRename and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfFormatTemplateVariableAccess(FormatTemplateVariableAccess e, int index, string partialPredicateCall) { + none() + } + private Element getImmediateChildOfImpl(Impl e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAssocItemList = nAttributeMacroExpansion + 1 + and + nAttr = nAssocItemList + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nSelfTy = nGenericParamList + 1 + and + nTraitTy = nSelfTy + 1 + and + nVisibility = nTraitTy + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() and partialPredicateCall = "AssocItemList()" + or + result = e.getAttr(index - nAssocItemList) and partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getSelfTy() and partialPredicateCall = "SelfTy()" + or + index = nSelfTy and result = e.getTraitTy() and partialPredicateCall = "TraitTy()" + or + index = nTraitTy and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + )) + } + private Element getImmediateChildOfMacroDef(MacroDef e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nArgs = nAttributeMacroExpansion + 1 + and + nAttr = nArgs + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nName = nBody + 1 + and + nVisibility = nName + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + index = nAttributeMacroExpansion and result = e.getArgs() and partialPredicateCall = "Args()" + or + result = e.getAttr(index - nArgs) and partialPredicateCall = "Attr(" + (index - nArgs).toString() + ")" + or + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + or + index = nBody and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfMacroRules(MacroRules e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and + nTokenTree = nName + 1 + and + nVisibility = nTokenTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + or + index = nTokenTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nItemList = nAttr + 1 + and + nName = nItemList + 1 + and + nVisibility = nName + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getItemList() and partialPredicateCall = "ItemList()" + or + index = nItemList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfPathExpr(PathExpr e, int index, string partialPredicateCall) { + + exists(int n, int nPath, int nAttr | + n = 0 + and + nPath = n + 1 + and + nAttr = nPath + e.getNumberOfAttrs() + and ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + result = e.getAttr(index - nPath) and partialPredicateCall = "Attr(" + (index - nPath).toString() + ")" + )) + } + private Element getImmediateChildOfTrait(Trait e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAssocItemList = nAttributeMacroExpansion + 1 + and + nAttr = nAssocItemList + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nImplRestriction = nGenericParamList + 1 + and + nName = nImplRestriction + 1 + and + nTypeBoundList = nName + 1 + and + nVisibility = nTypeBoundList + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() and partialPredicateCall = "AssocItemList()" + or + result = e.getAttr(index - nAssocItemList) and partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getImplRestriction() and partialPredicateCall = "ImplRestriction()" + or + index = nImplRestriction and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + or + index = nTypeBoundList and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + )) + } + private Element getImmediateChildOfUse(Use e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nUseTree = nAttr + 1 + and + nVisibility = nUseTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getUseTree() and partialPredicateCall = "UseTree()" + or + index = nUseTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfConst(Const e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, int nTypeRepr, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nGenericParamList = nBody + 1 + and + nName = nGenericParamList + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + or + index = nBody and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + )) + } + private Element getImmediateChildOfEnum(Enum e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nVariantList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + or + result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + or + index = nWhereClause and result = e.getVariantList() and partialPredicateCall = "VariantList()" + )) + } + private Element getImmediateChildOfForExpr(ForExpr e, int index, string partialPredicateCall) { + + exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and + nIterable = nAttr + 1 + and + nPat = nIterable + 1 + and ( + none() + or + index = n and result = e.getLabel() and partialPredicateCall = "Label()" + or + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + or + result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + or + index = nAttr and result = e.getIterable() and partialPredicateCall = "Iterable()" + or + index = nIterable and result = e.getPat() and partialPredicateCall = "Pat()" + )) + } + private Element getImmediateChildOfFunction(Function e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nParamList = nAttributeMacroExpansion + 1 + and + nAttr = nParamList + e.getNumberOfAttrs() + and + nAbi = nAttr + 1 + and + nFunctionBody = nAbi + 1 + and + nGenericParamList = nFunctionBody + 1 + and + nName = nGenericParamList + 1 + and + nRetType = nName + 1 + and + nVisibility = nRetType + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + index = nAttributeMacroExpansion and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + result = e.getAttr(index - nParamList) and partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" + or + index = nAttr and result = e.getAbi() and partialPredicateCall = "Abi()" + or + index = nAbi and result = e.getFunctionBody() and partialPredicateCall = "FunctionBody()" + or + index = nFunctionBody and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getRetType() and partialPredicateCall = "RetType()" + or + index = nRetType and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + )) + } + private Element getImmediateChildOfLoopExpr(LoopExpr e, int index, string partialPredicateCall) { + + exists(int n, int nLabel, int nLoopBody, int nAttr | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and ( + none() + or + index = n and result = e.getLabel() and partialPredicateCall = "Label()" + or + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + or + result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + )) + } + private Element getImmediateChildOfMacroCall(MacroCall e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, int nMacroCallExpansion | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nPath = nAttr + 1 + and + nTokenTree = nPath + 1 + and + nMacroCallExpansion = nTokenTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + or + index = nTokenTree and result = e.getMacroCallExpansion() and partialPredicateCall = "MacroCallExpansion()" + )) + } + private Element getImmediateChildOfStatic(Static e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nName = nBody + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + or + index = nBody and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + )) + } + private Element getImmediateChildOfStruct(Struct e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nFieldList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + or + result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + or + index = nWhereClause and result = e.getFieldList() and partialPredicateCall = "FieldList()" + )) + } + private Element getImmediateChildOfTypeAlias(TypeAlias e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nTypeRepr = nName + 1 + and + nTypeBoundList = nTypeRepr + 1 + and + nVisibility = nTypeBoundList + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + or + index = nTypeBoundList and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + )) + } + private Element getImmediateChildOfUnion(Union e, int index, string partialPredicateCall) { + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nStructFieldList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + or + result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + or + index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" + or + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + or + index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" + or + index = nWhereClause and result = e.getStructFieldList() and partialPredicateCall = "StructFieldList()" + )) + } + private Element getImmediateChildOfWhileExpr(WhileExpr e, int index, string partialPredicateCall) { + + exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and + nCondition = nAttr + 1 + and ( + none() + or + index = n and result = e.getLabel() and partialPredicateCall = "Label()" + or + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + or + result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + or + index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" + )) + } +cached +Element getImmediateChild(Element e, int index, string partialAccessor) { +// why does this look more complicated than it should? +// * none() simplifies generation, as we can append `or ...` without a special case for the first item +none() or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfExtractorStep(e, index, partialAccessor) or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfRefPat(RefPat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() + result = getImmediateChildOfNamedCrate(e, index, partialAccessor) or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfRefTypeRepr( - RefTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nLifetime, int nTypeRepr | - n = 0 and - nLifetime = n + 1 and - nTypeRepr = nLifetime + 1 and - ( - none() + result = getImmediateChildOfCrate(e, index, partialAccessor) or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + result = getImmediateChildOfFormat(e, index, partialAccessor) or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfRestPat(RestPat e, int index, string partialPredicateCall) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() + result = getImmediateChildOfFormatArgument(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() + result = getImmediateChildOfMissing(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfUnimplemented(e, index, partialAccessor) or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfSelfParam(SelfParam e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nTypeRepr = nAttr + 1 and - nLifetime = nTypeRepr + 1 and - nName = nLifetime + 1 and - ( - none() + result = getImmediateChildOfAbi(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfArgList(e, index, partialAccessor) or - index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + result = getImmediateChildOfAsmDirSpec(e, index, partialAccessor) or - index = nTypeRepr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + result = getImmediateChildOfAsmOperandExpr(e, index, partialAccessor) or - index = nLifetime and result = e.getName() and partialPredicateCall = "Name()" - ) - ) - } - - private Element getImmediateChildOfSlicePat(SlicePat e, int index, string partialPredicateCall) { - exists(int n, int nPat | - n = 0 and - nPat = n + e.getNumberOfPats() and - ( - none() + result = getImmediateChildOfAsmOption(e, index, partialAccessor) or - result = e.getPat(index - n) and - partialPredicateCall = "Pat(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfSliceTypeRepr( - SliceTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() + result = getImmediateChildOfAsmRegSpec(e, index, partialAccessor) or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfStructExpr(StructExpr e, int index, string partialPredicateCall) { - exists(int n, int nPath, int nStructExprFieldList | - n = 0 and - nPath = n + 1 and - nStructExprFieldList = nPath + 1 and - ( - none() + result = getImmediateChildOfAssocItemList(e, index, partialAccessor) or - index = n and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfExternItemList(e, index, partialAccessor) or - index = nPath and - result = e.getStructExprFieldList() and - partialPredicateCall = "StructExprFieldList()" - ) - ) - } - - private Element getImmediateChildOfStructFieldList( - StructFieldList e, int index, string partialPredicateCall - ) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfForBinder(e, index, partialAccessor) or - result = e.getField(index - n) and - partialPredicateCall = "Field(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfStructPat(StructPat e, int index, string partialPredicateCall) { - exists(int n, int nPath, int nStructPatFieldList | - n = 0 and - nPath = n + 1 and - nStructPatFieldList = nPath + 1 and - ( - none() + result = getImmediateChildOfFormatArgsArg(e, index, partialAccessor) or - index = n and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfGenericArgList(e, index, partialAccessor) or - index = nPath and - result = e.getStructPatFieldList() and - partialPredicateCall = "StructPatFieldList()" - ) - ) - } - - private Element getImmediateChildOfTokenTreeMeta( - TokenTreeMeta e, int index, string partialPredicateCall - ) { - exists(int n, int nPath, int nTokenTree | - n = 0 and - nPath = n + 1 and - nTokenTree = nPath + 1 and - ( - none() + result = getImmediateChildOfGenericParamList(e, index, partialAccessor) or - index = n and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfImplRestriction(e, index, partialAccessor) or - index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" - ) - ) - } - - private Element getImmediateChildOfTryExpr(TryExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() + result = getImmediateChildOfItemList(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfLabel(e, index, partialAccessor) or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfTupleExpr(TupleExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nField | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfLetElse(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfMacroItems(e, index, partialAccessor) or - result = e.getField(index - nAttr) and - partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTupleFieldList( - TupleFieldList e, int index, string partialPredicateCall - ) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfMatchArm(e, index, partialAccessor) or - result = e.getField(index - n) and - partialPredicateCall = "Field(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTuplePat(TuplePat e, int index, string partialPredicateCall) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfMatchArmList(e, index, partialAccessor) or - result = e.getField(index - n) and - partialPredicateCall = "Field(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTupleStructPat( - TupleStructPat e, int index, string partialPredicateCall - ) { - exists(int n, int nPath, int nField | - n = 0 and - nPath = n + 1 and - nField = nPath + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfMatchGuard(e, index, partialAccessor) or - index = n and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfMutRestriction(e, index, partialAccessor) or - result = e.getField(index - nPath) and - partialPredicateCall = "Field(" + (index - nPath).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTupleTypeRepr( - TupleTypeRepr e, int index, string partialPredicateCall - ) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() + result = getImmediateChildOfName(e, index, partialAccessor) or - result = e.getField(index - n) and - partialPredicateCall = "Field(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTypeArg(TypeArg e, int index, string partialPredicateCall) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() + result = getImmediateChildOfParamList(e, index, partialAccessor) or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - ) - ) - } - - private Element getImmediateChildOfTypeParam(TypeParam e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultType = nAttr + 1 and - nName = nDefaultType + 1 and - nTypeBoundList = nName + 1 and - ( - none() + result = getImmediateChildOfParenthesizedArgList(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfPath(e, index, partialAccessor) or - index = nAttr and result = e.getDefaultType() and partialPredicateCall = "DefaultType()" + result = getImmediateChildOfPathSegment(e, index, partialAccessor) or - index = nDefaultType and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfRename(e, index, partialAccessor) or - index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - ) - ) - } - - private Element getImmediateChildOfUnderscoreExpr( - UnderscoreExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() + result = getImmediateChildOfRetTypeRepr(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index, string partialPredicateCall) { - exists(int n, int nMeta | - n = 0 and - nMeta = n + 1 and - ( - none() + result = getImmediateChildOfReturnTypeSyntax(e, index, partialAccessor) or - index = n and result = e.getMeta() and partialPredicateCall = "Meta()" - ) - ) - } - - private Element getImmediateChildOfVariant(Variant e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nConstArg = nAttr + 1 and - nFieldList = nConstArg + 1 and - nName = nFieldList + 1 and - nVisibility = nName + 1 and - ( - none() + result = getImmediateChildOfSourceFile(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfStmtList(e, index, partialAccessor) or - index = nAttr and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + result = getImmediateChildOfStructExprField(e, index, partialAccessor) or - index = nConstArg and result = e.getFieldList() and partialPredicateCall = "FieldList()" + result = getImmediateChildOfStructExprFieldList(e, index, partialAccessor) or - index = nFieldList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfStructField(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfWildcardPat( - WildcardPat e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfYeetExpr(YeetExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() + result = getImmediateChildOfStructPatField(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfStructPatFieldList(e, index, partialAccessor) or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfYieldExpr(YieldExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() + result = getImmediateChildOfTokenTree(e, index, partialAccessor) or - result = e.getAttr(index - n) and - partialPredicateCall = "Attr(" + (index - n).toString() + ")" + result = getImmediateChildOfTryBlockModifier(e, index, partialAccessor) or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - ) - ) - } - - private Element getImmediateChildOfArrayListExpr( - ArrayListExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nExpr, int nAttr | - n = 0 and - nExpr = n + e.getNumberOfExprs() and - nAttr = nExpr + e.getNumberOfAttrs() and - ( - none() + result = getImmediateChildOfTupleField(e, index, partialAccessor) or - result = e.getExpr(index - n) and - partialPredicateCall = "Expr(" + (index - n).toString() + ")" + result = getImmediateChildOfTypeBound(e, index, partialAccessor) or - result = e.getAttr(index - nExpr) and - partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfArrayRepeatExpr( - ArrayRepeatExpr e, int index, string partialPredicateCall - ) { - exists(int n, int nExpr, int nAttr, int nRepeatOperand, int nRepeatLength | - n = 0 and - nExpr = n + e.getNumberOfExprs() and - nAttr = nExpr + e.getNumberOfAttrs() and - nRepeatOperand = nAttr + 1 and - nRepeatLength = nRepeatOperand + 1 and - ( - none() + result = getImmediateChildOfTypeBoundList(e, index, partialAccessor) or - result = e.getExpr(index - n) and - partialPredicateCall = "Expr(" + (index - n).toString() + ")" + result = getImmediateChildOfUseBoundGenericArgs(e, index, partialAccessor) or - result = e.getAttr(index - nExpr) and - partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" + result = getImmediateChildOfUseTree(e, index, partialAccessor) or - index = nAttr and result = e.getRepeatOperand() and partialPredicateCall = "RepeatOperand()" + result = getImmediateChildOfUseTreeList(e, index, partialAccessor) or - index = nRepeatOperand and - result = e.getRepeatLength() and - partialPredicateCall = "RepeatLength()" - ) - ) - } - - private Element getImmediateChildOfAsmExpr(AsmExpr e, int index, string partialPredicateCall) { - exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() and - nAttr = nAsmPiece + e.getNumberOfAttrs() and - nTemplate = nAttr + e.getNumberOfTemplates() and - ( - none() + result = getImmediateChildOfVariantList(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfVisibility(e, index, partialAccessor) or - result = e.getAsmPiece(index - nAttributeMacroExpansion) and - partialPredicateCall = "AsmPiece(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfVisibilityInner(e, index, partialAccessor) or - result = e.getAttr(index - nAsmPiece) and - partialPredicateCall = "Attr(" + (index - nAsmPiece).toString() + ")" + result = getImmediateChildOfWhereClause(e, index, partialAccessor) or - result = e.getTemplate(index - nAttr) and - partialPredicateCall = "Template(" + (index - nAttr).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfBlockExpr(BlockExpr e, int index, string partialPredicateCall) { - exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | - n = 0 and - nLabel = n + 1 and - nAttr = nLabel + e.getNumberOfAttrs() and - nStmtList = nAttr + 1 and - nTryBlockModifier = nStmtList + 1 and - ( - none() + result = getImmediateChildOfWherePred(e, index, partialAccessor) or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" + result = getImmediateChildOfArrayExprInternal(e, index, partialAccessor) or - result = e.getAttr(index - nLabel) and - partialPredicateCall = "Attr(" + (index - nLabel).toString() + ")" + result = getImmediateChildOfArrayTypeRepr(e, index, partialAccessor) or - index = nAttr and result = e.getStmtList() and partialPredicateCall = "StmtList()" + result = getImmediateChildOfAsmClobberAbi(e, index, partialAccessor) or - index = nStmtList and - result = e.getTryBlockModifier() and - partialPredicateCall = "TryBlockModifier()" - ) - ) - } - - private Element getImmediateChildOfExternBlock( - ExternBlock e, int index, string partialPredicateCall - ) { - exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAbi = nAttributeMacroExpansion + 1 and - nAttr = nAbi + e.getNumberOfAttrs() and - nExternItemList = nAttr + 1 and - ( - none() + result = getImmediateChildOfAsmConst(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfAsmLabel(e, index, partialAccessor) or - index = nAttributeMacroExpansion and result = e.getAbi() and partialPredicateCall = "Abi()" + result = getImmediateChildOfAsmOperandNamed(e, index, partialAccessor) or - result = e.getAttr(index - nAbi) and - partialPredicateCall = "Attr(" + (index - nAbi).toString() + ")" + result = getImmediateChildOfAsmOptionsList(e, index, partialAccessor) or - index = nAttr and - result = e.getExternItemList() and - partialPredicateCall = "ExternItemList()" - ) - ) - } - - private Element getImmediateChildOfExternCrate( - ExternCrate e, int index, string partialPredicateCall - ) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nIdentifier = nAttr + 1 and - nRename = nIdentifier + 1 and - nVisibility = nRename + 1 and - ( - none() + result = getImmediateChildOfAsmRegOperand(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfAsmSym(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfAssocTypeArg(e, index, partialAccessor) or - index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + result = getImmediateChildOfAttr(e, index, partialAccessor) or - index = nIdentifier and result = e.getRename() and partialPredicateCall = "Rename()" + result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) or - index = nRename and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfFormatTemplateVariableAccess( - FormatTemplateVariableAccess e, int index, string partialPredicateCall - ) { - none() - } - - private Element getImmediateChildOfImpl(Impl e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, - int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAssocItemList = nAttributeMacroExpansion + 1 and - nAttr = nAssocItemList + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nSelfTy = nGenericParamList + 1 and - nTraitTy = nSelfTy + 1 and - nVisibility = nTraitTy + 1 and - nWhereClause = nVisibility + 1 and - ( - none() + result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfBinaryExpr(e, index, partialAccessor) or - index = nAttributeMacroExpansion and - result = e.getAssocItemList() and - partialPredicateCall = "AssocItemList()" + result = getImmediateChildOfBoxPat(e, index, partialAccessor) or - result = e.getAttr(index - nAssocItemList) and - partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" + result = getImmediateChildOfBreakExpr(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfCallExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getSelfTy() and partialPredicateCall = "SelfTy()" + result = getImmediateChildOfCastExpr(e, index, partialAccessor) or - index = nSelfTy and result = e.getTraitTy() and partialPredicateCall = "TraitTy()" + result = getImmediateChildOfCfgAtom(e, index, partialAccessor) or - index = nTraitTy and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfCfgAttrMeta(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" - ) - ) - } - - private Element getImmediateChildOfMacroDef(MacroDef e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, - int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nArgs = nAttributeMacroExpansion + 1 and - nAttr = nArgs + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nName = nBody + 1 and - nVisibility = nName + 1 and - ( - none() + result = getImmediateChildOfCfgComposite(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfCfgMeta(e, index, partialAccessor) or - index = nAttributeMacroExpansion and - result = e.getArgs() and - partialPredicateCall = "Args()" + result = getImmediateChildOfCfgPredExpr(e, index, partialAccessor) or - result = e.getAttr(index - nArgs) and - partialPredicateCall = "Attr(" + (index - nArgs).toString() + ")" + result = getImmediateChildOfCfgPredPat(e, index, partialAccessor) or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + result = getImmediateChildOfClosureExpr(e, index, partialAccessor) or - index = nBody and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfComment(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfMacroRules(MacroRules e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nName = nAttr + 1 and - nTokenTree = nName + 1 and - nVisibility = nTokenTree + 1 and - ( - none() + result = getImmediateChildOfConstArg(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfConstBlockPat(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfConstParam(e, index, partialAccessor) or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfContinueExpr(e, index, partialAccessor) or - index = nName and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + result = getImmediateChildOfDerefPat(e, index, partialAccessor) or - index = nTokenTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nItemList = nAttr + 1 and - nName = nItemList + 1 and - nVisibility = nName + 1 and - ( - none() + result = getImmediateChildOfDocComment(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfDynTraitTypeRepr(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfExprStmt(e, index, partialAccessor) or - index = nAttr and result = e.getItemList() and partialPredicateCall = "ItemList()" + result = getImmediateChildOfFieldExpr(e, index, partialAccessor) or - index = nItemList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfFnPtrTypeRepr(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfPathExpr(PathExpr e, int index, string partialPredicateCall) { - exists(int n, int nPath, int nAttr | - n = 0 and - nPath = n + 1 and - nAttr = nPath + e.getNumberOfAttrs() and - ( - none() + result = getImmediateChildOfForTypeRepr(e, index, partialAccessor) or - index = n and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfFormatArgsExpr(e, index, partialAccessor) or - result = e.getAttr(index - nPath) and - partialPredicateCall = "Attr(" + (index - nPath).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfTrait(Trait e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, - int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAssocItemList = nAttributeMacroExpansion + 1 and - nAttr = nAssocItemList + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nImplRestriction = nGenericParamList + 1 and - nName = nImplRestriction + 1 and - nTypeBoundList = nName + 1 and - nVisibility = nTypeBoundList + 1 and - nWhereClause = nVisibility + 1 and - ( - none() + result = getImmediateChildOfIdentPat(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfIfExpr(e, index, partialAccessor) or - index = nAttributeMacroExpansion and - result = e.getAssocItemList() and - partialPredicateCall = "AssocItemList()" + result = getImmediateChildOfImplTraitTypeRepr(e, index, partialAccessor) or - result = e.getAttr(index - nAssocItemList) and - partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" + result = getImmediateChildOfIncludeBytesExpr(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfIndexExpr(e, index, partialAccessor) or - index = nGenericParamList and - result = e.getImplRestriction() and - partialPredicateCall = "ImplRestriction()" + result = getImmediateChildOfInferTypeRepr(e, index, partialAccessor) or - index = nImplRestriction and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfKeyValueMeta(e, index, partialAccessor) or - index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + result = getImmediateChildOfLetExpr(e, index, partialAccessor) or - index = nTypeBoundList and - result = e.getVisibility() and - partialPredicateCall = "Visibility()" + result = getImmediateChildOfLetStmt(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" - ) - ) - } - - private Element getImmediateChildOfUse(Use e, int index, string partialPredicateCall) { - exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nUseTree = nAttr + 1 and - nVisibility = nUseTree + 1 and - ( - none() + result = getImmediateChildOfLifetime(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfLifetimeArg(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfLifetimeParam(e, index, partialAccessor) or - index = nAttr and result = e.getUseTree() and partialPredicateCall = "UseTree()" + result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) or - index = nUseTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfConst(Const e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, - int nTypeRepr, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nGenericParamList = nBody + 1 and - nName = nGenericParamList + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - nWhereClause = nVisibility + 1 and - ( - none() + result = getImmediateChildOfLiteralPat(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfMacroExpr(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfMacroPat(e, index, partialAccessor) or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + result = getImmediateChildOfMacroTypeRepr(e, index, partialAccessor) or - index = nBody and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfMatchExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + result = getImmediateChildOfNameRef(e, index, partialAccessor) or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfNeverTypeRepr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" - ) - ) - } - - private Element getImmediateChildOfEnum(Enum e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nVariantList = nWhereClause + 1 and - ( - none() + result = getImmediateChildOfNotNull(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfOffsetOfExpr(e, index, partialAccessor) or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and - partialPredicateCall = - "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfOrPat(e, index, partialAccessor) or - result = e.getAttr(index - nDeriveMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + result = getImmediateChildOfParam(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfParenExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfParenPat(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfParenTypeRepr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" + result = getImmediateChildOfPathMeta(e, index, partialAccessor) or - index = nWhereClause and - result = e.getVariantList() and - partialPredicateCall = "VariantList()" - ) - ) - } - - private Element getImmediateChildOfForExpr(ForExpr e, int index, string partialPredicateCall) { - exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - nIterable = nAttr + 1 and - nPat = nIterable + 1 and - ( - none() + result = getImmediateChildOfPathPat(e, index, partialAccessor) or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" + result = getImmediateChildOfPathTypeRepr(e, index, partialAccessor) or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + result = getImmediateChildOfPatternTypeRepr(e, index, partialAccessor) or - result = e.getAttr(index - nLoopBody) and - partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + result = getImmediateChildOfPrefixExpr(e, index, partialAccessor) or - index = nAttr and result = e.getIterable() and partialPredicateCall = "Iterable()" + result = getImmediateChildOfPtrTypeRepr(e, index, partialAccessor) or - index = nIterable and result = e.getPat() and partialPredicateCall = "Pat()" - ) - ) - } - - private Element getImmediateChildOfFunction(Function e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, - int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nParamList = nAttributeMacroExpansion + 1 and - nAttr = nParamList + e.getNumberOfAttrs() and - nAbi = nAttr + 1 and - nFunctionBody = nAbi + 1 and - nGenericParamList = nFunctionBody + 1 and - nName = nGenericParamList + 1 and - nRetType = nName + 1 and - nVisibility = nRetType + 1 and - nWhereClause = nVisibility + 1 and - ( - none() + result = getImmediateChildOfRangeExpr(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfRangePat(e, index, partialAccessor) or - index = nAttributeMacroExpansion and - result = e.getParamList() and - partialPredicateCall = "ParamList()" + result = getImmediateChildOfRefExpr(e, index, partialAccessor) or - result = e.getAttr(index - nParamList) and - partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" + result = getImmediateChildOfRefPat(e, index, partialAccessor) or - index = nAttr and result = e.getAbi() and partialPredicateCall = "Abi()" + result = getImmediateChildOfRefTypeRepr(e, index, partialAccessor) or - index = nAbi and result = e.getFunctionBody() and partialPredicateCall = "FunctionBody()" + result = getImmediateChildOfRestPat(e, index, partialAccessor) or - index = nFunctionBody and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfReturnExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfSelfParam(e, index, partialAccessor) or - index = nName and result = e.getRetType() and partialPredicateCall = "RetType()" + result = getImmediateChildOfSlicePat(e, index, partialAccessor) or - index = nRetType and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfSliceTypeRepr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" - ) - ) - } - - private Element getImmediateChildOfLoopExpr(LoopExpr e, int index, string partialPredicateCall) { - exists(int n, int nLabel, int nLoopBody, int nAttr | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - ( - none() + result = getImmediateChildOfStructExpr(e, index, partialAccessor) or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" + result = getImmediateChildOfStructFieldList(e, index, partialAccessor) or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + result = getImmediateChildOfStructPat(e, index, partialAccessor) or - result = e.getAttr(index - nLoopBody) and - partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" - ) - ) - } - - private Element getImmediateChildOfMacroCall(MacroCall e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, - int nMacroCallExpansion - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nPath = nAttr + 1 and - nTokenTree = nPath + 1 and - nMacroCallExpansion = nTokenTree + 1 and - ( - none() + result = getImmediateChildOfTokenTreeMeta(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfTryExpr(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfTupleExpr(e, index, partialAccessor) or - index = nAttr and result = e.getPath() and partialPredicateCall = "Path()" + result = getImmediateChildOfTupleFieldList(e, index, partialAccessor) or - index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + result = getImmediateChildOfTuplePat(e, index, partialAccessor) or - index = nTokenTree and - result = e.getMacroCallExpansion() and - partialPredicateCall = "MacroCallExpansion()" - ) - ) - } - - private Element getImmediateChildOfStatic(Static e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, - int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nName = nBody + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() + result = getImmediateChildOfTupleStructPat(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfTupleTypeRepr(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfTypeArg(e, index, partialAccessor) or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" + result = getImmediateChildOfTypeParam(e, index, partialAccessor) or - index = nBody and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + result = getImmediateChildOfUnsafeMeta(e, index, partialAccessor) or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - ) - ) - } - - private Element getImmediateChildOfStruct(Struct e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nFieldList = nWhereClause + 1 and - ( - none() + result = getImmediateChildOfVariant(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfWildcardPat(e, index, partialAccessor) or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and - partialPredicateCall = - "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfYeetExpr(e, index, partialAccessor) or - result = e.getAttr(index - nDeriveMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + result = getImmediateChildOfYieldExpr(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfArrayListExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfArrayRepeatExpr(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfAsmExpr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" + result = getImmediateChildOfBlockExpr(e, index, partialAccessor) or - index = nWhereClause and result = e.getFieldList() and partialPredicateCall = "FieldList()" - ) - ) - } - - private Element getImmediateChildOfTypeAlias(TypeAlias e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, - int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nTypeRepr = nName + 1 and - nTypeBoundList = nTypeRepr + 1 and - nVisibility = nTypeBoundList + 1 and - nWhereClause = nVisibility + 1 and - ( - none() + result = getImmediateChildOfExternBlock(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfExternCrate(e, index, partialAccessor) or - result = e.getAttr(index - nAttributeMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfFormatTemplateVariableAccess(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfImpl(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfMacroDef(e, index, partialAccessor) or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + result = getImmediateChildOfMacroRules(e, index, partialAccessor) or - index = nTypeRepr and - result = e.getTypeBoundList() and - partialPredicateCall = "TypeBoundList()" + result = getImmediateChildOfModule(e, index, partialAccessor) or - index = nTypeBoundList and - result = e.getVisibility() and - partialPredicateCall = "Visibility()" + result = getImmediateChildOfPathExpr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" - ) - ) - } - - private Element getImmediateChildOfUnion(Union e, int index, string partialPredicateCall) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nStructFieldList = nWhereClause + 1 and - ( - none() + result = getImmediateChildOfTrait(e, index, partialAccessor) or - index = n and - result = e.getAttributeMacroExpansion() and - partialPredicateCall = "AttributeMacroExpansion()" + result = getImmediateChildOfUse(e, index, partialAccessor) or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and - partialPredicateCall = - "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" + result = getImmediateChildOfConst(e, index, partialAccessor) or - result = e.getAttr(index - nDeriveMacroExpansion) and - partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" + result = getImmediateChildOfEnum(e, index, partialAccessor) or - index = nAttr and - result = e.getGenericParamList() and - partialPredicateCall = "GenericParamList()" + result = getImmediateChildOfForExpr(e, index, partialAccessor) or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" + result = getImmediateChildOfFunction(e, index, partialAccessor) or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + result = getImmediateChildOfLoopExpr(e, index, partialAccessor) or - index = nVisibility and - result = e.getWhereClause() and - partialPredicateCall = "WhereClause()" + result = getImmediateChildOfMacroCall(e, index, partialAccessor) or - index = nWhereClause and - result = e.getStructFieldList() and - partialPredicateCall = "StructFieldList()" - ) - ) - } - - private Element getImmediateChildOfWhileExpr(WhileExpr e, int index, string partialPredicateCall) { - exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - nCondition = nAttr + 1 and - ( - none() + result = getImmediateChildOfStatic(e, index, partialAccessor) or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" + result = getImmediateChildOfStruct(e, index, partialAccessor) or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" + result = getImmediateChildOfTypeAlias(e, index, partialAccessor) or - result = e.getAttr(index - nLoopBody) and - partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + result = getImmediateChildOfUnion(e, index, partialAccessor) or - index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" - ) - ) - } - - cached - Element getImmediateChild(Element e, int index, string partialAccessor) { - // why does this look more complicated than it should? - // * none() simplifies generation, as we can append `or ...` without a special case for the first item - none() - or - result = getImmediateChildOfExtractorStep(e, index, partialAccessor) - or - result = getImmediateChildOfNamedCrate(e, index, partialAccessor) - or - result = getImmediateChildOfCrate(e, index, partialAccessor) - or - result = getImmediateChildOfFormat(e, index, partialAccessor) - or - result = getImmediateChildOfFormatArgument(e, index, partialAccessor) - or - result = getImmediateChildOfMissing(e, index, partialAccessor) - or - result = getImmediateChildOfUnimplemented(e, index, partialAccessor) - or - result = getImmediateChildOfAbi(e, index, partialAccessor) - or - result = getImmediateChildOfArgList(e, index, partialAccessor) - or - result = getImmediateChildOfAsmDirSpec(e, index, partialAccessor) - or - result = getImmediateChildOfAsmOperandExpr(e, index, partialAccessor) - or - result = getImmediateChildOfAsmOption(e, index, partialAccessor) - or - result = getImmediateChildOfAsmRegSpec(e, index, partialAccessor) - or - result = getImmediateChildOfAssocItemList(e, index, partialAccessor) - or - result = getImmediateChildOfExternItemList(e, index, partialAccessor) - or - result = getImmediateChildOfForBinder(e, index, partialAccessor) - or - result = getImmediateChildOfFormatArgsArg(e, index, partialAccessor) - or - result = getImmediateChildOfGenericArgList(e, index, partialAccessor) - or - result = getImmediateChildOfGenericParamList(e, index, partialAccessor) - or - result = getImmediateChildOfImplRestriction(e, index, partialAccessor) - or - result = getImmediateChildOfItemList(e, index, partialAccessor) - or - result = getImmediateChildOfLabel(e, index, partialAccessor) - or - result = getImmediateChildOfLetElse(e, index, partialAccessor) - or - result = getImmediateChildOfMacroItems(e, index, partialAccessor) - or - result = getImmediateChildOfMatchArm(e, index, partialAccessor) - or - result = getImmediateChildOfMatchArmList(e, index, partialAccessor) - or - result = getImmediateChildOfMatchGuard(e, index, partialAccessor) - or - result = getImmediateChildOfMutRestriction(e, index, partialAccessor) - or - result = getImmediateChildOfName(e, index, partialAccessor) - or - result = getImmediateChildOfParamList(e, index, partialAccessor) - or - result = getImmediateChildOfParenthesizedArgList(e, index, partialAccessor) - or - result = getImmediateChildOfPath(e, index, partialAccessor) - or - result = getImmediateChildOfPathSegment(e, index, partialAccessor) - or - result = getImmediateChildOfRename(e, index, partialAccessor) - or - result = getImmediateChildOfRetTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfReturnTypeSyntax(e, index, partialAccessor) - or - result = getImmediateChildOfSourceFile(e, index, partialAccessor) - or - result = getImmediateChildOfStmtList(e, index, partialAccessor) - or - result = getImmediateChildOfStructExprField(e, index, partialAccessor) - or - result = getImmediateChildOfStructExprFieldList(e, index, partialAccessor) - or - result = getImmediateChildOfStructField(e, index, partialAccessor) - or - result = getImmediateChildOfStructPatField(e, index, partialAccessor) - or - result = getImmediateChildOfStructPatFieldList(e, index, partialAccessor) - or - result = getImmediateChildOfTokenTree(e, index, partialAccessor) - or - result = getImmediateChildOfTryBlockModifier(e, index, partialAccessor) - or - result = getImmediateChildOfTupleField(e, index, partialAccessor) - or - result = getImmediateChildOfTypeBound(e, index, partialAccessor) - or - result = getImmediateChildOfTypeBoundList(e, index, partialAccessor) - or - result = getImmediateChildOfUseBoundGenericArgs(e, index, partialAccessor) - or - result = getImmediateChildOfUseTree(e, index, partialAccessor) - or - result = getImmediateChildOfUseTreeList(e, index, partialAccessor) - or - result = getImmediateChildOfVariantList(e, index, partialAccessor) - or - result = getImmediateChildOfVisibility(e, index, partialAccessor) - or - result = getImmediateChildOfVisibilityInner(e, index, partialAccessor) - or - result = getImmediateChildOfWhereClause(e, index, partialAccessor) - or - result = getImmediateChildOfWherePred(e, index, partialAccessor) - or - result = getImmediateChildOfArrayExprInternal(e, index, partialAccessor) - or - result = getImmediateChildOfArrayTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfAsmClobberAbi(e, index, partialAccessor) - or - result = getImmediateChildOfAsmConst(e, index, partialAccessor) - or - result = getImmediateChildOfAsmLabel(e, index, partialAccessor) - or - result = getImmediateChildOfAsmOperandNamed(e, index, partialAccessor) - or - result = getImmediateChildOfAsmOptionsList(e, index, partialAccessor) - or - result = getImmediateChildOfAsmRegOperand(e, index, partialAccessor) - or - result = getImmediateChildOfAsmSym(e, index, partialAccessor) - or - result = getImmediateChildOfAssocTypeArg(e, index, partialAccessor) - or - result = getImmediateChildOfAttr(e, index, partialAccessor) - or - result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) - or - result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) - or - result = getImmediateChildOfBinaryExpr(e, index, partialAccessor) - or - result = getImmediateChildOfBoxPat(e, index, partialAccessor) - or - result = getImmediateChildOfBreakExpr(e, index, partialAccessor) - or - result = getImmediateChildOfCallExpr(e, index, partialAccessor) - or - result = getImmediateChildOfCastExpr(e, index, partialAccessor) - or - result = getImmediateChildOfCfgAtom(e, index, partialAccessor) - or - result = getImmediateChildOfCfgAttrMeta(e, index, partialAccessor) - or - result = getImmediateChildOfCfgComposite(e, index, partialAccessor) - or - result = getImmediateChildOfCfgMeta(e, index, partialAccessor) - or - result = getImmediateChildOfClosureExpr(e, index, partialAccessor) - or - result = getImmediateChildOfComment(e, index, partialAccessor) - or - result = getImmediateChildOfConstArg(e, index, partialAccessor) - or - result = getImmediateChildOfConstBlockPat(e, index, partialAccessor) - or - result = getImmediateChildOfConstParam(e, index, partialAccessor) - or - result = getImmediateChildOfContinueExpr(e, index, partialAccessor) - or - result = getImmediateChildOfDerefPat(e, index, partialAccessor) - or - result = getImmediateChildOfDocComment(e, index, partialAccessor) - or - result = getImmediateChildOfDynTraitTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfExprStmt(e, index, partialAccessor) - or - result = getImmediateChildOfFieldExpr(e, index, partialAccessor) - or - result = getImmediateChildOfFnPtrTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfForTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfFormatArgsExpr(e, index, partialAccessor) - or - result = getImmediateChildOfIdentPat(e, index, partialAccessor) - or - result = getImmediateChildOfIfExpr(e, index, partialAccessor) - or - result = getImmediateChildOfImplTraitTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfIncludeBytesExpr(e, index, partialAccessor) - or - result = getImmediateChildOfIndexExpr(e, index, partialAccessor) - or - result = getImmediateChildOfInferTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfKeyValueMeta(e, index, partialAccessor) - or - result = getImmediateChildOfLetExpr(e, index, partialAccessor) - or - result = getImmediateChildOfLetStmt(e, index, partialAccessor) - or - result = getImmediateChildOfLifetime(e, index, partialAccessor) - or - result = getImmediateChildOfLifetimeArg(e, index, partialAccessor) - or - result = getImmediateChildOfLifetimeParam(e, index, partialAccessor) - or - result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) - or - result = getImmediateChildOfLiteralPat(e, index, partialAccessor) - or - result = getImmediateChildOfMacroExpr(e, index, partialAccessor) - or - result = getImmediateChildOfMacroPat(e, index, partialAccessor) - or - result = getImmediateChildOfMacroTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfMatchExpr(e, index, partialAccessor) - or - result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) - or - result = getImmediateChildOfNameRef(e, index, partialAccessor) - or - result = getImmediateChildOfNeverTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfNotNull(e, index, partialAccessor) - or - result = getImmediateChildOfOffsetOfExpr(e, index, partialAccessor) - or - result = getImmediateChildOfOrPat(e, index, partialAccessor) - or - result = getImmediateChildOfParam(e, index, partialAccessor) - or - result = getImmediateChildOfParenExpr(e, index, partialAccessor) - or - result = getImmediateChildOfParenPat(e, index, partialAccessor) - or - result = getImmediateChildOfParenTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfPathMeta(e, index, partialAccessor) - or - result = getImmediateChildOfPathPat(e, index, partialAccessor) - or - result = getImmediateChildOfPathTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfPatternTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfPrefixExpr(e, index, partialAccessor) - or - result = getImmediateChildOfPtrTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfRangeExpr(e, index, partialAccessor) - or - result = getImmediateChildOfRangePat(e, index, partialAccessor) - or - result = getImmediateChildOfRefExpr(e, index, partialAccessor) - or - result = getImmediateChildOfRefPat(e, index, partialAccessor) - or - result = getImmediateChildOfRefTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfRestPat(e, index, partialAccessor) - or - result = getImmediateChildOfReturnExpr(e, index, partialAccessor) - or - result = getImmediateChildOfSelfParam(e, index, partialAccessor) - or - result = getImmediateChildOfSlicePat(e, index, partialAccessor) - or - result = getImmediateChildOfSliceTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfStructExpr(e, index, partialAccessor) - or - result = getImmediateChildOfStructFieldList(e, index, partialAccessor) - or - result = getImmediateChildOfStructPat(e, index, partialAccessor) - or - result = getImmediateChildOfTokenTreeMeta(e, index, partialAccessor) - or - result = getImmediateChildOfTryExpr(e, index, partialAccessor) - or - result = getImmediateChildOfTupleExpr(e, index, partialAccessor) - or - result = getImmediateChildOfTupleFieldList(e, index, partialAccessor) - or - result = getImmediateChildOfTuplePat(e, index, partialAccessor) - or - result = getImmediateChildOfTupleStructPat(e, index, partialAccessor) - or - result = getImmediateChildOfTupleTypeRepr(e, index, partialAccessor) - or - result = getImmediateChildOfTypeArg(e, index, partialAccessor) - or - result = getImmediateChildOfTypeParam(e, index, partialAccessor) - or - result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) - or - result = getImmediateChildOfUnsafeMeta(e, index, partialAccessor) - or - result = getImmediateChildOfVariant(e, index, partialAccessor) - or - result = getImmediateChildOfWildcardPat(e, index, partialAccessor) - or - result = getImmediateChildOfYeetExpr(e, index, partialAccessor) - or - result = getImmediateChildOfYieldExpr(e, index, partialAccessor) - or - result = getImmediateChildOfArrayListExpr(e, index, partialAccessor) - or - result = getImmediateChildOfArrayRepeatExpr(e, index, partialAccessor) - or - result = getImmediateChildOfAsmExpr(e, index, partialAccessor) - or - result = getImmediateChildOfBlockExpr(e, index, partialAccessor) - or - result = getImmediateChildOfExternBlock(e, index, partialAccessor) - or - result = getImmediateChildOfExternCrate(e, index, partialAccessor) - or - result = getImmediateChildOfFormatTemplateVariableAccess(e, index, partialAccessor) - or - result = getImmediateChildOfImpl(e, index, partialAccessor) - or - result = getImmediateChildOfMacroDef(e, index, partialAccessor) - or - result = getImmediateChildOfMacroRules(e, index, partialAccessor) - or - result = getImmediateChildOfModule(e, index, partialAccessor) - or - result = getImmediateChildOfPathExpr(e, index, partialAccessor) - or - result = getImmediateChildOfTrait(e, index, partialAccessor) - or - result = getImmediateChildOfUse(e, index, partialAccessor) - or - result = getImmediateChildOfConst(e, index, partialAccessor) - or - result = getImmediateChildOfEnum(e, index, partialAccessor) - or - result = getImmediateChildOfForExpr(e, index, partialAccessor) - or - result = getImmediateChildOfFunction(e, index, partialAccessor) - or - result = getImmediateChildOfLoopExpr(e, index, partialAccessor) - or - result = getImmediateChildOfMacroCall(e, index, partialAccessor) - or - result = getImmediateChildOfStatic(e, index, partialAccessor) - or - result = getImmediateChildOfStruct(e, index, partialAccessor) - or - result = getImmediateChildOfTypeAlias(e, index, partialAccessor) - or - result = getImmediateChildOfUnion(e, index, partialAccessor) - or - result = getImmediateChildOfWhileExpr(e, index, partialAccessor) - } + result = getImmediateChildOfWhileExpr(e, index, partialAccessor) +} } /** - * Gets the "immediate" parent of `e`. "Immediate" means not taking into account node resolution: for example - * if `e` has conversions, `getImmediateParent(e)` will give the innermost conversion in the hidden AST. - */ +* Gets the "immediate" parent of `e`. "Immediate" means not taking into account node resolution: for example +* if `e` has conversions, `getImmediateParent(e)` will give the innermost conversion in the hidden AST. +*/ Element getImmediateParent(Element e) { - // `unique` is used here to tell the optimizer that there is in fact only one result - // this is tested by the `library-tests/parent/no_double_parents.ql` test - result = unique(Element x | e = Impl::getImmediateChild(x, _, _) | x) + // `unique` is used here to tell the optimizer that there is in fact only one result + // this is tested by the `library-tests/parent/no_double_parents.ql` test + result = unique(Element x | e = Impl::getImmediateChild(x, _, _) | x) } /** - * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. - */ +* Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. +*/ Element getImmediateChild(Element e, int index) { result = Impl::getImmediateChild(e, index, _) } /** - * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. - */ +* Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. +*/ Element getImmediateChildAndAccessor(Element e, int index, string accessor) { - exists(string partialAccessor | - result = Impl::getImmediateChild(e, index, partialAccessor) and - accessor = "get" + partialAccessor - ) + exists(string partialAccessor | result = Impl::getImmediateChild(e, index, partialAccessor) and accessor = "get" + partialAccessor) } /** - * Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. - */ +* Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. +*/ Element getChildAndAccessor(Element e, int index, string accessor) { - exists(string partialAccessor | - result = Impl::getImmediateChild(e, index, partialAccessor).resolve() and - accessor = "get" + partialAccessor - ) + exists(string partialAccessor | result = Impl::getImmediateChild(e, index, partialAccessor).resolve() and accessor = "get" + partialAccessor) } /** - * Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. - */ -Element getChild(Element e, int index) { result = Impl::getImmediateChild(e, index, _).resolve() } +* Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. +*/ +Element getChild(Element e, int index) { + result = Impl::getImmediateChild(e, index, _).resolve() +} 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 a8196bbd3738..6bcab8836037 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -10,55 +10,85 @@ module Raw { */ class Element extends @element { string toString() { none() } + + } + + /** * INTERNAL: Do not use. */ class ExtractorStep extends @extractor_step, Element { + override string toString() { result = "ExtractorStep" } /** * Gets the action of this extractor step. + * */ - string getAction() { extractor_steps(this, result, _) } - + string getAction() { + extractor_steps(this, result, _) + } /** * Gets the file of this extractor step, if it exists. + * */ - File getFile() { extractor_step_files(this, result) } - + File getFile() { + extractor_step_files(this, result) + } /** * Gets the duration ms of this extractor step. + * */ - int getDurationMs() { extractor_steps(this, _, result) } + int getDurationMs() { + extractor_steps(this, _, result) + } } - private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index) { none() } + + private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index) { + none() + } /** * INTERNAL: Do not use. */ - class Locatable extends @locatable, Element { } + class Locatable extends @locatable, Element { + + + + } + + /** * INTERNAL: Do not use. */ class NamedCrate extends @named_crate, Element { + override string toString() { result = "NamedCrate" } /** * Gets the name of this named crate. + * */ - string getName() { named_crates(this, result, _) } - + string getName() { + named_crates(this, result, _) + } /** * Gets the crate of this named crate. + * */ - Crate getCrate() { named_crates(this, _, result) } + Crate getCrate() { + named_crates(this, _, result) + } } - private Element getImmediateChildOfNamedCrate(NamedCrate e, int index) { none() } + + private Element getImmediateChildOfNamedCrate(NamedCrate e, int index) { + none() + } /** * INTERNAL: Do not use. @@ -67,44 +97,66 @@ module Raw { * * insufficient context information * * yet unimplemented parts of the extractor */ - class Unextracted extends @unextracted, Element { } + class Unextracted extends @unextracted, Element { + + + + } + + /** * INTERNAL: Do not use. */ - class AstNode extends @ast_node, Locatable { } + class AstNode extends @ast_node, Locatable { + + + + } + + /** * INTERNAL: Do not use. */ class Crate extends @crate, Locatable { + override string toString() { result = "Crate" } /** * Gets the name of this crate, if it exists. + * */ - string getName() { crate_names(this, result) } - + string getName() { + crate_names(this, result) + } /** * Gets the version of this crate, if it exists. + * */ - string getVersion() { crate_versions(this, result) } - + string getVersion() { + crate_versions(this, result) + } /** * Gets the `index`th cfg option of this crate (0-based). + * */ - string getCfgOption(int index) { crate_cfg_options(this, index, result) } - + string getCfgOption(int index) { + crate_cfg_options(this, index, result) + } /** * Gets the number of cfg options of this crate. */ - int getNumberOfCfgOptions() { result = count(int i | crate_cfg_options(this, i, _)) } - + int getNumberOfCfgOptions() { + result = count(int i | crate_cfg_options(this, i, _)) + } /** * Gets the `index`th named dependency of this crate (0-based). + * */ - NamedCrate getNamedDependency(int index) { crate_named_dependencies(this, index, result) } - + NamedCrate getNamedDependency(int index) { + crate_named_dependencies(this, index, result) + } /** * Gets the number of named dependencies of this crate. * INTERNAL: Do not use. @@ -114,32 +166,45 @@ module Raw { } } - private Element getImmediateChildOfCrate(Crate e, int index) { none() } + + private Element getImmediateChildOfCrate(Crate e, int index) { + none() + } /** * INTERNAL: Do not use. * The base class marking errors during parsing or resolution. */ class Missing extends @missing, Unextracted { + override string toString() { result = "Missing" } + } - private Element getImmediateChildOfMissing(Missing e, int index) { none() } + + private Element getImmediateChildOfMissing(Missing e, int index) { + none() + } /** * INTERNAL: Do not use. * The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. */ class Unimplemented extends @unimplemented, Unextracted { + override string toString() { result = "Unimplemented" } + } - private Element getImmediateChildOfUnimplemented(Unimplemented e, int index) { none() } + + private Element getImmediateChildOfUnimplemented(Unimplemented e, int index) { + none() + } /** * INTERNAL: Do not use. * An ABI specification for an extern function or block. - * + * * For example: * ```rust * extern "C" fn foo() {} @@ -147,33 +212,52 @@ module Raw { * ``` */ class Abi extends @abi, AstNode { + override string toString() { result = "Abi" } /** * Gets the abi string of this abi, if it exists. + * */ - string getAbiString() { abi_abi_strings(this, result) } + string getAbiString() { + abi_abi_strings(this, result) + } } - private Element getImmediateChildOfAbi(Abi e, int index) { none() } + + private Element getImmediateChildOfAbi(Abi e, int index) { + none() + } /** * INTERNAL: Do not use. * Something that can be addressed by a path. - * + * * TODO: This does not yet include all possible cases. */ - class Addressable extends @addressable, AstNode { } + class Addressable extends @addressable, AstNode { + + + + } + + /** * INTERNAL: Do not use. */ - class AnyAttr extends @any_attr, AstNode { } + class AnyAttr extends @any_attr, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A list of arguments in a function or method call. - * + * * For example: * ```rust * foo(1, 2, 3); @@ -181,35 +265,42 @@ module Raw { * ``` */ class ArgList extends @arg_list, AstNode { + override string toString() { result = "ArgList" } /** * Gets the `index`th argument of this argument list (0-based). + * */ - Expr getArg(int index) { arg_list_args(this, index, result) } - + Expr getArg(int index) { + arg_list_args(this, index, result) + } /** * Gets the number of arguments of this argument list. */ - int getNumberOfArgs() { result = count(int i | arg_list_args(this, i, _)) } + int getNumberOfArgs() { + result = count(int i | arg_list_args(this, i, _)) + } } + private Element getImmediateChildOfArgList(ArgList e, int index) { - exists(int n, int nArg | - n = 0 and - nArg = n + e.getNumberOfArgs() and - ( - none() - or - result = e.getArg(index - n) - ) - ) - } + + exists(int n, int nArg | + n = 0 + and + nArg = n + e.getNumberOfArgs() + and ( + none() + or + result = e.getArg(index - n) + )) + } /** * INTERNAL: Do not use. * An inline assembly direction specifier. - * + * * For example: * ```rust * use core::arch::asm; @@ -218,20 +309,31 @@ module Raw { * ``` */ class AsmDirSpec extends @asm_dir_spec, AstNode { + override string toString() { result = "AsmDirSpec" } + } - private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index) { none() } + + private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index) { + none() + } /** * INTERNAL: Do not use. */ - class AsmOperand extends @asm_operand, AstNode { } + class AsmOperand extends @asm_operand, AstNode { + + + + } + + /** * INTERNAL: Do not use. * An operand expression in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -240,38 +342,47 @@ module Raw { * ``` */ class AsmOperandExpr extends @asm_operand_expr, AstNode { + override string toString() { result = "AsmOperandExpr" } /** * Gets the in expression of this asm operand expression, if it exists. + * */ - Expr getInExpr() { asm_operand_expr_in_exprs(this, result) } - + Expr getInExpr() { + asm_operand_expr_in_exprs(this, result) + } /** * Gets the out expression of this asm operand expression, if it exists. + * */ - Expr getOutExpr() { asm_operand_expr_out_exprs(this, result) } + Expr getOutExpr() { + asm_operand_expr_out_exprs(this, result) + } } + private Element getImmediateChildOfAsmOperandExpr(AsmOperandExpr e, int index) { - exists(int n, int nInExpr, int nOutExpr | - n = 0 and - nInExpr = n + 1 and - nOutExpr = nInExpr + 1 and - ( - none() - or - index = n and result = e.getInExpr() - or - index = nInExpr and result = e.getOutExpr() - ) - ) - } + + exists(int n, int nInExpr, int nOutExpr | + n = 0 + and + nInExpr = n + 1 + and + nOutExpr = nInExpr + 1 + and ( + none() + or + index = n and result = e.getInExpr() + or + index = nInExpr and result = e.getOutExpr() + )) + } /** * INTERNAL: Do not use. * An option in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -280,25 +391,38 @@ module Raw { * ``` */ class AsmOption extends @asm_option, AstNode { + override string toString() { result = "AsmOption" } /** * Holds if this asm option is raw. + * */ - predicate isRaw() { asm_option_is_raw(this) } + predicate isRaw() { + asm_option_is_raw(this) + } } - private Element getImmediateChildOfAsmOption(AsmOption e, int index) { none() } + + private Element getImmediateChildOfAsmOption(AsmOption e, int index) { + none() + } /** * INTERNAL: Do not use. */ - class AsmPiece extends @asm_piece, AstNode { } + class AsmPiece extends @asm_piece, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A register specification in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -307,105 +431,145 @@ module Raw { * ``` */ class AsmRegSpec extends @asm_reg_spec, AstNode { + override string toString() { result = "AsmRegSpec" } /** * Gets the identifier of this asm reg spec, if it exists. + * */ - NameRef getIdentifier() { asm_reg_spec_identifiers(this, result) } + NameRef getIdentifier() { + asm_reg_spec_identifiers(this, result) + } } + private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index) { - exists(int n, int nIdentifier | - n = 0 and - nIdentifier = n + 1 and - ( - none() - or - index = n and result = e.getIdentifier() - ) - ) - } + + exists(int n, int nIdentifier | + n = 0 + and + nIdentifier = n + 1 + and ( + none() + or + index = n and result = e.getIdentifier() + )) + } /** * INTERNAL: Do not use. * A list of `AssocItem` elements, as appearing in a `Trait` or `Impl`. */ class AssocItemList extends @assoc_item_list, AstNode { + override string toString() { result = "AssocItemList" } /** * Gets the `index`th assoc item of this assoc item list (0-based). + * */ - AssocItem getAssocItem(int index) { assoc_item_list_assoc_items(this, index, result) } - + AssocItem getAssocItem(int index) { + assoc_item_list_assoc_items(this, index, result) + } /** * Gets the number of assoc items of this assoc item list. */ - int getNumberOfAssocItems() { result = count(int i | assoc_item_list_assoc_items(this, i, _)) } - + int getNumberOfAssocItems() { + result = count(int i | assoc_item_list_assoc_items(this, i, _)) + } /** * Gets the `index`th attr of this assoc item list (0-based). + * */ - AnyAttr getAttr(int index) { assoc_item_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + assoc_item_list_attrs(this, index, result) + } /** * Gets the number of attrs of this assoc item list. */ - int getNumberOfAttrs() { result = count(int i | assoc_item_list_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | assoc_item_list_attrs(this, i, _)) + } } + private Element getImmediateChildOfAssocItemList(AssocItemList e, int index) { - exists(int n, int nAssocItem, int nAttr | - n = 0 and - nAssocItem = n + e.getNumberOfAssocItems() and - nAttr = nAssocItem + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAssocItem(index - n) - or - result = e.getAttr(index - nAssocItem) - ) - ) - } + + exists(int n, int nAssocItem, int nAttr | + n = 0 + and + nAssocItem = n + e.getNumberOfAssocItems() + and + nAttr = nAssocItem + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAssocItem(index - n) + or + result = e.getAttr(index - nAssocItem) + )) + } /** * INTERNAL: Do not use. * A callable. Either a `Function` or a `ClosureExpr`. */ class Callable extends @callable, AstNode { + + + /** * Gets the parameter list of this callable, if it exists. + * */ - ParamList getParamList() { callable_param_lists(this, result) } - + ParamList getParamList() { + callable_param_lists(this, result) + } /** * Gets the `index`th attr of this callable (0-based). + * */ - AnyAttr getAttr(int index) { callable_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + callable_attrs(this, index, result) + } /** * Gets the number of attrs of this callable. */ - int getNumberOfAttrs() { result = count(int i | callable_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | callable_attrs(this, i, _)) + } } + + /** * INTERNAL: Do not use. */ - class CfgPredicate extends @cfg_predicate, AstNode { } + class CfgPredicate extends @cfg_predicate, AstNode { + + + + } + + /** * INTERNAL: Do not use. * The base class for expressions. */ - class Expr extends @expr, AstNode { } + class Expr extends @expr, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A list of items inside an extern block. - * + * * For example: * ```rust * extern "C" { @@ -415,23 +579,29 @@ module Raw { * ``` */ class ExternItemList extends @extern_item_list, AstNode { + override string toString() { result = "ExternItemList" } /** * Gets the `index`th attr of this extern item list (0-based). + * */ - AnyAttr getAttr(int index) { extern_item_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + extern_item_list_attrs(this, index, result) + } /** * Gets the number of attrs of this extern item list. */ - int getNumberOfAttrs() { result = count(int i | extern_item_list_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | extern_item_list_attrs(this, i, _)) + } /** * Gets the `index`th extern item of this extern item list (0-based). + * */ - ExternItem getExternItem(int index) { extern_item_list_extern_items(this, index, result) } - + ExternItem getExternItem(int index) { + extern_item_list_extern_items(this, index, result) + } /** * Gets the number of extern items of this extern item list. */ @@ -440,25 +610,28 @@ module Raw { } } + private Element getImmediateChildOfExternItemList(ExternItemList e, int index) { - exists(int n, int nAttr, int nExternItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExternItem = nAttr + e.getNumberOfExternItems() and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getExternItem(index - nAttr) - ) - ) - } + + exists(int n, int nAttr, int nExternItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExternItem = nAttr + e.getNumberOfExternItems() + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getExternItem(index - nAttr) + )) + } /** * INTERNAL: Do not use. * A list of fields in a struct or enum variant. - * + * * For example: * ```rust * struct S {x: i32, y: i32} @@ -467,43 +640,55 @@ module Raw { * // ^^^^^^^^^^^^^ * ``` */ - class FieldList extends @field_list, AstNode { } + class FieldList extends @field_list, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A for binder, specifying lifetime or type parameters for a closure or a type. - * + * * For example: * ```rust * let print_any = for |x: T| { * // ^^^^^^^^^^^^^^^^^^^^^^^ * println!("{:?}", x); * }; - * + * * print_any(42); * print_any("hello"); * ``` */ class ForBinder extends @for_binder, AstNode { + override string toString() { result = "ForBinder" } /** * Gets the generic parameter list of this for binder, if it exists. + * */ - GenericParamList getGenericParamList() { for_binder_generic_param_lists(this, result) } + GenericParamList getGenericParamList() { + for_binder_generic_param_lists(this, result) + } } + private Element getImmediateChildOfForBinder(ForBinder e, int index) { - exists(int n, int nGenericParamList | - n = 0 and - nGenericParamList = n + 1 and - ( - none() - or - index = n and result = e.getGenericParamList() - ) - ) - } + + exists(int n, int nGenericParamList | + n = 0 + and + nGenericParamList = n + 1 + and ( + none() + or + index = n and result = e.getGenericParamList() + )) + } /** * INTERNAL: Do not use. @@ -513,45 +698,60 @@ module Raw { * ``` */ class FormatArgsArg extends @format_args_arg, AstNode { + override string toString() { result = "FormatArgsArg" } /** * Gets the expression of this format arguments argument, if it exists. + * */ - Expr getExpr() { format_args_arg_exprs(this, result) } - + Expr getExpr() { + format_args_arg_exprs(this, result) + } /** * Gets the name of this format arguments argument, if it exists. + * */ - Name getName() { format_args_arg_names(this, result) } + Name getName() { + format_args_arg_names(this, result) + } } + private Element getImmediateChildOfFormatArgsArg(FormatArgsArg e, int index) { - exists(int n, int nExpr, int nName | - n = 0 and - nExpr = n + 1 and - nName = nExpr + 1 and - ( - none() - or - index = n and result = e.getExpr() - or - index = nExpr and result = e.getName() - ) - ) - } + + exists(int n, int nExpr, int nName | + n = 0 + and + nExpr = n + 1 + and + nName = nExpr + 1 + and ( + none() + or + index = n and result = e.getExpr() + or + index = nExpr and result = e.getName() + )) + } /** * INTERNAL: Do not use. * A generic argument in a generic argument list. - * + * * For example: * ```rust * Foo:: * // ^^^^^^^^^^^ * ``` */ - class GenericArg extends @generic_arg, AstNode { } + class GenericArg extends @generic_arg, AstNode { + + + + } + + /** * INTERNAL: Do not use. @@ -561,13 +761,16 @@ module Raw { * ``` */ class GenericArgList extends @generic_arg_list, AstNode { + override string toString() { result = "GenericArgList" } /** * Gets the `index`th generic argument of this generic argument list (0-based). + * */ - GenericArg getGenericArg(int index) { generic_arg_list_generic_args(this, index, result) } - + GenericArg getGenericArg(int index) { + generic_arg_list_generic_args(this, index, result) + } /** * Gets the number of generic arguments of this generic argument list. */ @@ -576,29 +779,37 @@ module Raw { } } + private Element getImmediateChildOfGenericArgList(GenericArgList e, int index) { - exists(int n, int nGenericArg | - n = 0 and - nGenericArg = n + e.getNumberOfGenericArgs() and - ( - none() - or - result = e.getGenericArg(index - n) - ) - ) - } + + exists(int n, int nGenericArg | + n = 0 + and + nGenericArg = n + e.getNumberOfGenericArgs() + and ( + none() + or + result = e.getGenericArg(index - n) + )) + } /** * INTERNAL: Do not use. * A generic parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo(t: T, u: U) {} * // ^ ^ * ``` */ - class GenericParam extends @generic_param, AstNode { } + class GenericParam extends @generic_param, AstNode { + + + + } + + /** * INTERNAL: Do not use. @@ -611,15 +822,16 @@ module Raw { * ``` */ class GenericParamList extends @generic_param_list, AstNode { + override string toString() { result = "GenericParamList" } /** * Gets the `index`th generic parameter of this generic parameter list (0-based). + * */ GenericParam getGenericParam(int index) { generic_param_list_generic_params(this, index, result) } - /** * Gets the number of generic parameters of this generic parameter list. */ @@ -628,47 +840,55 @@ module Raw { } } + private Element getImmediateChildOfGenericParamList(GenericParamList e, int index) { - exists(int n, int nGenericParam | - n = 0 and - nGenericParam = n + e.getNumberOfGenericParams() and - ( - none() - or - result = e.getGenericParam(index - n) - ) - ) - } + + exists(int n, int nGenericParam | + n = 0 + and + nGenericParam = n + e.getNumberOfGenericParams() + and ( + none() + or + result = e.getGenericParam(index - n) + )) + } /** * INTERNAL: Do not use. * An implementation restriction, limiting where a trait can be implemented. For example the `impl(crate)` restriction (an unstable feature). */ class ImplRestriction extends @impl_restriction, AstNode { + override string toString() { result = "ImplRestriction" } /** * Gets the visibility inner of this impl restriction, if it exists. + * */ - VisibilityInner getVisibilityInner() { impl_restriction_visibility_inners(this, result) } + VisibilityInner getVisibilityInner() { + impl_restriction_visibility_inners(this, result) + } } + private Element getImmediateChildOfImplRestriction(ImplRestriction e, int index) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() - ) - ) - } + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() + )) + } /** * INTERNAL: Do not use. * A list of items in a module or block. - * + * * For example: * ```rust * mod m { @@ -678,43 +898,54 @@ module Raw { * ``` */ class ItemList extends @item_list, AstNode { + override string toString() { result = "ItemList" } /** * Gets the `index`th attr of this item list (0-based). + * */ - AnyAttr getAttr(int index) { item_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + item_list_attrs(this, index, result) + } /** * Gets the number of attrs of this item list. */ - int getNumberOfAttrs() { result = count(int i | item_list_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | item_list_attrs(this, i, _)) + } /** * Gets the `index`th item of this item list (0-based). + * */ - Item getItem(int index) { item_list_items(this, index, result) } - + Item getItem(int index) { + item_list_items(this, index, result) + } /** * Gets the number of items of this item list. */ - int getNumberOfItems() { result = count(int i | item_list_items(this, i, _)) } + int getNumberOfItems() { + result = count(int i | item_list_items(this, i, _)) + } } + private Element getImmediateChildOfItemList(ItemList e, int index) { - exists(int n, int nAttr, int nItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nItem = nAttr + e.getNumberOfItems() and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getItem(index - nAttr) - ) - ) - } + + exists(int n, int nAttr, int nItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nItem = nAttr + e.getNumberOfItems() + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getItem(index - nAttr) + )) + } /** * INTERNAL: Do not use. @@ -727,30 +958,36 @@ module Raw { * ``` */ class Label extends @label, AstNode { + override string toString() { result = "Label" } /** * Gets the lifetime of this label, if it exists. + * */ - Lifetime getLifetime() { label_lifetimes(this, result) } + Lifetime getLifetime() { + label_lifetimes(this, result) + } } + private Element getImmediateChildOfLabel(Label e, int index) { - exists(int n, int nLifetime | - n = 0 and - nLifetime = n + 1 and - ( - none() - or - index = n and result = e.getLifetime() - ) - ) - } + + exists(int n, int nLifetime | + n = 0 + and + nLifetime = n + 1 + and ( + none() + or + index = n and result = e.getLifetime() + )) + } /** * INTERNAL: Do not use. * An else block in a let-else statement. - * + * * For example: * ```rust * let Some(x) = opt else { @@ -760,25 +997,31 @@ module Raw { * ``` */ class LetElse extends @let_else, AstNode { + override string toString() { result = "LetElse" } /** * Gets the block expression of this let else, if it exists. + * */ - BlockExpr getBlockExpr() { let_else_block_exprs(this, result) } + BlockExpr getBlockExpr() { + let_else_block_exprs(this, result) + } } + private Element getImmediateChildOfLetElse(LetElse e, int index) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() - ) - ) - } + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() + )) + } /** * INTERNAL: Do not use. @@ -786,42 +1029,49 @@ module Raw { * ```rust * mod foo{ * include!("common_definitions.rs"); - * + * * #[an_attribute_macro] * fn foo() { * println!("Hello, world!"); * } - * + * * #[derive(Debug)] * struct Bar; * } * ``` */ class MacroItems extends @macro_items, AstNode { + override string toString() { result = "MacroItems" } /** * Gets the `index`th item of this macro items (0-based). + * */ - Item getItem(int index) { macro_items_items(this, index, result) } - + Item getItem(int index) { + macro_items_items(this, index, result) + } /** * Gets the number of items of this macro items. */ - int getNumberOfItems() { result = count(int i | macro_items_items(this, i, _)) } + int getNumberOfItems() { + result = count(int i | macro_items_items(this, i, _)) + } } + private Element getImmediateChildOfMacroItems(MacroItems e, int index) { - exists(int n, int nItem | - n = 0 and - nItem = n + e.getNumberOfItems() and - ( - none() - or - result = e.getItem(index - n) - ) - ) - } + + exists(int n, int nItem | + n = 0 + and + nItem = n + e.getNumberOfItems() + and ( + none() + or + result = e.getItem(index - n) + )) + } /** * INTERNAL: Do not use. @@ -840,59 +1090,75 @@ module Raw { * ``` */ class MatchArm extends @match_arm, AstNode { + override string toString() { result = "MatchArm" } /** * Gets the `index`th attr of this match arm (0-based). + * */ - AnyAttr getAttr(int index) { match_arm_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + match_arm_attrs(this, index, result) + } /** * Gets the number of attrs of this match arm. */ - int getNumberOfAttrs() { result = count(int i | match_arm_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | match_arm_attrs(this, i, _)) + } /** * Gets the expression of this match arm, if it exists. + * */ - Expr getExpr() { match_arm_exprs(this, result) } - + Expr getExpr() { + match_arm_exprs(this, result) + } /** * Gets the guard of this match arm, if it exists. + * */ - MatchGuard getGuard() { match_arm_guards(this, result) } - + MatchGuard getGuard() { + match_arm_guards(this, result) + } /** * Gets the pattern of this match arm, if it exists. + * */ - Pat getPat() { match_arm_pats(this, result) } + Pat getPat() { + match_arm_pats(this, result) + } } + private Element getImmediateChildOfMatchArm(MatchArm e, int index) { - exists(int n, int nAttr, int nExpr, int nGuard, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nGuard = nExpr + 1 and - nPat = nGuard + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getGuard() - or - index = nGuard and result = e.getPat() - ) - ) - } + + exists(int n, int nAttr, int nExpr, int nGuard, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nGuard = nExpr + 1 + and + nPat = nGuard + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getGuard() + or + index = nGuard and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A list of arms in a match expression. - * + * * For example: * ```rust * match x { @@ -904,48 +1170,59 @@ module Raw { * ``` */ class MatchArmList extends @match_arm_list, AstNode { + override string toString() { result = "MatchArmList" } /** * Gets the `index`th arm of this match arm list (0-based). + * */ - MatchArm getArm(int index) { match_arm_list_arms(this, index, result) } - + MatchArm getArm(int index) { + match_arm_list_arms(this, index, result) + } /** * Gets the number of arms of this match arm list. */ - int getNumberOfArms() { result = count(int i | match_arm_list_arms(this, i, _)) } - + int getNumberOfArms() { + result = count(int i | match_arm_list_arms(this, i, _)) + } /** * Gets the `index`th attr of this match arm list (0-based). + * */ - AnyAttr getAttr(int index) { match_arm_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + match_arm_list_attrs(this, index, result) + } /** * Gets the number of attrs of this match arm list. */ - int getNumberOfAttrs() { result = count(int i | match_arm_list_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | match_arm_list_attrs(this, i, _)) + } } + private Element getImmediateChildOfMatchArmList(MatchArmList e, int index) { - exists(int n, int nArm, int nAttr | - n = 0 and - nArm = n + e.getNumberOfArms() and - nAttr = nArm + e.getNumberOfAttrs() and - ( - none() - or - result = e.getArm(index - n) - or - result = e.getAttr(index - nArm) - ) - ) - } + + exists(int n, int nArm, int nAttr | + n = 0 + and + nArm = n + e.getNumberOfArms() + and + nAttr = nArm + e.getNumberOfAttrs() + and ( + none() + or + result = e.getArm(index - n) + or + result = e.getAttr(index - nArm) + )) + } /** * INTERNAL: Do not use. * A guard condition in a match arm. - * + * * For example: * ```rust * match x { @@ -956,30 +1233,36 @@ module Raw { * ``` */ class MatchGuard extends @match_guard, AstNode { + override string toString() { result = "MatchGuard" } /** * Gets the condition of this match guard, if it exists. + * */ - Expr getCondition() { match_guard_conditions(this, result) } + Expr getCondition() { + match_guard_conditions(this, result) + } } + private Element getImmediateChildOfMatchGuard(MatchGuard e, int index) { - exists(int n, int nCondition | - n = 0 and - nCondition = n + 1 and - ( - none() - or - index = n and result = e.getCondition() - ) - ) - } + + exists(int n, int nCondition | + n = 0 + and + nCondition = n + 1 + and ( + none() + or + index = n and result = e.getCondition() + )) + } /** * INTERNAL: Do not use. * A meta item in an attribute. - * + * * For example: * ```rust * #[unsafe(lint::name = "reason_for_bypass")] @@ -991,42 +1274,56 @@ module Raw { * } * ``` */ - class Meta extends @meta, AstNode { } + class Meta extends @meta, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A mutability restriction, limiting where a field can be mutated. For example the `mut(crate)` restriction (an unstable feature). */ class MutRestriction extends @mut_restriction, AstNode { + override string toString() { result = "MutRestriction" } /** * Holds if this mut restriction is mut. + * */ - predicate isMut() { mut_restriction_is_mut(this) } - + predicate isMut() { + mut_restriction_is_mut(this) + } /** * Gets the visibility inner of this mut restriction, if it exists. + * */ - VisibilityInner getVisibilityInner() { mut_restriction_visibility_inners(this, result) } + VisibilityInner getVisibilityInner() { + mut_restriction_visibility_inners(this, result) + } } + private Element getImmediateChildOfMutRestriction(MutRestriction e, int index) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() - ) - ) - } + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() + )) + } /** * INTERNAL: Do not use. * An identifier name. - * + * * For example: * ```rust * let foo = 1; @@ -1034,41 +1331,59 @@ module Raw { * ``` */ class Name extends @name, AstNode { + override string toString() { result = "Name" } /** * Gets the text of this name, if it exists. + * */ - string getText() { name_texts(this, result) } + string getText() { + name_texts(this, result) + } } - private Element getImmediateChildOfName(Name e, int index) { none() } + + private Element getImmediateChildOfName(Name e, int index) { + none() + } /** * INTERNAL: Do not use. * A normal parameter, `Param`, or a self parameter `SelfParam`. */ class ParamBase extends @param_base, AstNode { + + + /** * Gets the `index`th attr of this parameter base (0-based). + * */ - AnyAttr getAttr(int index) { param_base_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + param_base_attrs(this, index, result) + } /** * Gets the number of attrs of this parameter base. */ - int getNumberOfAttrs() { result = count(int i | param_base_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | param_base_attrs(this, i, _)) + } /** * Gets the type representation of this parameter base, if it exists. + * */ - TypeRepr getTypeRepr() { param_base_type_reprs(this, result) } + TypeRepr getTypeRepr() { + param_base_type_reprs(this, result) + } } + + /** * INTERNAL: Do not use. * A list of parameters in a function, method, or closure declaration. - * + * * For example: * ```rust * fn foo(x: i32, y: i32) {} @@ -1076,43 +1391,53 @@ module Raw { * ``` */ class ParamList extends @param_list, AstNode { + override string toString() { result = "ParamList" } /** * Gets the `index`th parameter of this parameter list (0-based). + * */ - Param getParam(int index) { param_list_params(this, index, result) } - + Param getParam(int index) { + param_list_params(this, index, result) + } /** * Gets the number of parameters of this parameter list. */ - int getNumberOfParams() { result = count(int i | param_list_params(this, i, _)) } - + int getNumberOfParams() { + result = count(int i | param_list_params(this, i, _)) + } /** * Gets the self parameter of this parameter list, if it exists. + * */ - SelfParam getSelfParam() { param_list_self_params(this, result) } + SelfParam getSelfParam() { + param_list_self_params(this, result) + } } + private Element getImmediateChildOfParamList(ParamList e, int index) { - exists(int n, int nParam, int nSelfParam | - n = 0 and - nParam = n + e.getNumberOfParams() and - nSelfParam = nParam + 1 and - ( - none() - or - result = e.getParam(index - n) - or - index = nParam and result = e.getSelfParam() - ) - ) - } + + exists(int n, int nParam, int nSelfParam | + n = 0 + and + nParam = n + e.getNumberOfParams() + and + nSelfParam = nParam + 1 + and ( + none() + or + result = e.getParam(index - n) + or + index = nParam and result = e.getSelfParam() + )) + } /** * INTERNAL: Do not use. * A parenthesized argument list as used in function traits. - * + * * For example: * ```rust * fn call_with_42(f: F) -> i32 @@ -1125,13 +1450,16 @@ module Raw { * ``` */ class ParenthesizedArgList extends @parenthesized_arg_list, AstNode { + override string toString() { result = "ParenthesizedArgList" } /** * Gets the `index`th type argument of this parenthesized argument list (0-based). + * */ - TypeArg getTypeArg(int index) { parenthesized_arg_list_type_args(this, index, result) } - + TypeArg getTypeArg(int index) { + parenthesized_arg_list_type_args(this, index, result) + } /** * Gets the number of type arguments of this parenthesized argument list. */ @@ -1140,23 +1468,31 @@ module Raw { } } + private Element getImmediateChildOfParenthesizedArgList(ParenthesizedArgList e, int index) { - exists(int n, int nTypeArg | - n = 0 and - nTypeArg = n + e.getNumberOfTypeArgs() and - ( - none() - or - result = e.getTypeArg(index - n) - ) - ) - } + + exists(int n, int nTypeArg | + n = 0 + and + nTypeArg = n + e.getNumberOfTypeArgs() + and ( + none() + or + result = e.getTypeArg(index - n) + )) + } /** * INTERNAL: Do not use. * The base class for patterns. */ - class Pat extends @pat, AstNode { } + class Pat extends @pat, AstNode { + + + + } + + /** * INTERNAL: Do not use. @@ -1167,45 +1503,62 @@ module Raw { * ``` */ class Path extends @path, AstNode { + override string toString() { result = "Path" } /** * Gets the qualifier of this path, if it exists. + * */ - Path getQualifier() { path_qualifiers(this, result) } - + Path getQualifier() { + path_qualifiers(this, result) + } /** * Gets the last segment of this path, if it exists. + * */ - PathSegment getSegment() { path_segments_(this, result) } + PathSegment getSegment() { + path_segments_(this, result) + } } + private Element getImmediateChildOfPath(Path e, int index) { - exists(int n, int nQualifier, int nSegment | - n = 0 and - nQualifier = n + 1 and - nSegment = nQualifier + 1 and - ( - none() - or - index = n and result = e.getQualifier() - or - index = nQualifier and result = e.getSegment() - ) - ) - } + + exists(int n, int nQualifier, int nSegment | + n = 0 + and + nQualifier = n + 1 + and + nSegment = nQualifier + 1 + and ( + none() + or + index = n and result = e.getQualifier() + or + index = nQualifier and result = e.getSegment() + )) + } /** * INTERNAL: Do not use. * An AST element wrapping a path (`PathExpr`, `RecordExpr`, `PathPat`, `RecordPat`, `TupleStructPat`). */ class PathAstNode extends @path_ast_node, AstNode { + + + /** * Gets the path of this path ast node, if it exists. + * */ - Path getPath() { path_ast_node_paths(this, result) } + Path getPath() { + path_ast_node_paths(this, result) + } } + + /** * INTERNAL: Do not use. * A path segment, which is one part of a whole path. @@ -1217,83 +1570,102 @@ module Raw { * - `` */ class PathSegment extends @path_segment, AstNode { + override string toString() { result = "PathSegment" } /** * Gets the generic argument list of this path segment, if it exists. + * */ - GenericArgList getGenericArgList() { path_segment_generic_arg_lists(this, result) } - + GenericArgList getGenericArgList() { + path_segment_generic_arg_lists(this, result) + } /** * Gets the identifier of this path segment, if it exists. + * */ - NameRef getIdentifier() { path_segment_identifiers(this, result) } - + NameRef getIdentifier() { + path_segment_identifiers(this, result) + } /** * Gets the parenthesized argument list of this path segment, if it exists. + * */ ParenthesizedArgList getParenthesizedArgList() { path_segment_parenthesized_arg_lists(this, result) } - /** * Gets the ret type of this path segment, if it exists. + * */ - RetTypeRepr getRetType() { path_segment_ret_types(this, result) } - + RetTypeRepr getRetType() { + path_segment_ret_types(this, result) + } /** * Gets the return type syntax of this path segment, if it exists. + * */ - ReturnTypeSyntax getReturnTypeSyntax() { path_segment_return_type_syntaxes(this, result) } - + ReturnTypeSyntax getReturnTypeSyntax() { + path_segment_return_type_syntaxes(this, result) + } /** * Gets the type representation of this path segment, if it exists. + * */ - TypeRepr getTypeRepr() { path_segment_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + path_segment_type_reprs(this, result) + } /** * Gets the trait type representation of this path segment, if it exists. + * */ - PathTypeRepr getTraitTypeRepr() { path_segment_trait_type_reprs(this, result) } + PathTypeRepr getTraitTypeRepr() { + path_segment_trait_type_reprs(this, result) + } } + private Element getImmediateChildOfPathSegment(PathSegment e, int index) { - exists( - int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, - int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr - | - n = 0 and - nGenericArgList = n + 1 and - nIdentifier = nGenericArgList + 1 and - nParenthesizedArgList = nIdentifier + 1 and - nRetType = nParenthesizedArgList + 1 and - nReturnTypeSyntax = nRetType + 1 and - nTypeRepr = nReturnTypeSyntax + 1 and - nTraitTypeRepr = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getParenthesizedArgList() - or - index = nParenthesizedArgList and result = e.getRetType() - or - index = nRetType and result = e.getReturnTypeSyntax() - or - index = nReturnTypeSyntax and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTraitTypeRepr() - ) - ) - } + + exists(int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr | + n = 0 + and + nGenericArgList = n + 1 + and + nIdentifier = nGenericArgList + 1 + and + nParenthesizedArgList = nIdentifier + 1 + and + nRetType = nParenthesizedArgList + 1 + and + nReturnTypeSyntax = nRetType + 1 + and + nTypeRepr = nReturnTypeSyntax + 1 + and + nTraitTypeRepr = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getParenthesizedArgList() + or + index = nParenthesizedArgList and result = e.getRetType() + or + index = nRetType and result = e.getReturnTypeSyntax() + or + index = nReturnTypeSyntax and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTraitTypeRepr() + )) + } /** * INTERNAL: Do not use. * A rename in a use declaration. - * + * * For example: * ```rust * use foo as bar; @@ -1301,30 +1673,36 @@ module Raw { * ``` */ class Rename extends @rename, AstNode { + override string toString() { result = "Rename" } /** * Gets the name of this rename, if it exists. + * */ - Name getName() { rename_names(this, result) } + Name getName() { + rename_names(this, result) + } } + private Element getImmediateChildOfRename(Rename e, int index) { - exists(int n, int nName | - n = 0 and - nName = n + 1 and - ( - none() - or - index = n and result = e.getName() - ) - ) - } + + exists(int n, int nName | + n = 0 + and + nName = n + 1 + and ( + none() + or + index = n and result = e.getName() + )) + } /** * INTERNAL: Do not use. * A return type in a function signature. - * + * * For example: * ```rust * fn foo() -> i32 { 0 } @@ -1332,36 +1710,42 @@ module Raw { * ``` */ class RetTypeRepr extends @ret_type_repr, AstNode { + override string toString() { result = "RetTypeRepr" } /** * Gets the type representation of this ret type representation, if it exists. + * */ - TypeRepr getTypeRepr() { ret_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + ret_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfRetTypeRepr(RetTypeRepr e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A return type notation `(..)` to reference or bound the type returned by a trait method - * + * * For example: * ```rust * struct ReverseWidgets> { * factory: F, * } - * + * * impl Factory for ReverseWidgets * where * F: Factory, @@ -1373,15 +1757,20 @@ module Raw { * ``` */ class ReturnTypeSyntax extends @return_type_syntax, AstNode { + override string toString() { result = "ReturnTypeSyntax" } + } - private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index) { none() } + + private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index) { + none() + } /** * INTERNAL: Do not use. * A source file. - * + * * For example: * ```rust * // main.rs @@ -1389,55 +1778,72 @@ module Raw { * ``` */ class SourceFile extends @source_file, AstNode { + override string toString() { result = "SourceFile" } /** * Gets the `index`th attr of this source file (0-based). + * */ - AnyAttr getAttr(int index) { source_file_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + source_file_attrs(this, index, result) + } /** * Gets the number of attrs of this source file. */ - int getNumberOfAttrs() { result = count(int i | source_file_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | source_file_attrs(this, i, _)) + } /** * Gets the `index`th item of this source file (0-based). + * */ - Item getItem(int index) { source_file_items(this, index, result) } - + Item getItem(int index) { + source_file_items(this, index, result) + } /** * Gets the number of items of this source file. */ - int getNumberOfItems() { result = count(int i | source_file_items(this, i, _)) } + int getNumberOfItems() { + result = count(int i | source_file_items(this, i, _)) + } } + private Element getImmediateChildOfSourceFile(SourceFile e, int index) { - exists(int n, int nAttr, int nItem | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nItem = nAttr + e.getNumberOfItems() and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getItem(index - nAttr) - ) - ) - } + + exists(int n, int nAttr, int nItem | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nItem = nAttr + e.getNumberOfItems() + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getItem(index - nAttr) + )) + } /** * INTERNAL: Do not use. * The base class for statements. */ - class Stmt extends @stmt, AstNode { } + class Stmt extends @stmt, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A list of statements in a block, with an optional tail expression at the * end that determines the block's value. - * + * * For example: * ```rust * { @@ -1449,57 +1855,69 @@ module Raw { * ``` */ class StmtList extends @stmt_list, AstNode { + override string toString() { result = "StmtList" } /** * Gets the `index`th attr of this statement list (0-based). + * */ - AnyAttr getAttr(int index) { stmt_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + stmt_list_attrs(this, index, result) + } /** * Gets the number of attrs of this statement list. */ - int getNumberOfAttrs() { result = count(int i | stmt_list_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | stmt_list_attrs(this, i, _)) + } /** * Gets the `index`th statement of this statement list (0-based). * * The statements of a `StmtList` do not include any tail expression, which * can be accessed with predicates such as `getTailExpr`. */ - Stmt getStatement(int index) { stmt_list_statements(this, index, result) } - + Stmt getStatement(int index) { + stmt_list_statements(this, index, result) + } /** * Gets the number of statements of this statement list. */ - int getNumberOfStatements() { result = count(int i | stmt_list_statements(this, i, _)) } - + int getNumberOfStatements() { + result = count(int i | stmt_list_statements(this, i, _)) + } /** * Gets the tail expression of this statement list, if it exists. * * The tail expression is the expression at the end of a block, that * determines the block's value. */ - Expr getTailExpr() { stmt_list_tail_exprs(this, result) } + Expr getTailExpr() { + stmt_list_tail_exprs(this, result) + } } + private Element getImmediateChildOfStmtList(StmtList e, int index) { - exists(int n, int nAttr, int nStatement, int nTailExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nStatement = nAttr + e.getNumberOfStatements() and - nTailExpr = nStatement + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getStatement(index - nAttr) - or - index = nStatement and result = e.getTailExpr() - ) - ) - } + + exists(int n, int nAttr, int nStatement, int nTailExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nStatement = nAttr + e.getNumberOfStatements() + and + nTailExpr = nStatement + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getStatement(index - nAttr) + or + index = nStatement and result = e.getTailExpr() + )) + } /** * INTERNAL: Do not use. @@ -1509,51 +1927,64 @@ module Raw { * ``` */ class StructExprField extends @struct_expr_field, AstNode { + override string toString() { result = "StructExprField" } /** * Gets the `index`th attr of this struct expression field (0-based). + * */ - AnyAttr getAttr(int index) { struct_expr_field_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + struct_expr_field_attrs(this, index, result) + } /** * Gets the number of attrs of this struct expression field. */ - int getNumberOfAttrs() { result = count(int i | struct_expr_field_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | struct_expr_field_attrs(this, i, _)) + } /** * Gets the expression of this struct expression field, if it exists. + * */ - Expr getExpr() { struct_expr_field_exprs(this, result) } - + Expr getExpr() { + struct_expr_field_exprs(this, result) + } /** * Gets the identifier of this struct expression field, if it exists. + * */ - NameRef getIdentifier() { struct_expr_field_identifiers(this, result) } + NameRef getIdentifier() { + struct_expr_field_identifiers(this, result) + } } + private Element getImmediateChildOfStructExprField(StructExprField e, int index) { - exists(int n, int nAttr, int nExpr, int nIdentifier | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nIdentifier = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getIdentifier() - ) - ) - } + + exists(int n, int nAttr, int nExpr, int nIdentifier | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nIdentifier = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getIdentifier() + )) + } /** * INTERNAL: Do not use. * A list of fields in a struct expression. - * + * * For example: * ```rust * Foo { a: 1, b: 2 } @@ -1561,56 +1992,70 @@ module Raw { * ``` */ class StructExprFieldList extends @struct_expr_field_list, AstNode { + override string toString() { result = "StructExprFieldList" } /** * Gets the `index`th attr of this struct expression field list (0-based). + * */ - AnyAttr getAttr(int index) { struct_expr_field_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + struct_expr_field_list_attrs(this, index, result) + } /** * Gets the number of attrs of this struct expression field list. */ - int getNumberOfAttrs() { result = count(int i | struct_expr_field_list_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | struct_expr_field_list_attrs(this, i, _)) + } /** * Gets the `index`th field of this struct expression field list (0-based). + * */ - StructExprField getField(int index) { struct_expr_field_list_fields(this, index, result) } - + StructExprField getField(int index) { + struct_expr_field_list_fields(this, index, result) + } /** * Gets the number of fields of this struct expression field list. */ - int getNumberOfFields() { result = count(int i | struct_expr_field_list_fields(this, i, _)) } - + int getNumberOfFields() { + result = count(int i | struct_expr_field_list_fields(this, i, _)) + } /** * Gets the spread of this struct expression field list, if it exists. + * */ - Expr getSpread() { struct_expr_field_list_spreads(this, result) } + Expr getSpread() { + struct_expr_field_list_spreads(this, result) + } } + private Element getImmediateChildOfStructExprFieldList(StructExprFieldList e, int index) { - exists(int n, int nAttr, int nField, int nSpread | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - nSpread = nField + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - or - index = nField and result = e.getSpread() - ) - ) - } + + exists(int n, int nAttr, int nField, int nSpread | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and + nSpread = nField + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + or + index = nField and result = e.getSpread() + )) + } /** * INTERNAL: Do not use. * A field in a struct declaration. - * + * * For example: * ```rust * struct S { x: i32 } @@ -1618,78 +2063,99 @@ module Raw { * ``` */ class StructField extends @struct_field, AstNode { + override string toString() { result = "StructField" } /** * Gets the `index`th attr of this struct field (0-based). + * */ - AnyAttr getAttr(int index) { struct_field_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + struct_field_attrs(this, index, result) + } /** * Gets the number of attrs of this struct field. */ - int getNumberOfAttrs() { result = count(int i | struct_field_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | struct_field_attrs(this, i, _)) + } /** * Gets the default val of this struct field, if it exists. + * */ - ConstArg getDefaultVal() { struct_field_default_vals(this, result) } - + ConstArg getDefaultVal() { + struct_field_default_vals(this, result) + } /** * Holds if this struct field is unsafe. + * */ - predicate isUnsafe() { struct_field_is_unsafe(this) } - + predicate isUnsafe() { + struct_field_is_unsafe(this) + } /** * Gets the mut restriction of this struct field, if it exists. + * */ - MutRestriction getMutRestriction() { struct_field_mut_restrictions(this, result) } - + MutRestriction getMutRestriction() { + struct_field_mut_restrictions(this, result) + } /** * Gets the name of this struct field, if it exists. + * */ - Name getName() { struct_field_names(this, result) } - + Name getName() { + struct_field_names(this, result) + } /** * Gets the type representation of this struct field, if it exists. + * */ - TypeRepr getTypeRepr() { struct_field_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + struct_field_type_reprs(this, result) + } /** * Gets the visibility of this struct field, if it exists. + * */ - Visibility getVisibility() { struct_field_visibilities(this, result) } + Visibility getVisibility() { + struct_field_visibilities(this, result) + } } + private Element getImmediateChildOfStructField(StructField e, int index) { - exists( - int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, - int nVisibility - | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultVal = nAttr + 1 and - nMutRestriction = nDefaultVal + 1 and - nName = nMutRestriction + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultVal() - or - index = nDefaultVal and result = e.getMutRestriction() - or - index = nMutRestriction and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultVal = nAttr + 1 + and + nMutRestriction = nDefaultVal + 1 + and + nName = nMutRestriction + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultVal() + or + index = nDefaultVal and result = e.getMutRestriction() + or + index = nMutRestriction and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -1699,51 +2165,64 @@ module Raw { * ``` */ class StructPatField extends @struct_pat_field, AstNode { + override string toString() { result = "StructPatField" } /** * Gets the `index`th attr of this struct pattern field (0-based). + * */ - AnyAttr getAttr(int index) { struct_pat_field_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + struct_pat_field_attrs(this, index, result) + } /** * Gets the number of attrs of this struct pattern field. */ - int getNumberOfAttrs() { result = count(int i | struct_pat_field_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | struct_pat_field_attrs(this, i, _)) + } /** * Gets the identifier of this struct pattern field, if it exists. + * */ - NameRef getIdentifier() { struct_pat_field_identifiers(this, result) } - + NameRef getIdentifier() { + struct_pat_field_identifiers(this, result) + } /** * Gets the pattern of this struct pattern field, if it exists. + * */ - Pat getPat() { struct_pat_field_pats(this, result) } + Pat getPat() { + struct_pat_field_pats(this, result) + } } + private Element getImmediateChildOfStructPatField(StructPatField e, int index) { - exists(int n, int nAttr, int nIdentifier, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nIdentifier = nAttr + 1 and - nPat = nIdentifier + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getIdentifier() - or - index = nIdentifier and result = e.getPat() - ) - ) - } + + exists(int n, int nAttr, int nIdentifier, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nIdentifier = nAttr + 1 + and + nPat = nIdentifier + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getIdentifier() + or + index = nIdentifier and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A list of fields in a struct pattern. - * + * * For example: * ```rust * let Foo { a, b } = foo; @@ -1751,49 +2230,65 @@ module Raw { * ``` */ class StructPatFieldList extends @struct_pat_field_list, AstNode { + override string toString() { result = "StructPatFieldList" } /** * Gets the `index`th field of this struct pattern field list (0-based). + * */ - StructPatField getField(int index) { struct_pat_field_list_fields(this, index, result) } - + StructPatField getField(int index) { + struct_pat_field_list_fields(this, index, result) + } /** * Gets the number of fields of this struct pattern field list. */ - int getNumberOfFields() { result = count(int i | struct_pat_field_list_fields(this, i, _)) } - + int getNumberOfFields() { + result = count(int i | struct_pat_field_list_fields(this, i, _)) + } /** * Gets the rest pattern of this struct pattern field list, if it exists. + * */ - RestPat getRestPat() { struct_pat_field_list_rest_pats(this, result) } + RestPat getRestPat() { + struct_pat_field_list_rest_pats(this, result) + } } + private Element getImmediateChildOfStructPatFieldList(StructPatFieldList e, int index) { - exists(int n, int nField, int nRestPat | - n = 0 and - nField = n + e.getNumberOfFields() and - nRestPat = nField + 1 and - ( - none() - or - result = e.getField(index - n) - or - index = nField and result = e.getRestPat() - ) - ) - } + + exists(int n, int nField, int nRestPat | + n = 0 + and + nField = n + e.getNumberOfFields() + and + nRestPat = nField + 1 + and ( + none() + or + result = e.getField(index - n) + or + index = nField and result = e.getRestPat() + )) + } /** * INTERNAL: Do not use. * The base class for all tokens. */ - class Token extends @token, AstNode { } + class Token extends @token, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A token tree in a macro definition or invocation. - * + * * For example: * ```rust * println!("{} {}!", "Hello", "world"); @@ -1805,44 +2300,57 @@ module Raw { * ``` */ class TokenTree extends @token_tree, AstNode { + override string toString() { result = "TokenTree" } + } - private Element getImmediateChildOfTokenTree(TokenTree e, int index) { none() } + + private Element getImmediateChildOfTokenTree(TokenTree e, int index) { + none() + } /** * INTERNAL: Do not use. */ class TryBlockModifier extends @try_block_modifier, AstNode { + override string toString() { result = "TryBlockModifier" } /** * Holds if this try block modifier is try. + * */ - predicate isTry() { try_block_modifier_is_try(this) } - + predicate isTry() { + try_block_modifier_is_try(this) + } /** * Gets the type representation of this try block modifier, if it exists. + * */ - TypeRepr getTypeRepr() { try_block_modifier_type_reprs(this, result) } + TypeRepr getTypeRepr() { + try_block_modifier_type_reprs(this, result) + } } + private Element getImmediateChildOfTryBlockModifier(TryBlockModifier e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A field in a tuple struct or tuple variant. - * + * * For example: * ```rust * struct S(i32, String); @@ -1850,59 +2358,75 @@ module Raw { * ``` */ class TupleField extends @tuple_field, AstNode { + override string toString() { result = "TupleField" } /** * Gets the `index`th attr of this tuple field (0-based). + * */ - AnyAttr getAttr(int index) { tuple_field_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + tuple_field_attrs(this, index, result) + } /** * Gets the number of attrs of this tuple field. */ - int getNumberOfAttrs() { result = count(int i | tuple_field_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | tuple_field_attrs(this, i, _)) + } /** * Gets the mut restriction of this tuple field, if it exists. + * */ - MutRestriction getMutRestriction() { tuple_field_mut_restrictions(this, result) } - + MutRestriction getMutRestriction() { + tuple_field_mut_restrictions(this, result) + } /** * Gets the type representation of this tuple field, if it exists. + * */ - TypeRepr getTypeRepr() { tuple_field_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + tuple_field_type_reprs(this, result) + } /** * Gets the visibility of this tuple field, if it exists. + * */ - Visibility getVisibility() { tuple_field_visibilities(this, result) } + Visibility getVisibility() { + tuple_field_visibilities(this, result) + } } + private Element getImmediateChildOfTupleField(TupleField e, int index) { - exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nMutRestriction = nAttr + 1 and - nTypeRepr = nMutRestriction + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getMutRestriction() - or - index = nMutRestriction and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nMutRestriction = nAttr + 1 + and + nTypeRepr = nMutRestriction + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getMutRestriction() + or + index = nMutRestriction and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. * A type bound in a trait or generic parameter. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -1912,64 +2436,83 @@ module Raw { * ``` */ class TypeBound extends @type_bound, AstNode { + override string toString() { result = "TypeBound" } /** * Gets the for binder of this type bound, if it exists. + * */ - ForBinder getForBinder() { type_bound_for_binders(this, result) } - + ForBinder getForBinder() { + type_bound_for_binders(this, result) + } /** * Holds if this type bound is async. + * */ - predicate isAsync() { type_bound_is_async(this) } - + predicate isAsync() { + type_bound_is_async(this) + } /** * Holds if this type bound is const. + * */ - predicate isConst() { type_bound_is_const(this) } - + predicate isConst() { + type_bound_is_const(this) + } /** * Gets the lifetime of this type bound, if it exists. + * */ - Lifetime getLifetime() { type_bound_lifetimes(this, result) } - + Lifetime getLifetime() { + type_bound_lifetimes(this, result) + } /** * Gets the type representation of this type bound, if it exists. + * */ - TypeRepr getTypeRepr() { type_bound_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + type_bound_type_reprs(this, result) + } /** * Gets the use bound generic arguments of this type bound, if it exists. + * */ - UseBoundGenericArgs getUseBoundGenericArgs() { type_bound_use_bound_generic_args(this, result) } + UseBoundGenericArgs getUseBoundGenericArgs() { + type_bound_use_bound_generic_args(this, result) + } } + private Element getImmediateChildOfTypeBound(TypeBound e, int index) { - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | - n = 0 and - nForBinder = n + 1 and - nLifetime = nForBinder + 1 and - nTypeRepr = nLifetime + 1 and - nUseBoundGenericArgs = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getUseBoundGenericArgs() - ) - ) - } + + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | + n = 0 + and + nForBinder = n + 1 + and + nLifetime = nForBinder + 1 + and + nTypeRepr = nLifetime + 1 + and + nUseBoundGenericArgs = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getUseBoundGenericArgs() + )) + } /** * INTERNAL: Do not use. * A list of type bounds. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -1977,30 +2520,37 @@ module Raw { * ``` */ class TypeBoundList extends @type_bound_list, AstNode { + override string toString() { result = "TypeBoundList" } /** * Gets the `index`th bound of this type bound list (0-based). + * */ - TypeBound getBound(int index) { type_bound_list_bounds(this, index, result) } - + TypeBound getBound(int index) { + type_bound_list_bounds(this, index, result) + } /** * Gets the number of bounds of this type bound list. */ - int getNumberOfBounds() { result = count(int i | type_bound_list_bounds(this, i, _)) } + int getNumberOfBounds() { + result = count(int i | type_bound_list_bounds(this, i, _)) + } } + private Element getImmediateChildOfTypeBoundList(TypeBoundList e, int index) { - exists(int n, int nBound | - n = 0 and - nBound = n + e.getNumberOfBounds() and - ( - none() - or - result = e.getBound(index - n) - ) - ) - } + + exists(int n, int nBound | + n = 0 + and + nBound = n + e.getNumberOfBounds() + and ( + none() + or + result = e.getBound(index - n) + )) + } /** * INTERNAL: Do not use. @@ -2011,17 +2561,29 @@ module Raw { * let z: Option; * ``` */ - class TypeRepr extends @type_repr, AstNode { } + class TypeRepr extends @type_repr, AstNode { + + + + } + + /** * INTERNAL: Do not use. */ - class UseBoundGenericArg extends @use_bound_generic_arg, AstNode { } + class UseBoundGenericArg extends @use_bound_generic_arg, AstNode { + + + + } + + /** * INTERNAL: Do not use. * A use<..> bound to control which generic parameters are captured by an impl Trait return type. - * + * * For example: * ```rust * pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> { 0 } @@ -2029,15 +2591,16 @@ module Raw { * ``` */ class UseBoundGenericArgs extends @use_bound_generic_args, AstNode { + override string toString() { result = "UseBoundGenericArgs" } /** * Gets the `index`th use bound generic argument of this use bound generic arguments (0-based). + * */ UseBoundGenericArg getUseBoundGenericArg(int index) { use_bound_generic_args_use_bound_generic_args(this, index, result) } - /** * Gets the number of use bound generic arguments of this use bound generic arguments. */ @@ -2046,17 +2609,19 @@ module Raw { } } + private Element getImmediateChildOfUseBoundGenericArgs(UseBoundGenericArgs e, int index) { - exists(int n, int nUseBoundGenericArg | - n = 0 and - nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() and - ( - none() - or - result = e.getUseBoundGenericArg(index - n) - ) - ) - } + + exists(int n, int nUseBoundGenericArg | + n = 0 + and + nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() + and ( + none() + or + result = e.getUseBoundGenericArg(index - n) + )) + } /** * INTERNAL: Do not use. @@ -2069,51 +2634,65 @@ module Raw { * ``` */ class UseTree extends @use_tree, AstNode { + override string toString() { result = "UseTree" } /** * Holds if this use tree is glob. + * */ - predicate isGlob() { use_tree_is_glob(this) } - + predicate isGlob() { + use_tree_is_glob(this) + } /** * Gets the path of this use tree, if it exists. + * */ - Path getPath() { use_tree_paths(this, result) } - + Path getPath() { + use_tree_paths(this, result) + } /** * Gets the rename of this use tree, if it exists. + * */ - Rename getRename() { use_tree_renames(this, result) } - + Rename getRename() { + use_tree_renames(this, result) + } /** * Gets the use tree list of this use tree, if it exists. + * */ - UseTreeList getUseTreeList() { use_tree_use_tree_lists(this, result) } + UseTreeList getUseTreeList() { + use_tree_use_tree_lists(this, result) + } } + private Element getImmediateChildOfUseTree(UseTree e, int index) { - exists(int n, int nPath, int nRename, int nUseTreeList | - n = 0 and - nPath = n + 1 and - nRename = nPath + 1 and - nUseTreeList = nRename + 1 and - ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getRename() - or - index = nRename and result = e.getUseTreeList() - ) - ) - } + + exists(int n, int nPath, int nRename, int nUseTreeList | + n = 0 + and + nPath = n + 1 + and + nRename = nPath + 1 + and + nUseTreeList = nRename + 1 + and ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getRename() + or + index = nRename and result = e.getUseTreeList() + )) + } /** * INTERNAL: Do not use. * A list of use trees in a use declaration. - * + * * For example: * ```rust * use std::{fs, io}; @@ -2121,35 +2700,42 @@ module Raw { * ``` */ class UseTreeList extends @use_tree_list, AstNode { + override string toString() { result = "UseTreeList" } /** * Gets the `index`th use tree of this use tree list (0-based). + * */ - UseTree getUseTree(int index) { use_tree_list_use_trees(this, index, result) } - + UseTree getUseTree(int index) { + use_tree_list_use_trees(this, index, result) + } /** * Gets the number of use trees of this use tree list. */ - int getNumberOfUseTrees() { result = count(int i | use_tree_list_use_trees(this, i, _)) } + int getNumberOfUseTrees() { + result = count(int i | use_tree_list_use_trees(this, i, _)) + } } + private Element getImmediateChildOfUseTreeList(UseTreeList e, int index) { - exists(int n, int nUseTree | - n = 0 and - nUseTree = n + e.getNumberOfUseTrees() and - ( - none() - or - result = e.getUseTree(index - n) - ) - ) - } + + exists(int n, int nUseTree | + n = 0 + and + nUseTree = n + e.getNumberOfUseTrees() + and ( + none() + or + result = e.getUseTree(index - n) + )) + } /** * INTERNAL: Do not use. * A list of variants in an enum declaration. - * + * * For example: * ```rust * enum E { A, B, C } @@ -2157,35 +2743,42 @@ module Raw { * ``` */ class VariantList extends @variant_list, AstNode { + override string toString() { result = "VariantList" } /** * Gets the `index`th variant of this variant list (0-based). + * */ - Variant getVariant(int index) { variant_list_variants(this, index, result) } - + Variant getVariant(int index) { + variant_list_variants(this, index, result) + } /** * Gets the number of variants of this variant list. */ - int getNumberOfVariants() { result = count(int i | variant_list_variants(this, i, _)) } + int getNumberOfVariants() { + result = count(int i | variant_list_variants(this, i, _)) + } } + private Element getImmediateChildOfVariantList(VariantList e, int index) { - exists(int n, int nVariant | - n = 0 and - nVariant = n + e.getNumberOfVariants() and - ( - none() - or - result = e.getVariant(index - n) - ) - ) - } + + exists(int n, int nVariant | + n = 0 + and + nVariant = n + e.getNumberOfVariants() + and ( + none() + or + result = e.getVariant(index - n) + )) + } /** * INTERNAL: Do not use. * A visibility modifier. - * + * * For example: * ```rust * pub struct S; @@ -2193,25 +2786,31 @@ module Raw { * ``` */ class Visibility extends @visibility, AstNode { + override string toString() { result = "Visibility" } /** * Gets the visibility inner of this visibility, if it exists. + * */ - VisibilityInner getVisibilityInner() { visibility_visibility_inners(this, result) } + VisibilityInner getVisibilityInner() { + visibility_visibility_inners(this, result) + } } + private Element getImmediateChildOfVisibility(Visibility e, int index) { - exists(int n, int nVisibilityInner | - n = 0 and - nVisibilityInner = n + 1 and - ( - none() - or - index = n and result = e.getVisibilityInner() - ) - ) - } + + exists(int n, int nVisibilityInner | + n = 0 + and + nVisibilityInner = n + 1 + and ( + none() + or + index = n and result = e.getVisibilityInner() + )) + } /** * INTERNAL: Do not use. @@ -2222,30 +2821,36 @@ module Raw { * ``` */ class VisibilityInner extends @visibility_inner, AstNode { + override string toString() { result = "VisibilityInner" } /** * Gets the path of this visibility inner, if it exists. + * */ - Path getPath() { visibility_inner_paths(this, result) } + Path getPath() { + visibility_inner_paths(this, result) + } } + private Element getImmediateChildOfVisibilityInner(VisibilityInner e, int index) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() - ) - ) - } + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() + )) + } /** * INTERNAL: Do not use. * A where clause in a generic declaration. - * + * * For example: * ```rust * fn foo(t: T) where T: Debug {} @@ -2253,35 +2858,42 @@ module Raw { * ``` */ class WhereClause extends @where_clause, AstNode { + override string toString() { result = "WhereClause" } /** * Gets the `index`th predicate of this where clause (0-based). + * */ - WherePred getPredicate(int index) { where_clause_predicates(this, index, result) } - + WherePred getPredicate(int index) { + where_clause_predicates(this, index, result) + } /** * Gets the number of predicates of this where clause. */ - int getNumberOfPredicates() { result = count(int i | where_clause_predicates(this, i, _)) } + int getNumberOfPredicates() { + result = count(int i | where_clause_predicates(this, i, _)) + } } + private Element getImmediateChildOfWhereClause(WhereClause e, int index) { - exists(int n, int nPredicate | - n = 0 and - nPredicate = n + e.getNumberOfPredicates() and - ( - none() - or - result = e.getPredicate(index - n) - ) - ) - } + + exists(int n, int nPredicate | + n = 0 + and + nPredicate = n + e.getNumberOfPredicates() + and ( + none() + or + result = e.getPredicate(index - n) + )) + } /** * INTERNAL: Do not use. * A predicate in a where clause. - * + * * For example: * ```rust * fn foo(t: T, u: U) where T: Debug, U: Clone {} @@ -2291,101 +2903,129 @@ module Raw { * ``` */ class WherePred extends @where_pred, AstNode { + override string toString() { result = "WherePred" } /** * Gets the for binder of this where pred, if it exists. + * */ - ForBinder getForBinder() { where_pred_for_binders(this, result) } - + ForBinder getForBinder() { + where_pred_for_binders(this, result) + } /** * Gets the lifetime of this where pred, if it exists. + * */ - Lifetime getLifetime() { where_pred_lifetimes(this, result) } - + Lifetime getLifetime() { + where_pred_lifetimes(this, result) + } /** * Gets the type representation of this where pred, if it exists. + * */ - TypeRepr getTypeRepr() { where_pred_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + where_pred_type_reprs(this, result) + } /** * Gets the type bound list of this where pred, if it exists. + * */ - TypeBoundList getTypeBoundList() { where_pred_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + where_pred_type_bound_lists(this, result) + } } + private Element getImmediateChildOfWherePred(WherePred e, int index) { - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | - n = 0 and - nForBinder = n + 1 and - nLifetime = nForBinder + 1 and - nTypeRepr = nLifetime + 1 and - nTypeBoundList = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | + n = 0 + and + nForBinder = n + 1 + and + nLifetime = nForBinder + 1 + and + nTypeRepr = nLifetime + 1 + and + nTypeBoundList = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. */ class ArrayExprInternal extends @array_expr_internal, Expr { + override string toString() { result = "ArrayExprInternal" } /** * Gets the `index`th attr of this array expression internal (0-based). + * */ - AnyAttr getAttr(int index) { array_expr_internal_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + array_expr_internal_attrs(this, index, result) + } /** * Gets the number of attrs of this array expression internal. */ - int getNumberOfAttrs() { result = count(int i | array_expr_internal_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | array_expr_internal_attrs(this, i, _)) + } /** * Gets the `index`th expression of this array expression internal (0-based). + * */ - Expr getExpr(int index) { array_expr_internal_exprs(this, index, result) } - + Expr getExpr(int index) { + array_expr_internal_exprs(this, index, result) + } /** * Gets the number of expressions of this array expression internal. */ - int getNumberOfExprs() { result = count(int i | array_expr_internal_exprs(this, i, _)) } - + int getNumberOfExprs() { + result = count(int i | array_expr_internal_exprs(this, i, _)) + } /** * Holds if this array expression internal is semicolon. + * */ - predicate isSemicolon() { array_expr_internal_is_semicolon(this) } + predicate isSemicolon() { + array_expr_internal_is_semicolon(this) + } } + private Element getImmediateChildOfArrayExprInternal(ArrayExprInternal e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + e.getNumberOfExprs() and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getExpr(index - nAttr) - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + e.getNumberOfExprs() + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getExpr(index - nAttr) + )) + } /** * INTERNAL: Do not use. * An array type representation. - * + * * For example: * ```rust * let arr: [i32; 4]; @@ -2393,38 +3033,47 @@ module Raw { * ``` */ class ArrayTypeRepr extends @array_type_repr, TypeRepr { + override string toString() { result = "ArrayTypeRepr" } /** * Gets the const argument of this array type representation, if it exists. + * */ - ConstArg getConstArg() { array_type_repr_const_args(this, result) } - + ConstArg getConstArg() { + array_type_repr_const_args(this, result) + } /** * Gets the element type representation of this array type representation, if it exists. + * */ - TypeRepr getElementTypeRepr() { array_type_repr_element_type_reprs(this, result) } + TypeRepr getElementTypeRepr() { + array_type_repr_element_type_reprs(this, result) + } } + private Element getImmediateChildOfArrayTypeRepr(ArrayTypeRepr e, int index) { - exists(int n, int nConstArg, int nElementTypeRepr | - n = 0 and - nConstArg = n + 1 and - nElementTypeRepr = nConstArg + 1 and - ( - none() - or - index = n and result = e.getConstArg() - or - index = nConstArg and result = e.getElementTypeRepr() - ) - ) - } + + exists(int n, int nConstArg, int nElementTypeRepr | + n = 0 + and + nConstArg = n + 1 + and + nElementTypeRepr = nConstArg + 1 + and ( + none() + or + index = n and result = e.getConstArg() + or + index = nConstArg and result = e.getElementTypeRepr() + )) + } /** * INTERNAL: Do not use. * A clobbered ABI in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2433,35 +3082,42 @@ module Raw { * ``` */ class AsmClobberAbi extends @asm_clobber_abi, AsmPiece { + override string toString() { result = "AsmClobberAbi" } /** * Gets the `index`th attr of this asm clobber abi (0-based). + * */ - AnyAttr getAttr(int index) { asm_clobber_abi_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + asm_clobber_abi_attrs(this, index, result) + } /** * Gets the number of attrs of this asm clobber abi. */ - int getNumberOfAttrs() { result = count(int i | asm_clobber_abi_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | asm_clobber_abi_attrs(this, i, _)) + } } + private Element getImmediateChildOfAsmClobberAbi(AsmClobberAbi e, int index) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) - ) - ) - } + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) + )) + } /** * INTERNAL: Do not use. * A constant operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2470,35 +3126,43 @@ module Raw { * ``` */ class AsmConst extends @asm_const, AsmOperand { + override string toString() { result = "AsmConst" } /** * Gets the expression of this asm const, if it exists. + * */ - Expr getExpr() { asm_const_exprs(this, result) } - + Expr getExpr() { + asm_const_exprs(this, result) + } /** * Holds if this asm const is const. + * */ - predicate isConst() { asm_const_is_const(this) } + predicate isConst() { + asm_const_is_const(this) + } } + private Element getImmediateChildOfAsmConst(AsmConst e, int index) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() - ) - ) - } + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. * A label in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2510,30 +3174,36 @@ module Raw { * ``` */ class AsmLabel extends @asm_label, AsmOperand { + override string toString() { result = "AsmLabel" } /** * Gets the block expression of this asm label, if it exists. + * */ - BlockExpr getBlockExpr() { asm_label_block_exprs(this, result) } + BlockExpr getBlockExpr() { + asm_label_block_exprs(this, result) + } } + private Element getImmediateChildOfAsmLabel(AsmLabel e, int index) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() - ) - ) - } + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() + )) + } /** * INTERNAL: Do not use. * A named operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2542,51 +3212,64 @@ module Raw { * ``` */ class AsmOperandNamed extends @asm_operand_named, AsmPiece { + override string toString() { result = "AsmOperandNamed" } /** * Gets the asm operand of this asm operand named, if it exists. + * */ - AsmOperand getAsmOperand() { asm_operand_named_asm_operands(this, result) } - + AsmOperand getAsmOperand() { + asm_operand_named_asm_operands(this, result) + } /** * Gets the `index`th attr of this asm operand named (0-based). + * */ - AnyAttr getAttr(int index) { asm_operand_named_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + asm_operand_named_attrs(this, index, result) + } /** * Gets the number of attrs of this asm operand named. */ - int getNumberOfAttrs() { result = count(int i | asm_operand_named_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | asm_operand_named_attrs(this, i, _)) + } /** * Gets the name of this asm operand named, if it exists. + * */ - Name getName() { asm_operand_named_names(this, result) } + Name getName() { + asm_operand_named_names(this, result) + } } + private Element getImmediateChildOfAsmOperandNamed(AsmOperandNamed e, int index) { - exists(int n, int nAsmOperand, int nAttr, int nName | - n = 0 and - nAsmOperand = n + 1 and - nAttr = nAsmOperand + e.getNumberOfAttrs() and - nName = nAttr + 1 and - ( - none() - or - index = n and result = e.getAsmOperand() - or - result = e.getAttr(index - nAsmOperand) - or - index = nAttr and result = e.getName() - ) - ) - } + + exists(int n, int nAsmOperand, int nAttr, int nName | + n = 0 + and + nAsmOperand = n + 1 + and + nAttr = nAsmOperand + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and ( + none() + or + index = n and result = e.getAsmOperand() + or + result = e.getAttr(index - nAsmOperand) + or + index = nAttr and result = e.getName() + )) + } /** * INTERNAL: Do not use. * A list of options in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2595,48 +3278,59 @@ module Raw { * ``` */ class AsmOptionsList extends @asm_options_list, AsmPiece { + override string toString() { result = "AsmOptionsList" } /** * Gets the `index`th asm option of this asm options list (0-based). + * */ - AsmOption getAsmOption(int index) { asm_options_list_asm_options(this, index, result) } - + AsmOption getAsmOption(int index) { + asm_options_list_asm_options(this, index, result) + } /** * Gets the number of asm options of this asm options list. */ - int getNumberOfAsmOptions() { result = count(int i | asm_options_list_asm_options(this, i, _)) } - + int getNumberOfAsmOptions() { + result = count(int i | asm_options_list_asm_options(this, i, _)) + } /** * Gets the `index`th attr of this asm options list (0-based). + * */ - AnyAttr getAttr(int index) { asm_options_list_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + asm_options_list_attrs(this, index, result) + } /** * Gets the number of attrs of this asm options list. */ - int getNumberOfAttrs() { result = count(int i | asm_options_list_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | asm_options_list_attrs(this, i, _)) + } } + private Element getImmediateChildOfAsmOptionsList(AsmOptionsList e, int index) { - exists(int n, int nAsmOption, int nAttr | - n = 0 and - nAsmOption = n + e.getNumberOfAsmOptions() and - nAttr = nAsmOption + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAsmOption(index - n) - or - result = e.getAttr(index - nAsmOption) - ) - ) - } + + exists(int n, int nAsmOption, int nAttr | + n = 0 + and + nAsmOption = n + e.getNumberOfAsmOptions() + and + nAttr = nAsmOption + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAsmOption(index - n) + or + result = e.getAttr(index - nAsmOption) + )) + } /** * INTERNAL: Do not use. * A register operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2645,46 +3339,58 @@ module Raw { * ``` */ class AsmRegOperand extends @asm_reg_operand, AsmOperand { + override string toString() { result = "AsmRegOperand" } /** * Gets the asm dir spec of this asm reg operand, if it exists. + * */ - AsmDirSpec getAsmDirSpec() { asm_reg_operand_asm_dir_specs(this, result) } - + AsmDirSpec getAsmDirSpec() { + asm_reg_operand_asm_dir_specs(this, result) + } /** * Gets the asm operand expression of this asm reg operand, if it exists. + * */ - AsmOperandExpr getAsmOperandExpr() { asm_reg_operand_asm_operand_exprs(this, result) } - + AsmOperandExpr getAsmOperandExpr() { + asm_reg_operand_asm_operand_exprs(this, result) + } /** * Gets the asm reg spec of this asm reg operand, if it exists. + * */ - AsmRegSpec getAsmRegSpec() { asm_reg_operand_asm_reg_specs(this, result) } + AsmRegSpec getAsmRegSpec() { + asm_reg_operand_asm_reg_specs(this, result) + } } + private Element getImmediateChildOfAsmRegOperand(AsmRegOperand e, int index) { - exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | - n = 0 and - nAsmDirSpec = n + 1 and - nAsmOperandExpr = nAsmDirSpec + 1 and - nAsmRegSpec = nAsmOperandExpr + 1 and - ( - none() - or - index = n and result = e.getAsmDirSpec() - or - index = nAsmDirSpec and result = e.getAsmOperandExpr() - or - index = nAsmOperandExpr and result = e.getAsmRegSpec() - ) - ) - } + + exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | + n = 0 + and + nAsmDirSpec = n + 1 + and + nAsmOperandExpr = nAsmDirSpec + 1 + and + nAsmRegSpec = nAsmOperandExpr + 1 + and ( + none() + or + index = n and result = e.getAsmDirSpec() + or + index = nAsmDirSpec and result = e.getAsmOperandExpr() + or + index = nAsmOperandExpr and result = e.getAsmRegSpec() + )) + } /** * INTERNAL: Do not use. * A symbol operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -2693,30 +3399,36 @@ module Raw { * ``` */ class AsmSym extends @asm_sym, AsmOperand { + override string toString() { result = "AsmSym" } /** * Gets the path of this asm sym, if it exists. + * */ - Path getPath() { asm_sym_paths(this, result) } + Path getPath() { + asm_sym_paths(this, result) + } } + private Element getImmediateChildOfAsmSym(AsmSym e, int index) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() - ) - ) - } + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() + )) + } /** * INTERNAL: Do not use. * An associated type argument in a path. - * + * * For example: * ```rust * fn process_cloneable(iter: T) @@ -2729,89 +3441,113 @@ module Raw { * ``` */ class AssocTypeArg extends @assoc_type_arg, GenericArg { + override string toString() { result = "AssocTypeArg" } /** * Gets the const argument of this assoc type argument, if it exists. + * */ - ConstArg getConstArg() { assoc_type_arg_const_args(this, result) } - + ConstArg getConstArg() { + assoc_type_arg_const_args(this, result) + } /** * Gets the generic argument list of this assoc type argument, if it exists. + * */ - GenericArgList getGenericArgList() { assoc_type_arg_generic_arg_lists(this, result) } - + GenericArgList getGenericArgList() { + assoc_type_arg_generic_arg_lists(this, result) + } /** * Gets the identifier of this assoc type argument, if it exists. + * */ - NameRef getIdentifier() { assoc_type_arg_identifiers(this, result) } - + NameRef getIdentifier() { + assoc_type_arg_identifiers(this, result) + } /** * Gets the parameter list of this assoc type argument, if it exists. + * */ - ParamList getParamList() { assoc_type_arg_param_lists(this, result) } - + ParamList getParamList() { + assoc_type_arg_param_lists(this, result) + } /** * Gets the ret type of this assoc type argument, if it exists. + * */ - RetTypeRepr getRetType() { assoc_type_arg_ret_types(this, result) } - + RetTypeRepr getRetType() { + assoc_type_arg_ret_types(this, result) + } /** * Gets the return type syntax of this assoc type argument, if it exists. + * */ - ReturnTypeSyntax getReturnTypeSyntax() { assoc_type_arg_return_type_syntaxes(this, result) } - + ReturnTypeSyntax getReturnTypeSyntax() { + assoc_type_arg_return_type_syntaxes(this, result) + } /** * Gets the type representation of this assoc type argument, if it exists. + * */ - TypeRepr getTypeRepr() { assoc_type_arg_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + assoc_type_arg_type_reprs(this, result) + } /** * Gets the type bound list of this assoc type argument, if it exists. + * */ - TypeBoundList getTypeBoundList() { assoc_type_arg_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + assoc_type_arg_type_bound_lists(this, result) + } } + private Element getImmediateChildOfAssocTypeArg(AssocTypeArg e, int index) { - exists( - int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, - int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList - | - n = 0 and - nConstArg = n + 1 and - nGenericArgList = nConstArg + 1 and - nIdentifier = nGenericArgList + 1 and - nParamList = nIdentifier + 1 and - nRetType = nParamList + 1 and - nReturnTypeSyntax = nRetType + 1 and - nTypeRepr = nReturnTypeSyntax + 1 and - nTypeBoundList = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getConstArg() - or - index = nConstArg and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getParamList() - or - index = nParamList and result = e.getRetType() - or - index = nRetType and result = e.getReturnTypeSyntax() - or - index = nReturnTypeSyntax and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList | + n = 0 + and + nConstArg = n + 1 + and + nGenericArgList = nConstArg + 1 + and + nIdentifier = nGenericArgList + 1 + and + nParamList = nIdentifier + 1 + and + nRetType = nParamList + 1 + and + nReturnTypeSyntax = nRetType + 1 + and + nTypeRepr = nReturnTypeSyntax + 1 + and + nTypeBoundList = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getConstArg() + or + index = nConstArg and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getParamList() + or + index = nParamList and result = e.getRetType() + or + index = nRetType and result = e.getReturnTypeSyntax() + or + index = nReturnTypeSyntax and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. * An attribute applied to an item. - * + * * For example: * ```rust * #[derive(Debug)] @@ -2820,25 +3556,31 @@ module Raw { * ``` */ class Attr extends @attr, AnyAttr { + override string toString() { result = "Attr" } /** * Gets the meta of this attr, if it exists. + * */ - Meta getMeta() { attr_meta(this, result) } + Meta getMeta() { + attr_meta(this, result) + } } + private Element getImmediateChildOfAttr(Attr e, int index) { - exists(int n, int nMeta | - n = 0 and - nMeta = n + 1 and - ( - none() - or - index = n and result = e.getMeta() - ) - ) - } + + exists(int n, int nMeta | + n = 0 + and + nMeta = n + 1 + and ( + none() + or + index = n and result = e.getMeta() + )) + } /** * INTERNAL: Do not use. @@ -2851,38 +3593,48 @@ module Raw { * ``` */ class AwaitExpr extends @await_expr, Expr { + override string toString() { result = "AwaitExpr" } /** * Gets the `index`th attr of this await expression (0-based). + * */ - AnyAttr getAttr(int index) { await_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + await_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this await expression. */ - int getNumberOfAttrs() { result = count(int i | await_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | await_expr_attrs(this, i, _)) + } /** * Gets the expression of this await expression, if it exists. + * */ - Expr getExpr() { await_expr_exprs(this, result) } + Expr getExpr() { + await_expr_exprs(this, result) + } } + private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -2898,38 +3650,48 @@ module Raw { * ``` */ class BecomeExpr extends @become_expr, Expr { + override string toString() { result = "BecomeExpr" } /** * Gets the `index`th attr of this become expression (0-based). + * */ - AnyAttr getAttr(int index) { become_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + become_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this become expression. */ - int getNumberOfAttrs() { result = count(int i | become_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | become_expr_attrs(this, i, _)) + } /** * Gets the expression of this become expression, if it exists. + * */ - Expr getExpr() { become_expr_exprs(this, result) } + Expr getExpr() { + become_expr_exprs(this, result) + } } + private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -2943,51 +3705,66 @@ module Raw { * ``` */ class BinaryExpr extends @binary_expr, Expr { + override string toString() { result = "BinaryExpr" } /** * Gets the `index`th attr of this binary expression (0-based). + * */ - AnyAttr getAttr(int index) { binary_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + binary_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this binary expression. */ - int getNumberOfAttrs() { result = count(int i | binary_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | binary_expr_attrs(this, i, _)) + } /** * Gets the lhs of this binary expression, if it exists. + * */ - Expr getLhs() { binary_expr_lhs(this, result) } - + Expr getLhs() { + binary_expr_lhs(this, result) + } /** * Gets the operator name of this binary expression, if it exists. + * */ - string getOperatorName() { binary_expr_operator_names(this, result) } - + string getOperatorName() { + binary_expr_operator_names(this, result) + } /** * Gets the rhs of this binary expression, if it exists. + * */ - Expr getRhs() { binary_expr_rhs(this, result) } + Expr getRhs() { + binary_expr_rhs(this, result) + } } + private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index) { - exists(int n, int nAttr, int nLhs, int nRhs | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLhs = nAttr + 1 and - nRhs = nLhs + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLhs() - or - index = nLhs and result = e.getRhs() - ) - ) - } + + exists(int n, int nAttr, int nLhs, int nRhs | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLhs = nAttr + 1 + and + nRhs = nLhs + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLhs() + or + index = nLhs and result = e.getRhs() + )) + } /** * INTERNAL: Do not use. @@ -3000,25 +3777,31 @@ module Raw { * ``` */ class BoxPat extends @box_pat, Pat { + override string toString() { result = "BoxPat" } /** * Gets the pattern of this box pattern, if it exists. + * */ - Pat getPat() { box_pat_pats(this, result) } + Pat getPat() { + box_pat_pats(this, result) + } } + private Element getImmediateChildOfBoxPat(BoxPat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() + )) + } /** * INTERNAL: Do not use. @@ -3047,52 +3830,65 @@ module Raw { * ``` */ class BreakExpr extends @break_expr, Expr { + override string toString() { result = "BreakExpr" } /** * Gets the `index`th attr of this break expression (0-based). + * */ - AnyAttr getAttr(int index) { break_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + break_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this break expression. */ - int getNumberOfAttrs() { result = count(int i | break_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | break_expr_attrs(this, i, _)) + } /** * Gets the expression of this break expression, if it exists. + * */ - Expr getExpr() { break_expr_exprs(this, result) } - + Expr getExpr() { + break_expr_exprs(this, result) + } /** * Gets the lifetime of this break expression, if it exists. + * */ - Lifetime getLifetime() { break_expr_lifetimes(this, result) } + Lifetime getLifetime() { + break_expr_lifetimes(this, result) + } } + private Element getImmediateChildOfBreakExpr(BreakExpr e, int index) { - exists(int n, int nAttr, int nExpr, int nLifetime | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nLifetime = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getLifetime() - ) - ) - } + + exists(int n, int nAttr, int nExpr, int nLifetime | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nLifetime = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getLifetime() + )) + } /** * INTERNAL: Do not use. * NOTE: Consider using `Call` instead, as that excludes call expressions that are * instantiations of tuple structs and tuple variants. - * + * * A call expression. For example: * ```rust * foo(42); @@ -3102,46 +3898,59 @@ module Raw { * ``` */ class CallExpr extends @call_expr, Expr { + override string toString() { result = "CallExpr" } /** * Gets the argument list of this call expression, if it exists. + * */ - ArgList getArgList() { call_expr_arg_lists(this, result) } - + ArgList getArgList() { + call_expr_arg_lists(this, result) + } /** * Gets the `index`th attr of this call expression (0-based). + * */ - AnyAttr getAttr(int index) { call_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + call_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this call expression. */ - int getNumberOfAttrs() { result = count(int i | call_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | call_expr_attrs(this, i, _)) + } /** * Gets the function of this call expression, if it exists. + * */ - Expr getFunction() { call_expr_functions(this, result) } + Expr getFunction() { + call_expr_functions(this, result) + } } + private Element getImmediateChildOfCallExpr(CallExpr e, int index) { - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nFunction = nAttr + 1 and - ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getFunction() - ) - ) - } + + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 + and + nArgList = n + 1 + and + nAttr = nArgList + e.getNumberOfAttrs() + and + nFunction = nAttr + 1 + and ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getFunction() + )) + } /** * INTERNAL: Do not use. @@ -3151,104 +3960,135 @@ module Raw { * ``` */ class CastExpr extends @cast_expr, Expr { + override string toString() { result = "CastExpr" } /** * Gets the `index`th attr of this cast expression (0-based). + * */ - AnyAttr getAttr(int index) { cast_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + cast_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this cast expression. */ - int getNumberOfAttrs() { result = count(int i | cast_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | cast_expr_attrs(this, i, _)) + } /** * Gets the expression of this cast expression, if it exists. + * */ - Expr getExpr() { cast_expr_exprs(this, result) } - + Expr getExpr() { + cast_expr_exprs(this, result) + } /** * Gets the type representation of this cast expression, if it exists. + * */ - TypeRepr getTypeRepr() { cast_expr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + cast_expr_type_reprs(this, result) + } } + private Element getImmediateChildOfCastExpr(CastExpr e, int index) { - exists(int n, int nAttr, int nExpr, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - nTypeRepr = nExpr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nAttr, int nExpr, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and + nTypeRepr = nExpr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. */ class CfgAtom extends @cfg_atom, CfgPredicate { + override string toString() { result = "CfgAtom" } + } - private Element getImmediateChildOfCfgAtom(CfgAtom e, int index) { none() } + + private Element getImmediateChildOfCfgAtom(CfgAtom e, int index) { + none() + } /** * INTERNAL: Do not use. */ class CfgAttrMeta extends @cfg_attr_meta, Meta { + override string toString() { result = "CfgAttrMeta" } /** * Gets the cfg predicate of this cfg attr meta, if it exists. + * */ - CfgPredicate getCfgPredicate() { cfg_attr_meta_cfg_predicates(this, result) } - + CfgPredicate getCfgPredicate() { + cfg_attr_meta_cfg_predicates(this, result) + } /** * Gets the `index`th meta of this cfg attr meta (0-based). + * */ - Meta getMeta(int index) { cfg_attr_meta_metas(this, index, result) } - + Meta getMeta(int index) { + cfg_attr_meta_metas(this, index, result) + } /** * Gets the number of metas of this cfg attr meta. */ - int getNumberOfMetas() { result = count(int i | cfg_attr_meta_metas(this, i, _)) } + int getNumberOfMetas() { + result = count(int i | cfg_attr_meta_metas(this, i, _)) + } } + private Element getImmediateChildOfCfgAttrMeta(CfgAttrMeta e, int index) { - exists(int n, int nCfgPredicate, int nMeta | - n = 0 and - nCfgPredicate = n + 1 and - nMeta = nCfgPredicate + e.getNumberOfMetas() and - ( - none() - or - index = n and result = e.getCfgPredicate() - or - result = e.getMeta(index - nCfgPredicate) - ) - ) - } + + exists(int n, int nCfgPredicate, int nMeta | + n = 0 + and + nCfgPredicate = n + 1 + and + nMeta = nCfgPredicate + e.getNumberOfMetas() + and ( + none() + or + index = n and result = e.getCfgPredicate() + or + result = e.getMeta(index - nCfgPredicate) + )) + } /** * INTERNAL: Do not use. */ class CfgComposite extends @cfg_composite, CfgPredicate { + override string toString() { result = "CfgComposite" } /** * Gets the `index`th cfg predicate of this cfg composite (0-based). + * */ - CfgPredicate getCfgPredicate(int index) { cfg_composite_cfg_predicates(this, index, result) } - + CfgPredicate getCfgPredicate(int index) { + cfg_composite_cfg_predicates(this, index, result) + } /** * Gets the number of cfg predicates of this cfg composite. */ @@ -3257,42 +4097,110 @@ module Raw { } } + private Element getImmediateChildOfCfgComposite(CfgComposite e, int index) { - exists(int n, int nCfgPredicate | - n = 0 and - nCfgPredicate = n + e.getNumberOfCfgPredicates() and - ( - none() - or - result = e.getCfgPredicate(index - n) - ) - ) - } + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + e.getNumberOfCfgPredicates() + and ( + none() + or + result = e.getCfgPredicate(index - n) + )) + } /** * INTERNAL: Do not use. */ class CfgMeta extends @cfg_meta, Meta { + override string toString() { result = "CfgMeta" } /** * Gets the cfg predicate of this cfg meta, if it exists. + * */ - CfgPredicate getCfgPredicate() { cfg_meta_cfg_predicates(this, result) } + CfgPredicate getCfgPredicate() { + cfg_meta_cfg_predicates(this, result) + } } + private Element getImmediateChildOfCfgMeta(CfgMeta e, int index) { - exists(int n, int nCfgPredicate | - n = 0 and - nCfgPredicate = n + 1 and - ( + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( + none() + or + index = n and result = e.getCfgPredicate() + )) + } + + /** + * INTERNAL: Do not use. + */ + class CfgPredExpr extends @cfg_pred_expr, Expr { + + override string toString() { result = "CfgPredExpr" } + + /** + * Gets the cfg predicate of this cfg pred expression, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + cfg_pred_expr_cfg_predicates(this, result) + } + } + + + private Element getImmediateChildOfCfgPredExpr(CfgPredExpr e, int index) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( none() - or - index = n and result = e.getCfgPredicate() - ) - ) + or + index = n and result = e.getCfgPredicate() + )) + } + + /** + * INTERNAL: Do not use. + */ + class CfgPredPat extends @cfg_pred_pat, Pat { + + override string toString() { result = "CfgPredPat" } + + /** + * Gets the cfg predicate of this cfg pred pattern, if it exists. + * + */ + CfgPredicate getCfgPredicate() { + cfg_pred_pat_cfg_predicates(this, result) + } } + + private Element getImmediateChildOfCfgPredPat(CfgPredPat e, int index) { + + exists(int n, int nCfgPredicate | + n = 0 + and + nCfgPredicate = n + 1 + and ( + none() + or + index = n and result = e.getCfgPredicate() + )) + } + /** * INTERNAL: Do not use. * A closure expression. For example: @@ -3310,72 +4218,96 @@ module Raw { * ``` */ class ClosureExpr extends @closure_expr, Expr, Callable { + override string toString() { result = "ClosureExpr" } /** * Gets the closure body of this closure expression, if it exists. + * */ - Expr getClosureBody() { closure_expr_closure_bodies(this, result) } - + Expr getClosureBody() { + closure_expr_closure_bodies(this, result) + } /** * Gets the for binder of this closure expression, if it exists. + * */ - ForBinder getForBinder() { closure_expr_for_binders(this, result) } - + ForBinder getForBinder() { + closure_expr_for_binders(this, result) + } /** * Holds if this closure expression is async. + * */ - predicate isAsync() { closure_expr_is_async(this) } - + predicate isAsync() { + closure_expr_is_async(this) + } /** * Holds if this closure expression is const. + * */ - predicate isConst() { closure_expr_is_const(this) } - + predicate isConst() { + closure_expr_is_const(this) + } /** * Holds if this closure expression is gen. + * */ - predicate isGen() { closure_expr_is_gen(this) } - + predicate isGen() { + closure_expr_is_gen(this) + } /** * Holds if this closure expression is move. + * */ - predicate isMove() { closure_expr_is_move(this) } - + predicate isMove() { + closure_expr_is_move(this) + } /** * Holds if this closure expression is static. + * */ - predicate isStatic() { closure_expr_is_static(this) } - + predicate isStatic() { + closure_expr_is_static(this) + } /** * Gets the ret type of this closure expression, if it exists. + * */ - RetTypeRepr getRetType() { closure_expr_ret_types(this, result) } + RetTypeRepr getRetType() { + closure_expr_ret_types(this, result) + } } + private Element getImmediateChildOfClosureExpr(ClosureExpr e, int index) { - exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | - n = 0 and - nParamList = n + 1 and - nAttr = nParamList + e.getNumberOfAttrs() and - nClosureBody = nAttr + 1 and - nForBinder = nClosureBody + 1 and - nRetType = nForBinder + 1 and - ( - none() - or - index = n and result = e.getParamList() - or - result = e.getAttr(index - nParamList) - or - index = nAttr and result = e.getClosureBody() - or - index = nClosureBody and result = e.getForBinder() - or - index = nForBinder and result = e.getRetType() - ) - ) - } + + exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | + n = 0 + and + nParamList = n + 1 + and + nAttr = nParamList + e.getNumberOfAttrs() + and + nClosureBody = nAttr + 1 + and + nForBinder = nClosureBody + 1 + and + nRetType = nForBinder + 1 + and ( + none() + or + index = n and result = e.getParamList() + or + result = e.getAttr(index - nParamList) + or + index = nAttr and result = e.getClosureBody() + or + index = nClosureBody and result = e.getForBinder() + or + index = nForBinder and result = e.getRetType() + )) + } /** * INTERNAL: Do not use. @@ -3387,25 +4319,34 @@ module Raw { * ``` */ class Comment extends @comment, Token { + override string toString() { result = "Comment" } /** * Gets the parent of this comment. + * */ - AstNode getParent() { comments(this, result, _) } - + AstNode getParent() { + comments(this, result, _) + } /** * Gets the text of this comment. + * */ - string getText() { comments(this, _, result) } + string getText() { + comments(this, _, result) + } } - private Element getImmediateChildOfComment(Comment e, int index) { none() } + + private Element getImmediateChildOfComment(Comment e, int index) { + none() + } /** * INTERNAL: Do not use. * A constant argument in a generic argument list. - * + * * For example: * ```rust * Foo::<3> @@ -3413,25 +4354,31 @@ module Raw { * ``` */ class ConstArg extends @const_arg, GenericArg { + override string toString() { result = "ConstArg" } /** * Gets the expression of this const argument, if it exists. + * */ - Expr getExpr() { const_arg_exprs(this, result) } + Expr getExpr() { + const_arg_exprs(this, result) + } } + private Element getImmediateChildOfConstArg(ConstArg e, int index) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() - ) - ) - } + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -3444,35 +4391,43 @@ module Raw { * ``` */ class ConstBlockPat extends @const_block_pat, Pat { + override string toString() { result = "ConstBlockPat" } /** * Gets the block expression of this const block pattern, if it exists. + * */ - BlockExpr getBlockExpr() { const_block_pat_block_exprs(this, result) } - + BlockExpr getBlockExpr() { + const_block_pat_block_exprs(this, result) + } /** * Holds if this const block pattern is const. + * */ - predicate isConst() { const_block_pat_is_const(this) } + predicate isConst() { + const_block_pat_is_const(this) + } } + private Element getImmediateChildOfConstBlockPat(ConstBlockPat e, int index) { - exists(int n, int nBlockExpr | - n = 0 and - nBlockExpr = n + 1 and - ( - none() - or - index = n and result = e.getBlockExpr() - ) - ) - } + + exists(int n, int nBlockExpr | + n = 0 + and + nBlockExpr = n + 1 + and ( + none() + or + index = n and result = e.getBlockExpr() + )) + } /** * INTERNAL: Do not use. * A constant parameter in a generic parameter list. - * + * * For example: * ```rust * struct Foo ; @@ -3480,59 +4435,77 @@ module Raw { * ``` */ class ConstParam extends @const_param, GenericParam { + override string toString() { result = "ConstParam" } /** * Gets the `index`th attr of this const parameter (0-based). + * */ - AnyAttr getAttr(int index) { const_param_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + const_param_attrs(this, index, result) + } /** * Gets the number of attrs of this const parameter. */ - int getNumberOfAttrs() { result = count(int i | const_param_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | const_param_attrs(this, i, _)) + } /** * Gets the default val of this const parameter, if it exists. + * */ - ConstArg getDefaultVal() { const_param_default_vals(this, result) } - + ConstArg getDefaultVal() { + const_param_default_vals(this, result) + } /** * Holds if this const parameter is const. + * */ - predicate isConst() { const_param_is_const(this) } - + predicate isConst() { + const_param_is_const(this) + } /** * Gets the name of this const parameter, if it exists. + * */ - Name getName() { const_param_names(this, result) } - + Name getName() { + const_param_names(this, result) + } /** * Gets the type representation of this const parameter, if it exists. + * */ - TypeRepr getTypeRepr() { const_param_type_reprs(this, result) } + TypeRepr getTypeRepr() { + const_param_type_reprs(this, result) + } } + private Element getImmediateChildOfConstParam(ConstParam e, int index) { - exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultVal = nAttr + 1 and - nName = nDefaultVal + 1 and - nTypeRepr = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultVal() - or - index = nDefaultVal and result = e.getName() - or - index = nName and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultVal = nAttr + 1 + and + nName = nDefaultVal + 1 + and + nTypeRepr = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultVal() + or + index = nDefaultVal and result = e.getName() + or + index = nName and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -3553,38 +4526,48 @@ module Raw { * ``` */ class ContinueExpr extends @continue_expr, Expr { + override string toString() { result = "ContinueExpr" } /** * Gets the `index`th attr of this continue expression (0-based). + * */ - AnyAttr getAttr(int index) { continue_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + continue_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this continue expression. */ - int getNumberOfAttrs() { result = count(int i | continue_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | continue_expr_attrs(this, i, _)) + } /** * Gets the lifetime of this continue expression, if it exists. + * */ - Lifetime getLifetime() { continue_expr_lifetimes(this, result) } + Lifetime getLifetime() { + continue_expr_lifetimes(this, result) + } } + private Element getImmediateChildOfContinueExpr(ContinueExpr e, int index) { - exists(int n, int nAttr, int nLifetime | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLifetime = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLifetime() - ) - ) - } + + exists(int n, int nAttr, int nLifetime | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLifetime = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLifetime() + )) + } /** * INTERNAL: Do not use. @@ -3599,30 +4582,36 @@ module Raw { * ``` */ class DerefPat extends @deref_pat, Pat { + override string toString() { result = "DerefPat" } /** * Gets the pattern of this deref pattern, if it exists. + * */ - Pat getPat() { deref_pat_pats(this, result) } + Pat getPat() { + deref_pat_pats(this, result) + } } + private Element getImmediateChildOfDerefPat(DerefPat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A documentation comment. - * + * * For example: * ```rust * /// Documents `documented`. @@ -3630,15 +4619,20 @@ module Raw { * ``` */ class DocComment extends @doc_comment, AnyAttr { + override string toString() { result = "DocComment" } + } - private Element getImmediateChildOfDocComment(DocComment e, int index) { none() } + + private Element getImmediateChildOfDocComment(DocComment e, int index) { + none() + } /** * INTERNAL: Do not use. * A dynamic trait object type. - * + * * For example: * ```rust * let x: &dyn Debug; @@ -3646,25 +4640,31 @@ module Raw { * ``` */ class DynTraitTypeRepr extends @dyn_trait_type_repr, TypeRepr { + override string toString() { result = "DynTraitTypeRepr" } /** * Gets the type bound list of this dyn trait type representation, if it exists. + * */ - TypeBoundList getTypeBoundList() { dyn_trait_type_repr_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + dyn_trait_type_repr_type_bound_lists(this, result) + } } + private Element getImmediateChildOfDynTraitTypeRepr(DynTraitTypeRepr e, int index) { - exists(int n, int nTypeBoundList | - n = 0 and - nTypeBoundList = n + 1 and - ( - none() - or - index = n and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nTypeBoundList | + n = 0 + and + nTypeBoundList = n + 1 + and ( + none() + or + index = n and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. @@ -3676,25 +4676,31 @@ module Raw { * ``` */ class ExprStmt extends @expr_stmt, Stmt { + override string toString() { result = "ExprStmt" } /** * Gets the expression of this expression statement, if it exists. + * */ - Expr getExpr() { expr_stmt_exprs(this, result) } + Expr getExpr() { + expr_stmt_exprs(this, result) + } } + private Element getImmediateChildOfExprStmt(ExprStmt e, int index) { - exists(int n, int nExpr | - n = 0 and - nExpr = n + 1 and - ( - none() - or - index = n and result = e.getExpr() - ) - ) - } + + exists(int n, int nExpr | + n = 0 + and + nExpr = n + 1 + and ( + none() + or + index = n and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -3704,51 +4710,64 @@ module Raw { * ``` */ class FieldExpr extends @field_expr, Expr { + override string toString() { result = "FieldExpr" } /** * Gets the `index`th attr of this field expression (0-based). + * */ - AnyAttr getAttr(int index) { field_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + field_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this field expression. */ - int getNumberOfAttrs() { result = count(int i | field_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | field_expr_attrs(this, i, _)) + } /** * Gets the container of this field expression, if it exists. + * */ - Expr getContainer() { field_expr_containers(this, result) } - + Expr getContainer() { + field_expr_containers(this, result) + } /** * Gets the identifier of this field expression, if it exists. + * */ - NameRef getIdentifier() { field_expr_identifiers(this, result) } + NameRef getIdentifier() { + field_expr_identifiers(this, result) + } } + private Element getImmediateChildOfFieldExpr(FieldExpr e, int index) { - exists(int n, int nAttr, int nContainer, int nIdentifier | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nContainer = nAttr + 1 and - nIdentifier = nContainer + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getContainer() - or - index = nContainer and result = e.getIdentifier() - ) - ) - } + + exists(int n, int nAttr, int nContainer, int nIdentifier | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nContainer = nAttr + 1 + and + nIdentifier = nContainer + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getContainer() + or + index = nContainer and result = e.getIdentifier() + )) + } /** * INTERNAL: Do not use. * A function pointer type. - * + * * For example: * ```rust * let f: fn(i32) -> i32; @@ -3756,61 +4775,79 @@ module Raw { * ``` */ class FnPtrTypeRepr extends @fn_ptr_type_repr, TypeRepr { + override string toString() { result = "FnPtrTypeRepr" } /** * Gets the abi of this fn ptr type representation, if it exists. + * */ - Abi getAbi() { fn_ptr_type_repr_abis(this, result) } - + Abi getAbi() { + fn_ptr_type_repr_abis(this, result) + } /** * Holds if this fn ptr type representation is async. + * */ - predicate isAsync() { fn_ptr_type_repr_is_async(this) } - + predicate isAsync() { + fn_ptr_type_repr_is_async(this) + } /** * Holds if this fn ptr type representation is const. + * */ - predicate isConst() { fn_ptr_type_repr_is_const(this) } - + predicate isConst() { + fn_ptr_type_repr_is_const(this) + } /** * Holds if this fn ptr type representation is unsafe. + * */ - predicate isUnsafe() { fn_ptr_type_repr_is_unsafe(this) } - + predicate isUnsafe() { + fn_ptr_type_repr_is_unsafe(this) + } /** * Gets the parameter list of this fn ptr type representation, if it exists. + * */ - ParamList getParamList() { fn_ptr_type_repr_param_lists(this, result) } - + ParamList getParamList() { + fn_ptr_type_repr_param_lists(this, result) + } /** * Gets the ret type of this fn ptr type representation, if it exists. + * */ - RetTypeRepr getRetType() { fn_ptr_type_repr_ret_types(this, result) } + RetTypeRepr getRetType() { + fn_ptr_type_repr_ret_types(this, result) + } } + private Element getImmediateChildOfFnPtrTypeRepr(FnPtrTypeRepr e, int index) { - exists(int n, int nAbi, int nParamList, int nRetType | - n = 0 and - nAbi = n + 1 and - nParamList = nAbi + 1 and - nRetType = nParamList + 1 and - ( - none() - or - index = n and result = e.getAbi() - or - index = nAbi and result = e.getParamList() - or - index = nParamList and result = e.getRetType() - ) - ) - } + + exists(int n, int nAbi, int nParamList, int nRetType | + n = 0 + and + nAbi = n + 1 + and + nParamList = nAbi + 1 + and + nRetType = nParamList + 1 + and ( + none() + or + index = n and result = e.getAbi() + or + index = nAbi and result = e.getParamList() + or + index = nParamList and result = e.getRetType() + )) + } /** * INTERNAL: Do not use. * A function pointer type with a `for` modifier. - * + * * For example: * ```rust * type RefOp = for<'a> fn(&'a X) -> &'a X; @@ -3818,33 +4855,42 @@ module Raw { * ``` */ class ForTypeRepr extends @for_type_repr, TypeRepr { + override string toString() { result = "ForTypeRepr" } /** * Gets the for binder of this for type representation, if it exists. + * */ - ForBinder getForBinder() { for_type_repr_for_binders(this, result) } - + ForBinder getForBinder() { + for_type_repr_for_binders(this, result) + } /** * Gets the type representation of this for type representation, if it exists. + * */ - TypeRepr getTypeRepr() { for_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + for_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfForTypeRepr(ForTypeRepr e, int index) { - exists(int n, int nForBinder, int nTypeRepr | - n = 0 and - nForBinder = n + 1 and - nTypeRepr = nForBinder + 1 and - ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nForBinder, int nTypeRepr | + n = 0 + and + nForBinder = n + 1 + and + nTypeRepr = nForBinder + 1 + and ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -3858,52 +4904,67 @@ module Raw { * ``` */ class FormatArgsExpr extends @format_args_expr, Expr { + override string toString() { result = "FormatArgsExpr" } /** * Gets the `index`th argument of this format arguments expression (0-based). + * */ - FormatArgsArg getArg(int index) { format_args_expr_args(this, index, result) } - + FormatArgsArg getArg(int index) { + format_args_expr_args(this, index, result) + } /** * Gets the number of arguments of this format arguments expression. */ - int getNumberOfArgs() { result = count(int i | format_args_expr_args(this, i, _)) } - + int getNumberOfArgs() { + result = count(int i | format_args_expr_args(this, i, _)) + } /** * Gets the `index`th attr of this format arguments expression (0-based). + * */ - AnyAttr getAttr(int index) { format_args_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + format_args_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this format arguments expression. */ - int getNumberOfAttrs() { result = count(int i | format_args_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | format_args_expr_attrs(this, i, _)) + } /** * Gets the template of this format arguments expression, if it exists. + * */ - Expr getTemplate() { format_args_expr_templates(this, result) } + Expr getTemplate() { + format_args_expr_templates(this, result) + } } + private Element getImmediateChildOfFormatArgsExpr(FormatArgsExpr e, int index) { - exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | - n = 0 and - nArg = n + e.getNumberOfArgs() and - nAttr = nArg + e.getNumberOfAttrs() and - nTemplate = nAttr + 1 and - nFormat = nTemplate and - ( - none() - or - result = e.getArg(index - n) - or - result = e.getAttr(index - nArg) - or - index = nAttr and result = e.getTemplate() - ) - ) - } + + exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | + n = 0 + and + nArg = n + e.getNumberOfArgs() + and + nAttr = nArg + e.getNumberOfAttrs() + and + nTemplate = nAttr + 1 + and + nFormat = nTemplate + and ( + none() + or + result = e.getArg(index - n) + or + result = e.getAttr(index - nArg) + or + index = nAttr and result = e.getTemplate() + )) + } /** * INTERNAL: Do not use. @@ -3922,56 +4983,73 @@ module Raw { * ``` */ class IdentPat extends @ident_pat, Pat { + override string toString() { result = "IdentPat" } /** * Gets the `index`th attr of this ident pattern (0-based). + * */ - AnyAttr getAttr(int index) { ident_pat_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + ident_pat_attrs(this, index, result) + } /** * Gets the number of attrs of this ident pattern. */ - int getNumberOfAttrs() { result = count(int i | ident_pat_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | ident_pat_attrs(this, i, _)) + } /** * Holds if this ident pattern is mut. + * */ - predicate isMut() { ident_pat_is_mut(this) } - + predicate isMut() { + ident_pat_is_mut(this) + } /** * Holds if this ident pattern is reference. + * */ - predicate isRef() { ident_pat_is_ref(this) } - + predicate isRef() { + ident_pat_is_ref(this) + } /** * Gets the name of this ident pattern, if it exists. + * */ - Name getName() { ident_pat_names(this, result) } - + Name getName() { + ident_pat_names(this, result) + } /** * Gets the pattern of this ident pattern, if it exists. + * */ - Pat getPat() { ident_pat_pats(this, result) } + Pat getPat() { + ident_pat_pats(this, result) + } } + private Element getImmediateChildOfIdentPat(IdentPat e, int index) { - exists(int n, int nAttr, int nName, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nName = nAttr + 1 and - nPat = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getName() - or - index = nName and result = e.getPat() - ) - ) - } + + exists(int n, int nAttr, int nName, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and + nPat = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getName() + or + index = nName and result = e.getPat() + )) + } /** * INTERNAL: Do not use. @@ -3990,59 +5068,75 @@ module Raw { * ``` */ class IfExpr extends @if_expr, Expr { + override string toString() { result = "IfExpr" } /** * Gets the `index`th attr of this if expression (0-based). + * */ - AnyAttr getAttr(int index) { if_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + if_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this if expression. */ - int getNumberOfAttrs() { result = count(int i | if_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | if_expr_attrs(this, i, _)) + } /** * Gets the condition of this if expression, if it exists. + * */ - Expr getCondition() { if_expr_conditions(this, result) } - + Expr getCondition() { + if_expr_conditions(this, result) + } /** * Gets the else of this if expression, if it exists. + * */ - Expr getElse() { if_expr_elses(this, result) } - + Expr getElse() { + if_expr_elses(this, result) + } /** * Gets the then of this if expression, if it exists. + * */ - BlockExpr getThen() { if_expr_thens(this, result) } + BlockExpr getThen() { + if_expr_thens(this, result) + } } + private Element getImmediateChildOfIfExpr(IfExpr e, int index) { - exists(int n, int nAttr, int nCondition, int nElse, int nThen | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nCondition = nAttr + 1 and - nElse = nCondition + 1 and - nThen = nElse + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getCondition() - or - index = nCondition and result = e.getElse() - or - index = nElse and result = e.getThen() - ) - ) - } + + exists(int n, int nAttr, int nCondition, int nElse, int nThen | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nCondition = nAttr + 1 + and + nElse = nCondition + 1 + and + nThen = nElse + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getCondition() + or + index = nCondition and result = e.getElse() + or + index = nElse and result = e.getThen() + )) + } /** * INTERNAL: Do not use. * An `impl Trait` type. - * + * * For example: * ```rust * fn foo() -> impl Iterator { 0..10 } @@ -4050,25 +5144,31 @@ module Raw { * ``` */ class ImplTraitTypeRepr extends @impl_trait_type_repr, TypeRepr { + override string toString() { result = "ImplTraitTypeRepr" } /** * Gets the type bound list of this impl trait type representation, if it exists. + * */ - TypeBoundList getTypeBoundList() { impl_trait_type_repr_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + impl_trait_type_repr_type_bound_lists(this, result) + } } + private Element getImmediateChildOfImplTraitTypeRepr(ImplTraitTypeRepr e, int index) { - exists(int n, int nTypeBoundList | - n = 0 and - nTypeBoundList = n + 1 and - ( - none() - or - index = n and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nTypeBoundList | + n = 0 + and + nTypeBoundList = n + 1 + and ( + none() + or + index = n and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. @@ -4078,10 +5178,15 @@ module Raw { * ``` */ class IncludeBytesExpr extends @include_bytes_expr, Expr { + override string toString() { result = "IncludeBytesExpr" } + } - private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index) { none() } + + private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index) { + none() + } /** * INTERNAL: Do not use. @@ -4092,51 +5197,64 @@ module Raw { * ``` */ class IndexExpr extends @index_expr, Expr { + override string toString() { result = "IndexExpr" } /** * Gets the `index`th attr of this index expression (0-based). + * */ - AnyAttr getAttr(int index) { index_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + index_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this index expression. */ - int getNumberOfAttrs() { result = count(int i | index_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | index_expr_attrs(this, i, _)) + } /** * Gets the base of this index expression, if it exists. + * */ - Expr getBase() { index_expr_bases(this, result) } - + Expr getBase() { + index_expr_bases(this, result) + } /** * Gets the index of this index expression, if it exists. + * */ - Expr getIndex() { index_expr_indices(this, result) } + Expr getIndex() { + index_expr_indices(this, result) + } } + private Element getImmediateChildOfIndexExpr(IndexExpr e, int index) { - exists(int n, int nAttr, int nBase, int nIndex | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nBase = nAttr + 1 and - nIndex = nBase + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getBase() - or - index = nBase and result = e.getIndex() - ) - ) - } + + exists(int n, int nAttr, int nBase, int nIndex | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nBase = nAttr + 1 + and + nIndex = nBase + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getBase() + or + index = nBase and result = e.getIndex() + )) + } /** * INTERNAL: Do not use. * An inferred type (`_`). - * + * * For example: * ```rust * let x: _ = 42; @@ -4144,15 +5262,20 @@ module Raw { * ``` */ class InferTypeRepr extends @infer_type_repr, TypeRepr { + override string toString() { result = "InferTypeRepr" } + } - private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index) { none() } + + private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index) { + none() + } /** * INTERNAL: Do not use. * An item such as a function, struct, enum, etc. - * + * * For example: * ```rust * fn foo() {} @@ -4161,55 +5284,80 @@ module Raw { * ``` */ class Item extends @item, Stmt, Addressable { + + + /** * Gets the attribute macro expansion of this item, if it exists. + * */ - MacroItems getAttributeMacroExpansion() { item_attribute_macro_expansions(this, result) } + MacroItems getAttributeMacroExpansion() { + item_attribute_macro_expansions(this, result) + } } + + /** * INTERNAL: Do not use. */ class KeyValueMeta extends @key_value_meta, Meta { + override string toString() { result = "KeyValueMeta" } /** * Gets the expression of this key value meta, if it exists. + * */ - Expr getExpr() { key_value_meta_exprs(this, result) } - + Expr getExpr() { + key_value_meta_exprs(this, result) + } /** * Gets the path of this key value meta, if it exists. + * */ - Path getPath() { key_value_meta_paths(this, result) } + Path getPath() { + key_value_meta_paths(this, result) + } } + private Element getImmediateChildOfKeyValueMeta(KeyValueMeta e, int index) { - exists(int n, int nExpr, int nPath | - n = 0 and - nExpr = n + 1 and - nPath = nExpr + 1 and - ( - none() - or - index = n and result = e.getExpr() - or - index = nExpr and result = e.getPath() - ) - ) - } + + exists(int n, int nExpr, int nPath | + n = 0 + and + nExpr = n + 1 + and + nPath = nExpr + 1 + and ( + none() + or + index = n and result = e.getExpr() + or + index = nExpr and result = e.getPath() + )) + } /** * INTERNAL: Do not use. * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). */ class LabelableExpr extends @labelable_expr, Expr { + + + /** * Gets the label of this labelable expression, if it exists. + * */ - Label getLabel() { labelable_expr_labels(this, result) } + Label getLabel() { + labelable_expr_labels(this, result) + } } + + /** * INTERNAL: Do not use. * A `let` expression. For example: @@ -4220,46 +5368,59 @@ module Raw { * ``` */ class LetExpr extends @let_expr, Expr { + override string toString() { result = "LetExpr" } /** * Gets the `index`th attr of this let expression (0-based). + * */ - AnyAttr getAttr(int index) { let_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + let_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this let expression. */ - int getNumberOfAttrs() { result = count(int i | let_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | let_expr_attrs(this, i, _)) + } /** * Gets the scrutinee of this let expression, if it exists. + * */ - Expr getScrutinee() { let_expr_scrutinees(this, result) } - + Expr getScrutinee() { + let_expr_scrutinees(this, result) + } /** * Gets the pattern of this let expression, if it exists. + * */ - Pat getPat() { let_expr_pats(this, result) } + Pat getPat() { + let_expr_pats(this, result) + } } + private Element getImmediateChildOfLetExpr(LetExpr e, int index) { - exists(int n, int nAttr, int nScrutinee, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nScrutinee = nAttr + 1 and - nPat = nScrutinee + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getScrutinee() - or - index = nScrutinee and result = e.getPat() - ) - ) - } + + exists(int n, int nAttr, int nScrutinee, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nScrutinee = nAttr + 1 + and + nPat = nScrutinee + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getScrutinee() + or + index = nScrutinee and result = e.getPat() + )) + } /** * INTERNAL: Do not use. @@ -4276,67 +5437,86 @@ module Raw { * ``` */ class LetStmt extends @let_stmt, Stmt { + override string toString() { result = "LetStmt" } /** * Gets the `index`th attr of this let statement (0-based). + * */ - AnyAttr getAttr(int index) { let_stmt_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + let_stmt_attrs(this, index, result) + } /** * Gets the number of attrs of this let statement. */ - int getNumberOfAttrs() { result = count(int i | let_stmt_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | let_stmt_attrs(this, i, _)) + } /** * Gets the initializer of this let statement, if it exists. + * */ - Expr getInitializer() { let_stmt_initializers(this, result) } - + Expr getInitializer() { + let_stmt_initializers(this, result) + } /** * Gets the let else of this let statement, if it exists. + * */ - LetElse getLetElse() { let_stmt_let_elses(this, result) } - + LetElse getLetElse() { + let_stmt_let_elses(this, result) + } /** * Gets the pattern of this let statement, if it exists. + * */ - Pat getPat() { let_stmt_pats(this, result) } - + Pat getPat() { + let_stmt_pats(this, result) + } /** * Gets the type representation of this let statement, if it exists. + * */ - TypeRepr getTypeRepr() { let_stmt_type_reprs(this, result) } + TypeRepr getTypeRepr() { + let_stmt_type_reprs(this, result) + } } + private Element getImmediateChildOfLetStmt(LetStmt e, int index) { - exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nInitializer = nAttr + 1 and - nLetElse = nInitializer + 1 and - nPat = nLetElse + 1 and - nTypeRepr = nPat + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getInitializer() - or - index = nInitializer and result = e.getLetElse() - or - index = nLetElse and result = e.getPat() - or - index = nPat and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nInitializer = nAttr + 1 + and + nLetElse = nInitializer + 1 + and + nPat = nLetElse + 1 + and + nTypeRepr = nPat + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getInitializer() + or + index = nInitializer and result = e.getLetElse() + or + index = nLetElse and result = e.getPat() + or + index = nPat and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A lifetime annotation. - * + * * For example: * ```rust * fn foo<'a>(x: &'a str) {} @@ -4344,20 +5524,27 @@ module Raw { * ``` */ class Lifetime extends @lifetime, UseBoundGenericArg { + override string toString() { result = "Lifetime" } /** * Gets the text of this lifetime, if it exists. + * */ - string getText() { lifetime_texts(this, result) } + string getText() { + lifetime_texts(this, result) + } } - private Element getImmediateChildOfLifetime(Lifetime e, int index) { none() } + + private Element getImmediateChildOfLifetime(Lifetime e, int index) { + none() + } /** * INTERNAL: Do not use. * A lifetime argument in a generic argument list. - * + * * For example: * ```rust * let text: Text<'a>; @@ -4365,30 +5552,36 @@ module Raw { * ``` */ class LifetimeArg extends @lifetime_arg, GenericArg { + override string toString() { result = "LifetimeArg" } /** * Gets the lifetime of this lifetime argument, if it exists. + * */ - Lifetime getLifetime() { lifetime_arg_lifetimes(this, result) } + Lifetime getLifetime() { + lifetime_arg_lifetimes(this, result) + } } + private Element getImmediateChildOfLifetimeArg(LifetimeArg e, int index) { - exists(int n, int nLifetime | - n = 0 and - nLifetime = n + 1 and - ( - none() - or - index = n and result = e.getLifetime() - ) - ) - } + + exists(int n, int nLifetime | + n = 0 + and + nLifetime = n + 1 + and ( + none() + or + index = n and result = e.getLifetime() + )) + } /** * INTERNAL: Do not use. * A lifetime parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo<'a>(x: &'a str) {} @@ -4396,46 +5589,59 @@ module Raw { * ``` */ class LifetimeParam extends @lifetime_param, GenericParam { + override string toString() { result = "LifetimeParam" } /** * Gets the `index`th attr of this lifetime parameter (0-based). + * */ - AnyAttr getAttr(int index) { lifetime_param_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + lifetime_param_attrs(this, index, result) + } /** * Gets the number of attrs of this lifetime parameter. */ - int getNumberOfAttrs() { result = count(int i | lifetime_param_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | lifetime_param_attrs(this, i, _)) + } /** * Gets the lifetime of this lifetime parameter, if it exists. + * */ - Lifetime getLifetime() { lifetime_param_lifetimes(this, result) } - + Lifetime getLifetime() { + lifetime_param_lifetimes(this, result) + } /** * Gets the type bound list of this lifetime parameter, if it exists. + * */ - TypeBoundList getTypeBoundList() { lifetime_param_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + lifetime_param_type_bound_lists(this, result) + } } + private Element getImmediateChildOfLifetimeParam(LifetimeParam e, int index) { - exists(int n, int nAttr, int nLifetime, int nTypeBoundList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nLifetime = nAttr + 1 and - nTypeBoundList = nLifetime + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nAttr, int nLifetime, int nTypeBoundList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nLifetime = nAttr + 1 + and + nTypeBoundList = nLifetime + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. @@ -4452,35 +5658,44 @@ module Raw { * ``` */ class LiteralExpr extends @literal_expr, Expr { + override string toString() { result = "LiteralExpr" } /** * Gets the `index`th attr of this literal expression (0-based). + * */ - AnyAttr getAttr(int index) { literal_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + literal_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this literal expression. */ - int getNumberOfAttrs() { result = count(int i | literal_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | literal_expr_attrs(this, i, _)) + } /** * Gets the text value of this literal expression, if it exists. + * */ - string getTextValue() { literal_expr_text_values(this, result) } + string getTextValue() { + literal_expr_text_values(this, result) + } } + private Element getImmediateChildOfLiteralExpr(LiteralExpr e, int index) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) - ) - ) - } + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) + )) + } /** * INTERNAL: Do not use. @@ -4493,60 +5708,72 @@ module Raw { * ``` */ class LiteralPat extends @literal_pat, Pat { + override string toString() { result = "LiteralPat" } /** * Gets the literal of this literal pattern, if it exists. + * */ - LiteralExpr getLiteral() { literal_pat_literals(this, result) } + LiteralExpr getLiteral() { + literal_pat_literals(this, result) + } } + private Element getImmediateChildOfLiteralPat(LiteralPat e, int index) { - exists(int n, int nLiteral | - n = 0 and - nLiteral = n + 1 and - ( - none() - or - index = n and result = e.getLiteral() - ) - ) - } + + exists(int n, int nLiteral | + n = 0 + and + nLiteral = n + 1 + and ( + none() + or + index = n and result = e.getLiteral() + )) + } /** * INTERNAL: Do not use. * A macro expression, representing the invocation of a macro that produces an expression. - * + * * For example: * ```rust * let y = vec![1, 2, 3]; * ``` */ class MacroExpr extends @macro_expr, Expr { + override string toString() { result = "MacroExpr" } /** * Gets the macro call of this macro expression, if it exists. + * */ - MacroCall getMacroCall() { macro_expr_macro_calls(this, result) } + MacroCall getMacroCall() { + macro_expr_macro_calls(this, result) + } } + private Element getImmediateChildOfMacroExpr(MacroExpr e, int index) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() - ) - ) - } + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() + )) + } /** * INTERNAL: Do not use. * A macro pattern, representing the invocation of a macro that produces a pattern. - * + * * For example: * ```rust * macro_rules! my_macro { @@ -4562,30 +5789,36 @@ module Raw { * ``` */ class MacroPat extends @macro_pat, Pat { + override string toString() { result = "MacroPat" } /** * Gets the macro call of this macro pattern, if it exists. + * */ - MacroCall getMacroCall() { macro_pat_macro_calls(this, result) } + MacroCall getMacroCall() { + macro_pat_macro_calls(this, result) + } } + private Element getImmediateChildOfMacroPat(MacroPat e, int index) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() - ) - ) - } + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() + )) + } /** * INTERNAL: Do not use. * A type produced by a macro. - * + * * For example: * ```rust * macro_rules! macro_type { @@ -4596,25 +5829,31 @@ module Raw { * ``` */ class MacroTypeRepr extends @macro_type_repr, TypeRepr { + override string toString() { result = "MacroTypeRepr" } /** * Gets the macro call of this macro type representation, if it exists. + * */ - MacroCall getMacroCall() { macro_type_repr_macro_calls(this, result) } + MacroCall getMacroCall() { + macro_type_repr_macro_calls(this, result) + } } + private Element getImmediateChildOfMacroTypeRepr(MacroTypeRepr e, int index) { - exists(int n, int nMacroCall | - n = 0 and - nMacroCall = n + 1 and - ( - none() - or - index = n and result = e.getMacroCall() - ) - ) - } + + exists(int n, int nMacroCall | + n = 0 + and + nMacroCall = n + 1 + and ( + none() + or + index = n and result = e.getMacroCall() + )) + } /** * INTERNAL: Do not use. @@ -4633,53 +5872,66 @@ module Raw { * ``` */ class MatchExpr extends @match_expr, Expr { + override string toString() { result = "MatchExpr" } /** * Gets the `index`th attr of this match expression (0-based). + * */ - AnyAttr getAttr(int index) { match_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + match_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this match expression. */ - int getNumberOfAttrs() { result = count(int i | match_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | match_expr_attrs(this, i, _)) + } /** * Gets the scrutinee (the expression being matched) of this match expression, if it exists. + * */ - Expr getScrutinee() { match_expr_scrutinees(this, result) } - + Expr getScrutinee() { + match_expr_scrutinees(this, result) + } /** * Gets the match arm list of this match expression, if it exists. + * */ - MatchArmList getMatchArmList() { match_expr_match_arm_lists(this, result) } + MatchArmList getMatchArmList() { + match_expr_match_arm_lists(this, result) + } } + private Element getImmediateChildOfMatchExpr(MatchExpr e, int index) { - exists(int n, int nAttr, int nScrutinee, int nMatchArmList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nScrutinee = nAttr + 1 and - nMatchArmList = nScrutinee + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getScrutinee() - or - index = nScrutinee and result = e.getMatchArmList() - ) - ) - } + + exists(int n, int nAttr, int nScrutinee, int nMatchArmList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nScrutinee = nAttr + 1 + and + nMatchArmList = nScrutinee + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getScrutinee() + or + index = nScrutinee and result = e.getMatchArmList() + )) + } /** * INTERNAL: Do not use. * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and * indexing syntax (such as `x[y]`). - * + * * A method call expression. For example: * ```rust * x.foo(42); @@ -4687,67 +5939,86 @@ module Raw { * ``` */ class MethodCallExpr extends @method_call_expr, Expr { + override string toString() { result = "MethodCallExpr" } /** * Gets the argument list of this method call expression, if it exists. + * */ - ArgList getArgList() { method_call_expr_arg_lists(this, result) } - + ArgList getArgList() { + method_call_expr_arg_lists(this, result) + } /** * Gets the `index`th attr of this method call expression (0-based). + * */ - AnyAttr getAttr(int index) { method_call_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + method_call_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this method call expression. */ - int getNumberOfAttrs() { result = count(int i | method_call_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | method_call_expr_attrs(this, i, _)) + } /** * Gets the generic argument list of this method call expression, if it exists. + * */ - GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) } - + GenericArgList getGenericArgList() { + method_call_expr_generic_arg_lists(this, result) + } /** * Gets the identifier of this method call expression, if it exists. + * */ - NameRef getIdentifier() { method_call_expr_identifiers(this, result) } - + NameRef getIdentifier() { + method_call_expr_identifiers(this, result) + } /** * Gets the receiver of this method call expression, if it exists. + * */ - Expr getReceiver() { method_call_expr_receivers(this, result) } + Expr getReceiver() { + method_call_expr_receivers(this, result) + } } + private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index) { - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 and - nArgList = n + 1 and - nAttr = nArgList + e.getNumberOfAttrs() and - nGenericArgList = nAttr + 1 and - nIdentifier = nGenericArgList + 1 and - nReceiver = nIdentifier + 1 and - ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getReceiver() - ) - ) - } + + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 + and + nArgList = n + 1 + and + nAttr = nArgList + e.getNumberOfAttrs() + and + nGenericArgList = nAttr + 1 + and + nIdentifier = nGenericArgList + 1 + and + nReceiver = nIdentifier + 1 + and ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getReceiver() + )) + } /** * INTERNAL: Do not use. * A reference to a name. - * + * * For example: * ```rust * foo(); @@ -4755,20 +6026,27 @@ module Raw { * ``` */ class NameRef extends @name_ref, UseBoundGenericArg { + override string toString() { result = "NameRef" } /** * Gets the text of this name reference, if it exists. + * */ - string getText() { name_ref_texts(this, result) } + string getText() { + name_ref_texts(this, result) + } } - private Element getImmediateChildOfNameRef(NameRef e, int index) { none() } + + private Element getImmediateChildOfNameRef(NameRef e, int index) { + none() + } /** * INTERNAL: Do not use. * The never type `!`. - * + * * For example: * ```rust * fn foo() -> ! { panic!() } @@ -4776,10 +6054,15 @@ module Raw { * ``` */ class NeverTypeRepr extends @never_type_repr, TypeRepr { + override string toString() { result = "NeverTypeRepr" } + } - private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index) { none() } + + private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index) { + none() + } /** * INTERNAL: Do not use. @@ -4792,10 +6075,15 @@ module Raw { * ``` */ class NotNull extends @not_null, Pat { + override string toString() { result = "NotNull" } + } - private Element getImmediateChildOfNotNull(NotNull e, int index) { none() } + + private Element getImmediateChildOfNotNull(NotNull e, int index) { + none() + } /** * INTERNAL: Do not use. @@ -4805,51 +6093,65 @@ module Raw { * ``` */ class OffsetOfExpr extends @offset_of_expr, Expr { + override string toString() { result = "OffsetOfExpr" } /** * Gets the `index`th attr of this offset of expression (0-based). + * */ - AnyAttr getAttr(int index) { offset_of_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + offset_of_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this offset of expression. */ - int getNumberOfAttrs() { result = count(int i | offset_of_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | offset_of_expr_attrs(this, i, _)) + } /** * Gets the `index`th field of this offset of expression (0-based). + * */ - NameRef getField(int index) { offset_of_expr_fields(this, index, result) } - + NameRef getField(int index) { + offset_of_expr_fields(this, index, result) + } /** * Gets the number of fields of this offset of expression. */ - int getNumberOfFields() { result = count(int i | offset_of_expr_fields(this, i, _)) } - + int getNumberOfFields() { + result = count(int i | offset_of_expr_fields(this, i, _)) + } /** * Gets the type representation of this offset of expression, if it exists. + * */ - TypeRepr getTypeRepr() { offset_of_expr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + offset_of_expr_type_reprs(this, result) + } } + private Element getImmediateChildOfOffsetOfExpr(OffsetOfExpr e, int index) { - exists(int n, int nAttr, int nField, int nTypeRepr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - nTypeRepr = nField + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - or - index = nField and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nAttr, int nField, int nTypeRepr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and + nTypeRepr = nField + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + or + index = nField and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -4861,30 +6163,37 @@ module Raw { * ``` */ class OrPat extends @or_pat, Pat { + override string toString() { result = "OrPat" } /** * Gets the `index`th pattern of this or pattern (0-based). + * */ - Pat getPat(int index) { or_pat_pats(this, index, result) } - + Pat getPat(int index) { + or_pat_pats(this, index, result) + } /** * Gets the number of patterns of this or pattern. */ - int getNumberOfPats() { result = count(int i | or_pat_pats(this, i, _)) } + int getNumberOfPats() { + result = count(int i | or_pat_pats(this, i, _)) + } } + private Element getImmediateChildOfOrPat(OrPat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + e.getNumberOfPats() and - ( - none() - or - result = e.getPat(index - n) - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + e.getNumberOfPats() + and ( + none() + or + result = e.getPat(index - n) + )) + } /** * INTERNAL: Do not use. @@ -4896,79 +6205,97 @@ module Raw { * ``` */ class Param extends @param, ParamBase { + override string toString() { result = "Param" } /** * Gets the pattern of this parameter, if it exists. + * */ - Pat getPat() { param_pats(this, result) } + Pat getPat() { + param_pats(this, result) + } } + private Element getImmediateChildOfParam(Param e, int index) { - exists(int n, int nAttr, int nTypeRepr, int nPat | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nTypeRepr = nAttr + 1 and - nPat = nTypeRepr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getPat() - ) - ) - } + + exists(int n, int nAttr, int nTypeRepr, int nPat | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nTypeRepr = nAttr + 1 + and + nPat = nTypeRepr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A parenthesized expression. - * + * * For example: * ```rust * (x + y) * ``` */ class ParenExpr extends @paren_expr, Expr { + override string toString() { result = "ParenExpr" } /** * Gets the `index`th attr of this paren expression (0-based). + * */ - AnyAttr getAttr(int index) { paren_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + paren_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this paren expression. */ - int getNumberOfAttrs() { result = count(int i | paren_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | paren_expr_attrs(this, i, _)) + } /** * Gets the expression of this paren expression, if it exists. + * */ - Expr getExpr() { paren_expr_exprs(this, result) } + Expr getExpr() { + paren_expr_exprs(this, result) + } } + private Element getImmediateChildOfParenExpr(ParenExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. * A parenthesized pattern. - * + * * For example: * ```rust * let (x) = 1; @@ -4976,30 +6303,36 @@ module Raw { * ``` */ class ParenPat extends @paren_pat, Pat { + override string toString() { result = "ParenPat" } /** * Gets the pattern of this paren pattern, if it exists. + * */ - Pat getPat() { paren_pat_pats(this, result) } + Pat getPat() { + paren_pat_pats(this, result) + } } + private Element getImmediateChildOfParenPat(ParenPat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A parenthesized type. - * + * * For example: * ```rust * let x: (i32); @@ -5007,55 +6340,73 @@ module Raw { * ``` */ class ParenTypeRepr extends @paren_type_repr, TypeRepr { + override string toString() { result = "ParenTypeRepr" } /** * Gets the type representation of this paren type representation, if it exists. + * */ - TypeRepr getTypeRepr() { paren_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + paren_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfParenTypeRepr(ParenTypeRepr e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. */ - class PathExprBase extends @path_expr_base, Expr { } + class PathExprBase extends @path_expr_base, Expr { + + + + } + + /** * INTERNAL: Do not use. */ class PathMeta extends @path_meta, Meta { + override string toString() { result = "PathMeta" } /** * Gets the path of this path meta, if it exists. + * */ - Path getPath() { path_meta_paths(this, result) } + Path getPath() { + path_meta_paths(this, result) + } } + private Element getImmediateChildOfPathMeta(PathMeta e, int index) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() - ) - ) - } + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() + )) + } /** * INTERNAL: Do not use. @@ -5068,20 +6419,24 @@ module Raw { * ``` */ class PathPat extends @path_pat, Pat, PathAstNode { + override string toString() { result = "PathPat" } + } + private Element getImmediateChildOfPathPat(PathPat e, int index) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() - ) - ) - } + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() + )) + } /** * INTERNAL: Do not use. @@ -5092,25 +6447,31 @@ module Raw { * ``` */ class PathTypeRepr extends @path_type_repr, TypeRepr { + override string toString() { result = "PathTypeRepr" } /** * Gets the path of this path type representation, if it exists. + * */ - Path getPath() { path_type_repr_paths(this, result) } + Path getPath() { + path_type_repr_paths(this, result) + } } + private Element getImmediateChildOfPathTypeRepr(PathTypeRepr e, int index) { - exists(int n, int nPath | - n = 0 and - nPath = n + 1 and - ( - none() - or - index = n and result = e.getPath() - ) - ) - } + + exists(int n, int nPath | + n = 0 + and + nPath = n + 1 + and ( + none() + or + index = n and result = e.getPath() + )) + } /** * INTERNAL: Do not use. @@ -5122,33 +6483,42 @@ module Raw { * ``` */ class PatternTypeRepr extends @pattern_type_repr, TypeRepr { + override string toString() { result = "PatternTypeRepr" } /** * Gets the pattern of this pattern type representation, if it exists. + * */ - Pat getPat() { pattern_type_repr_pats(this, result) } - + Pat getPat() { + pattern_type_repr_pats(this, result) + } /** * Gets the type representation of this pattern type representation, if it exists. + * */ - TypeRepr getTypeRepr() { pattern_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + pattern_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfPatternTypeRepr(PatternTypeRepr e, int index) { - exists(int n, int nPat, int nTypeRepr | - n = 0 and - nPat = n + 1 and - nTypeRepr = nPat + 1 and - ( - none() - or - index = n and result = e.getPat() - or - index = nPat and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nPat, int nTypeRepr | + n = 0 + and + nPat = n + 1 + and + nTypeRepr = nPat + 1 + and ( + none() + or + index = n and result = e.getPat() + or + index = nPat and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -5160,48 +6530,60 @@ module Raw { * ``` */ class PrefixExpr extends @prefix_expr, Expr { + override string toString() { result = "PrefixExpr" } /** * Gets the `index`th attr of this prefix expression (0-based). + * */ - AnyAttr getAttr(int index) { prefix_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + prefix_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this prefix expression. */ - int getNumberOfAttrs() { result = count(int i | prefix_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | prefix_expr_attrs(this, i, _)) + } /** * Gets the expression of this prefix expression, if it exists. + * */ - Expr getExpr() { prefix_expr_exprs(this, result) } - + Expr getExpr() { + prefix_expr_exprs(this, result) + } /** * Gets the operator name of this prefix expression, if it exists. + * */ - string getOperatorName() { prefix_expr_operator_names(this, result) } + string getOperatorName() { + prefix_expr_operator_names(this, result) + } } + private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. * A pointer type. - * + * * For example: * ```rust * let p: *const i32; @@ -5210,35 +6592,45 @@ module Raw { * ``` */ class PtrTypeRepr extends @ptr_type_repr, TypeRepr { + override string toString() { result = "PtrTypeRepr" } /** * Holds if this ptr type representation is const. + * */ - predicate isConst() { ptr_type_repr_is_const(this) } - + predicate isConst() { + ptr_type_repr_is_const(this) + } /** * Holds if this ptr type representation is mut. + * */ - predicate isMut() { ptr_type_repr_is_mut(this) } - + predicate isMut() { + ptr_type_repr_is_mut(this) + } /** * Gets the type representation of this ptr type representation, if it exists. + * */ - TypeRepr getTypeRepr() { ptr_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + ptr_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfPtrTypeRepr(PtrTypeRepr e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -5253,51 +6645,66 @@ module Raw { * ``` */ class RangeExpr extends @range_expr, Expr { + override string toString() { result = "RangeExpr" } /** * Gets the `index`th attr of this range expression (0-based). + * */ - AnyAttr getAttr(int index) { range_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + range_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this range expression. */ - int getNumberOfAttrs() { result = count(int i | range_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | range_expr_attrs(this, i, _)) + } /** * Gets the end of this range expression, if it exists. + * */ - Expr getEnd() { range_expr_ends(this, result) } - + Expr getEnd() { + range_expr_ends(this, result) + } /** * Gets the operator name of this range expression, if it exists. + * */ - string getOperatorName() { range_expr_operator_names(this, result) } - + string getOperatorName() { + range_expr_operator_names(this, result) + } /** * Gets the start of this range expression, if it exists. + * */ - Expr getStart() { range_expr_starts(this, result) } + Expr getStart() { + range_expr_starts(this, result) + } } + private Element getImmediateChildOfRangeExpr(RangeExpr e, int index) { - exists(int n, int nAttr, int nEnd, int nStart | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nEnd = nAttr + 1 and - nStart = nEnd + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getEnd() - or - index = nEnd and result = e.getStart() - ) - ) - } + + exists(int n, int nAttr, int nEnd, int nStart | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nEnd = nAttr + 1 + and + nStart = nEnd + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getEnd() + or + index = nEnd and result = e.getStart() + )) + } /** * INTERNAL: Do not use. @@ -5311,38 +6718,49 @@ module Raw { * ``` */ class RangePat extends @range_pat, Pat { + override string toString() { result = "RangePat" } /** * Gets the end of this range pattern, if it exists. + * */ - Pat getEnd() { range_pat_ends(this, result) } - + Pat getEnd() { + range_pat_ends(this, result) + } /** * Gets the operator name of this range pattern, if it exists. + * */ - string getOperatorName() { range_pat_operator_names(this, result) } - + string getOperatorName() { + range_pat_operator_names(this, result) + } /** * Gets the start of this range pattern, if it exists. + * */ - Pat getStart() { range_pat_starts(this, result) } + Pat getStart() { + range_pat_starts(this, result) + } } + private Element getImmediateChildOfRangePat(RangePat e, int index) { - exists(int n, int nEnd, int nStart | - n = 0 and - nEnd = n + 1 and - nStart = nEnd + 1 and - ( - none() - or - index = n and result = e.getEnd() - or - index = nEnd and result = e.getStart() - ) - ) - } + + exists(int n, int nEnd, int nStart | + n = 0 + and + nEnd = n + 1 + and + nStart = nEnd + 1 + and ( + none() + or + index = n and result = e.getEnd() + or + index = nEnd and result = e.getStart() + )) + } /** * INTERNAL: Do not use. @@ -5355,53 +6773,69 @@ module Raw { * ``` */ class RefExpr extends @ref_expr, Expr { + override string toString() { result = "RefExpr" } /** * Gets the `index`th attr of this reference expression (0-based). + * */ - AnyAttr getAttr(int index) { ref_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + ref_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this reference expression. */ - int getNumberOfAttrs() { result = count(int i | ref_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | ref_expr_attrs(this, i, _)) + } /** * Gets the expression of this reference expression, if it exists. + * */ - Expr getExpr() { ref_expr_exprs(this, result) } - + Expr getExpr() { + ref_expr_exprs(this, result) + } /** * Holds if this reference expression is const. + * */ - predicate isConst() { ref_expr_is_const(this) } - + predicate isConst() { + ref_expr_is_const(this) + } /** * Holds if this reference expression is mut. + * */ - predicate isMut() { ref_expr_is_mut(this) } - + predicate isMut() { + ref_expr_is_mut(this) + } /** * Holds if this reference expression is raw. + * */ - predicate isRaw() { ref_expr_is_raw(this) } + predicate isRaw() { + ref_expr_is_raw(this) + } } + private Element getImmediateChildOfRefExpr(RefExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -5414,35 +6848,43 @@ module Raw { * ``` */ class RefPat extends @ref_pat, Pat { + override string toString() { result = "RefPat" } /** * Holds if this reference pattern is mut. + * */ - predicate isMut() { ref_pat_is_mut(this) } - + predicate isMut() { + ref_pat_is_mut(this) + } /** * Gets the pattern of this reference pattern, if it exists. + * */ - Pat getPat() { ref_pat_pats(this, result) } + Pat getPat() { + ref_pat_pats(this, result) + } } + private Element getImmediateChildOfRefPat(RefPat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + 1 and - ( - none() - or - index = n and result = e.getPat() - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + 1 + and ( + none() + or + index = n and result = e.getPat() + )) + } /** * INTERNAL: Do not use. * A reference type. - * + * * For example: * ```rust * let r: &i32; @@ -5451,43 +6893,54 @@ module Raw { * ``` */ class RefTypeRepr extends @ref_type_repr, TypeRepr { + override string toString() { result = "RefTypeRepr" } /** * Holds if this reference type representation is mut. + * */ - predicate isMut() { ref_type_repr_is_mut(this) } - + predicate isMut() { + ref_type_repr_is_mut(this) + } /** * Gets the lifetime of this reference type representation, if it exists. + * */ - Lifetime getLifetime() { ref_type_repr_lifetimes(this, result) } - + Lifetime getLifetime() { + ref_type_repr_lifetimes(this, result) + } /** * Gets the type representation of this reference type representation, if it exists. + * */ - TypeRepr getTypeRepr() { ref_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + ref_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfRefTypeRepr(RefTypeRepr e, int index) { - exists(int n, int nLifetime, int nTypeRepr | - n = 0 and - nLifetime = n + 1 and - nTypeRepr = nLifetime + 1 and - ( - none() - or - index = n and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nLifetime, int nTypeRepr | + n = 0 + and + nLifetime = n + 1 + and + nTypeRepr = nLifetime + 1 + and ( + none() + or + index = n and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A rest pattern (`..`) in a tuple, slice, or struct pattern. - * + * * For example: * ```rust * let (a, .., z) = (1, 2, 3); @@ -5495,30 +6948,37 @@ module Raw { * ``` */ class RestPat extends @rest_pat, Pat { + override string toString() { result = "RestPat" } /** * Gets the `index`th attr of this rest pattern (0-based). + * */ - AnyAttr getAttr(int index) { rest_pat_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + rest_pat_attrs(this, index, result) + } /** * Gets the number of attrs of this rest pattern. */ - int getNumberOfAttrs() { result = count(int i | rest_pat_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | rest_pat_attrs(this, i, _)) + } } + private Element getImmediateChildOfRestPat(RestPat e, int index) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) - ) - ) - } + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) + )) + } /** * INTERNAL: Do not use. @@ -5535,38 +6995,48 @@ module Raw { * ``` */ class ReturnExpr extends @return_expr, Expr { + override string toString() { result = "ReturnExpr" } /** * Gets the `index`th attr of this return expression (0-based). + * */ - AnyAttr getAttr(int index) { return_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + return_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this return expression. */ - int getNumberOfAttrs() { result = count(int i | return_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | return_expr_attrs(this, i, _)) + } /** * Gets the expression of this return expression, if it exists. + * */ - Expr getExpr() { return_expr_exprs(this, result) } + Expr getExpr() { + return_expr_exprs(this, result) + } } + private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -5583,49 +7053,64 @@ module Raw { * ``` */ class SelfParam extends @self_param, ParamBase { + override string toString() { result = "SelfParam" } /** * Holds if this self parameter is reference. + * */ - predicate isRef() { self_param_is_ref(this) } - + predicate isRef() { + self_param_is_ref(this) + } /** * Holds if this self parameter is mut. + * */ - predicate isMut() { self_param_is_mut(this) } - + predicate isMut() { + self_param_is_mut(this) + } /** * Gets the lifetime of this self parameter, if it exists. + * */ - Lifetime getLifetime() { self_param_lifetimes(this, result) } - + Lifetime getLifetime() { + self_param_lifetimes(this, result) + } /** * Gets the name of this self parameter, if it exists. + * */ - Name getName() { self_param_names(this, result) } + Name getName() { + self_param_names(this, result) + } } + private Element getImmediateChildOfSelfParam(SelfParam e, int index) { - exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nTypeRepr = nAttr + 1 and - nLifetime = nTypeRepr + 1 and - nName = nLifetime + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getLifetime() - or - index = nLifetime and result = e.getName() - ) - ) - } + + exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nTypeRepr = nAttr + 1 + and + nLifetime = nTypeRepr + 1 + and + nName = nLifetime + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getLifetime() + or + index = nLifetime and result = e.getName() + )) + } /** * INTERNAL: Do not use. @@ -5639,35 +7124,42 @@ module Raw { * ``` */ class SlicePat extends @slice_pat, Pat { + override string toString() { result = "SlicePat" } /** * Gets the `index`th pattern of this slice pattern (0-based). + * */ - Pat getPat(int index) { slice_pat_pats(this, index, result) } - + Pat getPat(int index) { + slice_pat_pats(this, index, result) + } /** * Gets the number of patterns of this slice pattern. */ - int getNumberOfPats() { result = count(int i | slice_pat_pats(this, i, _)) } + int getNumberOfPats() { + result = count(int i | slice_pat_pats(this, i, _)) + } } + private Element getImmediateChildOfSlicePat(SlicePat e, int index) { - exists(int n, int nPat | - n = 0 and - nPat = n + e.getNumberOfPats() and - ( - none() - or - result = e.getPat(index - n) - ) - ) - } + + exists(int n, int nPat | + n = 0 + and + nPat = n + e.getNumberOfPats() + and ( + none() + or + result = e.getPat(index - n) + )) + } /** * INTERNAL: Do not use. * A slice type. - * + * * For example: * ```rust * let s: &[i32]; @@ -5675,25 +7167,31 @@ module Raw { * ``` */ class SliceTypeRepr extends @slice_type_repr, TypeRepr { + override string toString() { result = "SliceTypeRepr" } /** * Gets the type representation of this slice type representation, if it exists. + * */ - TypeRepr getTypeRepr() { slice_type_repr_type_reprs(this, result) } + TypeRepr getTypeRepr() { + slice_type_repr_type_reprs(this, result) + } } + private Element getImmediateChildOfSliceTypeRepr(SliceTypeRepr e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. @@ -5706,35 +7204,40 @@ module Raw { * ``` */ class StructExpr extends @struct_expr, Expr, PathAstNode { + override string toString() { result = "StructExpr" } /** * Gets the struct expression field list of this struct expression, if it exists. + * */ StructExprFieldList getStructExprFieldList() { struct_expr_struct_expr_field_lists(this, result) } } + private Element getImmediateChildOfStructExpr(StructExpr e, int index) { - exists(int n, int nPath, int nStructExprFieldList | - n = 0 and - nPath = n + 1 and - nStructExprFieldList = nPath + 1 and - ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getStructExprFieldList() - ) - ) - } + + exists(int n, int nPath, int nStructExprFieldList | + n = 0 + and + nPath = n + 1 + and + nStructExprFieldList = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getStructExprFieldList() + )) + } /** * INTERNAL: Do not use. * A list of fields in a struct declaration. - * + * * For example: * ```rust * struct S { x: i32, y: i32 } @@ -5742,30 +7245,37 @@ module Raw { * ``` */ class StructFieldList extends @struct_field_list, FieldList { + override string toString() { result = "StructFieldList" } /** * Gets the `index`th field of this struct field list (0-based). + * */ - StructField getField(int index) { struct_field_list_fields(this, index, result) } - + StructField getField(int index) { + struct_field_list_fields(this, index, result) + } /** * Gets the number of fields of this struct field list. */ - int getNumberOfFields() { result = count(int i | struct_field_list_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | struct_field_list_fields(this, i, _)) + } } + private Element getImmediateChildOfStructFieldList(StructFieldList e, int index) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() - or - result = e.getField(index - n) - ) - ) - } + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) + )) + } /** * INTERNAL: Do not use. @@ -5778,65 +7288,81 @@ module Raw { * ``` */ class StructPat extends @struct_pat, Pat, PathAstNode { + override string toString() { result = "StructPat" } /** * Gets the struct pattern field list of this struct pattern, if it exists. + * */ - StructPatFieldList getStructPatFieldList() { struct_pat_struct_pat_field_lists(this, result) } + StructPatFieldList getStructPatFieldList() { + struct_pat_struct_pat_field_lists(this, result) + } } + private Element getImmediateChildOfStructPat(StructPat e, int index) { - exists(int n, int nPath, int nStructPatFieldList | - n = 0 and - nPath = n + 1 and - nStructPatFieldList = nPath + 1 and - ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getStructPatFieldList() - ) - ) - } + + exists(int n, int nPath, int nStructPatFieldList | + n = 0 + and + nPath = n + 1 + and + nStructPatFieldList = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getStructPatFieldList() + )) + } /** * INTERNAL: Do not use. */ class TokenTreeMeta extends @token_tree_meta, Meta { + override string toString() { result = "TokenTreeMeta" } /** * Gets the path of this token tree meta, if it exists. + * */ - Path getPath() { token_tree_meta_paths(this, result) } - + Path getPath() { + token_tree_meta_paths(this, result) + } /** * Gets the token tree of this token tree meta, if it exists. + * */ - TokenTree getTokenTree() { token_tree_meta_token_trees(this, result) } + TokenTree getTokenTree() { + token_tree_meta_token_trees(this, result) + } } + private Element getImmediateChildOfTokenTreeMeta(TokenTreeMeta e, int index) { - exists(int n, int nPath, int nTokenTree | - n = 0 and - nPath = n + 1 and - nTokenTree = nPath + 1 and - ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getTokenTree() - ) - ) - } + + exists(int n, int nPath, int nTokenTree | + n = 0 + and + nPath = n + 1 + and + nTokenTree = nPath + 1 + and ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getTokenTree() + )) + } /** * INTERNAL: Do not use. * A try expression using the `?` operator. - * + * * For example: * ```rust * let x = foo()?; @@ -5844,38 +7370,48 @@ module Raw { * ``` */ class TryExpr extends @try_expr, Expr { + override string toString() { result = "TryExpr" } /** * Gets the `index`th attr of this try expression (0-based). + * */ - AnyAttr getAttr(int index) { try_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + try_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this try expression. */ - int getNumberOfAttrs() { result = count(int i | try_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | try_expr_attrs(this, i, _)) + } /** * Gets the expression of this try expression, if it exists. + * */ - Expr getExpr() { try_expr_exprs(this, result) } + Expr getExpr() { + try_expr_exprs(this, result) + } } + private Element getImmediateChildOfTryExpr(TryExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -5887,48 +7423,59 @@ module Raw { * ``` */ class TupleExpr extends @tuple_expr, Expr { + override string toString() { result = "TupleExpr" } /** * Gets the `index`th attr of this tuple expression (0-based). + * */ - AnyAttr getAttr(int index) { tuple_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + tuple_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this tuple expression. */ - int getNumberOfAttrs() { result = count(int i | tuple_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | tuple_expr_attrs(this, i, _)) + } /** * Gets the `index`th field of this tuple expression (0-based). + * */ - Expr getField(int index) { tuple_expr_fields(this, index, result) } - + Expr getField(int index) { + tuple_expr_fields(this, index, result) + } /** * Gets the number of fields of this tuple expression. */ - int getNumberOfFields() { result = count(int i | tuple_expr_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | tuple_expr_fields(this, i, _)) + } } + private Element getImmediateChildOfTupleExpr(TupleExpr e, int index) { - exists(int n, int nAttr, int nField | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nField = nAttr + e.getNumberOfFields() and - ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - ) - ) - } + + exists(int n, int nAttr, int nField | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nField = nAttr + e.getNumberOfFields() + and ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + )) + } /** * INTERNAL: Do not use. * A list of fields in a tuple struct or tuple variant. - * + * * For example: * ```rust * struct S(i32, String); @@ -5936,30 +7483,37 @@ module Raw { * ``` */ class TupleFieldList extends @tuple_field_list, FieldList { + override string toString() { result = "TupleFieldList" } /** * Gets the `index`th field of this tuple field list (0-based). + * */ - TupleField getField(int index) { tuple_field_list_fields(this, index, result) } - + TupleField getField(int index) { + tuple_field_list_fields(this, index, result) + } /** * Gets the number of fields of this tuple field list. */ - int getNumberOfFields() { result = count(int i | tuple_field_list_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | tuple_field_list_fields(this, i, _)) + } } + private Element getImmediateChildOfTupleFieldList(TupleFieldList e, int index) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() - or - result = e.getField(index - n) - ) - ) - } + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) + )) + } /** * INTERNAL: Do not use. @@ -5970,30 +7524,37 @@ module Raw { * ``` */ class TuplePat extends @tuple_pat, Pat { + override string toString() { result = "TuplePat" } /** * Gets the `index`th field of this tuple pattern (0-based). + * */ - Pat getField(int index) { tuple_pat_fields(this, index, result) } - + Pat getField(int index) { + tuple_pat_fields(this, index, result) + } /** * Gets the number of fields of this tuple pattern. */ - int getNumberOfFields() { result = count(int i | tuple_pat_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | tuple_pat_fields(this, i, _)) + } } + private Element getImmediateChildOfTuplePat(TuplePat e, int index) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() - or - result = e.getField(index - n) - ) - ) - } + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) + )) + } /** * INTERNAL: Do not use. @@ -6007,38 +7568,46 @@ module Raw { * ``` */ class TupleStructPat extends @tuple_struct_pat, Pat, PathAstNode { + override string toString() { result = "TupleStructPat" } /** * Gets the `index`th field of this tuple struct pattern (0-based). + * */ - Pat getField(int index) { tuple_struct_pat_fields(this, index, result) } - + Pat getField(int index) { + tuple_struct_pat_fields(this, index, result) + } /** * Gets the number of fields of this tuple struct pattern. */ - int getNumberOfFields() { result = count(int i | tuple_struct_pat_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | tuple_struct_pat_fields(this, i, _)) + } } + private Element getImmediateChildOfTupleStructPat(TupleStructPat e, int index) { - exists(int n, int nPath, int nField | - n = 0 and - nPath = n + 1 and - nField = nPath + e.getNumberOfFields() and - ( - none() - or - index = n and result = e.getPath() - or - result = e.getField(index - nPath) - ) - ) - } + + exists(int n, int nPath, int nField | + n = 0 + and + nPath = n + 1 + and + nField = nPath + e.getNumberOfFields() + and ( + none() + or + index = n and result = e.getPath() + or + result = e.getField(index - nPath) + )) + } /** * INTERNAL: Do not use. * A tuple type. - * + * * For example: * ```rust * let t: (i32, String); @@ -6046,35 +7615,42 @@ module Raw { * ``` */ class TupleTypeRepr extends @tuple_type_repr, TypeRepr { + override string toString() { result = "TupleTypeRepr" } /** * Gets the `index`th field of this tuple type representation (0-based). + * */ - TypeRepr getField(int index) { tuple_type_repr_fields(this, index, result) } - + TypeRepr getField(int index) { + tuple_type_repr_fields(this, index, result) + } /** * Gets the number of fields of this tuple type representation. */ - int getNumberOfFields() { result = count(int i | tuple_type_repr_fields(this, i, _)) } + int getNumberOfFields() { + result = count(int i | tuple_type_repr_fields(this, i, _)) + } } + private Element getImmediateChildOfTupleTypeRepr(TupleTypeRepr e, int index) { - exists(int n, int nField | - n = 0 and - nField = n + e.getNumberOfFields() and - ( - none() - or - result = e.getField(index - n) - ) - ) - } + + exists(int n, int nField | + n = 0 + and + nField = n + e.getNumberOfFields() + and ( + none() + or + result = e.getField(index - n) + )) + } /** * INTERNAL: Do not use. * A type argument in a generic argument list. - * + * * For example: * ```rust * Foo:: @@ -6082,30 +7658,36 @@ module Raw { * ``` */ class TypeArg extends @type_arg, GenericArg { + override string toString() { result = "TypeArg" } /** * Gets the type representation of this type argument, if it exists. + * */ - TypeRepr getTypeRepr() { type_arg_type_reprs(this, result) } + TypeRepr getTypeRepr() { + type_arg_type_reprs(this, result) + } } + private Element getImmediateChildOfTypeArg(TypeArg e, int index) { - exists(int n, int nTypeRepr | - n = 0 and - nTypeRepr = n + 1 and - ( - none() - or - index = n and result = e.getTypeRepr() - ) - ) - } + + exists(int n, int nTypeRepr | + n = 0 + and + nTypeRepr = n + 1 + and ( + none() + or + index = n and result = e.getTypeRepr() + )) + } /** * INTERNAL: Do not use. * A type parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -6113,54 +7695,70 @@ module Raw { * ``` */ class TypeParam extends @type_param, GenericParam { + override string toString() { result = "TypeParam" } /** * Gets the `index`th attr of this type parameter (0-based). + * */ - AnyAttr getAttr(int index) { type_param_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + type_param_attrs(this, index, result) + } /** * Gets the number of attrs of this type parameter. */ - int getNumberOfAttrs() { result = count(int i | type_param_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | type_param_attrs(this, i, _)) + } /** * Gets the default type of this type parameter, if it exists. + * */ - TypeRepr getDefaultType() { type_param_default_types(this, result) } - + TypeRepr getDefaultType() { + type_param_default_types(this, result) + } /** * Gets the name of this type parameter, if it exists. + * */ - Name getName() { type_param_names(this, result) } - + Name getName() { + type_param_names(this, result) + } /** * Gets the type bound list of this type parameter, if it exists. + * */ - TypeBoundList getTypeBoundList() { type_param_type_bound_lists(this, result) } + TypeBoundList getTypeBoundList() { + type_param_type_bound_lists(this, result) + } } + private Element getImmediateChildOfTypeParam(TypeParam e, int index) { - exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nDefaultType = nAttr + 1 and - nName = nDefaultType + 1 and - nTypeBoundList = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultType() - or - index = nDefaultType and result = e.getName() - or - index = nName and result = e.getTypeBoundList() - ) - ) - } + + exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nDefaultType = nAttr + 1 + and + nName = nDefaultType + 1 + and + nTypeBoundList = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultType() + or + index = nDefaultType and result = e.getName() + or + index = nName and result = e.getTypeBoundList() + )) + } /** * INTERNAL: Do not use. @@ -6170,64 +7768,79 @@ module Raw { * ``` */ class UnderscoreExpr extends @underscore_expr, Expr { + override string toString() { result = "UnderscoreExpr" } /** * Gets the `index`th attr of this underscore expression (0-based). + * */ - AnyAttr getAttr(int index) { underscore_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + underscore_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this underscore expression. */ - int getNumberOfAttrs() { result = count(int i | underscore_expr_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | underscore_expr_attrs(this, i, _)) + } } + private Element getImmediateChildOfUnderscoreExpr(UnderscoreExpr e, int index) { - exists(int n, int nAttr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - ( - none() - or - result = e.getAttr(index - n) - ) - ) - } + + exists(int n, int nAttr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and ( + none() + or + result = e.getAttr(index - n) + )) + } /** * INTERNAL: Do not use. */ class UnsafeMeta extends @unsafe_meta, Meta { + override string toString() { result = "UnsafeMeta" } /** * Holds if this unsafe meta is unsafe. + * */ - predicate isUnsafe() { unsafe_meta_is_unsafe(this) } - + predicate isUnsafe() { + unsafe_meta_is_unsafe(this) + } /** * Gets the meta of this unsafe meta, if it exists. + * */ - Meta getMeta() { unsafe_meta_meta(this, result) } + Meta getMeta() { + unsafe_meta_meta(this, result) + } } + private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index) { - exists(int n, int nMeta | - n = 0 and - nMeta = n + 1 and - ( - none() - or - index = n and result = e.getMeta() - ) - ) - } + + exists(int n, int nMeta | + n = 0 + and + nMeta = n + 1 + and ( + none() + or + index = n and result = e.getMeta() + )) + } /** * INTERNAL: Do not use. * A variant in an enum declaration. - * + * * For example: * ```rust * enum E { A, B(i32), C { x: i32 } } @@ -6235,62 +7848,81 @@ module Raw { * ``` */ class Variant extends @variant, Addressable { + override string toString() { result = "Variant" } /** * Gets the `index`th attr of this variant (0-based). + * */ - AnyAttr getAttr(int index) { variant_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + variant_attrs(this, index, result) + } /** * Gets the number of attrs of this variant. */ - int getNumberOfAttrs() { result = count(int i | variant_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | variant_attrs(this, i, _)) + } /** * Gets the const argument of this variant, if it exists. + * */ - ConstArg getConstArg() { variant_const_args(this, result) } - + ConstArg getConstArg() { + variant_const_args(this, result) + } /** * Gets the field list of this variant, if it exists. + * */ - FieldList getFieldList() { variant_field_lists(this, result) } - + FieldList getFieldList() { + variant_field_lists(this, result) + } /** * Gets the name of this variant, if it exists. + * */ - Name getName() { variant_names(this, result) } - + Name getName() { + variant_names(this, result) + } /** * Gets the visibility of this variant, if it exists. + * */ - Visibility getVisibility() { variant_visibilities(this, result) } + Visibility getVisibility() { + variant_visibilities(this, result) + } } + private Element getImmediateChildOfVariant(Variant e, int index) { - exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nConstArg = nAttr + 1 and - nFieldList = nConstArg + 1 and - nName = nFieldList + 1 and - nVisibility = nName + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getConstArg() - or - index = nConstArg and result = e.getFieldList() - or - index = nFieldList and result = e.getName() - or - index = nName and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nConstArg = nAttr + 1 + and + nFieldList = nConstArg + 1 + and + nName = nFieldList + 1 + and + nVisibility = nName + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getConstArg() + or + index = nConstArg and result = e.getFieldList() + or + index = nFieldList and result = e.getName() + or + index = nName and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -6300,10 +7932,15 @@ module Raw { * ``` */ class WildcardPat extends @wildcard_pat, Pat { + override string toString() { result = "WildcardPat" } + } - private Element getImmediateChildOfWildcardPat(WildcardPat e, int index) { none() } + + private Element getImmediateChildOfWildcardPat(WildcardPat e, int index) { + none() + } /** * INTERNAL: Do not use. @@ -6315,38 +7952,48 @@ module Raw { * ``` */ class YeetExpr extends @yeet_expr, Expr { + override string toString() { result = "YeetExpr" } /** * Gets the `index`th attr of this yeet expression (0-based). + * */ - AnyAttr getAttr(int index) { yeet_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + yeet_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this yeet expression. */ - int getNumberOfAttrs() { result = count(int i | yeet_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | yeet_expr_attrs(this, i, _)) + } /** * Gets the expression of this yeet expression, if it exists. + * */ - Expr getExpr() { yeet_expr_exprs(this, result) } + Expr getExpr() { + yeet_expr_exprs(this, result) + } } + private Element getImmediateChildOfYeetExpr(YeetExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -6359,38 +8006,48 @@ module Raw { * ``` */ class YieldExpr extends @yield_expr, Expr { + override string toString() { result = "YieldExpr" } /** * Gets the `index`th attr of this yield expression (0-based). + * */ - AnyAttr getAttr(int index) { yield_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + yield_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this yield expression. */ - int getNumberOfAttrs() { result = count(int i | yield_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | yield_expr_attrs(this, i, _)) + } /** * Gets the expression of this yield expression, if it exists. + * */ - Expr getExpr() { yield_expr_exprs(this, result) } + Expr getExpr() { + yield_expr_exprs(this, result) + } } + private Element getImmediateChildOfYieldExpr(YieldExpr e, int index) { - exists(int n, int nAttr, int nExpr | - n = 0 and - nAttr = n + e.getNumberOfAttrs() and - nExpr = nAttr + 1 and - ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - ) - ) - } + + exists(int n, int nAttr, int nExpr | + n = 0 + and + nAttr = n + e.getNumberOfAttrs() + and + nExpr = nAttr + 1 + and ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + )) + } /** * INTERNAL: Do not use. @@ -6403,71 +8060,93 @@ module Raw { * ``` */ class AsmExpr extends @asm_expr, Expr, Item { + override string toString() { result = "AsmExpr" } /** * Gets the `index`th asm piece of this asm expression (0-based). + * */ - AsmPiece getAsmPiece(int index) { asm_expr_asm_pieces(this, index, result) } - + AsmPiece getAsmPiece(int index) { + asm_expr_asm_pieces(this, index, result) + } /** * Gets the number of asm pieces of this asm expression. */ - int getNumberOfAsmPieces() { result = count(int i | asm_expr_asm_pieces(this, i, _)) } - + int getNumberOfAsmPieces() { + result = count(int i | asm_expr_asm_pieces(this, i, _)) + } /** * Gets the `index`th attr of this asm expression (0-based). + * */ - AnyAttr getAttr(int index) { asm_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + asm_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this asm expression. */ - int getNumberOfAttrs() { result = count(int i | asm_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | asm_expr_attrs(this, i, _)) + } /** * Gets the `index`th template of this asm expression (0-based). + * */ - Expr getTemplate(int index) { asm_expr_templates(this, index, result) } - + Expr getTemplate(int index) { + asm_expr_templates(this, index, result) + } /** * Gets the number of templates of this asm expression. */ - int getNumberOfTemplates() { result = count(int i | asm_expr_templates(this, i, _)) } + int getNumberOfTemplates() { + result = count(int i | asm_expr_templates(this, i, _)) + } } + private Element getImmediateChildOfAsmExpr(AsmExpr e, int index) { - exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() and - nAttr = nAsmPiece + e.getNumberOfAttrs() and - nTemplate = nAttr + e.getNumberOfTemplates() and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAsmPiece(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nAsmPiece) - or - result = e.getTemplate(index - nAttr) - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() + and + nAttr = nAsmPiece + e.getNumberOfAttrs() + and + nTemplate = nAttr + e.getNumberOfTemplates() + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAsmPiece(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nAsmPiece) + or + result = e.getTemplate(index - nAttr) + )) + } /** * INTERNAL: Do not use. * An associated item in a `Trait` or `Impl`. - * + * * For example: * ```rust * trait T {fn foo(&self);} * // ^^^^^^^^^^^^^ * ``` */ - class AssocItem extends @assoc_item, Item { } + class AssocItem extends @assoc_item, Item { + + + + } + + /** * INTERNAL: Do not use. @@ -6485,79 +8164,103 @@ module Raw { * ``` */ class BlockExpr extends @block_expr, LabelableExpr { + override string toString() { result = "BlockExpr" } /** * Gets the `index`th attr of this block expression (0-based). + * */ - AnyAttr getAttr(int index) { block_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + block_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this block expression. */ - int getNumberOfAttrs() { result = count(int i | block_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | block_expr_attrs(this, i, _)) + } /** * Holds if this block expression is async. + * */ - predicate isAsync() { block_expr_is_async(this) } - + predicate isAsync() { + block_expr_is_async(this) + } /** * Holds if this block expression is const. + * */ - predicate isConst() { block_expr_is_const(this) } - + predicate isConst() { + block_expr_is_const(this) + } /** * Holds if this block expression is gen. + * */ - predicate isGen() { block_expr_is_gen(this) } - + predicate isGen() { + block_expr_is_gen(this) + } /** * Holds if this block expression is move. + * */ - predicate isMove() { block_expr_is_move(this) } - + predicate isMove() { + block_expr_is_move(this) + } /** * Holds if this block expression is unsafe. + * */ - predicate isUnsafe() { block_expr_is_unsafe(this) } - + predicate isUnsafe() { + block_expr_is_unsafe(this) + } /** * Gets the statement list of this block expression, if it exists. + * */ - StmtList getStmtList() { block_expr_stmt_lists(this, result) } - + StmtList getStmtList() { + block_expr_stmt_lists(this, result) + } /** * Gets the try block modifier of this block expression, if it exists. + * */ - TryBlockModifier getTryBlockModifier() { block_expr_try_block_modifiers(this, result) } + TryBlockModifier getTryBlockModifier() { + block_expr_try_block_modifiers(this, result) + } } + private Element getImmediateChildOfBlockExpr(BlockExpr e, int index) { - exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | - n = 0 and - nLabel = n + 1 and - nAttr = nLabel + e.getNumberOfAttrs() and - nStmtList = nAttr + 1 and - nTryBlockModifier = nStmtList + 1 and - ( - none() - or - index = n and result = e.getLabel() - or - result = e.getAttr(index - nLabel) - or - index = nAttr and result = e.getStmtList() - or - index = nStmtList and result = e.getTryBlockModifier() - ) - ) - } + + exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | + n = 0 + and + nLabel = n + 1 + and + nAttr = nLabel + e.getNumberOfAttrs() + and + nStmtList = nAttr + 1 + and + nTryBlockModifier = nStmtList + 1 + and ( + none() + or + index = n and result = e.getLabel() + or + result = e.getAttr(index - nLabel) + or + index = nAttr and result = e.getStmtList() + or + index = nStmtList and result = e.getTryBlockModifier() + )) + } /** * INTERNAL: Do not use. * An extern block containing foreign function declarations. - * + * * For example: * ```rust * extern "C" { @@ -6566,123 +8269,154 @@ module Raw { * ``` */ class ExternBlock extends @extern_block, Item { + override string toString() { result = "ExternBlock" } /** * Gets the abi of this extern block, if it exists. + * */ - Abi getAbi() { extern_block_abis(this, result) } - + Abi getAbi() { + extern_block_abis(this, result) + } /** * Gets the `index`th attr of this extern block (0-based). + * */ - AnyAttr getAttr(int index) { extern_block_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + extern_block_attrs(this, index, result) + } /** * Gets the number of attrs of this extern block. */ - int getNumberOfAttrs() { result = count(int i | extern_block_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | extern_block_attrs(this, i, _)) + } /** * Gets the extern item list of this extern block, if it exists. + * */ - ExternItemList getExternItemList() { extern_block_extern_item_lists(this, result) } - + ExternItemList getExternItemList() { + extern_block_extern_item_lists(this, result) + } /** * Holds if this extern block is unsafe. + * */ - predicate isUnsafe() { extern_block_is_unsafe(this) } + predicate isUnsafe() { + extern_block_is_unsafe(this) + } } + private Element getImmediateChildOfExternBlock(ExternBlock e, int index) { - exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAbi = nAttributeMacroExpansion + 1 and - nAttr = nAbi + e.getNumberOfAttrs() and - nExternItemList = nAttr + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAbi() - or - result = e.getAttr(index - nAbi) - or - index = nAttr and result = e.getExternItemList() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAbi = nAttributeMacroExpansion + 1 + and + nAttr = nAbi + e.getNumberOfAttrs() + and + nExternItemList = nAttr + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAbi() + or + result = e.getAttr(index - nAbi) + or + index = nAttr and result = e.getExternItemList() + )) + } /** * INTERNAL: Do not use. * An extern crate declaration. - * + * * For example: * ```rust * extern crate serde; * ``` */ class ExternCrate extends @extern_crate, Item { + override string toString() { result = "ExternCrate" } /** * Gets the `index`th attr of this extern crate (0-based). + * */ - AnyAttr getAttr(int index) { extern_crate_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + extern_crate_attrs(this, index, result) + } /** * Gets the number of attrs of this extern crate. */ - int getNumberOfAttrs() { result = count(int i | extern_crate_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | extern_crate_attrs(this, i, _)) + } /** * Gets the identifier of this extern crate, if it exists. + * */ - NameRef getIdentifier() { extern_crate_identifiers(this, result) } - + NameRef getIdentifier() { + extern_crate_identifiers(this, result) + } /** * Gets the rename of this extern crate, if it exists. + * */ - Rename getRename() { extern_crate_renames(this, result) } - + Rename getRename() { + extern_crate_renames(this, result) + } /** * Gets the visibility of this extern crate, if it exists. + * */ - Visibility getVisibility() { extern_crate_visibilities(this, result) } + Visibility getVisibility() { + extern_crate_visibilities(this, result) + } } + private Element getImmediateChildOfExternCrate(ExternCrate e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nIdentifier = nAttr + 1 and - nRename = nIdentifier + 1 and - nVisibility = nRename + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getIdentifier() - or - index = nIdentifier and result = e.getRename() - or - index = nRename and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nIdentifier = nAttr + 1 + and + nRename = nIdentifier + 1 + and + nVisibility = nRename + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getIdentifier() + or + index = nIdentifier and result = e.getRename() + or + index = nRename and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. * An item inside an extern block. - * + * * For example: * ```rust * extern "C" { @@ -6691,12 +8425,18 @@ module Raw { * } * ``` */ - class ExternItem extends @extern_item, Item { } + class ExternItem extends @extern_item, Item { + + + + } + + /** * INTERNAL: Do not use. * An `impl` block. - * + * * For example: * ```rust * impl MyTrait for MyType { @@ -6705,115 +8445,152 @@ module Raw { * ``` */ class Impl extends @impl, Item { + override string toString() { result = "Impl" } /** * Gets the assoc item list of this impl, if it exists. + * */ - AssocItemList getAssocItemList() { impl_assoc_item_lists(this, result) } - + AssocItemList getAssocItemList() { + impl_assoc_item_lists(this, result) + } /** * Gets the `index`th attr of this impl (0-based). + * */ - AnyAttr getAttr(int index) { impl_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + impl_attrs(this, index, result) + } /** * Gets the number of attrs of this impl. */ - int getNumberOfAttrs() { result = count(int i | impl_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | impl_attrs(this, i, _)) + } /** * Gets the generic parameter list of this impl, if it exists. + * */ - GenericParamList getGenericParamList() { impl_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + impl_generic_param_lists(this, result) + } /** * Holds if this impl is const. + * */ - predicate isConst() { impl_is_const(this) } - + predicate isConst() { + impl_is_const(this) + } /** * Holds if this impl is default. + * */ - predicate isDefault() { impl_is_default(this) } - + predicate isDefault() { + impl_is_default(this) + } /** * Holds if this impl is unsafe. + * */ - predicate isUnsafe() { impl_is_unsafe(this) } - + predicate isUnsafe() { + impl_is_unsafe(this) + } /** * Gets the self ty of this impl, if it exists. + * */ - TypeRepr getSelfTy() { impl_self_ties(this, result) } - + TypeRepr getSelfTy() { + impl_self_ties(this, result) + } /** * Gets the trait ty of this impl, if it exists. + * */ - TypeRepr getTraitTy() { impl_trait_ties(this, result) } - + TypeRepr getTraitTy() { + impl_trait_ties(this, result) + } /** * Gets the visibility of this impl, if it exists. + * */ - Visibility getVisibility() { impl_visibilities(this, result) } - + Visibility getVisibility() { + impl_visibilities(this, result) + } /** * Gets the where clause of this impl, if it exists. + * */ - WhereClause getWhereClause() { impl_where_clauses(this, result) } + WhereClause getWhereClause() { + impl_where_clauses(this, result) + } } - private Element getImmediateChildOfImpl(Impl e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, - int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAssocItemList = nAttributeMacroExpansion + 1 and - nAttr = nAssocItemList + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nSelfTy = nGenericParamList + 1 and - nTraitTy = nSelfTy + 1 and - nVisibility = nTraitTy + 1 and - nWhereClause = nVisibility + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() - or - result = e.getAttr(index - nAssocItemList) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getSelfTy() - or - index = nSelfTy and result = e.getTraitTy() - or - index = nTraitTy and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - ) - ) - } + + private Element getImmediateChildOfImpl(Impl e, int index) { + + exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAssocItemList = nAttributeMacroExpansion + 1 + and + nAttr = nAssocItemList + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nSelfTy = nGenericParamList + 1 + and + nTraitTy = nSelfTy + 1 + and + nVisibility = nTraitTy + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() + or + result = e.getAttr(index - nAssocItemList) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getSelfTy() + or + index = nSelfTy and result = e.getTraitTy() + or + index = nTraitTy and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + )) + } /** * INTERNAL: Do not use. * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). */ class LoopingExpr extends @looping_expr, LabelableExpr { + + + /** * Gets the loop body of this looping expression, if it exists. + * */ - BlockExpr getLoopBody() { looping_expr_loop_bodies(this, result) } + BlockExpr getLoopBody() { + looping_expr_loop_bodies(this, result) + } } + + /** * INTERNAL: Do not use. * A Rust 2.0 style declarative macro definition. - * + * * For example: * ```rust * pub macro vec_of_two($element:expr) { @@ -6822,68 +8599,85 @@ module Raw { * ``` */ class MacroDef extends @macro_def, Item { + override string toString() { result = "MacroDef" } /** * Gets the arguments of this macro def, if it exists. + * */ - TokenTree getArgs() { macro_def_args(this, result) } - + TokenTree getArgs() { + macro_def_args(this, result) + } /** * Gets the `index`th attr of this macro def (0-based). + * */ - AnyAttr getAttr(int index) { macro_def_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + macro_def_attrs(this, index, result) + } /** * Gets the number of attrs of this macro def. */ - int getNumberOfAttrs() { result = count(int i | macro_def_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | macro_def_attrs(this, i, _)) + } /** * Gets the body of this macro def, if it exists. + * */ - TokenTree getBody() { macro_def_bodies(this, result) } - + TokenTree getBody() { + macro_def_bodies(this, result) + } /** * Gets the name of this macro def, if it exists. + * */ - Name getName() { macro_def_names(this, result) } - + Name getName() { + macro_def_names(this, result) + } /** * Gets the visibility of this macro def, if it exists. + * */ - Visibility getVisibility() { macro_def_visibilities(this, result) } + Visibility getVisibility() { + macro_def_visibilities(this, result) + } } + private Element getImmediateChildOfMacroDef(MacroDef e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, - int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nArgs = nAttributeMacroExpansion + 1 and - nAttr = nArgs + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nName = nBody + 1 and - nVisibility = nName + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getArgs() - or - result = e.getAttr(index - nArgs) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getName() - or - index = nName and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nArgs = nAttributeMacroExpansion + 1 + and + nAttr = nArgs + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nName = nBody + 1 + and + nVisibility = nName + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getArgs() + or + result = e.getAttr(index - nArgs) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getName() + or + index = nName and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -6897,59 +8691,74 @@ module Raw { * ``` */ class MacroRules extends @macro_rules, Item { + override string toString() { result = "MacroRules" } /** * Gets the `index`th attr of this macro rules (0-based). + * */ - AnyAttr getAttr(int index) { macro_rules_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + macro_rules_attrs(this, index, result) + } /** * Gets the number of attrs of this macro rules. */ - int getNumberOfAttrs() { result = count(int i | macro_rules_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | macro_rules_attrs(this, i, _)) + } /** * Gets the name of this macro rules, if it exists. + * */ - Name getName() { macro_rules_names(this, result) } - + Name getName() { + macro_rules_names(this, result) + } /** * Gets the token tree of this macro rules, if it exists. + * */ - TokenTree getTokenTree() { macro_rules_token_trees(this, result) } - + TokenTree getTokenTree() { + macro_rules_token_trees(this, result) + } /** * Gets the visibility of this macro rules, if it exists. + * */ - Visibility getVisibility() { macro_rules_visibilities(this, result) } + Visibility getVisibility() { + macro_rules_visibilities(this, result) + } } + private Element getImmediateChildOfMacroRules(MacroRules e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nName = nAttr + 1 and - nTokenTree = nName + 1 and - nVisibility = nTokenTree + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getName() - or - index = nName and result = e.getTokenTree() - or - index = nTokenTree and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nName = nAttr + 1 + and + nTokenTree = nName + 1 + and + nVisibility = nTokenTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getName() + or + index = nName and result = e.getTokenTree() + or + index = nTokenTree and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -6964,59 +8773,74 @@ module Raw { * ``` */ class Module extends @module, Item { + override string toString() { result = "Module" } /** * Gets the `index`th attr of this module (0-based). + * */ - AnyAttr getAttr(int index) { module_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + module_attrs(this, index, result) + } /** * Gets the number of attrs of this module. */ - int getNumberOfAttrs() { result = count(int i | module_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | module_attrs(this, i, _)) + } /** * Gets the item list of this module, if it exists. + * */ - ItemList getItemList() { module_item_lists(this, result) } - + ItemList getItemList() { + module_item_lists(this, result) + } /** * Gets the name of this module, if it exists. + * */ - Name getName() { module_names(this, result) } - + Name getName() { + module_names(this, result) + } /** * Gets the visibility of this module, if it exists. + * */ - Visibility getVisibility() { module_visibilities(this, result) } + Visibility getVisibility() { + module_visibilities(this, result) + } } + private Element getImmediateChildOfModule(Module e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nItemList = nAttr + 1 and - nName = nItemList + 1 and - nVisibility = nName + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getItemList() - or - index = nItemList and result = e.getName() - or - index = nName and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nItemList = nAttr + 1 + and + nName = nItemList + 1 + and + nVisibility = nName + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getItemList() + or + index = nItemList and result = e.getName() + or + index = nName and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -7029,33 +8853,41 @@ module Raw { * ``` */ class PathExpr extends @path_expr, PathExprBase, PathAstNode { + override string toString() { result = "PathExpr" } /** * Gets the `index`th attr of this path expression (0-based). + * */ - AnyAttr getAttr(int index) { path_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + path_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this path expression. */ - int getNumberOfAttrs() { result = count(int i | path_expr_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | path_expr_attrs(this, i, _)) + } } + private Element getImmediateChildOfPathExpr(PathExpr e, int index) { - exists(int n, int nPath, int nAttr | - n = 0 and - nPath = n + 1 and - nAttr = nPath + e.getNumberOfAttrs() and - ( - none() - or - index = n and result = e.getPath() - or - result = e.getAttr(index - nPath) - ) - ) - } + + exists(int n, int nPath, int nAttr | + n = 0 + and + nPath = n + 1 + and + nAttr = nPath + e.getNumberOfAttrs() + and ( + none() + or + index = n and result = e.getPath() + or + result = e.getAttr(index - nPath) + )) + } /** * INTERNAL: Do not use. @@ -7066,158 +8898,204 @@ module Raw { * type Result: Copy; * fn frobinize_with(&mut self, frobinator: &Self::Frobinator) -> Result; * } - * + * * pub trait Foo where T::Frobinator: Eq {} * ``` */ class Trait extends @trait, Item { + override string toString() { result = "Trait" } /** * Gets the assoc item list of this trait, if it exists. + * */ - AssocItemList getAssocItemList() { trait_assoc_item_lists(this, result) } - + AssocItemList getAssocItemList() { + trait_assoc_item_lists(this, result) + } /** * Gets the `index`th attr of this trait (0-based). + * */ - AnyAttr getAttr(int index) { trait_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + trait_attrs(this, index, result) + } /** * Gets the number of attrs of this trait. */ - int getNumberOfAttrs() { result = count(int i | trait_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | trait_attrs(this, i, _)) + } /** * Gets the generic parameter list of this trait, if it exists. + * */ - GenericParamList getGenericParamList() { trait_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + trait_generic_param_lists(this, result) + } /** * Gets the impl restriction of this trait, if it exists. + * */ - ImplRestriction getImplRestriction() { trait_impl_restrictions(this, result) } - + ImplRestriction getImplRestriction() { + trait_impl_restrictions(this, result) + } /** * Holds if this trait is auto. + * */ - predicate isAuto() { trait_is_auto(this) } - + predicate isAuto() { + trait_is_auto(this) + } /** * Holds if this trait is unsafe. + * */ - predicate isUnsafe() { trait_is_unsafe(this) } - + predicate isUnsafe() { + trait_is_unsafe(this) + } /** * Gets the name of this trait, if it exists. + * */ - Name getName() { trait_names(this, result) } - + Name getName() { + trait_names(this, result) + } /** * Gets the type bound list of this trait, if it exists. + * */ - TypeBoundList getTypeBoundList() { trait_type_bound_lists(this, result) } - + TypeBoundList getTypeBoundList() { + trait_type_bound_lists(this, result) + } /** * Gets the visibility of this trait, if it exists. + * */ - Visibility getVisibility() { trait_visibilities(this, result) } - + Visibility getVisibility() { + trait_visibilities(this, result) + } /** * Gets the where clause of this trait, if it exists. + * */ - WhereClause getWhereClause() { trait_where_clauses(this, result) } + WhereClause getWhereClause() { + trait_where_clauses(this, result) + } } + private Element getImmediateChildOfTrait(Trait e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, - int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAssocItemList = nAttributeMacroExpansion + 1 and - nAttr = nAssocItemList + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nImplRestriction = nGenericParamList + 1 and - nName = nImplRestriction + 1 and - nTypeBoundList = nName + 1 and - nVisibility = nTypeBoundList + 1 and - nWhereClause = nVisibility + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() - or - result = e.getAttr(index - nAssocItemList) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getImplRestriction() - or - index = nImplRestriction and result = e.getName() - or - index = nName and result = e.getTypeBoundList() - or - index = nTypeBoundList and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAssocItemList = nAttributeMacroExpansion + 1 + and + nAttr = nAssocItemList + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nImplRestriction = nGenericParamList + 1 + and + nName = nImplRestriction + 1 + and + nTypeBoundList = nName + 1 + and + nVisibility = nTypeBoundList + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() + or + result = e.getAttr(index - nAssocItemList) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getImplRestriction() + or + index = nImplRestriction and result = e.getName() + or + index = nName and result = e.getTypeBoundList() + or + index = nTypeBoundList and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + )) + } /** * INTERNAL: Do not use. * An item that defines a type. Either a `Struct`, `Enum`, or `Union`. */ class TypeItem extends @type_item, Item { + + + /** * Gets the `index`th derive macro expansion of this type item (0-based). + * */ MacroItems getDeriveMacroExpansion(int index) { type_item_derive_macro_expansions(this, index, result) } - /** * Gets the number of derive macro expansions of this type item. */ int getNumberOfDeriveMacroExpansions() { result = count(int i | type_item_derive_macro_expansions(this, i, _)) } - /** * Gets the `index`th attr of this type item (0-based). + * */ - AnyAttr getAttr(int index) { type_item_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + type_item_attrs(this, index, result) + } /** * Gets the number of attrs of this type item. */ - int getNumberOfAttrs() { result = count(int i | type_item_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | type_item_attrs(this, i, _)) + } /** * Gets the generic parameter list of this type item, if it exists. + * */ - GenericParamList getGenericParamList() { type_item_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + type_item_generic_param_lists(this, result) + } /** * Gets the name of this type item, if it exists. + * */ - Name getName() { type_item_names(this, result) } - + Name getName() { + type_item_names(this, result) + } /** * Gets the visibility of this type item, if it exists. + * */ - Visibility getVisibility() { type_item_visibilities(this, result) } - + Visibility getVisibility() { + type_item_visibilities(this, result) + } /** * Gets the where clause of this type item, if it exists. + * */ - WhereClause getWhereClause() { type_item_where_clauses(this, result) } + WhereClause getWhereClause() { + type_item_where_clauses(this, result) + } } + + /** * INTERNAL: Do not use. * A `use` statement. For example: @@ -7226,215 +9104,267 @@ module Raw { * ``` */ class Use extends @use, Item { + override string toString() { result = "Use" } /** * Gets the `index`th attr of this use (0-based). + * */ - AnyAttr getAttr(int index) { use_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + use_attrs(this, index, result) + } /** * Gets the number of attrs of this use. */ - int getNumberOfAttrs() { result = count(int i | use_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | use_attrs(this, i, _)) + } /** * Gets the use tree of this use, if it exists. + * */ - UseTree getUseTree() { use_use_trees(this, result) } - + UseTree getUseTree() { + use_use_trees(this, result) + } /** * Gets the visibility of this use, if it exists. + * */ - Visibility getVisibility() { use_visibilities(this, result) } + Visibility getVisibility() { + use_visibilities(this, result) + } } + private Element getImmediateChildOfUse(Use e, int index) { - exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nUseTree = nAttr + 1 and - nVisibility = nUseTree + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getUseTree() - or - index = nUseTree and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nUseTree = nAttr + 1 + and + nVisibility = nUseTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getUseTree() + or + index = nUseTree and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. * A constant item declaration. - * + * * For example: * ```rust * const X: i32 = 42; * ``` */ class Const extends @const, AssocItem { + override string toString() { result = "Const" } /** * Gets the `index`th attr of this const (0-based). + * */ - AnyAttr getAttr(int index) { const_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + const_attrs(this, index, result) + } /** * Gets the number of attrs of this const. */ - int getNumberOfAttrs() { result = count(int i | const_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | const_attrs(this, i, _)) + } /** * Gets the body of this const, if it exists. + * */ - Expr getBody() { const_bodies(this, result) } - + Expr getBody() { + const_bodies(this, result) + } /** * Gets the generic parameter list of this const, if it exists. + * */ - GenericParamList getGenericParamList() { const_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + const_generic_param_lists(this, result) + } /** * Holds if this const is const. + * */ - predicate isConst() { const_is_const(this) } - + predicate isConst() { + const_is_const(this) + } /** * Holds if this const is default. + * */ - predicate isDefault() { const_is_default(this) } - + predicate isDefault() { + const_is_default(this) + } /** * Gets the name of this const, if it exists. + * */ - Name getName() { const_names(this, result) } - + Name getName() { + const_names(this, result) + } /** * Gets the type representation of this const, if it exists. + * */ - TypeRepr getTypeRepr() { const_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + const_type_reprs(this, result) + } /** * Gets the visibility of this const, if it exists. + * */ - Visibility getVisibility() { const_visibilities(this, result) } - + Visibility getVisibility() { + const_visibilities(this, result) + } /** * Gets the where clause of this const, if it exists. + * */ - WhereClause getWhereClause() { const_where_clauses(this, result) } - + WhereClause getWhereClause() { + const_where_clauses(this, result) + } /** * Holds if this constant has an implementation. * * This is the same as `hasBody` for source code, but for library code (for which we always skip * the body), this will hold when the body was present in the original code. */ - predicate hasImplementation() { const_has_implementation(this) } + predicate hasImplementation() { + const_has_implementation(this) + } } + private Element getImmediateChildOfConst(Const e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, - int nTypeRepr, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nGenericParamList = nBody + 1 and - nName = nGenericParamList + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - nWhereClause = nVisibility + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, int nTypeRepr, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nGenericParamList = nBody + 1 + and + nName = nGenericParamList + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + )) + } /** * INTERNAL: Do not use. * An enum declaration. - * + * * For example: * ```rust * enum E {A, B(i32), C {x: i32}} * ``` */ class Enum extends @enum, TypeItem { + override string toString() { result = "Enum" } /** * Gets the variant list of this enum, if it exists. + * */ - VariantList getVariantList() { enum_variant_lists(this, result) } + VariantList getVariantList() { + enum_variant_lists(this, result) + } } + private Element getImmediateChildOfEnum(Enum e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nVariantList = nWhereClause + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getVariantList() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nVariantList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getVariantList() + )) + } /** * INTERNAL: Do not use. * A for loop expression. - * + * * For example: * ```rust * for x in 0..10 { @@ -7443,52 +9373,67 @@ module Raw { * ``` */ class ForExpr extends @for_expr, LoopingExpr { + override string toString() { result = "ForExpr" } /** * Gets the `index`th attr of this for expression (0-based). + * */ - AnyAttr getAttr(int index) { for_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + for_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this for expression. */ - int getNumberOfAttrs() { result = count(int i | for_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | for_expr_attrs(this, i, _)) + } /** * Gets the iterable of this for expression, if it exists. + * */ - Expr getIterable() { for_expr_iterables(this, result) } - + Expr getIterable() { + for_expr_iterables(this, result) + } /** * Gets the pattern of this for expression, if it exists. + * */ - Pat getPat() { for_expr_pats(this, result) } + Pat getPat() { + for_expr_pats(this, result) + } } + private Element getImmediateChildOfForExpr(ForExpr e, int index) { - exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - nIterable = nAttr + 1 and - nPat = nIterable + 1 and - ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - or - index = nAttr and result = e.getIterable() - or - index = nIterable and result = e.getPat() - ) - ) - } + + exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and + nIterable = nAttr + 1 + and + nPat = nIterable + 1 + and ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + or + index = nAttr and result = e.getIterable() + or + index = nIterable and result = e.getPat() + )) + } /** * INTERNAL: Do not use. @@ -7504,118 +9449,153 @@ module Raw { * ``` */ class Function extends @function, AssocItem, ExternItem, Callable { + override string toString() { result = "Function" } /** * Gets the abi of this function, if it exists. + * */ - Abi getAbi() { function_abis(this, result) } - + Abi getAbi() { + function_abis(this, result) + } /** * Gets the function body of this function, if it exists. + * */ - BlockExpr getFunctionBody() { function_function_bodies(this, result) } - + BlockExpr getFunctionBody() { + function_function_bodies(this, result) + } /** * Gets the generic parameter list of this function, if it exists. + * */ - GenericParamList getGenericParamList() { function_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + function_generic_param_lists(this, result) + } /** * Holds if this function is async. + * */ - predicate isAsync() { function_is_async(this) } - + predicate isAsync() { + function_is_async(this) + } /** * Holds if this function is const. + * */ - predicate isConst() { function_is_const(this) } - + predicate isConst() { + function_is_const(this) + } /** * Holds if this function is default. + * */ - predicate isDefault() { function_is_default(this) } - + predicate isDefault() { + function_is_default(this) + } /** * Holds if this function is gen. + * */ - predicate isGen() { function_is_gen(this) } - + predicate isGen() { + function_is_gen(this) + } /** * Holds if this function is unsafe. + * */ - predicate isUnsafe() { function_is_unsafe(this) } - + predicate isUnsafe() { + function_is_unsafe(this) + } /** * Gets the name of this function, if it exists. + * */ - Name getName() { function_names(this, result) } - + Name getName() { + function_names(this, result) + } /** * Gets the ret type of this function, if it exists. + * */ - RetTypeRepr getRetType() { function_ret_types(this, result) } - + RetTypeRepr getRetType() { + function_ret_types(this, result) + } /** * Gets the visibility of this function, if it exists. + * */ - Visibility getVisibility() { function_visibilities(this, result) } - + Visibility getVisibility() { + function_visibilities(this, result) + } /** * Gets the where clause of this function, if it exists. + * */ - WhereClause getWhereClause() { function_where_clauses(this, result) } - + WhereClause getWhereClause() { + function_where_clauses(this, result) + } /** * Holds if this function has an implementation. * * This is the same as `hasBody` for source code, but for library code (for which we always skip * the body), this will hold when the body was present in the original code. */ - predicate hasImplementation() { function_has_implementation(this) } + predicate hasImplementation() { + function_has_implementation(this) + } } + private Element getImmediateChildOfFunction(Function e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, - int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nParamList = nAttributeMacroExpansion + 1 and - nAttr = nParamList + e.getNumberOfAttrs() and - nAbi = nAttr + 1 and - nFunctionBody = nAbi + 1 and - nGenericParamList = nFunctionBody + 1 and - nName = nGenericParamList + 1 and - nRetType = nName + 1 and - nVisibility = nRetType + 1 and - nWhereClause = nVisibility + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getParamList() - or - result = e.getAttr(index - nParamList) - or - index = nAttr and result = e.getAbi() - or - index = nAbi and result = e.getFunctionBody() - or - index = nFunctionBody and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getRetType() - or - index = nRetType and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nParamList = nAttributeMacroExpansion + 1 + and + nAttr = nParamList + e.getNumberOfAttrs() + and + nAbi = nAttr + 1 + and + nFunctionBody = nAbi + 1 + and + nGenericParamList = nFunctionBody + 1 + and + nName = nGenericParamList + 1 + and + nRetType = nName + 1 + and + nVisibility = nRetType + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getParamList() + or + result = e.getAttr(index - nParamList) + or + index = nAttr and result = e.getAbi() + or + index = nAbi and result = e.getFunctionBody() + or + index = nFunctionBody and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getRetType() + or + index = nRetType and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + )) + } /** * INTERNAL: Do not use. @@ -7643,189 +9623,235 @@ module Raw { * ``` */ class LoopExpr extends @loop_expr, LoopingExpr { + override string toString() { result = "LoopExpr" } /** * Gets the `index`th attr of this loop expression (0-based). + * */ - AnyAttr getAttr(int index) { loop_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + loop_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this loop expression. */ - int getNumberOfAttrs() { result = count(int i | loop_expr_attrs(this, i, _)) } + int getNumberOfAttrs() { + result = count(int i | loop_expr_attrs(this, i, _)) + } } + private Element getImmediateChildOfLoopExpr(LoopExpr e, int index) { - exists(int n, int nLabel, int nLoopBody, int nAttr | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - ) - ) - } + + exists(int n, int nLabel, int nLoopBody, int nAttr | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + )) + } /** * INTERNAL: Do not use. * A macro invocation. - * + * * For example: * ```rust * println!("Hello, world!"); * ``` */ class MacroCall extends @macro_call, AssocItem, ExternItem { + override string toString() { result = "MacroCall" } /** * Gets the `index`th attr of this macro call (0-based). + * */ - AnyAttr getAttr(int index) { macro_call_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + macro_call_attrs(this, index, result) + } /** * Gets the number of attrs of this macro call. */ - int getNumberOfAttrs() { result = count(int i | macro_call_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | macro_call_attrs(this, i, _)) + } /** * Gets the path of this macro call, if it exists. + * */ - Path getPath() { macro_call_paths(this, result) } - + Path getPath() { + macro_call_paths(this, result) + } /** * Gets the token tree of this macro call, if it exists. + * */ - TokenTree getTokenTree() { macro_call_token_trees(this, result) } - + TokenTree getTokenTree() { + macro_call_token_trees(this, result) + } /** * Gets the macro call expansion of this macro call, if it exists. + * */ - AstNode getMacroCallExpansion() { macro_call_macro_call_expansions(this, result) } + AstNode getMacroCallExpansion() { + macro_call_macro_call_expansions(this, result) + } } + private Element getImmediateChildOfMacroCall(MacroCall e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, - int nMacroCallExpansion - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nPath = nAttr + 1 and - nTokenTree = nPath + 1 and - nMacroCallExpansion = nTokenTree + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getPath() - or - index = nPath and result = e.getTokenTree() - or - index = nTokenTree and result = e.getMacroCallExpansion() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, int nMacroCallExpansion | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nPath = nAttr + 1 + and + nTokenTree = nPath + 1 + and + nMacroCallExpansion = nTokenTree + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getPath() + or + index = nPath and result = e.getTokenTree() + or + index = nTokenTree and result = e.getMacroCallExpansion() + )) + } /** * INTERNAL: Do not use. * A static item declaration. - * + * * For example: * ```rust * static X: i32 = 42; * ``` */ class Static extends @static, ExternItem { + override string toString() { result = "Static" } /** * Gets the `index`th attr of this static (0-based). + * */ - AnyAttr getAttr(int index) { static_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + static_attrs(this, index, result) + } /** * Gets the number of attrs of this static. */ - int getNumberOfAttrs() { result = count(int i | static_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | static_attrs(this, i, _)) + } /** * Gets the body of this static, if it exists. + * */ - Expr getBody() { static_bodies(this, result) } - + Expr getBody() { + static_bodies(this, result) + } /** * Holds if this static is mut. + * */ - predicate isMut() { static_is_mut(this) } - + predicate isMut() { + static_is_mut(this) + } /** * Holds if this static is static. + * */ - predicate isStatic() { static_is_static(this) } - + predicate isStatic() { + static_is_static(this) + } /** * Holds if this static is unsafe. + * */ - predicate isUnsafe() { static_is_unsafe(this) } - + predicate isUnsafe() { + static_is_unsafe(this) + } /** * Gets the name of this static, if it exists. + * */ - Name getName() { static_names(this, result) } - + Name getName() { + static_names(this, result) + } /** * Gets the type representation of this static, if it exists. + * */ - TypeRepr getTypeRepr() { static_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + static_type_reprs(this, result) + } /** * Gets the visibility of this static, if it exists. + * */ - Visibility getVisibility() { static_visibilities(this, result) } + Visibility getVisibility() { + static_visibilities(this, result) + } } + private Element getImmediateChildOfStatic(Static e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, - int nVisibility - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nBody = nAttr + 1 and - nName = nBody + 1 and - nTypeRepr = nName + 1 and - nVisibility = nTypeRepr + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, int nVisibility | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nBody = nAttr + 1 + and + nName = nBody + 1 + and + nTypeRepr = nName + 1 + and + nVisibility = nTypeRepr + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + )) + } /** * INTERNAL: Do not use. @@ -7838,56 +9864,66 @@ module Raw { * ``` */ class Struct extends @struct, TypeItem { + override string toString() { result = "Struct" } /** * Gets the field list of this struct, if it exists. + * */ - FieldList getFieldList() { struct_field_lists_(this, result) } + FieldList getFieldList() { + struct_field_lists_(this, result) + } } + private Element getImmediateChildOfStruct(Struct e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nFieldList = nWhereClause + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getFieldList() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nFieldList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getFieldList() + )) + } /** * INTERNAL: Do not use. * A type alias. For example: * ```rust * type Point = (u8, u8); - * + * * trait Trait { * type Output; * // ^^^^^^^^^^^ @@ -7895,148 +9931,183 @@ module Raw { * ``` */ class TypeAlias extends @type_alias, AssocItem, ExternItem { + override string toString() { result = "TypeAlias" } /** * Gets the `index`th attr of this type alias (0-based). + * */ - AnyAttr getAttr(int index) { type_alias_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + type_alias_attrs(this, index, result) + } /** * Gets the number of attrs of this type alias. */ - int getNumberOfAttrs() { result = count(int i | type_alias_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | type_alias_attrs(this, i, _)) + } /** * Gets the generic parameter list of this type alias, if it exists. + * */ - GenericParamList getGenericParamList() { type_alias_generic_param_lists(this, result) } - + GenericParamList getGenericParamList() { + type_alias_generic_param_lists(this, result) + } /** * Holds if this type alias is default. + * */ - predicate isDefault() { type_alias_is_default(this) } - + predicate isDefault() { + type_alias_is_default(this) + } /** * Gets the name of this type alias, if it exists. + * */ - Name getName() { type_alias_names(this, result) } - + Name getName() { + type_alias_names(this, result) + } /** * Gets the type representation of this type alias, if it exists. + * */ - TypeRepr getTypeRepr() { type_alias_type_reprs(this, result) } - + TypeRepr getTypeRepr() { + type_alias_type_reprs(this, result) + } /** * Gets the type bound list of this type alias, if it exists. + * */ - TypeBoundList getTypeBoundList() { type_alias_type_bound_lists(this, result) } - + TypeBoundList getTypeBoundList() { + type_alias_type_bound_lists(this, result) + } /** * Gets the visibility of this type alias, if it exists. + * */ - Visibility getVisibility() { type_alias_visibilities(this, result) } - + Visibility getVisibility() { + type_alias_visibilities(this, result) + } /** * Gets the where clause of this type alias, if it exists. + * */ - WhereClause getWhereClause() { type_alias_where_clauses(this, result) } + WhereClause getWhereClause() { + type_alias_where_clauses(this, result) + } } + private Element getImmediateChildOfTypeAlias(TypeAlias e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, - int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nTypeRepr = nName + 1 and - nTypeBoundList = nTypeRepr + 1 and - nVisibility = nTypeBoundList + 1 and - nWhereClause = nVisibility + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - or - index = nTypeBoundList and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nTypeRepr = nName + 1 + and + nTypeBoundList = nTypeRepr + 1 + and + nVisibility = nTypeBoundList + 1 + and + nWhereClause = nVisibility + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + or + index = nTypeBoundList and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + )) + } /** * INTERNAL: Do not use. * A union declaration. - * + * * For example: * ```rust * union U { f1: u32, f2: f32 } * ``` */ class Union extends @union, TypeItem { + override string toString() { result = "Union" } /** * Gets the struct field list of this union, if it exists. + * */ - StructFieldList getStructFieldList() { union_struct_field_lists(this, result) } + StructFieldList getStructFieldList() { + union_struct_field_lists(this, result) + } } + private Element getImmediateChildOfUnion(Union e, int index) { - exists( - int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, - int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList - | - n = 0 and - nAttributeMacroExpansion = n + 1 and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and - nGenericParamList = nAttr + 1 and - nName = nGenericParamList + 1 and - nVisibility = nName + 1 and - nWhereClause = nVisibility + 1 and - nStructFieldList = nWhereClause + 1 and - ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getStructFieldList() - ) - ) - } + + exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList | + n = 0 + and + nAttributeMacroExpansion = n + 1 + and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() + and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() + and + nGenericParamList = nAttr + 1 + and + nName = nGenericParamList + 1 + and + nVisibility = nName + 1 + and + nWhereClause = nVisibility + 1 + and + nStructFieldList = nWhereClause + 1 + and ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getStructFieldList() + )) + } /** * INTERNAL: Do not use. * A while loop expression. - * + * * For example: * ```rust * while x < 10 { @@ -8045,400 +10116,417 @@ module Raw { * ``` */ class WhileExpr extends @while_expr, LoopingExpr { + override string toString() { result = "WhileExpr" } /** * Gets the `index`th attr of this while expression (0-based). + * */ - AnyAttr getAttr(int index) { while_expr_attrs(this, index, result) } - + AnyAttr getAttr(int index) { + while_expr_attrs(this, index, result) + } /** * Gets the number of attrs of this while expression. */ - int getNumberOfAttrs() { result = count(int i | while_expr_attrs(this, i, _)) } - + int getNumberOfAttrs() { + result = count(int i | while_expr_attrs(this, i, _)) + } /** * Gets the condition of this while expression, if it exists. + * */ - Expr getCondition() { while_expr_conditions(this, result) } + Expr getCondition() { + while_expr_conditions(this, result) + } } + private Element getImmediateChildOfWhileExpr(WhileExpr e, int index) { - exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | - n = 0 and - nLabel = n + 1 and - nLoopBody = nLabel + 1 and - nAttr = nLoopBody + e.getNumberOfAttrs() and - nCondition = nAttr + 1 and - ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - or - index = nAttr and result = e.getCondition() - ) - ) - } + + exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | + n = 0 + and + nLabel = n + 1 + and + nLoopBody = nLabel + 1 + and + nAttr = nLoopBody + e.getNumberOfAttrs() + and + nCondition = nAttr + 1 + and ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + or + index = nAttr and result = e.getCondition() + )) + } + /** * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. */ pragma[nomagic] Element getImmediateChild(Element e, int index) { - // why does this look more complicated than it should? - // * none() simplifies generation, as we can append `or ...` without a special case for the first item - none() - or - result = getImmediateChildOfExtractorStep(e, index) - or - result = getImmediateChildOfNamedCrate(e, index) - or - result = getImmediateChildOfCrate(e, index) - or - result = getImmediateChildOfMissing(e, index) - or - result = getImmediateChildOfUnimplemented(e, index) - or - result = getImmediateChildOfAbi(e, index) - or - result = getImmediateChildOfArgList(e, index) - or - result = getImmediateChildOfAsmDirSpec(e, index) - or - result = getImmediateChildOfAsmOperandExpr(e, index) - or - result = getImmediateChildOfAsmOption(e, index) - or - result = getImmediateChildOfAsmRegSpec(e, index) - or - result = getImmediateChildOfAssocItemList(e, index) - or - result = getImmediateChildOfExternItemList(e, index) - or - result = getImmediateChildOfForBinder(e, index) - or - result = getImmediateChildOfFormatArgsArg(e, index) - or - result = getImmediateChildOfGenericArgList(e, index) - or - result = getImmediateChildOfGenericParamList(e, index) - or - result = getImmediateChildOfImplRestriction(e, index) - or - result = getImmediateChildOfItemList(e, index) - or - result = getImmediateChildOfLabel(e, index) - or - result = getImmediateChildOfLetElse(e, index) - or - result = getImmediateChildOfMacroItems(e, index) - or - result = getImmediateChildOfMatchArm(e, index) - or - result = getImmediateChildOfMatchArmList(e, index) - or - result = getImmediateChildOfMatchGuard(e, index) - or - result = getImmediateChildOfMutRestriction(e, index) - or - result = getImmediateChildOfName(e, index) - or - result = getImmediateChildOfParamList(e, index) - or - result = getImmediateChildOfParenthesizedArgList(e, index) - or - result = getImmediateChildOfPath(e, index) - or - result = getImmediateChildOfPathSegment(e, index) - or - result = getImmediateChildOfRename(e, index) - or - result = getImmediateChildOfRetTypeRepr(e, index) - or - result = getImmediateChildOfReturnTypeSyntax(e, index) - or - result = getImmediateChildOfSourceFile(e, index) - or - result = getImmediateChildOfStmtList(e, index) - or - result = getImmediateChildOfStructExprField(e, index) - or - result = getImmediateChildOfStructExprFieldList(e, index) - or - result = getImmediateChildOfStructField(e, index) - or - result = getImmediateChildOfStructPatField(e, index) - or - result = getImmediateChildOfStructPatFieldList(e, index) - or - result = getImmediateChildOfTokenTree(e, index) - or - result = getImmediateChildOfTryBlockModifier(e, index) - or - result = getImmediateChildOfTupleField(e, index) - or - result = getImmediateChildOfTypeBound(e, index) - or - result = getImmediateChildOfTypeBoundList(e, index) - or - result = getImmediateChildOfUseBoundGenericArgs(e, index) - or - result = getImmediateChildOfUseTree(e, index) - or - result = getImmediateChildOfUseTreeList(e, index) - or - result = getImmediateChildOfVariantList(e, index) - or - result = getImmediateChildOfVisibility(e, index) - or - result = getImmediateChildOfVisibilityInner(e, index) - or - result = getImmediateChildOfWhereClause(e, index) - or - result = getImmediateChildOfWherePred(e, index) - or - result = getImmediateChildOfArrayExprInternal(e, index) - or - result = getImmediateChildOfArrayTypeRepr(e, index) - or - result = getImmediateChildOfAsmClobberAbi(e, index) - or - result = getImmediateChildOfAsmConst(e, index) - or - result = getImmediateChildOfAsmLabel(e, index) - or - result = getImmediateChildOfAsmOperandNamed(e, index) - or - result = getImmediateChildOfAsmOptionsList(e, index) - or - result = getImmediateChildOfAsmRegOperand(e, index) - or - result = getImmediateChildOfAsmSym(e, index) - or - result = getImmediateChildOfAssocTypeArg(e, index) - or - result = getImmediateChildOfAttr(e, index) - or - result = getImmediateChildOfAwaitExpr(e, index) - or - result = getImmediateChildOfBecomeExpr(e, index) - or - result = getImmediateChildOfBinaryExpr(e, index) - or - result = getImmediateChildOfBoxPat(e, index) - or - result = getImmediateChildOfBreakExpr(e, index) - or - result = getImmediateChildOfCallExpr(e, index) - or - result = getImmediateChildOfCastExpr(e, index) - or - result = getImmediateChildOfCfgAtom(e, index) - or - result = getImmediateChildOfCfgAttrMeta(e, index) - or - result = getImmediateChildOfCfgComposite(e, index) - or - result = getImmediateChildOfCfgMeta(e, index) - or - result = getImmediateChildOfClosureExpr(e, index) - or - result = getImmediateChildOfComment(e, index) - or - result = getImmediateChildOfConstArg(e, index) - or - result = getImmediateChildOfConstBlockPat(e, index) - or - result = getImmediateChildOfConstParam(e, index) - or - result = getImmediateChildOfContinueExpr(e, index) - or - result = getImmediateChildOfDerefPat(e, index) - or - result = getImmediateChildOfDocComment(e, index) - or - result = getImmediateChildOfDynTraitTypeRepr(e, index) - or - result = getImmediateChildOfExprStmt(e, index) - or - result = getImmediateChildOfFieldExpr(e, index) - or - result = getImmediateChildOfFnPtrTypeRepr(e, index) - or - result = getImmediateChildOfForTypeRepr(e, index) - or - result = getImmediateChildOfFormatArgsExpr(e, index) - or - result = getImmediateChildOfIdentPat(e, index) - or - result = getImmediateChildOfIfExpr(e, index) - or - result = getImmediateChildOfImplTraitTypeRepr(e, index) - or - result = getImmediateChildOfIncludeBytesExpr(e, index) - or - result = getImmediateChildOfIndexExpr(e, index) - or - result = getImmediateChildOfInferTypeRepr(e, index) - or - result = getImmediateChildOfKeyValueMeta(e, index) - or - result = getImmediateChildOfLetExpr(e, index) - or - result = getImmediateChildOfLetStmt(e, index) - or - result = getImmediateChildOfLifetime(e, index) - or - result = getImmediateChildOfLifetimeArg(e, index) - or - result = getImmediateChildOfLifetimeParam(e, index) - or - result = getImmediateChildOfLiteralExpr(e, index) - or - result = getImmediateChildOfLiteralPat(e, index) - or - result = getImmediateChildOfMacroExpr(e, index) - or - result = getImmediateChildOfMacroPat(e, index) - or - result = getImmediateChildOfMacroTypeRepr(e, index) - or - result = getImmediateChildOfMatchExpr(e, index) - or - result = getImmediateChildOfMethodCallExpr(e, index) - or - result = getImmediateChildOfNameRef(e, index) - or - result = getImmediateChildOfNeverTypeRepr(e, index) - or - result = getImmediateChildOfNotNull(e, index) - or - result = getImmediateChildOfOffsetOfExpr(e, index) - or - result = getImmediateChildOfOrPat(e, index) - or - result = getImmediateChildOfParam(e, index) - or - result = getImmediateChildOfParenExpr(e, index) - or - result = getImmediateChildOfParenPat(e, index) - or - result = getImmediateChildOfParenTypeRepr(e, index) - or - result = getImmediateChildOfPathMeta(e, index) - or - result = getImmediateChildOfPathPat(e, index) - or - result = getImmediateChildOfPathTypeRepr(e, index) - or - result = getImmediateChildOfPatternTypeRepr(e, index) - or - result = getImmediateChildOfPrefixExpr(e, index) - or - result = getImmediateChildOfPtrTypeRepr(e, index) - or - result = getImmediateChildOfRangeExpr(e, index) - or - result = getImmediateChildOfRangePat(e, index) - or - result = getImmediateChildOfRefExpr(e, index) - or - result = getImmediateChildOfRefPat(e, index) - or - result = getImmediateChildOfRefTypeRepr(e, index) - or - result = getImmediateChildOfRestPat(e, index) - or - result = getImmediateChildOfReturnExpr(e, index) - or - result = getImmediateChildOfSelfParam(e, index) - or - result = getImmediateChildOfSlicePat(e, index) - or - result = getImmediateChildOfSliceTypeRepr(e, index) - or - result = getImmediateChildOfStructExpr(e, index) - or - result = getImmediateChildOfStructFieldList(e, index) - or - result = getImmediateChildOfStructPat(e, index) - or - result = getImmediateChildOfTokenTreeMeta(e, index) - or - result = getImmediateChildOfTryExpr(e, index) - or - result = getImmediateChildOfTupleExpr(e, index) - or - result = getImmediateChildOfTupleFieldList(e, index) - or - result = getImmediateChildOfTuplePat(e, index) - or - result = getImmediateChildOfTupleStructPat(e, index) - or - result = getImmediateChildOfTupleTypeRepr(e, index) - or - result = getImmediateChildOfTypeArg(e, index) - or - result = getImmediateChildOfTypeParam(e, index) - or - result = getImmediateChildOfUnderscoreExpr(e, index) - or - result = getImmediateChildOfUnsafeMeta(e, index) - or - result = getImmediateChildOfVariant(e, index) - or - result = getImmediateChildOfWildcardPat(e, index) - or - result = getImmediateChildOfYeetExpr(e, index) - or - result = getImmediateChildOfYieldExpr(e, index) - or - result = getImmediateChildOfAsmExpr(e, index) - or - result = getImmediateChildOfBlockExpr(e, index) - or - result = getImmediateChildOfExternBlock(e, index) - or - result = getImmediateChildOfExternCrate(e, index) - or - result = getImmediateChildOfImpl(e, index) - or - result = getImmediateChildOfMacroDef(e, index) - or - result = getImmediateChildOfMacroRules(e, index) - or - result = getImmediateChildOfModule(e, index) - or - result = getImmediateChildOfPathExpr(e, index) - or - result = getImmediateChildOfTrait(e, index) - or - result = getImmediateChildOfUse(e, index) - or - result = getImmediateChildOfConst(e, index) - or - result = getImmediateChildOfEnum(e, index) - or - result = getImmediateChildOfForExpr(e, index) - or - result = getImmediateChildOfFunction(e, index) - or - result = getImmediateChildOfLoopExpr(e, index) - or - result = getImmediateChildOfMacroCall(e, index) - or - result = getImmediateChildOfStatic(e, index) - or - result = getImmediateChildOfStruct(e, index) - or - result = getImmediateChildOfTypeAlias(e, index) - or - result = getImmediateChildOfUnion(e, index) - or - result = getImmediateChildOfWhileExpr(e, index) + // why does this look more complicated than it should? + // * none() simplifies generation, as we can append `or ...` without a special case for the first item + none() + or + result = getImmediateChildOfExtractorStep(e, index) + or + result = getImmediateChildOfNamedCrate(e, index) + or + result = getImmediateChildOfCrate(e, index) + or + result = getImmediateChildOfMissing(e, index) + or + result = getImmediateChildOfUnimplemented(e, index) + or + result = getImmediateChildOfAbi(e, index) + or + result = getImmediateChildOfArgList(e, index) + or + result = getImmediateChildOfAsmDirSpec(e, index) + or + result = getImmediateChildOfAsmOperandExpr(e, index) + or + result = getImmediateChildOfAsmOption(e, index) + or + result = getImmediateChildOfAsmRegSpec(e, index) + or + result = getImmediateChildOfAssocItemList(e, index) + or + result = getImmediateChildOfExternItemList(e, index) + or + result = getImmediateChildOfForBinder(e, index) + or + result = getImmediateChildOfFormatArgsArg(e, index) + or + result = getImmediateChildOfGenericArgList(e, index) + or + result = getImmediateChildOfGenericParamList(e, index) + or + result = getImmediateChildOfImplRestriction(e, index) + or + result = getImmediateChildOfItemList(e, index) + or + result = getImmediateChildOfLabel(e, index) + or + result = getImmediateChildOfLetElse(e, index) + or + result = getImmediateChildOfMacroItems(e, index) + or + result = getImmediateChildOfMatchArm(e, index) + or + result = getImmediateChildOfMatchArmList(e, index) + or + result = getImmediateChildOfMatchGuard(e, index) + or + result = getImmediateChildOfMutRestriction(e, index) + or + result = getImmediateChildOfName(e, index) + or + result = getImmediateChildOfParamList(e, index) + or + result = getImmediateChildOfParenthesizedArgList(e, index) + or + result = getImmediateChildOfPath(e, index) + or + result = getImmediateChildOfPathSegment(e, index) + or + result = getImmediateChildOfRename(e, index) + or + result = getImmediateChildOfRetTypeRepr(e, index) + or + result = getImmediateChildOfReturnTypeSyntax(e, index) + or + result = getImmediateChildOfSourceFile(e, index) + or + result = getImmediateChildOfStmtList(e, index) + or + result = getImmediateChildOfStructExprField(e, index) + or + result = getImmediateChildOfStructExprFieldList(e, index) + or + result = getImmediateChildOfStructField(e, index) + or + result = getImmediateChildOfStructPatField(e, index) + or + result = getImmediateChildOfStructPatFieldList(e, index) + or + result = getImmediateChildOfTokenTree(e, index) + or + result = getImmediateChildOfTryBlockModifier(e, index) + or + result = getImmediateChildOfTupleField(e, index) + or + result = getImmediateChildOfTypeBound(e, index) + or + result = getImmediateChildOfTypeBoundList(e, index) + or + result = getImmediateChildOfUseBoundGenericArgs(e, index) + or + result = getImmediateChildOfUseTree(e, index) + or + result = getImmediateChildOfUseTreeList(e, index) + or + result = getImmediateChildOfVariantList(e, index) + or + result = getImmediateChildOfVisibility(e, index) + or + result = getImmediateChildOfVisibilityInner(e, index) + or + result = getImmediateChildOfWhereClause(e, index) + or + result = getImmediateChildOfWherePred(e, index) + or + result = getImmediateChildOfArrayExprInternal(e, index) + or + result = getImmediateChildOfArrayTypeRepr(e, index) + or + result = getImmediateChildOfAsmClobberAbi(e, index) + or + result = getImmediateChildOfAsmConst(e, index) + or + result = getImmediateChildOfAsmLabel(e, index) + or + result = getImmediateChildOfAsmOperandNamed(e, index) + or + result = getImmediateChildOfAsmOptionsList(e, index) + or + result = getImmediateChildOfAsmRegOperand(e, index) + or + result = getImmediateChildOfAsmSym(e, index) + or + result = getImmediateChildOfAssocTypeArg(e, index) + or + result = getImmediateChildOfAttr(e, index) + or + result = getImmediateChildOfAwaitExpr(e, index) + or + result = getImmediateChildOfBecomeExpr(e, index) + or + result = getImmediateChildOfBinaryExpr(e, index) + or + result = getImmediateChildOfBoxPat(e, index) + or + result = getImmediateChildOfBreakExpr(e, index) + or + result = getImmediateChildOfCallExpr(e, index) + or + result = getImmediateChildOfCastExpr(e, index) + or + result = getImmediateChildOfCfgAtom(e, index) + or + result = getImmediateChildOfCfgAttrMeta(e, index) + or + result = getImmediateChildOfCfgComposite(e, index) + or + result = getImmediateChildOfCfgMeta(e, index) + or + result = getImmediateChildOfCfgPredExpr(e, index) + or + result = getImmediateChildOfCfgPredPat(e, index) + or + result = getImmediateChildOfClosureExpr(e, index) + or + result = getImmediateChildOfComment(e, index) + or + result = getImmediateChildOfConstArg(e, index) + or + result = getImmediateChildOfConstBlockPat(e, index) + or + result = getImmediateChildOfConstParam(e, index) + or + result = getImmediateChildOfContinueExpr(e, index) + or + result = getImmediateChildOfDerefPat(e, index) + or + result = getImmediateChildOfDocComment(e, index) + or + result = getImmediateChildOfDynTraitTypeRepr(e, index) + or + result = getImmediateChildOfExprStmt(e, index) + or + result = getImmediateChildOfFieldExpr(e, index) + or + result = getImmediateChildOfFnPtrTypeRepr(e, index) + or + result = getImmediateChildOfForTypeRepr(e, index) + or + result = getImmediateChildOfFormatArgsExpr(e, index) + or + result = getImmediateChildOfIdentPat(e, index) + or + result = getImmediateChildOfIfExpr(e, index) + or + result = getImmediateChildOfImplTraitTypeRepr(e, index) + or + result = getImmediateChildOfIncludeBytesExpr(e, index) + or + result = getImmediateChildOfIndexExpr(e, index) + or + result = getImmediateChildOfInferTypeRepr(e, index) + or + result = getImmediateChildOfKeyValueMeta(e, index) + or + result = getImmediateChildOfLetExpr(e, index) + or + result = getImmediateChildOfLetStmt(e, index) + or + result = getImmediateChildOfLifetime(e, index) + or + result = getImmediateChildOfLifetimeArg(e, index) + or + result = getImmediateChildOfLifetimeParam(e, index) + or + result = getImmediateChildOfLiteralExpr(e, index) + or + result = getImmediateChildOfLiteralPat(e, index) + or + result = getImmediateChildOfMacroExpr(e, index) + or + result = getImmediateChildOfMacroPat(e, index) + or + result = getImmediateChildOfMacroTypeRepr(e, index) + or + result = getImmediateChildOfMatchExpr(e, index) + or + result = getImmediateChildOfMethodCallExpr(e, index) + or + result = getImmediateChildOfNameRef(e, index) + or + result = getImmediateChildOfNeverTypeRepr(e, index) + or + result = getImmediateChildOfNotNull(e, index) + or + result = getImmediateChildOfOffsetOfExpr(e, index) + or + result = getImmediateChildOfOrPat(e, index) + or + result = getImmediateChildOfParam(e, index) + or + result = getImmediateChildOfParenExpr(e, index) + or + result = getImmediateChildOfParenPat(e, index) + or + result = getImmediateChildOfParenTypeRepr(e, index) + or + result = getImmediateChildOfPathMeta(e, index) + or + result = getImmediateChildOfPathPat(e, index) + or + result = getImmediateChildOfPathTypeRepr(e, index) + or + result = getImmediateChildOfPatternTypeRepr(e, index) + or + result = getImmediateChildOfPrefixExpr(e, index) + or + result = getImmediateChildOfPtrTypeRepr(e, index) + or + result = getImmediateChildOfRangeExpr(e, index) + or + result = getImmediateChildOfRangePat(e, index) + or + result = getImmediateChildOfRefExpr(e, index) + or + result = getImmediateChildOfRefPat(e, index) + or + result = getImmediateChildOfRefTypeRepr(e, index) + or + result = getImmediateChildOfRestPat(e, index) + or + result = getImmediateChildOfReturnExpr(e, index) + or + result = getImmediateChildOfSelfParam(e, index) + or + result = getImmediateChildOfSlicePat(e, index) + or + result = getImmediateChildOfSliceTypeRepr(e, index) + or + result = getImmediateChildOfStructExpr(e, index) + or + result = getImmediateChildOfStructFieldList(e, index) + or + result = getImmediateChildOfStructPat(e, index) + or + result = getImmediateChildOfTokenTreeMeta(e, index) + or + result = getImmediateChildOfTryExpr(e, index) + or + result = getImmediateChildOfTupleExpr(e, index) + or + result = getImmediateChildOfTupleFieldList(e, index) + or + result = getImmediateChildOfTuplePat(e, index) + or + result = getImmediateChildOfTupleStructPat(e, index) + or + result = getImmediateChildOfTupleTypeRepr(e, index) + or + result = getImmediateChildOfTypeArg(e, index) + or + result = getImmediateChildOfTypeParam(e, index) + or + result = getImmediateChildOfUnderscoreExpr(e, index) + or + result = getImmediateChildOfUnsafeMeta(e, index) + or + result = getImmediateChildOfVariant(e, index) + or + result = getImmediateChildOfWildcardPat(e, index) + or + result = getImmediateChildOfYeetExpr(e, index) + or + result = getImmediateChildOfYieldExpr(e, index) + or + result = getImmediateChildOfAsmExpr(e, index) + or + result = getImmediateChildOfBlockExpr(e, index) + or + result = getImmediateChildOfExternBlock(e, index) + or + result = getImmediateChildOfExternCrate(e, index) + or + result = getImmediateChildOfImpl(e, index) + or + result = getImmediateChildOfMacroDef(e, index) + or + result = getImmediateChildOfMacroRules(e, index) + or + result = getImmediateChildOfModule(e, index) + or + result = getImmediateChildOfPathExpr(e, index) + or + result = getImmediateChildOfTrait(e, index) + or + result = getImmediateChildOfUse(e, index) + or + result = getImmediateChildOfConst(e, index) + or + result = getImmediateChildOfEnum(e, index) + or + result = getImmediateChildOfForExpr(e, index) + or + result = getImmediateChildOfFunction(e, index) + or + result = getImmediateChildOfLoopExpr(e, index) + or + result = getImmediateChildOfMacroCall(e, index) + or + result = getImmediateChildOfStatic(e, index) + or + result = getImmediateChildOfStruct(e, index) + or + result = getImmediateChildOfTypeAlias(e, index) + or + result = getImmediateChildOfUnion(e, index) + or + result = getImmediateChildOfWhileExpr(e, index) } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll index c3cf0d6d0150..5919f0ef7d60 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll @@ -12,728 +12,907 @@ module Synth { * INTERNAL: Do not use. * The synthesized type of all elements. */ - cached - newtype TElement = + cached newtype TElement = /** * INTERNAL: Do not use. */ - TAbi(Raw::Abi id) { constructAbi(id) } or + TAbi(Raw::Abi id) { constructAbi(id) } + or /** * INTERNAL: Do not use. */ - TArgList(Raw::ArgList id) { constructArgList(id) } or + TArgList(Raw::ArgList id) { constructArgList(id) } + or /** * INTERNAL: Do not use. */ - TArrayExprInternal(Raw::ArrayExprInternal id) { constructArrayExprInternal(id) } or + TArrayExprInternal(Raw::ArrayExprInternal id) { constructArrayExprInternal(id) } + or /** * INTERNAL: Do not use. */ - TArrayListExpr(Raw::ArrayExprInternal id) { constructArrayListExpr(id) } or + TArrayListExpr(Raw::ArrayExprInternal id) { constructArrayListExpr(id) } + or /** * INTERNAL: Do not use. */ - TArrayRepeatExpr(Raw::ArrayExprInternal id) { constructArrayRepeatExpr(id) } or + TArrayRepeatExpr(Raw::ArrayExprInternal id) { constructArrayRepeatExpr(id) } + or /** * INTERNAL: Do not use. */ - TArrayTypeRepr(Raw::ArrayTypeRepr id) { constructArrayTypeRepr(id) } or + TArrayTypeRepr(Raw::ArrayTypeRepr id) { constructArrayTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TAsmClobberAbi(Raw::AsmClobberAbi id) { constructAsmClobberAbi(id) } or + TAsmClobberAbi(Raw::AsmClobberAbi id) { constructAsmClobberAbi(id) } + or /** * INTERNAL: Do not use. */ - TAsmConst(Raw::AsmConst id) { constructAsmConst(id) } or + TAsmConst(Raw::AsmConst id) { constructAsmConst(id) } + or /** * INTERNAL: Do not use. */ - TAsmDirSpec(Raw::AsmDirSpec id) { constructAsmDirSpec(id) } or + TAsmDirSpec(Raw::AsmDirSpec id) { constructAsmDirSpec(id) } + or /** * INTERNAL: Do not use. */ - TAsmExpr(Raw::AsmExpr id) { constructAsmExpr(id) } or + TAsmExpr(Raw::AsmExpr id) { constructAsmExpr(id) } + or /** * INTERNAL: Do not use. */ - TAsmLabel(Raw::AsmLabel id) { constructAsmLabel(id) } or + TAsmLabel(Raw::AsmLabel id) { constructAsmLabel(id) } + or /** * INTERNAL: Do not use. */ - TAsmOperandExpr(Raw::AsmOperandExpr id) { constructAsmOperandExpr(id) } or + TAsmOperandExpr(Raw::AsmOperandExpr id) { constructAsmOperandExpr(id) } + or /** * INTERNAL: Do not use. */ - TAsmOperandNamed(Raw::AsmOperandNamed id) { constructAsmOperandNamed(id) } or + TAsmOperandNamed(Raw::AsmOperandNamed id) { constructAsmOperandNamed(id) } + or /** * INTERNAL: Do not use. */ - TAsmOption(Raw::AsmOption id) { constructAsmOption(id) } or + TAsmOption(Raw::AsmOption id) { constructAsmOption(id) } + or /** * INTERNAL: Do not use. */ - TAsmOptionsList(Raw::AsmOptionsList id) { constructAsmOptionsList(id) } or + TAsmOptionsList(Raw::AsmOptionsList id) { constructAsmOptionsList(id) } + or /** * INTERNAL: Do not use. */ - TAsmRegOperand(Raw::AsmRegOperand id) { constructAsmRegOperand(id) } or + TAsmRegOperand(Raw::AsmRegOperand id) { constructAsmRegOperand(id) } + or /** * INTERNAL: Do not use. */ - TAsmRegSpec(Raw::AsmRegSpec id) { constructAsmRegSpec(id) } or + TAsmRegSpec(Raw::AsmRegSpec id) { constructAsmRegSpec(id) } + or /** * INTERNAL: Do not use. */ - TAsmSym(Raw::AsmSym id) { constructAsmSym(id) } or + TAsmSym(Raw::AsmSym id) { constructAsmSym(id) } + or /** * INTERNAL: Do not use. */ - TAssocItemList(Raw::AssocItemList id) { constructAssocItemList(id) } or + TAssocItemList(Raw::AssocItemList id) { constructAssocItemList(id) } + or /** * INTERNAL: Do not use. */ - TAssocTypeArg(Raw::AssocTypeArg id) { constructAssocTypeArg(id) } or + TAssocTypeArg(Raw::AssocTypeArg id) { constructAssocTypeArg(id) } + or /** * INTERNAL: Do not use. */ - TAttr(Raw::Attr id) { constructAttr(id) } or + TAttr(Raw::Attr id) { constructAttr(id) } + or /** * INTERNAL: Do not use. */ - TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } or + TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } + or /** * INTERNAL: Do not use. */ - TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } or + TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } + or /** * INTERNAL: Do not use. */ - TBinaryExpr(Raw::BinaryExpr id) { constructBinaryExpr(id) } or + TBinaryExpr(Raw::BinaryExpr id) { constructBinaryExpr(id) } + or /** * INTERNAL: Do not use. */ - TBlockExpr(Raw::BlockExpr id) { constructBlockExpr(id) } or + TBlockExpr(Raw::BlockExpr id) { constructBlockExpr(id) } + or /** * INTERNAL: Do not use. */ - TBoxPat(Raw::BoxPat id) { constructBoxPat(id) } or + TBoxPat(Raw::BoxPat id) { constructBoxPat(id) } + or /** * INTERNAL: Do not use. */ - TBreakExpr(Raw::BreakExpr id) { constructBreakExpr(id) } or + TBreakExpr(Raw::BreakExpr id) { constructBreakExpr(id) } + or /** * INTERNAL: Do not use. */ - TCallExpr(Raw::CallExpr id) { constructCallExpr(id) } or + TCallExpr(Raw::CallExpr id) { constructCallExpr(id) } + or /** * INTERNAL: Do not use. */ - TCastExpr(Raw::CastExpr id) { constructCastExpr(id) } or + TCastExpr(Raw::CastExpr id) { constructCastExpr(id) } + or /** * INTERNAL: Do not use. */ - TCfgAtom(Raw::CfgAtom id) { constructCfgAtom(id) } or + TCfgAtom(Raw::CfgAtom id) { constructCfgAtom(id) } + or /** * INTERNAL: Do not use. */ - TCfgAttrMeta(Raw::CfgAttrMeta id) { constructCfgAttrMeta(id) } or + TCfgAttrMeta(Raw::CfgAttrMeta id) { constructCfgAttrMeta(id) } + or /** * INTERNAL: Do not use. */ - TCfgComposite(Raw::CfgComposite id) { constructCfgComposite(id) } or + TCfgComposite(Raw::CfgComposite id) { constructCfgComposite(id) } + or /** * INTERNAL: Do not use. */ - TCfgMeta(Raw::CfgMeta id) { constructCfgMeta(id) } or + TCfgMeta(Raw::CfgMeta id) { constructCfgMeta(id) } + or /** * INTERNAL: Do not use. */ - TClosureExpr(Raw::ClosureExpr id) { constructClosureExpr(id) } or + TCfgPredExpr(Raw::CfgPredExpr id) { constructCfgPredExpr(id) } + or /** * INTERNAL: Do not use. */ - TComment(Raw::Comment id) { constructComment(id) } or + TCfgPredPat(Raw::CfgPredPat id) { constructCfgPredPat(id) } + or /** * INTERNAL: Do not use. */ - TConst(Raw::Const id) { constructConst(id) } or + TClosureExpr(Raw::ClosureExpr id) { constructClosureExpr(id) } + or /** * INTERNAL: Do not use. */ - TConstArg(Raw::ConstArg id) { constructConstArg(id) } or + TComment(Raw::Comment id) { constructComment(id) } + or /** * INTERNAL: Do not use. */ - TConstBlockPat(Raw::ConstBlockPat id) { constructConstBlockPat(id) } or + TConst(Raw::Const id) { constructConst(id) } + or /** * INTERNAL: Do not use. */ - TConstParam(Raw::ConstParam id) { constructConstParam(id) } or + TConstArg(Raw::ConstArg id) { constructConstArg(id) } + or /** * INTERNAL: Do not use. */ - TContinueExpr(Raw::ContinueExpr id) { constructContinueExpr(id) } or + TConstBlockPat(Raw::ConstBlockPat id) { constructConstBlockPat(id) } + or /** * INTERNAL: Do not use. */ - TCrate(Raw::Crate id) { constructCrate(id) } or + TConstParam(Raw::ConstParam id) { constructConstParam(id) } + or /** * INTERNAL: Do not use. */ - TDerefPat(Raw::DerefPat id) { constructDerefPat(id) } or + TContinueExpr(Raw::ContinueExpr id) { constructContinueExpr(id) } + or /** * INTERNAL: Do not use. */ - TDocComment(Raw::DocComment id) { constructDocComment(id) } or + TCrate(Raw::Crate id) { constructCrate(id) } + or /** * INTERNAL: Do not use. */ - TDynTraitTypeRepr(Raw::DynTraitTypeRepr id) { constructDynTraitTypeRepr(id) } or + TDerefPat(Raw::DerefPat id) { constructDerefPat(id) } + or /** * INTERNAL: Do not use. */ - TEnum(Raw::Enum id) { constructEnum(id) } or + TDocComment(Raw::DocComment id) { constructDocComment(id) } + or /** * INTERNAL: Do not use. */ - TExprStmt(Raw::ExprStmt id) { constructExprStmt(id) } or + TDynTraitTypeRepr(Raw::DynTraitTypeRepr id) { constructDynTraitTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TExternBlock(Raw::ExternBlock id) { constructExternBlock(id) } or + TEnum(Raw::Enum id) { constructEnum(id) } + or /** * INTERNAL: Do not use. */ - TExternCrate(Raw::ExternCrate id) { constructExternCrate(id) } or + TExprStmt(Raw::ExprStmt id) { constructExprStmt(id) } + or /** * INTERNAL: Do not use. */ - TExternItemList(Raw::ExternItemList id) { constructExternItemList(id) } or + TExternBlock(Raw::ExternBlock id) { constructExternBlock(id) } + or /** * INTERNAL: Do not use. */ - TExtractorStep(Raw::ExtractorStep id) { constructExtractorStep(id) } or + TExternCrate(Raw::ExternCrate id) { constructExternCrate(id) } + or /** * INTERNAL: Do not use. */ - TFieldExpr(Raw::FieldExpr id) { constructFieldExpr(id) } or + TExternItemList(Raw::ExternItemList id) { constructExternItemList(id) } + or /** * INTERNAL: Do not use. */ - TFnPtrTypeRepr(Raw::FnPtrTypeRepr id) { constructFnPtrTypeRepr(id) } or + TExtractorStep(Raw::ExtractorStep id) { constructExtractorStep(id) } + or /** * INTERNAL: Do not use. */ - TForBinder(Raw::ForBinder id) { constructForBinder(id) } or + TFieldExpr(Raw::FieldExpr id) { constructFieldExpr(id) } + or /** * INTERNAL: Do not use. */ - TForExpr(Raw::ForExpr id) { constructForExpr(id) } or + TFnPtrTypeRepr(Raw::FnPtrTypeRepr id) { constructFnPtrTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TForTypeRepr(Raw::ForTypeRepr id) { constructForTypeRepr(id) } or + TForBinder(Raw::ForBinder id) { constructForBinder(id) } + or /** * INTERNAL: Do not use. */ - TFormat(Raw::FormatArgsExpr parent, int index, string text, int offset) { - constructFormat(parent, index, text, offset) - } or + TForExpr(Raw::ForExpr id) { constructForExpr(id) } + or /** * INTERNAL: Do not use. */ - TFormatArgsArg(Raw::FormatArgsArg id) { constructFormatArgsArg(id) } or + TForTypeRepr(Raw::ForTypeRepr id) { constructForTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TFormatArgsExpr(Raw::FormatArgsExpr id) { constructFormatArgsExpr(id) } or + TFormat(Raw::FormatArgsExpr parent, int index, string text, int offset) { constructFormat(parent, index, text, offset) } + or /** * INTERNAL: Do not use. */ - TFormatArgument( - Raw::FormatArgsExpr parent, int index, int kind, string name, boolean positional, int offset - ) { - constructFormatArgument(parent, index, kind, name, positional, offset) - } or + TFormatArgsArg(Raw::FormatArgsArg id) { constructFormatArgsArg(id) } + or /** * INTERNAL: Do not use. */ - TFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) { - constructFormatTemplateVariableAccess(parent, index, kind) - } or + TFormatArgsExpr(Raw::FormatArgsExpr id) { constructFormatArgsExpr(id) } + or /** * INTERNAL: Do not use. */ - TFunction(Raw::Function id) { constructFunction(id) } or + TFormatArgument(Raw::FormatArgsExpr parent, int index, int kind, string name, boolean positional, int offset) { constructFormatArgument(parent, index, kind, name, positional, offset) } + or /** * INTERNAL: Do not use. */ - TGenericArgList(Raw::GenericArgList id) { constructGenericArgList(id) } or + TFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) { constructFormatTemplateVariableAccess(parent, index, kind) } + or /** * INTERNAL: Do not use. */ - TGenericParamList(Raw::GenericParamList id) { constructGenericParamList(id) } or + TFunction(Raw::Function id) { constructFunction(id) } + or /** * INTERNAL: Do not use. */ - TIdentPat(Raw::IdentPat id) { constructIdentPat(id) } or + TGenericArgList(Raw::GenericArgList id) { constructGenericArgList(id) } + or /** * INTERNAL: Do not use. */ - TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } or + TGenericParamList(Raw::GenericParamList id) { constructGenericParamList(id) } + or /** * INTERNAL: Do not use. */ - TImpl(Raw::Impl id) { constructImpl(id) } or + TIdentPat(Raw::IdentPat id) { constructIdentPat(id) } + or /** * INTERNAL: Do not use. */ - TImplRestriction(Raw::ImplRestriction id) { constructImplRestriction(id) } or + TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } + or /** * INTERNAL: Do not use. */ - TImplTraitTypeRepr(Raw::ImplTraitTypeRepr id) { constructImplTraitTypeRepr(id) } or + TImpl(Raw::Impl id) { constructImpl(id) } + or /** * INTERNAL: Do not use. */ - TIncludeBytesExpr(Raw::IncludeBytesExpr id) { constructIncludeBytesExpr(id) } or + TImplRestriction(Raw::ImplRestriction id) { constructImplRestriction(id) } + or /** * INTERNAL: Do not use. */ - TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } or + TImplTraitTypeRepr(Raw::ImplTraitTypeRepr id) { constructImplTraitTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TInferTypeRepr(Raw::InferTypeRepr id) { constructInferTypeRepr(id) } or + TIncludeBytesExpr(Raw::IncludeBytesExpr id) { constructIncludeBytesExpr(id) } + or /** * INTERNAL: Do not use. */ - TItemList(Raw::ItemList id) { constructItemList(id) } or + TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } + or /** * INTERNAL: Do not use. */ - TKeyValueMeta(Raw::KeyValueMeta id) { constructKeyValueMeta(id) } or + TInferTypeRepr(Raw::InferTypeRepr id) { constructInferTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TLabel(Raw::Label id) { constructLabel(id) } or + TItemList(Raw::ItemList id) { constructItemList(id) } + or /** * INTERNAL: Do not use. */ - TLetElse(Raw::LetElse id) { constructLetElse(id) } or + TKeyValueMeta(Raw::KeyValueMeta id) { constructKeyValueMeta(id) } + or /** * INTERNAL: Do not use. */ - TLetExpr(Raw::LetExpr id) { constructLetExpr(id) } or + TLabel(Raw::Label id) { constructLabel(id) } + or /** * INTERNAL: Do not use. */ - TLetStmt(Raw::LetStmt id) { constructLetStmt(id) } or + TLetElse(Raw::LetElse id) { constructLetElse(id) } + or /** * INTERNAL: Do not use. */ - TLifetime(Raw::Lifetime id) { constructLifetime(id) } or + TLetExpr(Raw::LetExpr id) { constructLetExpr(id) } + or /** * INTERNAL: Do not use. */ - TLifetimeArg(Raw::LifetimeArg id) { constructLifetimeArg(id) } or + TLetStmt(Raw::LetStmt id) { constructLetStmt(id) } + or /** * INTERNAL: Do not use. */ - TLifetimeParam(Raw::LifetimeParam id) { constructLifetimeParam(id) } or + TLifetime(Raw::Lifetime id) { constructLifetime(id) } + or /** * INTERNAL: Do not use. */ - TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } or + TLifetimeArg(Raw::LifetimeArg id) { constructLifetimeArg(id) } + or /** * INTERNAL: Do not use. */ - TLiteralPat(Raw::LiteralPat id) { constructLiteralPat(id) } or + TLifetimeParam(Raw::LifetimeParam id) { constructLifetimeParam(id) } + or /** * INTERNAL: Do not use. */ - TLoopExpr(Raw::LoopExpr id) { constructLoopExpr(id) } or + TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } + or /** * INTERNAL: Do not use. */ - TMacroCall(Raw::MacroCall id) { constructMacroCall(id) } or + TLiteralPat(Raw::LiteralPat id) { constructLiteralPat(id) } + or /** * INTERNAL: Do not use. */ - TMacroDef(Raw::MacroDef id) { constructMacroDef(id) } or + TLoopExpr(Raw::LoopExpr id) { constructLoopExpr(id) } + or /** * INTERNAL: Do not use. */ - TMacroExpr(Raw::MacroExpr id) { constructMacroExpr(id) } or + TMacroCall(Raw::MacroCall id) { constructMacroCall(id) } + or /** * INTERNAL: Do not use. */ - TMacroItems(Raw::MacroItems id) { constructMacroItems(id) } or + TMacroDef(Raw::MacroDef id) { constructMacroDef(id) } + or /** * INTERNAL: Do not use. */ - TMacroPat(Raw::MacroPat id) { constructMacroPat(id) } or + TMacroExpr(Raw::MacroExpr id) { constructMacroExpr(id) } + or /** * INTERNAL: Do not use. */ - TMacroRules(Raw::MacroRules id) { constructMacroRules(id) } or + TMacroItems(Raw::MacroItems id) { constructMacroItems(id) } + or /** * INTERNAL: Do not use. */ - TMacroTypeRepr(Raw::MacroTypeRepr id) { constructMacroTypeRepr(id) } or + TMacroPat(Raw::MacroPat id) { constructMacroPat(id) } + or /** * INTERNAL: Do not use. */ - TMatchArm(Raw::MatchArm id) { constructMatchArm(id) } or + TMacroRules(Raw::MacroRules id) { constructMacroRules(id) } + or /** * INTERNAL: Do not use. */ - TMatchArmList(Raw::MatchArmList id) { constructMatchArmList(id) } or + TMacroTypeRepr(Raw::MacroTypeRepr id) { constructMacroTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TMatchExpr(Raw::MatchExpr id) { constructMatchExpr(id) } or + TMatchArm(Raw::MatchArm id) { constructMatchArm(id) } + or /** * INTERNAL: Do not use. */ - TMatchGuard(Raw::MatchGuard id) { constructMatchGuard(id) } or + TMatchArmList(Raw::MatchArmList id) { constructMatchArmList(id) } + or /** * INTERNAL: Do not use. */ - TMethodCallExpr(Raw::MethodCallExpr id) { constructMethodCallExpr(id) } or + TMatchExpr(Raw::MatchExpr id) { constructMatchExpr(id) } + or /** * INTERNAL: Do not use. */ - TMissing(Raw::Missing id) { constructMissing(id) } or + TMatchGuard(Raw::MatchGuard id) { constructMatchGuard(id) } + or /** * INTERNAL: Do not use. */ - TModule(Raw::Module id) { constructModule(id) } or + TMethodCallExpr(Raw::MethodCallExpr id) { constructMethodCallExpr(id) } + or /** * INTERNAL: Do not use. */ - TMutRestriction(Raw::MutRestriction id) { constructMutRestriction(id) } or + TMissing(Raw::Missing id) { constructMissing(id) } + or /** * INTERNAL: Do not use. */ - TName(Raw::Name id) { constructName(id) } or + TModule(Raw::Module id) { constructModule(id) } + or /** * INTERNAL: Do not use. */ - TNameRef(Raw::NameRef id) { constructNameRef(id) } or + TMutRestriction(Raw::MutRestriction id) { constructMutRestriction(id) } + or + /** + * INTERNAL: Do not use. + */ + TName(Raw::Name id) { constructName(id) } + or + /** + * INTERNAL: Do not use. + */ + TNameRef(Raw::NameRef id) { constructNameRef(id) } + or /** * INTERNAL: Do not use. */ - TNamedCrate(Raw::NamedCrate id) { constructNamedCrate(id) } or + TNamedCrate(Raw::NamedCrate id) { constructNamedCrate(id) } + or /** * INTERNAL: Do not use. */ - TNeverTypeRepr(Raw::NeverTypeRepr id) { constructNeverTypeRepr(id) } or + TNeverTypeRepr(Raw::NeverTypeRepr id) { constructNeverTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TNotNull(Raw::NotNull id) { constructNotNull(id) } or + TNotNull(Raw::NotNull id) { constructNotNull(id) } + or /** * INTERNAL: Do not use. */ - TOffsetOfExpr(Raw::OffsetOfExpr id) { constructOffsetOfExpr(id) } or + TOffsetOfExpr(Raw::OffsetOfExpr id) { constructOffsetOfExpr(id) } + or /** * INTERNAL: Do not use. */ - TOrPat(Raw::OrPat id) { constructOrPat(id) } or + TOrPat(Raw::OrPat id) { constructOrPat(id) } + or /** * INTERNAL: Do not use. */ - TParam(Raw::Param id) { constructParam(id) } or + TParam(Raw::Param id) { constructParam(id) } + or /** * INTERNAL: Do not use. */ - TParamList(Raw::ParamList id) { constructParamList(id) } or + TParamList(Raw::ParamList id) { constructParamList(id) } + or /** * INTERNAL: Do not use. */ - TParenExpr(Raw::ParenExpr id) { constructParenExpr(id) } or + TParenExpr(Raw::ParenExpr id) { constructParenExpr(id) } + or /** * INTERNAL: Do not use. */ - TParenPat(Raw::ParenPat id) { constructParenPat(id) } or + TParenPat(Raw::ParenPat id) { constructParenPat(id) } + or /** * INTERNAL: Do not use. */ - TParenTypeRepr(Raw::ParenTypeRepr id) { constructParenTypeRepr(id) } or + TParenTypeRepr(Raw::ParenTypeRepr id) { constructParenTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TParenthesizedArgList(Raw::ParenthesizedArgList id) { constructParenthesizedArgList(id) } or + TParenthesizedArgList(Raw::ParenthesizedArgList id) { constructParenthesizedArgList(id) } + or /** * INTERNAL: Do not use. */ - TPath(Raw::Path id) { constructPath(id) } or + TPath(Raw::Path id) { constructPath(id) } + or /** * INTERNAL: Do not use. */ - TPathExpr(Raw::PathExpr id) { constructPathExpr(id) } or + TPathExpr(Raw::PathExpr id) { constructPathExpr(id) } + or /** * INTERNAL: Do not use. */ - TPathMeta(Raw::PathMeta id) { constructPathMeta(id) } or + TPathMeta(Raw::PathMeta id) { constructPathMeta(id) } + or /** * INTERNAL: Do not use. */ - TPathPat(Raw::PathPat id) { constructPathPat(id) } or + TPathPat(Raw::PathPat id) { constructPathPat(id) } + or /** * INTERNAL: Do not use. */ - TPathSegment(Raw::PathSegment id) { constructPathSegment(id) } or + TPathSegment(Raw::PathSegment id) { constructPathSegment(id) } + or /** * INTERNAL: Do not use. */ - TPathTypeRepr(Raw::PathTypeRepr id) { constructPathTypeRepr(id) } or + TPathTypeRepr(Raw::PathTypeRepr id) { constructPathTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TPatternTypeRepr(Raw::PatternTypeRepr id) { constructPatternTypeRepr(id) } or + TPatternTypeRepr(Raw::PatternTypeRepr id) { constructPatternTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TPrefixExpr(Raw::PrefixExpr id) { constructPrefixExpr(id) } or + TPrefixExpr(Raw::PrefixExpr id) { constructPrefixExpr(id) } + or /** * INTERNAL: Do not use. */ - TPtrTypeRepr(Raw::PtrTypeRepr id) { constructPtrTypeRepr(id) } or + TPtrTypeRepr(Raw::PtrTypeRepr id) { constructPtrTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TRangeExpr(Raw::RangeExpr id) { constructRangeExpr(id) } or + TRangeExpr(Raw::RangeExpr id) { constructRangeExpr(id) } + or /** * INTERNAL: Do not use. */ - TRangePat(Raw::RangePat id) { constructRangePat(id) } or + TRangePat(Raw::RangePat id) { constructRangePat(id) } + or /** * INTERNAL: Do not use. */ - TRefExpr(Raw::RefExpr id) { constructRefExpr(id) } or + TRefExpr(Raw::RefExpr id) { constructRefExpr(id) } + or /** * INTERNAL: Do not use. */ - TRefPat(Raw::RefPat id) { constructRefPat(id) } or + TRefPat(Raw::RefPat id) { constructRefPat(id) } + or /** * INTERNAL: Do not use. */ - TRefTypeRepr(Raw::RefTypeRepr id) { constructRefTypeRepr(id) } or + TRefTypeRepr(Raw::RefTypeRepr id) { constructRefTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TRename(Raw::Rename id) { constructRename(id) } or + TRename(Raw::Rename id) { constructRename(id) } + or /** * INTERNAL: Do not use. */ - TRestPat(Raw::RestPat id) { constructRestPat(id) } or + TRestPat(Raw::RestPat id) { constructRestPat(id) } + or /** * INTERNAL: Do not use. */ - TRetTypeRepr(Raw::RetTypeRepr id) { constructRetTypeRepr(id) } or + TRetTypeRepr(Raw::RetTypeRepr id) { constructRetTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TReturnExpr(Raw::ReturnExpr id) { constructReturnExpr(id) } or + TReturnExpr(Raw::ReturnExpr id) { constructReturnExpr(id) } + or /** * INTERNAL: Do not use. */ - TReturnTypeSyntax(Raw::ReturnTypeSyntax id) { constructReturnTypeSyntax(id) } or + TReturnTypeSyntax(Raw::ReturnTypeSyntax id) { constructReturnTypeSyntax(id) } + or /** * INTERNAL: Do not use. */ - TSelfParam(Raw::SelfParam id) { constructSelfParam(id) } or + TSelfParam(Raw::SelfParam id) { constructSelfParam(id) } + or /** * INTERNAL: Do not use. */ - TSlicePat(Raw::SlicePat id) { constructSlicePat(id) } or + TSlicePat(Raw::SlicePat id) { constructSlicePat(id) } + or /** * INTERNAL: Do not use. */ - TSliceTypeRepr(Raw::SliceTypeRepr id) { constructSliceTypeRepr(id) } or + TSliceTypeRepr(Raw::SliceTypeRepr id) { constructSliceTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TSourceFile(Raw::SourceFile id) { constructSourceFile(id) } or + TSourceFile(Raw::SourceFile id) { constructSourceFile(id) } + or /** * INTERNAL: Do not use. */ - TStatic(Raw::Static id) { constructStatic(id) } or + TStatic(Raw::Static id) { constructStatic(id) } + or /** * INTERNAL: Do not use. */ - TStmtList(Raw::StmtList id) { constructStmtList(id) } or + TStmtList(Raw::StmtList id) { constructStmtList(id) } + or /** * INTERNAL: Do not use. */ - TStruct(Raw::Struct id) { constructStruct(id) } or + TStruct(Raw::Struct id) { constructStruct(id) } + or /** * INTERNAL: Do not use. */ - TStructExpr(Raw::StructExpr id) { constructStructExpr(id) } or + TStructExpr(Raw::StructExpr id) { constructStructExpr(id) } + or /** * INTERNAL: Do not use. */ - TStructExprField(Raw::StructExprField id) { constructStructExprField(id) } or + TStructExprField(Raw::StructExprField id) { constructStructExprField(id) } + or /** * INTERNAL: Do not use. */ - TStructExprFieldList(Raw::StructExprFieldList id) { constructStructExprFieldList(id) } or + TStructExprFieldList(Raw::StructExprFieldList id) { constructStructExprFieldList(id) } + or /** * INTERNAL: Do not use. */ - TStructField(Raw::StructField id) { constructStructField(id) } or + TStructField(Raw::StructField id) { constructStructField(id) } + or /** * INTERNAL: Do not use. */ - TStructFieldList(Raw::StructFieldList id) { constructStructFieldList(id) } or + TStructFieldList(Raw::StructFieldList id) { constructStructFieldList(id) } + or /** * INTERNAL: Do not use. */ - TStructPat(Raw::StructPat id) { constructStructPat(id) } or + TStructPat(Raw::StructPat id) { constructStructPat(id) } + or /** * INTERNAL: Do not use. */ - TStructPatField(Raw::StructPatField id) { constructStructPatField(id) } or + TStructPatField(Raw::StructPatField id) { constructStructPatField(id) } + or /** * INTERNAL: Do not use. */ - TStructPatFieldList(Raw::StructPatFieldList id) { constructStructPatFieldList(id) } or + TStructPatFieldList(Raw::StructPatFieldList id) { constructStructPatFieldList(id) } + or /** * INTERNAL: Do not use. */ - TTokenTree(Raw::TokenTree id) { constructTokenTree(id) } or + TTokenTree(Raw::TokenTree id) { constructTokenTree(id) } + or /** * INTERNAL: Do not use. */ - TTokenTreeMeta(Raw::TokenTreeMeta id) { constructTokenTreeMeta(id) } or + TTokenTreeMeta(Raw::TokenTreeMeta id) { constructTokenTreeMeta(id) } + or /** * INTERNAL: Do not use. */ - TTrait(Raw::Trait id) { constructTrait(id) } or + TTrait(Raw::Trait id) { constructTrait(id) } + or /** * INTERNAL: Do not use. */ - TTryBlockModifier(Raw::TryBlockModifier id) { constructTryBlockModifier(id) } or + TTryBlockModifier(Raw::TryBlockModifier id) { constructTryBlockModifier(id) } + or /** * INTERNAL: Do not use. */ - TTryExpr(Raw::TryExpr id) { constructTryExpr(id) } or + TTryExpr(Raw::TryExpr id) { constructTryExpr(id) } + or /** * INTERNAL: Do not use. */ - TTupleExpr(Raw::TupleExpr id) { constructTupleExpr(id) } or + TTupleExpr(Raw::TupleExpr id) { constructTupleExpr(id) } + or /** * INTERNAL: Do not use. */ - TTupleField(Raw::TupleField id) { constructTupleField(id) } or + TTupleField(Raw::TupleField id) { constructTupleField(id) } + or /** * INTERNAL: Do not use. */ - TTupleFieldList(Raw::TupleFieldList id) { constructTupleFieldList(id) } or + TTupleFieldList(Raw::TupleFieldList id) { constructTupleFieldList(id) } + or /** * INTERNAL: Do not use. */ - TTuplePat(Raw::TuplePat id) { constructTuplePat(id) } or + TTuplePat(Raw::TuplePat id) { constructTuplePat(id) } + or /** * INTERNAL: Do not use. */ - TTupleStructPat(Raw::TupleStructPat id) { constructTupleStructPat(id) } or + TTupleStructPat(Raw::TupleStructPat id) { constructTupleStructPat(id) } + or /** * INTERNAL: Do not use. */ - TTupleTypeRepr(Raw::TupleTypeRepr id) { constructTupleTypeRepr(id) } or + TTupleTypeRepr(Raw::TupleTypeRepr id) { constructTupleTypeRepr(id) } + or /** * INTERNAL: Do not use. */ - TTypeAlias(Raw::TypeAlias id) { constructTypeAlias(id) } or + TTypeAlias(Raw::TypeAlias id) { constructTypeAlias(id) } + or /** * INTERNAL: Do not use. */ - TTypeArg(Raw::TypeArg id) { constructTypeArg(id) } or + TTypeArg(Raw::TypeArg id) { constructTypeArg(id) } + or /** * INTERNAL: Do not use. */ - TTypeBound(Raw::TypeBound id) { constructTypeBound(id) } or + TTypeBound(Raw::TypeBound id) { constructTypeBound(id) } + or /** * INTERNAL: Do not use. */ - TTypeBoundList(Raw::TypeBoundList id) { constructTypeBoundList(id) } or + TTypeBoundList(Raw::TypeBoundList id) { constructTypeBoundList(id) } + or /** * INTERNAL: Do not use. */ - TTypeParam(Raw::TypeParam id) { constructTypeParam(id) } or + TTypeParam(Raw::TypeParam id) { constructTypeParam(id) } + or /** * INTERNAL: Do not use. */ - TUnderscoreExpr(Raw::UnderscoreExpr id) { constructUnderscoreExpr(id) } or + TUnderscoreExpr(Raw::UnderscoreExpr id) { constructUnderscoreExpr(id) } + or /** * INTERNAL: Do not use. */ - TUnimplemented(Raw::Unimplemented id) { constructUnimplemented(id) } or + TUnimplemented(Raw::Unimplemented id) { constructUnimplemented(id) } + or /** * INTERNAL: Do not use. */ - TUnion(Raw::Union id) { constructUnion(id) } or + TUnion(Raw::Union id) { constructUnion(id) } + or /** * INTERNAL: Do not use. */ - TUnsafeMeta(Raw::UnsafeMeta id) { constructUnsafeMeta(id) } or + TUnsafeMeta(Raw::UnsafeMeta id) { constructUnsafeMeta(id) } + or /** * INTERNAL: Do not use. */ - TUse(Raw::Use id) { constructUse(id) } or + TUse(Raw::Use id) { constructUse(id) } + or /** * INTERNAL: Do not use. */ - TUseBoundGenericArgs(Raw::UseBoundGenericArgs id) { constructUseBoundGenericArgs(id) } or + TUseBoundGenericArgs(Raw::UseBoundGenericArgs id) { constructUseBoundGenericArgs(id) } + or /** * INTERNAL: Do not use. */ - TUseTree(Raw::UseTree id) { constructUseTree(id) } or + TUseTree(Raw::UseTree id) { constructUseTree(id) } + or /** * INTERNAL: Do not use. */ - TUseTreeList(Raw::UseTreeList id) { constructUseTreeList(id) } or + TUseTreeList(Raw::UseTreeList id) { constructUseTreeList(id) } + or /** * INTERNAL: Do not use. */ - TVariant(Raw::Variant id) { constructVariant(id) } or + TVariant(Raw::Variant id) { constructVariant(id) } + or /** * INTERNAL: Do not use. */ - TVariantList(Raw::VariantList id) { constructVariantList(id) } or + TVariantList(Raw::VariantList id) { constructVariantList(id) } + or /** * INTERNAL: Do not use. */ - TVisibility(Raw::Visibility id) { constructVisibility(id) } or + TVisibility(Raw::Visibility id) { constructVisibility(id) } + or /** * INTERNAL: Do not use. */ - TVisibilityInner(Raw::VisibilityInner id) { constructVisibilityInner(id) } or + TVisibilityInner(Raw::VisibilityInner id) { constructVisibilityInner(id) } + or /** * INTERNAL: Do not use. */ - TWhereClause(Raw::WhereClause id) { constructWhereClause(id) } or + TWhereClause(Raw::WhereClause id) { constructWhereClause(id) } + or /** * INTERNAL: Do not use. */ - TWherePred(Raw::WherePred id) { constructWherePred(id) } or + TWherePred(Raw::WherePred id) { constructWherePred(id) } + or /** * INTERNAL: Do not use. */ - TWhileExpr(Raw::WhileExpr id) { constructWhileExpr(id) } or + TWhileExpr(Raw::WhileExpr id) { constructWhileExpr(id) } + or /** * INTERNAL: Do not use. */ - TWildcardPat(Raw::WildcardPat id) { constructWildcardPat(id) } or + TWildcardPat(Raw::WildcardPat id) { constructWildcardPat(id) } + or /** * INTERNAL: Do not use. */ - TYeetExpr(Raw::YeetExpr id) { constructYeetExpr(id) } or + TYeetExpr(Raw::YeetExpr id) { constructYeetExpr(id) } + or /** * INTERNAL: Do not use. */ @@ -743,169 +922,114 @@ module Synth { * INTERNAL: Do not use. */ class TAddressable = TItem or TVariant; - /** * INTERNAL: Do not use. */ class TAnyAttr = TAttr or TDocComment; - /** * INTERNAL: Do not use. */ class TArrayExpr = TArrayListExpr or TArrayRepeatExpr; - /** * INTERNAL: Do not use. */ class TAsmOperand = TAsmConst or TAsmLabel or TAsmRegOperand or TAsmSym; - /** * INTERNAL: Do not use. */ class TAsmPiece = TAsmClobberAbi or TAsmOperandNamed or TAsmOptionsList; - /** * INTERNAL: Do not use. */ class TAssocItem = TConst or TFunction or TMacroCall or TTypeAlias; - /** * INTERNAL: Do not use. */ - class TAstNode = - TAbi or TAddressable or TAnyAttr or TArgList or TAsmDirSpec or TAsmOperand or TAsmOperandExpr or - TAsmOption or TAsmPiece or TAsmRegSpec or TAssocItemList or TCallable or TCfgPredicate or - TExpr or TExternItemList or TFieldList or TForBinder or TFormatArgsArg or TGenericArg or - TGenericArgList or TGenericParam or TGenericParamList or TImplRestriction or TItemList or - TLabel or TLetElse or TMacroItems or TMatchArm or TMatchArmList or TMatchGuard or TMeta or - TMutRestriction or TName or TParamBase or TParamList or TParenthesizedArgList or TPat or - TPath or TPathAstNode or TPathSegment or TRename or TRetTypeRepr or TReturnTypeSyntax or - TSourceFile or TStmt or TStmtList or TStructExprField or TStructExprFieldList or - TStructField or TStructPatField or TStructPatFieldList or TToken or TTokenTree or - TTryBlockModifier or TTupleField or TTypeBound or TTypeBoundList or TTypeRepr or - TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or - TVisibility or TVisibilityInner or TWhereClause or TWherePred; - + class TAstNode = TAbi or TAddressable or TAnyAttr or TArgList or TAsmDirSpec or TAsmOperand or TAsmOperandExpr or TAsmOption or TAsmPiece or TAsmRegSpec or TAssocItemList or TCallable or TCfgPredicate or TExpr or TExternItemList or TFieldList or TForBinder or TFormatArgsArg or TGenericArg or TGenericArgList or TGenericParam or TGenericParamList or TImplRestriction or TItemList or TLabel or TLetElse or TMacroItems or TMatchArm or TMatchArmList or TMatchGuard or TMeta or TMutRestriction or TName or TParamBase or TParamList or TParenthesizedArgList or TPat or TPath or TPathAstNode or TPathSegment or TRename or TRetTypeRepr or TReturnTypeSyntax or TSourceFile or TStmt or TStmtList or TStructExprField or TStructExprFieldList or TStructField or TStructPatField or TStructPatFieldList or TToken or TTokenTree or TTryBlockModifier or TTupleField or TTypeBound or TTypeBoundList or TTypeRepr or TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or TVisibility or TVisibilityInner or TWhereClause or TWherePred; /** * INTERNAL: Do not use. */ class TCallable = TClosureExpr or TFunction; - /** * INTERNAL: Do not use. */ class TCfgPredicate = TCfgAtom or TCfgComposite; - /** * INTERNAL: Do not use. */ - class TExpr = - TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or - TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or - TFormatArgsExpr or TIfExpr or TIncludeBytesExpr or TIndexExpr or TLabelableExpr or - TLetExpr or TLiteralExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or TOffsetOfExpr or - TParenExpr or TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or TReturnExpr or - TStructExpr or TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or TYieldExpr; - + class TExpr = TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or TBreakExpr or TCallExpr or TCastExpr or TCfgPredExpr or TClosureExpr or TContinueExpr or TFieldExpr or TFormatArgsExpr or TIfExpr or TIncludeBytesExpr or TIndexExpr or TLabelableExpr or TLetExpr or TLiteralExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or TOffsetOfExpr or TParenExpr or TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or TReturnExpr or TStructExpr or TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or TYieldExpr; /** * INTERNAL: Do not use. */ class TExternItem = TFunction or TMacroCall or TStatic or TTypeAlias; - /** * INTERNAL: Do not use. */ class TFieldList = TStructFieldList or TTupleFieldList; - /** * INTERNAL: Do not use. */ class TGenericArg = TAssocTypeArg or TConstArg or TLifetimeArg or TTypeArg; - /** * INTERNAL: Do not use. */ class TGenericParam = TConstParam or TLifetimeParam or TTypeParam; - /** * INTERNAL: Do not use. */ - class TItem = - TAsmExpr or TAssocItem or TExternBlock or TExternCrate or TExternItem or TImpl or TMacroDef or - TMacroRules or TModule or TTrait or TTypeItem or TUse; - + class TItem = TAsmExpr or TAssocItem or TExternBlock or TExternCrate or TExternItem or TImpl or TMacroDef or TMacroRules or TModule or TTrait or TTypeItem or TUse; /** * INTERNAL: Do not use. */ class TLabelableExpr = TBlockExpr or TLoopingExpr; - /** * INTERNAL: Do not use. */ class TLocatable = TAstNode or TCrate or TFormat or TFormatArgument; - /** * INTERNAL: Do not use. */ class TLoopingExpr = TForExpr or TLoopExpr or TWhileExpr; - /** * INTERNAL: Do not use. */ - class TMeta = - TCfgAttrMeta or TCfgMeta or TKeyValueMeta or TPathMeta or TTokenTreeMeta or TUnsafeMeta; - + class TMeta = TCfgAttrMeta or TCfgMeta or TKeyValueMeta or TPathMeta or TTokenTreeMeta or TUnsafeMeta; /** * INTERNAL: Do not use. */ class TParamBase = TParam or TSelfParam; - /** * INTERNAL: Do not use. */ - class TPat = - TBoxPat or TConstBlockPat or TDerefPat or TIdentPat or TLiteralPat or TMacroPat or TNotNull or - TOrPat or TParenPat or TPathPat or TRangePat or TRefPat or TRestPat or TSlicePat or - TStructPat or TTuplePat or TTupleStructPat or TWildcardPat; - + class TPat = TBoxPat or TCfgPredPat or TConstBlockPat or TDerefPat or TIdentPat or TLiteralPat or TMacroPat or TNotNull or TOrPat or TParenPat or TPathPat or TRangePat or TRefPat or TRestPat or TSlicePat or TStructPat or TTuplePat or TTupleStructPat or TWildcardPat; /** * INTERNAL: Do not use. */ class TPathAstNode = TPathExpr or TPathPat or TStructExpr or TStructPat or TTupleStructPat; - /** * INTERNAL: Do not use. */ class TPathExprBase = TFormatTemplateVariableAccess or TPathExpr; - /** * INTERNAL: Do not use. */ class TStmt = TExprStmt or TItem or TLetStmt; - /** * INTERNAL: Do not use. */ class TToken = TComment; - /** * INTERNAL: Do not use. */ class TTypeItem = TEnum or TStruct or TUnion; - /** * INTERNAL: Do not use. */ - class TTypeRepr = - TArrayTypeRepr or TDynTraitTypeRepr or TFnPtrTypeRepr or TForTypeRepr or TImplTraitTypeRepr or - TInferTypeRepr or TMacroTypeRepr or TNeverTypeRepr or TParenTypeRepr or TPathTypeRepr or - TPatternTypeRepr or TPtrTypeRepr or TRefTypeRepr or TSliceTypeRepr or TTupleTypeRepr; - + class TTypeRepr = TArrayTypeRepr or TDynTraitTypeRepr or TFnPtrTypeRepr or TForTypeRepr or TImplTraitTypeRepr or TInferTypeRepr or TMacroTypeRepr or TNeverTypeRepr or TParenTypeRepr or TPathTypeRepr or TPatternTypeRepr or TPtrTypeRepr or TRefTypeRepr or TSliceTypeRepr or TTupleTypeRepr; /** * INTERNAL: Do not use. */ class TUnextracted = TMissing or TUnimplemented; - /** * INTERNAL: Do not use. */ @@ -926,20 +1050,23 @@ module Synth { e = TFormatTemplateVariableAccess(result, _, _) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAbi`, if possible. */ - TAbi convertAbiFromRaw(Raw::Element e) { result = TAbi(e) } - + TAbi convertAbiFromRaw(Raw::Element e) { + result = TAbi(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArgList`, if possible. */ - TArgList convertArgListFromRaw(Raw::Element e) { result = TArgList(e) } - + TArgList convertArgListFromRaw(Raw::Element e) { + result = TArgList(e) + } /** * INTERNAL: Do not use. * @@ -948,399 +1075,470 @@ module Synth { TArrayExprInternal convertArrayExprInternalFromRaw(Raw::Element e) { result = TArrayExprInternal(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayListExpr`, if possible. */ - TArrayListExpr convertArrayListExprFromRaw(Raw::Element e) { result = TArrayListExpr(e) } - + TArrayListExpr convertArrayListExprFromRaw(Raw::Element e) { + result = TArrayListExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayRepeatExpr`, if possible. */ - TArrayRepeatExpr convertArrayRepeatExprFromRaw(Raw::Element e) { result = TArrayRepeatExpr(e) } - + TArrayRepeatExpr convertArrayRepeatExprFromRaw(Raw::Element e) { + result = TArrayRepeatExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayTypeRepr`, if possible. */ - TArrayTypeRepr convertArrayTypeReprFromRaw(Raw::Element e) { result = TArrayTypeRepr(e) } - + TArrayTypeRepr convertArrayTypeReprFromRaw(Raw::Element e) { + result = TArrayTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmClobberAbi`, if possible. */ - TAsmClobberAbi convertAsmClobberAbiFromRaw(Raw::Element e) { result = TAsmClobberAbi(e) } - + TAsmClobberAbi convertAsmClobberAbiFromRaw(Raw::Element e) { + result = TAsmClobberAbi(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmConst`, if possible. */ - TAsmConst convertAsmConstFromRaw(Raw::Element e) { result = TAsmConst(e) } - + TAsmConst convertAsmConstFromRaw(Raw::Element e) { + result = TAsmConst(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmDirSpec`, if possible. */ - TAsmDirSpec convertAsmDirSpecFromRaw(Raw::Element e) { result = TAsmDirSpec(e) } - + TAsmDirSpec convertAsmDirSpecFromRaw(Raw::Element e) { + result = TAsmDirSpec(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmExpr`, if possible. */ - TAsmExpr convertAsmExprFromRaw(Raw::Element e) { result = TAsmExpr(e) } - + TAsmExpr convertAsmExprFromRaw(Raw::Element e) { + result = TAsmExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmLabel`, if possible. */ - TAsmLabel convertAsmLabelFromRaw(Raw::Element e) { result = TAsmLabel(e) } - + TAsmLabel convertAsmLabelFromRaw(Raw::Element e) { + result = TAsmLabel(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOperandExpr`, if possible. */ - TAsmOperandExpr convertAsmOperandExprFromRaw(Raw::Element e) { result = TAsmOperandExpr(e) } - + TAsmOperandExpr convertAsmOperandExprFromRaw(Raw::Element e) { + result = TAsmOperandExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOperandNamed`, if possible. */ - TAsmOperandNamed convertAsmOperandNamedFromRaw(Raw::Element e) { result = TAsmOperandNamed(e) } - + TAsmOperandNamed convertAsmOperandNamedFromRaw(Raw::Element e) { + result = TAsmOperandNamed(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOption`, if possible. */ - TAsmOption convertAsmOptionFromRaw(Raw::Element e) { result = TAsmOption(e) } - + TAsmOption convertAsmOptionFromRaw(Raw::Element e) { + result = TAsmOption(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOptionsList`, if possible. */ - TAsmOptionsList convertAsmOptionsListFromRaw(Raw::Element e) { result = TAsmOptionsList(e) } - + TAsmOptionsList convertAsmOptionsListFromRaw(Raw::Element e) { + result = TAsmOptionsList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmRegOperand`, if possible. */ - TAsmRegOperand convertAsmRegOperandFromRaw(Raw::Element e) { result = TAsmRegOperand(e) } - + TAsmRegOperand convertAsmRegOperandFromRaw(Raw::Element e) { + result = TAsmRegOperand(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmRegSpec`, if possible. */ - TAsmRegSpec convertAsmRegSpecFromRaw(Raw::Element e) { result = TAsmRegSpec(e) } - + TAsmRegSpec convertAsmRegSpecFromRaw(Raw::Element e) { + result = TAsmRegSpec(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmSym`, if possible. */ - TAsmSym convertAsmSymFromRaw(Raw::Element e) { result = TAsmSym(e) } - + TAsmSym convertAsmSymFromRaw(Raw::Element e) { + result = TAsmSym(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAssocItemList`, if possible. */ - TAssocItemList convertAssocItemListFromRaw(Raw::Element e) { result = TAssocItemList(e) } - + TAssocItemList convertAssocItemListFromRaw(Raw::Element e) { + result = TAssocItemList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAssocTypeArg`, if possible. */ - TAssocTypeArg convertAssocTypeArgFromRaw(Raw::Element e) { result = TAssocTypeArg(e) } - + TAssocTypeArg convertAssocTypeArgFromRaw(Raw::Element e) { + result = TAssocTypeArg(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAttr`, if possible. */ - TAttr convertAttrFromRaw(Raw::Element e) { result = TAttr(e) } - + TAttr convertAttrFromRaw(Raw::Element e) { + result = TAttr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAwaitExpr`, if possible. */ - TAwaitExpr convertAwaitExprFromRaw(Raw::Element e) { result = TAwaitExpr(e) } - + TAwaitExpr convertAwaitExprFromRaw(Raw::Element e) { + result = TAwaitExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBecomeExpr`, if possible. */ - TBecomeExpr convertBecomeExprFromRaw(Raw::Element e) { result = TBecomeExpr(e) } - + TBecomeExpr convertBecomeExprFromRaw(Raw::Element e) { + result = TBecomeExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBinaryExpr`, if possible. */ - TBinaryExpr convertBinaryExprFromRaw(Raw::Element e) { result = TBinaryExpr(e) } - + TBinaryExpr convertBinaryExprFromRaw(Raw::Element e) { + result = TBinaryExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBlockExpr`, if possible. */ - TBlockExpr convertBlockExprFromRaw(Raw::Element e) { result = TBlockExpr(e) } - + TBlockExpr convertBlockExprFromRaw(Raw::Element e) { + result = TBlockExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBoxPat`, if possible. */ - TBoxPat convertBoxPatFromRaw(Raw::Element e) { result = TBoxPat(e) } - + TBoxPat convertBoxPatFromRaw(Raw::Element e) { + result = TBoxPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBreakExpr`, if possible. */ - TBreakExpr convertBreakExprFromRaw(Raw::Element e) { result = TBreakExpr(e) } - + TBreakExpr convertBreakExprFromRaw(Raw::Element e) { + result = TBreakExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCallExpr`, if possible. */ - TCallExpr convertCallExprFromRaw(Raw::Element e) { result = TCallExpr(e) } - + TCallExpr convertCallExprFromRaw(Raw::Element e) { + result = TCallExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCastExpr`, if possible. */ - TCastExpr convertCastExprFromRaw(Raw::Element e) { result = TCastExpr(e) } - + TCastExpr convertCastExprFromRaw(Raw::Element e) { + result = TCastExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgAtom`, if possible. */ - TCfgAtom convertCfgAtomFromRaw(Raw::Element e) { result = TCfgAtom(e) } - + TCfgAtom convertCfgAtomFromRaw(Raw::Element e) { + result = TCfgAtom(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgAttrMeta`, if possible. */ - TCfgAttrMeta convertCfgAttrMetaFromRaw(Raw::Element e) { result = TCfgAttrMeta(e) } - + TCfgAttrMeta convertCfgAttrMetaFromRaw(Raw::Element e) { + result = TCfgAttrMeta(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgComposite`, if possible. */ - TCfgComposite convertCfgCompositeFromRaw(Raw::Element e) { result = TCfgComposite(e) } - + TCfgComposite convertCfgCompositeFromRaw(Raw::Element e) { + result = TCfgComposite(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgMeta`, if possible. */ - TCfgMeta convertCfgMetaFromRaw(Raw::Element e) { result = TCfgMeta(e) } - + TCfgMeta convertCfgMetaFromRaw(Raw::Element e) { + result = TCfgMeta(e) + } + /** + * INTERNAL: Do not use. + * + * Converts a raw element to a synthesized `TCfgPredExpr`, if possible. + */ + TCfgPredExpr convertCfgPredExprFromRaw(Raw::Element e) { + result = TCfgPredExpr(e) + } + /** + * INTERNAL: Do not use. + * + * Converts a raw element to a synthesized `TCfgPredPat`, if possible. + */ + TCfgPredPat convertCfgPredPatFromRaw(Raw::Element e) { + result = TCfgPredPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TClosureExpr`, if possible. */ - TClosureExpr convertClosureExprFromRaw(Raw::Element e) { result = TClosureExpr(e) } - + TClosureExpr convertClosureExprFromRaw(Raw::Element e) { + result = TClosureExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TComment`, if possible. */ - TComment convertCommentFromRaw(Raw::Element e) { result = TComment(e) } - + TComment convertCommentFromRaw(Raw::Element e) { + result = TComment(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConst`, if possible. */ - TConst convertConstFromRaw(Raw::Element e) { result = TConst(e) } - + TConst convertConstFromRaw(Raw::Element e) { + result = TConst(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstArg`, if possible. */ - TConstArg convertConstArgFromRaw(Raw::Element e) { result = TConstArg(e) } - + TConstArg convertConstArgFromRaw(Raw::Element e) { + result = TConstArg(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstBlockPat`, if possible. */ - TConstBlockPat convertConstBlockPatFromRaw(Raw::Element e) { result = TConstBlockPat(e) } - + TConstBlockPat convertConstBlockPatFromRaw(Raw::Element e) { + result = TConstBlockPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstParam`, if possible. */ - TConstParam convertConstParamFromRaw(Raw::Element e) { result = TConstParam(e) } - + TConstParam convertConstParamFromRaw(Raw::Element e) { + result = TConstParam(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TContinueExpr`, if possible. */ - TContinueExpr convertContinueExprFromRaw(Raw::Element e) { result = TContinueExpr(e) } - + TContinueExpr convertContinueExprFromRaw(Raw::Element e) { + result = TContinueExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCrate`, if possible. */ - TCrate convertCrateFromRaw(Raw::Element e) { result = TCrate(e) } - + TCrate convertCrateFromRaw(Raw::Element e) { + result = TCrate(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDerefPat`, if possible. */ - TDerefPat convertDerefPatFromRaw(Raw::Element e) { result = TDerefPat(e) } - + TDerefPat convertDerefPatFromRaw(Raw::Element e) { + result = TDerefPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDocComment`, if possible. */ - TDocComment convertDocCommentFromRaw(Raw::Element e) { result = TDocComment(e) } - + TDocComment convertDocCommentFromRaw(Raw::Element e) { + result = TDocComment(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDynTraitTypeRepr`, if possible. */ - TDynTraitTypeRepr convertDynTraitTypeReprFromRaw(Raw::Element e) { result = TDynTraitTypeRepr(e) } - + TDynTraitTypeRepr convertDynTraitTypeReprFromRaw(Raw::Element e) { + result = TDynTraitTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TEnum`, if possible. */ - TEnum convertEnumFromRaw(Raw::Element e) { result = TEnum(e) } - + TEnum convertEnumFromRaw(Raw::Element e) { + result = TEnum(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExprStmt`, if possible. */ - TExprStmt convertExprStmtFromRaw(Raw::Element e) { result = TExprStmt(e) } - + TExprStmt convertExprStmtFromRaw(Raw::Element e) { + result = TExprStmt(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternBlock`, if possible. */ - TExternBlock convertExternBlockFromRaw(Raw::Element e) { result = TExternBlock(e) } - + TExternBlock convertExternBlockFromRaw(Raw::Element e) { + result = TExternBlock(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternCrate`, if possible. */ - TExternCrate convertExternCrateFromRaw(Raw::Element e) { result = TExternCrate(e) } - + TExternCrate convertExternCrateFromRaw(Raw::Element e) { + result = TExternCrate(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternItemList`, if possible. */ - TExternItemList convertExternItemListFromRaw(Raw::Element e) { result = TExternItemList(e) } - + TExternItemList convertExternItemListFromRaw(Raw::Element e) { + result = TExternItemList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExtractorStep`, if possible. */ - TExtractorStep convertExtractorStepFromRaw(Raw::Element e) { result = TExtractorStep(e) } - + TExtractorStep convertExtractorStepFromRaw(Raw::Element e) { + result = TExtractorStep(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFieldExpr`, if possible. */ - TFieldExpr convertFieldExprFromRaw(Raw::Element e) { result = TFieldExpr(e) } - + TFieldExpr convertFieldExprFromRaw(Raw::Element e) { + result = TFieldExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFnPtrTypeRepr`, if possible. */ - TFnPtrTypeRepr convertFnPtrTypeReprFromRaw(Raw::Element e) { result = TFnPtrTypeRepr(e) } - + TFnPtrTypeRepr convertFnPtrTypeReprFromRaw(Raw::Element e) { + result = TFnPtrTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForBinder`, if possible. */ - TForBinder convertForBinderFromRaw(Raw::Element e) { result = TForBinder(e) } - + TForBinder convertForBinderFromRaw(Raw::Element e) { + result = TForBinder(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForExpr`, if possible. */ - TForExpr convertForExprFromRaw(Raw::Element e) { result = TForExpr(e) } - + TForExpr convertForExprFromRaw(Raw::Element e) { + result = TForExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForTypeRepr`, if possible. */ - TForTypeRepr convertForTypeReprFromRaw(Raw::Element e) { result = TForTypeRepr(e) } - + TForTypeRepr convertForTypeReprFromRaw(Raw::Element e) { + result = TForTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormat`, if possible. */ - TFormat convertFormatFromRaw(Raw::Element e) { none() } - + TFormat convertFormatFromRaw(Raw::Element e) { + none() + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgsArg`, if possible. */ - TFormatArgsArg convertFormatArgsArgFromRaw(Raw::Element e) { result = TFormatArgsArg(e) } - + TFormatArgsArg convertFormatArgsArgFromRaw(Raw::Element e) { + result = TFormatArgsArg(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgsExpr`, if possible. */ - TFormatArgsExpr convertFormatArgsExprFromRaw(Raw::Element e) { result = TFormatArgsExpr(e) } - + TFormatArgsExpr convertFormatArgsExprFromRaw(Raw::Element e) { + result = TFormatArgsExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgument`, if possible. */ - TFormatArgument convertFormatArgumentFromRaw(Raw::Element e) { none() } - + TFormatArgument convertFormatArgumentFromRaw(Raw::Element e) { + none() + } /** * INTERNAL: Do not use. * @@ -1349,56 +1547,62 @@ module Synth { TFormatTemplateVariableAccess convertFormatTemplateVariableAccessFromRaw(Raw::Element e) { none() } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFunction`, if possible. */ - TFunction convertFunctionFromRaw(Raw::Element e) { result = TFunction(e) } - + TFunction convertFunctionFromRaw(Raw::Element e) { + result = TFunction(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TGenericArgList`, if possible. */ - TGenericArgList convertGenericArgListFromRaw(Raw::Element e) { result = TGenericArgList(e) } - + TGenericArgList convertGenericArgListFromRaw(Raw::Element e) { + result = TGenericArgList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TGenericParamList`, if possible. */ - TGenericParamList convertGenericParamListFromRaw(Raw::Element e) { result = TGenericParamList(e) } - + TGenericParamList convertGenericParamListFromRaw(Raw::Element e) { + result = TGenericParamList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIdentPat`, if possible. */ - TIdentPat convertIdentPatFromRaw(Raw::Element e) { result = TIdentPat(e) } - + TIdentPat convertIdentPatFromRaw(Raw::Element e) { + result = TIdentPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIfExpr`, if possible. */ - TIfExpr convertIfExprFromRaw(Raw::Element e) { result = TIfExpr(e) } - + TIfExpr convertIfExprFromRaw(Raw::Element e) { + result = TIfExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TImpl`, if possible. */ - TImpl convertImplFromRaw(Raw::Element e) { result = TImpl(e) } - + TImpl convertImplFromRaw(Raw::Element e) { + result = TImpl(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TImplRestriction`, if possible. */ - TImplRestriction convertImplRestrictionFromRaw(Raw::Element e) { result = TImplRestriction(e) } - + TImplRestriction convertImplRestrictionFromRaw(Raw::Element e) { + result = TImplRestriction(e) + } /** * INTERNAL: Do not use. * @@ -1407,301 +1611,342 @@ module Synth { TImplTraitTypeRepr convertImplTraitTypeReprFromRaw(Raw::Element e) { result = TImplTraitTypeRepr(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIncludeBytesExpr`, if possible. */ - TIncludeBytesExpr convertIncludeBytesExprFromRaw(Raw::Element e) { result = TIncludeBytesExpr(e) } - + TIncludeBytesExpr convertIncludeBytesExprFromRaw(Raw::Element e) { + result = TIncludeBytesExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIndexExpr`, if possible. */ - TIndexExpr convertIndexExprFromRaw(Raw::Element e) { result = TIndexExpr(e) } - + TIndexExpr convertIndexExprFromRaw(Raw::Element e) { + result = TIndexExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TInferTypeRepr`, if possible. */ - TInferTypeRepr convertInferTypeReprFromRaw(Raw::Element e) { result = TInferTypeRepr(e) } - + TInferTypeRepr convertInferTypeReprFromRaw(Raw::Element e) { + result = TInferTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TItemList`, if possible. */ - TItemList convertItemListFromRaw(Raw::Element e) { result = TItemList(e) } - + TItemList convertItemListFromRaw(Raw::Element e) { + result = TItemList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TKeyValueMeta`, if possible. */ - TKeyValueMeta convertKeyValueMetaFromRaw(Raw::Element e) { result = TKeyValueMeta(e) } - + TKeyValueMeta convertKeyValueMetaFromRaw(Raw::Element e) { + result = TKeyValueMeta(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLabel`, if possible. */ - TLabel convertLabelFromRaw(Raw::Element e) { result = TLabel(e) } - + TLabel convertLabelFromRaw(Raw::Element e) { + result = TLabel(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetElse`, if possible. */ - TLetElse convertLetElseFromRaw(Raw::Element e) { result = TLetElse(e) } - + TLetElse convertLetElseFromRaw(Raw::Element e) { + result = TLetElse(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetExpr`, if possible. */ - TLetExpr convertLetExprFromRaw(Raw::Element e) { result = TLetExpr(e) } - + TLetExpr convertLetExprFromRaw(Raw::Element e) { + result = TLetExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetStmt`, if possible. */ - TLetStmt convertLetStmtFromRaw(Raw::Element e) { result = TLetStmt(e) } - + TLetStmt convertLetStmtFromRaw(Raw::Element e) { + result = TLetStmt(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetime`, if possible. */ - TLifetime convertLifetimeFromRaw(Raw::Element e) { result = TLifetime(e) } - + TLifetime convertLifetimeFromRaw(Raw::Element e) { + result = TLifetime(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetimeArg`, if possible. */ - TLifetimeArg convertLifetimeArgFromRaw(Raw::Element e) { result = TLifetimeArg(e) } - + TLifetimeArg convertLifetimeArgFromRaw(Raw::Element e) { + result = TLifetimeArg(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetimeParam`, if possible. */ - TLifetimeParam convertLifetimeParamFromRaw(Raw::Element e) { result = TLifetimeParam(e) } - + TLifetimeParam convertLifetimeParamFromRaw(Raw::Element e) { + result = TLifetimeParam(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLiteralExpr`, if possible. */ - TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { result = TLiteralExpr(e) } - + TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { + result = TLiteralExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLiteralPat`, if possible. */ - TLiteralPat convertLiteralPatFromRaw(Raw::Element e) { result = TLiteralPat(e) } - + TLiteralPat convertLiteralPatFromRaw(Raw::Element e) { + result = TLiteralPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLoopExpr`, if possible. */ - TLoopExpr convertLoopExprFromRaw(Raw::Element e) { result = TLoopExpr(e) } - + TLoopExpr convertLoopExprFromRaw(Raw::Element e) { + result = TLoopExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroCall`, if possible. */ - TMacroCall convertMacroCallFromRaw(Raw::Element e) { result = TMacroCall(e) } - + TMacroCall convertMacroCallFromRaw(Raw::Element e) { + result = TMacroCall(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroDef`, if possible. */ - TMacroDef convertMacroDefFromRaw(Raw::Element e) { result = TMacroDef(e) } - + TMacroDef convertMacroDefFromRaw(Raw::Element e) { + result = TMacroDef(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroExpr`, if possible. */ - TMacroExpr convertMacroExprFromRaw(Raw::Element e) { result = TMacroExpr(e) } - + TMacroExpr convertMacroExprFromRaw(Raw::Element e) { + result = TMacroExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroItems`, if possible. */ - TMacroItems convertMacroItemsFromRaw(Raw::Element e) { result = TMacroItems(e) } - + TMacroItems convertMacroItemsFromRaw(Raw::Element e) { + result = TMacroItems(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroPat`, if possible. */ - TMacroPat convertMacroPatFromRaw(Raw::Element e) { result = TMacroPat(e) } - + TMacroPat convertMacroPatFromRaw(Raw::Element e) { + result = TMacroPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroRules`, if possible. */ - TMacroRules convertMacroRulesFromRaw(Raw::Element e) { result = TMacroRules(e) } - + TMacroRules convertMacroRulesFromRaw(Raw::Element e) { + result = TMacroRules(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroTypeRepr`, if possible. */ - TMacroTypeRepr convertMacroTypeReprFromRaw(Raw::Element e) { result = TMacroTypeRepr(e) } - + TMacroTypeRepr convertMacroTypeReprFromRaw(Raw::Element e) { + result = TMacroTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchArm`, if possible. */ - TMatchArm convertMatchArmFromRaw(Raw::Element e) { result = TMatchArm(e) } - + TMatchArm convertMatchArmFromRaw(Raw::Element e) { + result = TMatchArm(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchArmList`, if possible. */ - TMatchArmList convertMatchArmListFromRaw(Raw::Element e) { result = TMatchArmList(e) } - + TMatchArmList convertMatchArmListFromRaw(Raw::Element e) { + result = TMatchArmList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchExpr`, if possible. */ - TMatchExpr convertMatchExprFromRaw(Raw::Element e) { result = TMatchExpr(e) } - + TMatchExpr convertMatchExprFromRaw(Raw::Element e) { + result = TMatchExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchGuard`, if possible. */ - TMatchGuard convertMatchGuardFromRaw(Raw::Element e) { result = TMatchGuard(e) } - + TMatchGuard convertMatchGuardFromRaw(Raw::Element e) { + result = TMatchGuard(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMethodCallExpr`, if possible. */ - TMethodCallExpr convertMethodCallExprFromRaw(Raw::Element e) { result = TMethodCallExpr(e) } - + TMethodCallExpr convertMethodCallExprFromRaw(Raw::Element e) { + result = TMethodCallExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMissing`, if possible. */ - TMissing convertMissingFromRaw(Raw::Element e) { result = TMissing(e) } - + TMissing convertMissingFromRaw(Raw::Element e) { + result = TMissing(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TModule`, if possible. */ - TModule convertModuleFromRaw(Raw::Element e) { result = TModule(e) } - + TModule convertModuleFromRaw(Raw::Element e) { + result = TModule(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMutRestriction`, if possible. */ - TMutRestriction convertMutRestrictionFromRaw(Raw::Element e) { result = TMutRestriction(e) } - + TMutRestriction convertMutRestrictionFromRaw(Raw::Element e) { + result = TMutRestriction(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TName`, if possible. */ - TName convertNameFromRaw(Raw::Element e) { result = TName(e) } - + TName convertNameFromRaw(Raw::Element e) { + result = TName(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNameRef`, if possible. */ - TNameRef convertNameRefFromRaw(Raw::Element e) { result = TNameRef(e) } - + TNameRef convertNameRefFromRaw(Raw::Element e) { + result = TNameRef(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNamedCrate`, if possible. */ - TNamedCrate convertNamedCrateFromRaw(Raw::Element e) { result = TNamedCrate(e) } - + TNamedCrate convertNamedCrateFromRaw(Raw::Element e) { + result = TNamedCrate(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNeverTypeRepr`, if possible. */ - TNeverTypeRepr convertNeverTypeReprFromRaw(Raw::Element e) { result = TNeverTypeRepr(e) } - + TNeverTypeRepr convertNeverTypeReprFromRaw(Raw::Element e) { + result = TNeverTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNotNull`, if possible. */ - TNotNull convertNotNullFromRaw(Raw::Element e) { result = TNotNull(e) } - + TNotNull convertNotNullFromRaw(Raw::Element e) { + result = TNotNull(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TOffsetOfExpr`, if possible. */ - TOffsetOfExpr convertOffsetOfExprFromRaw(Raw::Element e) { result = TOffsetOfExpr(e) } - + TOffsetOfExpr convertOffsetOfExprFromRaw(Raw::Element e) { + result = TOffsetOfExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TOrPat`, if possible. */ - TOrPat convertOrPatFromRaw(Raw::Element e) { result = TOrPat(e) } - + TOrPat convertOrPatFromRaw(Raw::Element e) { + result = TOrPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParam`, if possible. */ - TParam convertParamFromRaw(Raw::Element e) { result = TParam(e) } - + TParam convertParamFromRaw(Raw::Element e) { + result = TParam(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParamList`, if possible. */ - TParamList convertParamListFromRaw(Raw::Element e) { result = TParamList(e) } - + TParamList convertParamListFromRaw(Raw::Element e) { + result = TParamList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenExpr`, if possible. */ - TParenExpr convertParenExprFromRaw(Raw::Element e) { result = TParenExpr(e) } - + TParenExpr convertParenExprFromRaw(Raw::Element e) { + result = TParenExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenPat`, if possible. */ - TParenPat convertParenPatFromRaw(Raw::Element e) { result = TParenPat(e) } - + TParenPat convertParenPatFromRaw(Raw::Element e) { + result = TParenPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenTypeRepr`, if possible. */ - TParenTypeRepr convertParenTypeReprFromRaw(Raw::Element e) { result = TParenTypeRepr(e) } - + TParenTypeRepr convertParenTypeReprFromRaw(Raw::Element e) { + result = TParenTypeRepr(e) + } /** * INTERNAL: Do not use. * @@ -1710,203 +1955,230 @@ module Synth { TParenthesizedArgList convertParenthesizedArgListFromRaw(Raw::Element e) { result = TParenthesizedArgList(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPath`, if possible. */ - TPath convertPathFromRaw(Raw::Element e) { result = TPath(e) } - + TPath convertPathFromRaw(Raw::Element e) { + result = TPath(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathExpr`, if possible. */ - TPathExpr convertPathExprFromRaw(Raw::Element e) { result = TPathExpr(e) } - + TPathExpr convertPathExprFromRaw(Raw::Element e) { + result = TPathExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathMeta`, if possible. */ - TPathMeta convertPathMetaFromRaw(Raw::Element e) { result = TPathMeta(e) } - + TPathMeta convertPathMetaFromRaw(Raw::Element e) { + result = TPathMeta(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathPat`, if possible. */ - TPathPat convertPathPatFromRaw(Raw::Element e) { result = TPathPat(e) } - + TPathPat convertPathPatFromRaw(Raw::Element e) { + result = TPathPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathSegment`, if possible. */ - TPathSegment convertPathSegmentFromRaw(Raw::Element e) { result = TPathSegment(e) } - + TPathSegment convertPathSegmentFromRaw(Raw::Element e) { + result = TPathSegment(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathTypeRepr`, if possible. */ - TPathTypeRepr convertPathTypeReprFromRaw(Raw::Element e) { result = TPathTypeRepr(e) } - + TPathTypeRepr convertPathTypeReprFromRaw(Raw::Element e) { + result = TPathTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPatternTypeRepr`, if possible. */ - TPatternTypeRepr convertPatternTypeReprFromRaw(Raw::Element e) { result = TPatternTypeRepr(e) } - + TPatternTypeRepr convertPatternTypeReprFromRaw(Raw::Element e) { + result = TPatternTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPrefixExpr`, if possible. */ - TPrefixExpr convertPrefixExprFromRaw(Raw::Element e) { result = TPrefixExpr(e) } - + TPrefixExpr convertPrefixExprFromRaw(Raw::Element e) { + result = TPrefixExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPtrTypeRepr`, if possible. */ - TPtrTypeRepr convertPtrTypeReprFromRaw(Raw::Element e) { result = TPtrTypeRepr(e) } - + TPtrTypeRepr convertPtrTypeReprFromRaw(Raw::Element e) { + result = TPtrTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRangeExpr`, if possible. */ - TRangeExpr convertRangeExprFromRaw(Raw::Element e) { result = TRangeExpr(e) } - + TRangeExpr convertRangeExprFromRaw(Raw::Element e) { + result = TRangeExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRangePat`, if possible. */ - TRangePat convertRangePatFromRaw(Raw::Element e) { result = TRangePat(e) } - + TRangePat convertRangePatFromRaw(Raw::Element e) { + result = TRangePat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefExpr`, if possible. */ - TRefExpr convertRefExprFromRaw(Raw::Element e) { result = TRefExpr(e) } - + TRefExpr convertRefExprFromRaw(Raw::Element e) { + result = TRefExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefPat`, if possible. */ - TRefPat convertRefPatFromRaw(Raw::Element e) { result = TRefPat(e) } - + TRefPat convertRefPatFromRaw(Raw::Element e) { + result = TRefPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefTypeRepr`, if possible. */ - TRefTypeRepr convertRefTypeReprFromRaw(Raw::Element e) { result = TRefTypeRepr(e) } - + TRefTypeRepr convertRefTypeReprFromRaw(Raw::Element e) { + result = TRefTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRename`, if possible. */ - TRename convertRenameFromRaw(Raw::Element e) { result = TRename(e) } - + TRename convertRenameFromRaw(Raw::Element e) { + result = TRename(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRestPat`, if possible. */ - TRestPat convertRestPatFromRaw(Raw::Element e) { result = TRestPat(e) } - + TRestPat convertRestPatFromRaw(Raw::Element e) { + result = TRestPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRetTypeRepr`, if possible. */ - TRetTypeRepr convertRetTypeReprFromRaw(Raw::Element e) { result = TRetTypeRepr(e) } - + TRetTypeRepr convertRetTypeReprFromRaw(Raw::Element e) { + result = TRetTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TReturnExpr`, if possible. */ - TReturnExpr convertReturnExprFromRaw(Raw::Element e) { result = TReturnExpr(e) } - + TReturnExpr convertReturnExprFromRaw(Raw::Element e) { + result = TReturnExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TReturnTypeSyntax`, if possible. */ - TReturnTypeSyntax convertReturnTypeSyntaxFromRaw(Raw::Element e) { result = TReturnTypeSyntax(e) } - + TReturnTypeSyntax convertReturnTypeSyntaxFromRaw(Raw::Element e) { + result = TReturnTypeSyntax(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSelfParam`, if possible. */ - TSelfParam convertSelfParamFromRaw(Raw::Element e) { result = TSelfParam(e) } - + TSelfParam convertSelfParamFromRaw(Raw::Element e) { + result = TSelfParam(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSlicePat`, if possible. */ - TSlicePat convertSlicePatFromRaw(Raw::Element e) { result = TSlicePat(e) } - + TSlicePat convertSlicePatFromRaw(Raw::Element e) { + result = TSlicePat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSliceTypeRepr`, if possible. */ - TSliceTypeRepr convertSliceTypeReprFromRaw(Raw::Element e) { result = TSliceTypeRepr(e) } - + TSliceTypeRepr convertSliceTypeReprFromRaw(Raw::Element e) { + result = TSliceTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSourceFile`, if possible. */ - TSourceFile convertSourceFileFromRaw(Raw::Element e) { result = TSourceFile(e) } - + TSourceFile convertSourceFileFromRaw(Raw::Element e) { + result = TSourceFile(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStatic`, if possible. */ - TStatic convertStaticFromRaw(Raw::Element e) { result = TStatic(e) } - + TStatic convertStaticFromRaw(Raw::Element e) { + result = TStatic(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStmtList`, if possible. */ - TStmtList convertStmtListFromRaw(Raw::Element e) { result = TStmtList(e) } - + TStmtList convertStmtListFromRaw(Raw::Element e) { + result = TStmtList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStruct`, if possible. */ - TStruct convertStructFromRaw(Raw::Element e) { result = TStruct(e) } - + TStruct convertStructFromRaw(Raw::Element e) { + result = TStruct(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructExpr`, if possible. */ - TStructExpr convertStructExprFromRaw(Raw::Element e) { result = TStructExpr(e) } - + TStructExpr convertStructExprFromRaw(Raw::Element e) { + result = TStructExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructExprField`, if possible. */ - TStructExprField convertStructExprFieldFromRaw(Raw::Element e) { result = TStructExprField(e) } - + TStructExprField convertStructExprFieldFromRaw(Raw::Element e) { + result = TStructExprField(e) + } /** * INTERNAL: Do not use. * @@ -1915,35 +2187,38 @@ module Synth { TStructExprFieldList convertStructExprFieldListFromRaw(Raw::Element e) { result = TStructExprFieldList(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructField`, if possible. */ - TStructField convertStructFieldFromRaw(Raw::Element e) { result = TStructField(e) } - + TStructField convertStructFieldFromRaw(Raw::Element e) { + result = TStructField(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructFieldList`, if possible. */ - TStructFieldList convertStructFieldListFromRaw(Raw::Element e) { result = TStructFieldList(e) } - + TStructFieldList convertStructFieldListFromRaw(Raw::Element e) { + result = TStructFieldList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructPat`, if possible. */ - TStructPat convertStructPatFromRaw(Raw::Element e) { result = TStructPat(e) } - + TStructPat convertStructPatFromRaw(Raw::Element e) { + result = TStructPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructPatField`, if possible. */ - TStructPatField convertStructPatFieldFromRaw(Raw::Element e) { result = TStructPatField(e) } - + TStructPatField convertStructPatFieldFromRaw(Raw::Element e) { + result = TStructPatField(e) + } /** * INTERNAL: Do not use. * @@ -1952,154 +2227,174 @@ module Synth { TStructPatFieldList convertStructPatFieldListFromRaw(Raw::Element e) { result = TStructPatFieldList(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTokenTree`, if possible. */ - TTokenTree convertTokenTreeFromRaw(Raw::Element e) { result = TTokenTree(e) } - + TTokenTree convertTokenTreeFromRaw(Raw::Element e) { + result = TTokenTree(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTokenTreeMeta`, if possible. */ - TTokenTreeMeta convertTokenTreeMetaFromRaw(Raw::Element e) { result = TTokenTreeMeta(e) } - + TTokenTreeMeta convertTokenTreeMetaFromRaw(Raw::Element e) { + result = TTokenTreeMeta(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTrait`, if possible. */ - TTrait convertTraitFromRaw(Raw::Element e) { result = TTrait(e) } - + TTrait convertTraitFromRaw(Raw::Element e) { + result = TTrait(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTryBlockModifier`, if possible. */ - TTryBlockModifier convertTryBlockModifierFromRaw(Raw::Element e) { result = TTryBlockModifier(e) } - + TTryBlockModifier convertTryBlockModifierFromRaw(Raw::Element e) { + result = TTryBlockModifier(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTryExpr`, if possible. */ - TTryExpr convertTryExprFromRaw(Raw::Element e) { result = TTryExpr(e) } - + TTryExpr convertTryExprFromRaw(Raw::Element e) { + result = TTryExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleExpr`, if possible. */ - TTupleExpr convertTupleExprFromRaw(Raw::Element e) { result = TTupleExpr(e) } - + TTupleExpr convertTupleExprFromRaw(Raw::Element e) { + result = TTupleExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleField`, if possible. */ - TTupleField convertTupleFieldFromRaw(Raw::Element e) { result = TTupleField(e) } - + TTupleField convertTupleFieldFromRaw(Raw::Element e) { + result = TTupleField(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleFieldList`, if possible. */ - TTupleFieldList convertTupleFieldListFromRaw(Raw::Element e) { result = TTupleFieldList(e) } - + TTupleFieldList convertTupleFieldListFromRaw(Raw::Element e) { + result = TTupleFieldList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTuplePat`, if possible. */ - TTuplePat convertTuplePatFromRaw(Raw::Element e) { result = TTuplePat(e) } - + TTuplePat convertTuplePatFromRaw(Raw::Element e) { + result = TTuplePat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleStructPat`, if possible. */ - TTupleStructPat convertTupleStructPatFromRaw(Raw::Element e) { result = TTupleStructPat(e) } - + TTupleStructPat convertTupleStructPatFromRaw(Raw::Element e) { + result = TTupleStructPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleTypeRepr`, if possible. */ - TTupleTypeRepr convertTupleTypeReprFromRaw(Raw::Element e) { result = TTupleTypeRepr(e) } - + TTupleTypeRepr convertTupleTypeReprFromRaw(Raw::Element e) { + result = TTupleTypeRepr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeAlias`, if possible. */ - TTypeAlias convertTypeAliasFromRaw(Raw::Element e) { result = TTypeAlias(e) } - + TTypeAlias convertTypeAliasFromRaw(Raw::Element e) { + result = TTypeAlias(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeArg`, if possible. */ - TTypeArg convertTypeArgFromRaw(Raw::Element e) { result = TTypeArg(e) } - + TTypeArg convertTypeArgFromRaw(Raw::Element e) { + result = TTypeArg(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeBound`, if possible. */ - TTypeBound convertTypeBoundFromRaw(Raw::Element e) { result = TTypeBound(e) } - + TTypeBound convertTypeBoundFromRaw(Raw::Element e) { + result = TTypeBound(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeBoundList`, if possible. */ - TTypeBoundList convertTypeBoundListFromRaw(Raw::Element e) { result = TTypeBoundList(e) } - + TTypeBoundList convertTypeBoundListFromRaw(Raw::Element e) { + result = TTypeBoundList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeParam`, if possible. */ - TTypeParam convertTypeParamFromRaw(Raw::Element e) { result = TTypeParam(e) } - + TTypeParam convertTypeParamFromRaw(Raw::Element e) { + result = TTypeParam(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnderscoreExpr`, if possible. */ - TUnderscoreExpr convertUnderscoreExprFromRaw(Raw::Element e) { result = TUnderscoreExpr(e) } - + TUnderscoreExpr convertUnderscoreExprFromRaw(Raw::Element e) { + result = TUnderscoreExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnimplemented`, if possible. */ - TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { result = TUnimplemented(e) } - + TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { + result = TUnimplemented(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnion`, if possible. */ - TUnion convertUnionFromRaw(Raw::Element e) { result = TUnion(e) } - + TUnion convertUnionFromRaw(Raw::Element e) { + result = TUnion(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnsafeMeta`, if possible. */ - TUnsafeMeta convertUnsafeMetaFromRaw(Raw::Element e) { result = TUnsafeMeta(e) } - + TUnsafeMeta convertUnsafeMetaFromRaw(Raw::Element e) { + result = TUnsafeMeta(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUse`, if possible. */ - TUse convertUseFromRaw(Raw::Element e) { result = TUse(e) } - + TUse convertUseFromRaw(Raw::Element e) { + result = TUse(e) + } /** * INTERNAL: Do not use. * @@ -2108,90 +2403,102 @@ module Synth { TUseBoundGenericArgs convertUseBoundGenericArgsFromRaw(Raw::Element e) { result = TUseBoundGenericArgs(e) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUseTree`, if possible. */ - TUseTree convertUseTreeFromRaw(Raw::Element e) { result = TUseTree(e) } - + TUseTree convertUseTreeFromRaw(Raw::Element e) { + result = TUseTree(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUseTreeList`, if possible. */ - TUseTreeList convertUseTreeListFromRaw(Raw::Element e) { result = TUseTreeList(e) } - + TUseTreeList convertUseTreeListFromRaw(Raw::Element e) { + result = TUseTreeList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVariant`, if possible. */ - TVariant convertVariantFromRaw(Raw::Element e) { result = TVariant(e) } - + TVariant convertVariantFromRaw(Raw::Element e) { + result = TVariant(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVariantList`, if possible. */ - TVariantList convertVariantListFromRaw(Raw::Element e) { result = TVariantList(e) } - + TVariantList convertVariantListFromRaw(Raw::Element e) { + result = TVariantList(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVisibility`, if possible. */ - TVisibility convertVisibilityFromRaw(Raw::Element e) { result = TVisibility(e) } - + TVisibility convertVisibilityFromRaw(Raw::Element e) { + result = TVisibility(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVisibilityInner`, if possible. */ - TVisibilityInner convertVisibilityInnerFromRaw(Raw::Element e) { result = TVisibilityInner(e) } - + TVisibilityInner convertVisibilityInnerFromRaw(Raw::Element e) { + result = TVisibilityInner(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWhereClause`, if possible. */ - TWhereClause convertWhereClauseFromRaw(Raw::Element e) { result = TWhereClause(e) } - + TWhereClause convertWhereClauseFromRaw(Raw::Element e) { + result = TWhereClause(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWherePred`, if possible. */ - TWherePred convertWherePredFromRaw(Raw::Element e) { result = TWherePred(e) } - + TWherePred convertWherePredFromRaw(Raw::Element e) { + result = TWherePred(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWhileExpr`, if possible. */ - TWhileExpr convertWhileExprFromRaw(Raw::Element e) { result = TWhileExpr(e) } - + TWhileExpr convertWhileExprFromRaw(Raw::Element e) { + result = TWhileExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWildcardPat`, if possible. */ - TWildcardPat convertWildcardPatFromRaw(Raw::Element e) { result = TWildcardPat(e) } - + TWildcardPat convertWildcardPatFromRaw(Raw::Element e) { + result = TWildcardPat(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TYeetExpr`, if possible. */ - TYeetExpr convertYeetExprFromRaw(Raw::Element e) { result = TYeetExpr(e) } - + TYeetExpr convertYeetExprFromRaw(Raw::Element e) { + result = TYeetExpr(e) + } /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TYieldExpr`, if possible. */ - TYieldExpr convertYieldExprFromRaw(Raw::Element e) { result = TYieldExpr(e) } + TYieldExpr convertYieldExprFromRaw(Raw::Element e) { + result = TYieldExpr(e) + } /** * INTERNAL: Do not use. @@ -2202,7 +2509,6 @@ module Synth { or result = convertVariantFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAnyAttr`, if possible. @@ -2212,7 +2518,6 @@ module Synth { or result = convertDocCommentFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TArrayExpr`, if possible. @@ -2222,7 +2527,6 @@ module Synth { or result = convertArrayRepeatExprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAsmOperand`, if possible. @@ -2236,7 +2540,6 @@ module Synth { or result = convertAsmSymFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAsmPiece`, if possible. @@ -2248,7 +2551,6 @@ module Synth { or result = convertAsmOptionsListFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAssocItem`, if possible. @@ -2262,7 +2564,6 @@ module Synth { or result = convertTypeAliasFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAstNode`, if possible. @@ -2402,7 +2703,6 @@ module Synth { or result = convertWherePredFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TCallable`, if possible. @@ -2412,7 +2712,6 @@ module Synth { or result = convertFunctionFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TCfgPredicate`, if possible. @@ -2422,7 +2721,6 @@ module Synth { or result = convertCfgCompositeFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TElement`, if possible. @@ -2436,7 +2734,6 @@ module Synth { or result = convertUnextractedFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TExpr`, if possible. @@ -2460,6 +2757,8 @@ module Synth { or result = convertCastExprFromRaw(e) or + result = convertCfgPredExprFromRaw(e) + or result = convertClosureExprFromRaw(e) or result = convertContinueExprFromRaw(e) @@ -2512,7 +2811,6 @@ module Synth { or result = convertYieldExprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TExternItem`, if possible. @@ -2526,7 +2824,6 @@ module Synth { or result = convertTypeAliasFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TFieldList`, if possible. @@ -2536,7 +2833,6 @@ module Synth { or result = convertTupleFieldListFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TGenericArg`, if possible. @@ -2550,7 +2846,6 @@ module Synth { or result = convertTypeArgFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TGenericParam`, if possible. @@ -2562,7 +2857,6 @@ module Synth { or result = convertTypeParamFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TItem`, if possible. @@ -2592,7 +2886,6 @@ module Synth { or result = convertUseFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLabelableExpr`, if possible. @@ -2602,7 +2895,6 @@ module Synth { or result = convertLoopingExprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLocatable`, if possible. @@ -2616,7 +2908,6 @@ module Synth { or result = convertFormatArgumentFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLoopingExpr`, if possible. @@ -2628,7 +2919,6 @@ module Synth { or result = convertWhileExprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TMeta`, if possible. @@ -2646,7 +2936,6 @@ module Synth { or result = convertUnsafeMetaFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TParamBase`, if possible. @@ -2656,7 +2945,6 @@ module Synth { or result = convertSelfParamFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPat`, if possible. @@ -2664,6 +2952,8 @@ module Synth { TPat convertPatFromRaw(Raw::Element e) { result = convertBoxPatFromRaw(e) or + result = convertCfgPredPatFromRaw(e) + or result = convertConstBlockPatFromRaw(e) or result = convertDerefPatFromRaw(e) @@ -2698,7 +2988,6 @@ module Synth { or result = convertWildcardPatFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPathAstNode`, if possible. @@ -2714,7 +3003,6 @@ module Synth { or result = convertTupleStructPatFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPathExprBase`, if possible. @@ -2724,7 +3012,6 @@ module Synth { or result = convertPathExprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TStmt`, if possible. @@ -2736,13 +3023,13 @@ module Synth { or result = convertLetStmtFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TToken`, if possible. */ - TToken convertTokenFromRaw(Raw::Element e) { result = convertCommentFromRaw(e) } - + TToken convertTokenFromRaw(Raw::Element e) { + result = convertCommentFromRaw(e) + } /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TTypeItem`, if possible. @@ -2754,7 +3041,6 @@ module Synth { or result = convertUnionFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TTypeRepr`, if possible. @@ -2790,7 +3076,6 @@ module Synth { or result = convertTupleTypeReprFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TUnextracted`, if possible. @@ -2800,7 +3085,6 @@ module Synth { or result = convertUnimplementedFromRaw(e) } - /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TUseBoundGenericArg`, if possible. @@ -2815,14 +3099,16 @@ module Synth { * INTERNAL: Do not use. * Converts a synthesized `TAbi` to a raw DB element, if possible. */ - Raw::Element convertAbiToRaw(TAbi e) { e = TAbi(result) } - + Raw::Element convertAbiToRaw(TAbi e) { + e = TAbi(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TArgList` to a raw DB element, if possible. */ - Raw::Element convertArgListToRaw(TArgList e) { e = TArgList(result) } - + Raw::Element convertArgListToRaw(TArgList e) { + e = TArgList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TArrayExprInternal` to a raw DB element, if possible. @@ -2830,391 +3116,468 @@ module Synth { Raw::Element convertArrayExprInternalToRaw(TArrayExprInternal e) { e = TArrayExprInternal(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TArrayListExpr` to a raw DB element, if possible. */ - Raw::Element convertArrayListExprToRaw(TArrayListExpr e) { e = TArrayListExpr(result) } - + Raw::Element convertArrayListExprToRaw(TArrayListExpr e) { + e = TArrayListExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TArrayRepeatExpr` to a raw DB element, if possible. */ - Raw::Element convertArrayRepeatExprToRaw(TArrayRepeatExpr e) { e = TArrayRepeatExpr(result) } - + Raw::Element convertArrayRepeatExprToRaw(TArrayRepeatExpr e) { + e = TArrayRepeatExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TArrayTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertArrayTypeReprToRaw(TArrayTypeRepr e) { e = TArrayTypeRepr(result) } - + Raw::Element convertArrayTypeReprToRaw(TArrayTypeRepr e) { + e = TArrayTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmClobberAbi` to a raw DB element, if possible. */ - Raw::Element convertAsmClobberAbiToRaw(TAsmClobberAbi e) { e = TAsmClobberAbi(result) } - + Raw::Element convertAsmClobberAbiToRaw(TAsmClobberAbi e) { + e = TAsmClobberAbi(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmConst` to a raw DB element, if possible. */ - Raw::Element convertAsmConstToRaw(TAsmConst e) { e = TAsmConst(result) } - + Raw::Element convertAsmConstToRaw(TAsmConst e) { + e = TAsmConst(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmDirSpec` to a raw DB element, if possible. */ - Raw::Element convertAsmDirSpecToRaw(TAsmDirSpec e) { e = TAsmDirSpec(result) } - + Raw::Element convertAsmDirSpecToRaw(TAsmDirSpec e) { + e = TAsmDirSpec(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmExpr` to a raw DB element, if possible. */ - Raw::Element convertAsmExprToRaw(TAsmExpr e) { e = TAsmExpr(result) } - + Raw::Element convertAsmExprToRaw(TAsmExpr e) { + e = TAsmExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmLabel` to a raw DB element, if possible. */ - Raw::Element convertAsmLabelToRaw(TAsmLabel e) { e = TAsmLabel(result) } - + Raw::Element convertAsmLabelToRaw(TAsmLabel e) { + e = TAsmLabel(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperandExpr` to a raw DB element, if possible. */ - Raw::Element convertAsmOperandExprToRaw(TAsmOperandExpr e) { e = TAsmOperandExpr(result) } - + Raw::Element convertAsmOperandExprToRaw(TAsmOperandExpr e) { + e = TAsmOperandExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperandNamed` to a raw DB element, if possible. */ - Raw::Element convertAsmOperandNamedToRaw(TAsmOperandNamed e) { e = TAsmOperandNamed(result) } - + Raw::Element convertAsmOperandNamedToRaw(TAsmOperandNamed e) { + e = TAsmOperandNamed(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOption` to a raw DB element, if possible. */ - Raw::Element convertAsmOptionToRaw(TAsmOption e) { e = TAsmOption(result) } - + Raw::Element convertAsmOptionToRaw(TAsmOption e) { + e = TAsmOption(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOptionsList` to a raw DB element, if possible. */ - Raw::Element convertAsmOptionsListToRaw(TAsmOptionsList e) { e = TAsmOptionsList(result) } - + Raw::Element convertAsmOptionsListToRaw(TAsmOptionsList e) { + e = TAsmOptionsList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmRegOperand` to a raw DB element, if possible. */ - Raw::Element convertAsmRegOperandToRaw(TAsmRegOperand e) { e = TAsmRegOperand(result) } - + Raw::Element convertAsmRegOperandToRaw(TAsmRegOperand e) { + e = TAsmRegOperand(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmRegSpec` to a raw DB element, if possible. */ - Raw::Element convertAsmRegSpecToRaw(TAsmRegSpec e) { e = TAsmRegSpec(result) } - + Raw::Element convertAsmRegSpecToRaw(TAsmRegSpec e) { + e = TAsmRegSpec(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAsmSym` to a raw DB element, if possible. */ - Raw::Element convertAsmSymToRaw(TAsmSym e) { e = TAsmSym(result) } - + Raw::Element convertAsmSymToRaw(TAsmSym e) { + e = TAsmSym(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAssocItemList` to a raw DB element, if possible. */ - Raw::Element convertAssocItemListToRaw(TAssocItemList e) { e = TAssocItemList(result) } - + Raw::Element convertAssocItemListToRaw(TAssocItemList e) { + e = TAssocItemList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAssocTypeArg` to a raw DB element, if possible. */ - Raw::Element convertAssocTypeArgToRaw(TAssocTypeArg e) { e = TAssocTypeArg(result) } - + Raw::Element convertAssocTypeArgToRaw(TAssocTypeArg e) { + e = TAssocTypeArg(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAttr` to a raw DB element, if possible. */ - Raw::Element convertAttrToRaw(TAttr e) { e = TAttr(result) } - + Raw::Element convertAttrToRaw(TAttr e) { + e = TAttr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TAwaitExpr` to a raw DB element, if possible. */ - Raw::Element convertAwaitExprToRaw(TAwaitExpr e) { e = TAwaitExpr(result) } - + Raw::Element convertAwaitExprToRaw(TAwaitExpr e) { + e = TAwaitExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TBecomeExpr` to a raw DB element, if possible. */ - Raw::Element convertBecomeExprToRaw(TBecomeExpr e) { e = TBecomeExpr(result) } - + Raw::Element convertBecomeExprToRaw(TBecomeExpr e) { + e = TBecomeExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TBinaryExpr` to a raw DB element, if possible. */ - Raw::Element convertBinaryExprToRaw(TBinaryExpr e) { e = TBinaryExpr(result) } - + Raw::Element convertBinaryExprToRaw(TBinaryExpr e) { + e = TBinaryExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TBlockExpr` to a raw DB element, if possible. */ - Raw::Element convertBlockExprToRaw(TBlockExpr e) { e = TBlockExpr(result) } - + Raw::Element convertBlockExprToRaw(TBlockExpr e) { + e = TBlockExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TBoxPat` to a raw DB element, if possible. */ - Raw::Element convertBoxPatToRaw(TBoxPat e) { e = TBoxPat(result) } - + Raw::Element convertBoxPatToRaw(TBoxPat e) { + e = TBoxPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TBreakExpr` to a raw DB element, if possible. */ - Raw::Element convertBreakExprToRaw(TBreakExpr e) { e = TBreakExpr(result) } - + Raw::Element convertBreakExprToRaw(TBreakExpr e) { + e = TBreakExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCallExpr` to a raw DB element, if possible. */ - Raw::Element convertCallExprToRaw(TCallExpr e) { e = TCallExpr(result) } - + Raw::Element convertCallExprToRaw(TCallExpr e) { + e = TCallExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCastExpr` to a raw DB element, if possible. */ - Raw::Element convertCastExprToRaw(TCastExpr e) { e = TCastExpr(result) } - + Raw::Element convertCastExprToRaw(TCastExpr e) { + e = TCastExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCfgAtom` to a raw DB element, if possible. */ - Raw::Element convertCfgAtomToRaw(TCfgAtom e) { e = TCfgAtom(result) } - + Raw::Element convertCfgAtomToRaw(TCfgAtom e) { + e = TCfgAtom(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCfgAttrMeta` to a raw DB element, if possible. */ - Raw::Element convertCfgAttrMetaToRaw(TCfgAttrMeta e) { e = TCfgAttrMeta(result) } - + Raw::Element convertCfgAttrMetaToRaw(TCfgAttrMeta e) { + e = TCfgAttrMeta(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCfgComposite` to a raw DB element, if possible. */ - Raw::Element convertCfgCompositeToRaw(TCfgComposite e) { e = TCfgComposite(result) } - + Raw::Element convertCfgCompositeToRaw(TCfgComposite e) { + e = TCfgComposite(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCfgMeta` to a raw DB element, if possible. */ - Raw::Element convertCfgMetaToRaw(TCfgMeta e) { e = TCfgMeta(result) } - + Raw::Element convertCfgMetaToRaw(TCfgMeta e) { + e = TCfgMeta(result) + } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TCfgPredExpr` to a raw DB element, if possible. + */ + Raw::Element convertCfgPredExprToRaw(TCfgPredExpr e) { + e = TCfgPredExpr(result) + } + /** + * INTERNAL: Do not use. + * Converts a synthesized `TCfgPredPat` to a raw DB element, if possible. + */ + Raw::Element convertCfgPredPatToRaw(TCfgPredPat e) { + e = TCfgPredPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TClosureExpr` to a raw DB element, if possible. */ - Raw::Element convertClosureExprToRaw(TClosureExpr e) { e = TClosureExpr(result) } - + Raw::Element convertClosureExprToRaw(TClosureExpr e) { + e = TClosureExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TComment` to a raw DB element, if possible. */ - Raw::Element convertCommentToRaw(TComment e) { e = TComment(result) } - + Raw::Element convertCommentToRaw(TComment e) { + e = TComment(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TConst` to a raw DB element, if possible. */ - Raw::Element convertConstToRaw(TConst e) { e = TConst(result) } - + Raw::Element convertConstToRaw(TConst e) { + e = TConst(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TConstArg` to a raw DB element, if possible. */ - Raw::Element convertConstArgToRaw(TConstArg e) { e = TConstArg(result) } - + Raw::Element convertConstArgToRaw(TConstArg e) { + e = TConstArg(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TConstBlockPat` to a raw DB element, if possible. */ - Raw::Element convertConstBlockPatToRaw(TConstBlockPat e) { e = TConstBlockPat(result) } - + Raw::Element convertConstBlockPatToRaw(TConstBlockPat e) { + e = TConstBlockPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TConstParam` to a raw DB element, if possible. */ - Raw::Element convertConstParamToRaw(TConstParam e) { e = TConstParam(result) } - + Raw::Element convertConstParamToRaw(TConstParam e) { + e = TConstParam(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TContinueExpr` to a raw DB element, if possible. */ - Raw::Element convertContinueExprToRaw(TContinueExpr e) { e = TContinueExpr(result) } - + Raw::Element convertContinueExprToRaw(TContinueExpr e) { + e = TContinueExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TCrate` to a raw DB element, if possible. */ - Raw::Element convertCrateToRaw(TCrate e) { e = TCrate(result) } - + Raw::Element convertCrateToRaw(TCrate e) { + e = TCrate(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TDerefPat` to a raw DB element, if possible. */ - Raw::Element convertDerefPatToRaw(TDerefPat e) { e = TDerefPat(result) } - + Raw::Element convertDerefPatToRaw(TDerefPat e) { + e = TDerefPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TDocComment` to a raw DB element, if possible. */ - Raw::Element convertDocCommentToRaw(TDocComment e) { e = TDocComment(result) } - + Raw::Element convertDocCommentToRaw(TDocComment e) { + e = TDocComment(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TDynTraitTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertDynTraitTypeReprToRaw(TDynTraitTypeRepr e) { e = TDynTraitTypeRepr(result) } - + Raw::Element convertDynTraitTypeReprToRaw(TDynTraitTypeRepr e) { + e = TDynTraitTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TEnum` to a raw DB element, if possible. */ - Raw::Element convertEnumToRaw(TEnum e) { e = TEnum(result) } - + Raw::Element convertEnumToRaw(TEnum e) { + e = TEnum(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TExprStmt` to a raw DB element, if possible. */ - Raw::Element convertExprStmtToRaw(TExprStmt e) { e = TExprStmt(result) } - + Raw::Element convertExprStmtToRaw(TExprStmt e) { + e = TExprStmt(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TExternBlock` to a raw DB element, if possible. */ - Raw::Element convertExternBlockToRaw(TExternBlock e) { e = TExternBlock(result) } - + Raw::Element convertExternBlockToRaw(TExternBlock e) { + e = TExternBlock(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TExternCrate` to a raw DB element, if possible. */ - Raw::Element convertExternCrateToRaw(TExternCrate e) { e = TExternCrate(result) } - + Raw::Element convertExternCrateToRaw(TExternCrate e) { + e = TExternCrate(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TExternItemList` to a raw DB element, if possible. */ - Raw::Element convertExternItemListToRaw(TExternItemList e) { e = TExternItemList(result) } - + Raw::Element convertExternItemListToRaw(TExternItemList e) { + e = TExternItemList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TExtractorStep` to a raw DB element, if possible. */ - Raw::Element convertExtractorStepToRaw(TExtractorStep e) { e = TExtractorStep(result) } - + Raw::Element convertExtractorStepToRaw(TExtractorStep e) { + e = TExtractorStep(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TFieldExpr` to a raw DB element, if possible. */ - Raw::Element convertFieldExprToRaw(TFieldExpr e) { e = TFieldExpr(result) } - + Raw::Element convertFieldExprToRaw(TFieldExpr e) { + e = TFieldExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TFnPtrTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertFnPtrTypeReprToRaw(TFnPtrTypeRepr e) { e = TFnPtrTypeRepr(result) } - + Raw::Element convertFnPtrTypeReprToRaw(TFnPtrTypeRepr e) { + e = TFnPtrTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TForBinder` to a raw DB element, if possible. */ - Raw::Element convertForBinderToRaw(TForBinder e) { e = TForBinder(result) } - + Raw::Element convertForBinderToRaw(TForBinder e) { + e = TForBinder(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TForExpr` to a raw DB element, if possible. */ - Raw::Element convertForExprToRaw(TForExpr e) { e = TForExpr(result) } - + Raw::Element convertForExprToRaw(TForExpr e) { + e = TForExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TForTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertForTypeReprToRaw(TForTypeRepr e) { e = TForTypeRepr(result) } - + Raw::Element convertForTypeReprToRaw(TForTypeRepr e) { + e = TForTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TFormat` to a raw DB element, if possible. */ - Raw::Element convertFormatToRaw(TFormat e) { none() } - + Raw::Element convertFormatToRaw(TFormat e) { + none() + } /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgsArg` to a raw DB element, if possible. */ - Raw::Element convertFormatArgsArgToRaw(TFormatArgsArg e) { e = TFormatArgsArg(result) } - + Raw::Element convertFormatArgsArgToRaw(TFormatArgsArg e) { + e = TFormatArgsArg(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgsExpr` to a raw DB element, if possible. */ - Raw::Element convertFormatArgsExprToRaw(TFormatArgsExpr e) { e = TFormatArgsExpr(result) } - + Raw::Element convertFormatArgsExprToRaw(TFormatArgsExpr e) { + e = TFormatArgsExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgument` to a raw DB element, if possible. */ - Raw::Element convertFormatArgumentToRaw(TFormatArgument e) { none() } - + Raw::Element convertFormatArgumentToRaw(TFormatArgument e) { + none() + } /** * INTERNAL: Do not use. * Converts a synthesized `TFormatTemplateVariableAccess` to a raw DB element, if possible. */ - Raw::Element convertFormatTemplateVariableAccessToRaw(TFormatTemplateVariableAccess e) { none() } - + Raw::Element convertFormatTemplateVariableAccessToRaw(TFormatTemplateVariableAccess e) { + none() + } /** * INTERNAL: Do not use. * Converts a synthesized `TFunction` to a raw DB element, if possible. */ - Raw::Element convertFunctionToRaw(TFunction e) { e = TFunction(result) } - + Raw::Element convertFunctionToRaw(TFunction e) { + e = TFunction(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TGenericArgList` to a raw DB element, if possible. */ - Raw::Element convertGenericArgListToRaw(TGenericArgList e) { e = TGenericArgList(result) } - + Raw::Element convertGenericArgListToRaw(TGenericArgList e) { + e = TGenericArgList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TGenericParamList` to a raw DB element, if possible. */ - Raw::Element convertGenericParamListToRaw(TGenericParamList e) { e = TGenericParamList(result) } - + Raw::Element convertGenericParamListToRaw(TGenericParamList e) { + e = TGenericParamList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TIdentPat` to a raw DB element, if possible. */ - Raw::Element convertIdentPatToRaw(TIdentPat e) { e = TIdentPat(result) } - + Raw::Element convertIdentPatToRaw(TIdentPat e) { + e = TIdentPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TIfExpr` to a raw DB element, if possible. */ - Raw::Element convertIfExprToRaw(TIfExpr e) { e = TIfExpr(result) } - + Raw::Element convertIfExprToRaw(TIfExpr e) { + e = TIfExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TImpl` to a raw DB element, if possible. */ - Raw::Element convertImplToRaw(TImpl e) { e = TImpl(result) } - + Raw::Element convertImplToRaw(TImpl e) { + e = TImpl(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TImplRestriction` to a raw DB element, if possible. */ - Raw::Element convertImplRestrictionToRaw(TImplRestriction e) { e = TImplRestriction(result) } - + Raw::Element convertImplRestrictionToRaw(TImplRestriction e) { + e = TImplRestriction(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TImplTraitTypeRepr` to a raw DB element, if possible. @@ -3222,259 +3585,300 @@ module Synth { Raw::Element convertImplTraitTypeReprToRaw(TImplTraitTypeRepr e) { e = TImplTraitTypeRepr(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TIncludeBytesExpr` to a raw DB element, if possible. */ - Raw::Element convertIncludeBytesExprToRaw(TIncludeBytesExpr e) { e = TIncludeBytesExpr(result) } - + Raw::Element convertIncludeBytesExprToRaw(TIncludeBytesExpr e) { + e = TIncludeBytesExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TIndexExpr` to a raw DB element, if possible. */ - Raw::Element convertIndexExprToRaw(TIndexExpr e) { e = TIndexExpr(result) } - + Raw::Element convertIndexExprToRaw(TIndexExpr e) { + e = TIndexExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TInferTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertInferTypeReprToRaw(TInferTypeRepr e) { e = TInferTypeRepr(result) } - + Raw::Element convertInferTypeReprToRaw(TInferTypeRepr e) { + e = TInferTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TItemList` to a raw DB element, if possible. */ - Raw::Element convertItemListToRaw(TItemList e) { e = TItemList(result) } - + Raw::Element convertItemListToRaw(TItemList e) { + e = TItemList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TKeyValueMeta` to a raw DB element, if possible. */ - Raw::Element convertKeyValueMetaToRaw(TKeyValueMeta e) { e = TKeyValueMeta(result) } - + Raw::Element convertKeyValueMetaToRaw(TKeyValueMeta e) { + e = TKeyValueMeta(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLabel` to a raw DB element, if possible. */ - Raw::Element convertLabelToRaw(TLabel e) { e = TLabel(result) } - + Raw::Element convertLabelToRaw(TLabel e) { + e = TLabel(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLetElse` to a raw DB element, if possible. */ - Raw::Element convertLetElseToRaw(TLetElse e) { e = TLetElse(result) } - + Raw::Element convertLetElseToRaw(TLetElse e) { + e = TLetElse(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLetExpr` to a raw DB element, if possible. */ - Raw::Element convertLetExprToRaw(TLetExpr e) { e = TLetExpr(result) } - + Raw::Element convertLetExprToRaw(TLetExpr e) { + e = TLetExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLetStmt` to a raw DB element, if possible. */ - Raw::Element convertLetStmtToRaw(TLetStmt e) { e = TLetStmt(result) } - + Raw::Element convertLetStmtToRaw(TLetStmt e) { + e = TLetStmt(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLifetime` to a raw DB element, if possible. */ - Raw::Element convertLifetimeToRaw(TLifetime e) { e = TLifetime(result) } - + Raw::Element convertLifetimeToRaw(TLifetime e) { + e = TLifetime(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLifetimeArg` to a raw DB element, if possible. */ - Raw::Element convertLifetimeArgToRaw(TLifetimeArg e) { e = TLifetimeArg(result) } - + Raw::Element convertLifetimeArgToRaw(TLifetimeArg e) { + e = TLifetimeArg(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLifetimeParam` to a raw DB element, if possible. */ - Raw::Element convertLifetimeParamToRaw(TLifetimeParam e) { e = TLifetimeParam(result) } - + Raw::Element convertLifetimeParamToRaw(TLifetimeParam e) { + e = TLifetimeParam(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLiteralExpr` to a raw DB element, if possible. */ - Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { e = TLiteralExpr(result) } - + Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { + e = TLiteralExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLiteralPat` to a raw DB element, if possible. */ - Raw::Element convertLiteralPatToRaw(TLiteralPat e) { e = TLiteralPat(result) } - + Raw::Element convertLiteralPatToRaw(TLiteralPat e) { + e = TLiteralPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TLoopExpr` to a raw DB element, if possible. */ - Raw::Element convertLoopExprToRaw(TLoopExpr e) { e = TLoopExpr(result) } - + Raw::Element convertLoopExprToRaw(TLoopExpr e) { + e = TLoopExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroCall` to a raw DB element, if possible. */ - Raw::Element convertMacroCallToRaw(TMacroCall e) { e = TMacroCall(result) } - + Raw::Element convertMacroCallToRaw(TMacroCall e) { + e = TMacroCall(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroDef` to a raw DB element, if possible. */ - Raw::Element convertMacroDefToRaw(TMacroDef e) { e = TMacroDef(result) } - + Raw::Element convertMacroDefToRaw(TMacroDef e) { + e = TMacroDef(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroExpr` to a raw DB element, if possible. */ - Raw::Element convertMacroExprToRaw(TMacroExpr e) { e = TMacroExpr(result) } - + Raw::Element convertMacroExprToRaw(TMacroExpr e) { + e = TMacroExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroItems` to a raw DB element, if possible. */ - Raw::Element convertMacroItemsToRaw(TMacroItems e) { e = TMacroItems(result) } - + Raw::Element convertMacroItemsToRaw(TMacroItems e) { + e = TMacroItems(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroPat` to a raw DB element, if possible. */ - Raw::Element convertMacroPatToRaw(TMacroPat e) { e = TMacroPat(result) } - + Raw::Element convertMacroPatToRaw(TMacroPat e) { + e = TMacroPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroRules` to a raw DB element, if possible. */ - Raw::Element convertMacroRulesToRaw(TMacroRules e) { e = TMacroRules(result) } - + Raw::Element convertMacroRulesToRaw(TMacroRules e) { + e = TMacroRules(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMacroTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertMacroTypeReprToRaw(TMacroTypeRepr e) { e = TMacroTypeRepr(result) } - + Raw::Element convertMacroTypeReprToRaw(TMacroTypeRepr e) { + e = TMacroTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMatchArm` to a raw DB element, if possible. */ - Raw::Element convertMatchArmToRaw(TMatchArm e) { e = TMatchArm(result) } - + Raw::Element convertMatchArmToRaw(TMatchArm e) { + e = TMatchArm(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMatchArmList` to a raw DB element, if possible. */ - Raw::Element convertMatchArmListToRaw(TMatchArmList e) { e = TMatchArmList(result) } - + Raw::Element convertMatchArmListToRaw(TMatchArmList e) { + e = TMatchArmList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMatchExpr` to a raw DB element, if possible. */ - Raw::Element convertMatchExprToRaw(TMatchExpr e) { e = TMatchExpr(result) } - + Raw::Element convertMatchExprToRaw(TMatchExpr e) { + e = TMatchExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMatchGuard` to a raw DB element, if possible. */ - Raw::Element convertMatchGuardToRaw(TMatchGuard e) { e = TMatchGuard(result) } - + Raw::Element convertMatchGuardToRaw(TMatchGuard e) { + e = TMatchGuard(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMethodCallExpr` to a raw DB element, if possible. */ - Raw::Element convertMethodCallExprToRaw(TMethodCallExpr e) { e = TMethodCallExpr(result) } - + Raw::Element convertMethodCallExprToRaw(TMethodCallExpr e) { + e = TMethodCallExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMissing` to a raw DB element, if possible. */ - Raw::Element convertMissingToRaw(TMissing e) { e = TMissing(result) } - + Raw::Element convertMissingToRaw(TMissing e) { + e = TMissing(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TModule` to a raw DB element, if possible. */ - Raw::Element convertModuleToRaw(TModule e) { e = TModule(result) } - + Raw::Element convertModuleToRaw(TModule e) { + e = TModule(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TMutRestriction` to a raw DB element, if possible. */ - Raw::Element convertMutRestrictionToRaw(TMutRestriction e) { e = TMutRestriction(result) } - + Raw::Element convertMutRestrictionToRaw(TMutRestriction e) { + e = TMutRestriction(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TName` to a raw DB element, if possible. */ - Raw::Element convertNameToRaw(TName e) { e = TName(result) } - + Raw::Element convertNameToRaw(TName e) { + e = TName(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TNameRef` to a raw DB element, if possible. */ - Raw::Element convertNameRefToRaw(TNameRef e) { e = TNameRef(result) } - + Raw::Element convertNameRefToRaw(TNameRef e) { + e = TNameRef(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TNamedCrate` to a raw DB element, if possible. */ - Raw::Element convertNamedCrateToRaw(TNamedCrate e) { e = TNamedCrate(result) } - + Raw::Element convertNamedCrateToRaw(TNamedCrate e) { + e = TNamedCrate(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TNeverTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertNeverTypeReprToRaw(TNeverTypeRepr e) { e = TNeverTypeRepr(result) } - + Raw::Element convertNeverTypeReprToRaw(TNeverTypeRepr e) { + e = TNeverTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TNotNull` to a raw DB element, if possible. */ - Raw::Element convertNotNullToRaw(TNotNull e) { e = TNotNull(result) } - + Raw::Element convertNotNullToRaw(TNotNull e) { + e = TNotNull(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TOffsetOfExpr` to a raw DB element, if possible. */ - Raw::Element convertOffsetOfExprToRaw(TOffsetOfExpr e) { e = TOffsetOfExpr(result) } - + Raw::Element convertOffsetOfExprToRaw(TOffsetOfExpr e) { + e = TOffsetOfExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TOrPat` to a raw DB element, if possible. */ - Raw::Element convertOrPatToRaw(TOrPat e) { e = TOrPat(result) } - + Raw::Element convertOrPatToRaw(TOrPat e) { + e = TOrPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParam` to a raw DB element, if possible. */ - Raw::Element convertParamToRaw(TParam e) { e = TParam(result) } - + Raw::Element convertParamToRaw(TParam e) { + e = TParam(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParamList` to a raw DB element, if possible. */ - Raw::Element convertParamListToRaw(TParamList e) { e = TParamList(result) } - + Raw::Element convertParamListToRaw(TParamList e) { + e = TParamList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParenExpr` to a raw DB element, if possible. */ - Raw::Element convertParenExprToRaw(TParenExpr e) { e = TParenExpr(result) } - + Raw::Element convertParenExprToRaw(TParenExpr e) { + e = TParenExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParenPat` to a raw DB element, if possible. */ - Raw::Element convertParenPatToRaw(TParenPat e) { e = TParenPat(result) } - + Raw::Element convertParenPatToRaw(TParenPat e) { + e = TParenPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParenTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertParenTypeReprToRaw(TParenTypeRepr e) { e = TParenTypeRepr(result) } - + Raw::Element convertParenTypeReprToRaw(TParenTypeRepr e) { + e = TParenTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TParenthesizedArgList` to a raw DB element, if possible. @@ -3482,175 +3886,202 @@ module Synth { Raw::Element convertParenthesizedArgListToRaw(TParenthesizedArgList e) { e = TParenthesizedArgList(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TPath` to a raw DB element, if possible. */ - Raw::Element convertPathToRaw(TPath e) { e = TPath(result) } - + Raw::Element convertPathToRaw(TPath e) { + e = TPath(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPathExpr` to a raw DB element, if possible. */ - Raw::Element convertPathExprToRaw(TPathExpr e) { e = TPathExpr(result) } - + Raw::Element convertPathExprToRaw(TPathExpr e) { + e = TPathExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPathMeta` to a raw DB element, if possible. */ - Raw::Element convertPathMetaToRaw(TPathMeta e) { e = TPathMeta(result) } - + Raw::Element convertPathMetaToRaw(TPathMeta e) { + e = TPathMeta(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPathPat` to a raw DB element, if possible. */ - Raw::Element convertPathPatToRaw(TPathPat e) { e = TPathPat(result) } - + Raw::Element convertPathPatToRaw(TPathPat e) { + e = TPathPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPathSegment` to a raw DB element, if possible. */ - Raw::Element convertPathSegmentToRaw(TPathSegment e) { e = TPathSegment(result) } - + Raw::Element convertPathSegmentToRaw(TPathSegment e) { + e = TPathSegment(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPathTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPathTypeReprToRaw(TPathTypeRepr e) { e = TPathTypeRepr(result) } - + Raw::Element convertPathTypeReprToRaw(TPathTypeRepr e) { + e = TPathTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPatternTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPatternTypeReprToRaw(TPatternTypeRepr e) { e = TPatternTypeRepr(result) } - + Raw::Element convertPatternTypeReprToRaw(TPatternTypeRepr e) { + e = TPatternTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPrefixExpr` to a raw DB element, if possible. */ - Raw::Element convertPrefixExprToRaw(TPrefixExpr e) { e = TPrefixExpr(result) } - + Raw::Element convertPrefixExprToRaw(TPrefixExpr e) { + e = TPrefixExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TPtrTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPtrTypeReprToRaw(TPtrTypeRepr e) { e = TPtrTypeRepr(result) } - + Raw::Element convertPtrTypeReprToRaw(TPtrTypeRepr e) { + e = TPtrTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRangeExpr` to a raw DB element, if possible. */ - Raw::Element convertRangeExprToRaw(TRangeExpr e) { e = TRangeExpr(result) } - + Raw::Element convertRangeExprToRaw(TRangeExpr e) { + e = TRangeExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRangePat` to a raw DB element, if possible. */ - Raw::Element convertRangePatToRaw(TRangePat e) { e = TRangePat(result) } - + Raw::Element convertRangePatToRaw(TRangePat e) { + e = TRangePat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRefExpr` to a raw DB element, if possible. */ - Raw::Element convertRefExprToRaw(TRefExpr e) { e = TRefExpr(result) } - + Raw::Element convertRefExprToRaw(TRefExpr e) { + e = TRefExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRefPat` to a raw DB element, if possible. */ - Raw::Element convertRefPatToRaw(TRefPat e) { e = TRefPat(result) } - + Raw::Element convertRefPatToRaw(TRefPat e) { + e = TRefPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRefTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertRefTypeReprToRaw(TRefTypeRepr e) { e = TRefTypeRepr(result) } - + Raw::Element convertRefTypeReprToRaw(TRefTypeRepr e) { + e = TRefTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRename` to a raw DB element, if possible. */ - Raw::Element convertRenameToRaw(TRename e) { e = TRename(result) } - + Raw::Element convertRenameToRaw(TRename e) { + e = TRename(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRestPat` to a raw DB element, if possible. */ - Raw::Element convertRestPatToRaw(TRestPat e) { e = TRestPat(result) } - + Raw::Element convertRestPatToRaw(TRestPat e) { + e = TRestPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TRetTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertRetTypeReprToRaw(TRetTypeRepr e) { e = TRetTypeRepr(result) } - + Raw::Element convertRetTypeReprToRaw(TRetTypeRepr e) { + e = TRetTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TReturnExpr` to a raw DB element, if possible. */ - Raw::Element convertReturnExprToRaw(TReturnExpr e) { e = TReturnExpr(result) } - + Raw::Element convertReturnExprToRaw(TReturnExpr e) { + e = TReturnExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TReturnTypeSyntax` to a raw DB element, if possible. */ - Raw::Element convertReturnTypeSyntaxToRaw(TReturnTypeSyntax e) { e = TReturnTypeSyntax(result) } - + Raw::Element convertReturnTypeSyntaxToRaw(TReturnTypeSyntax e) { + e = TReturnTypeSyntax(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TSelfParam` to a raw DB element, if possible. */ - Raw::Element convertSelfParamToRaw(TSelfParam e) { e = TSelfParam(result) } - + Raw::Element convertSelfParamToRaw(TSelfParam e) { + e = TSelfParam(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TSlicePat` to a raw DB element, if possible. */ - Raw::Element convertSlicePatToRaw(TSlicePat e) { e = TSlicePat(result) } - + Raw::Element convertSlicePatToRaw(TSlicePat e) { + e = TSlicePat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TSliceTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertSliceTypeReprToRaw(TSliceTypeRepr e) { e = TSliceTypeRepr(result) } - + Raw::Element convertSliceTypeReprToRaw(TSliceTypeRepr e) { + e = TSliceTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TSourceFile` to a raw DB element, if possible. */ - Raw::Element convertSourceFileToRaw(TSourceFile e) { e = TSourceFile(result) } - + Raw::Element convertSourceFileToRaw(TSourceFile e) { + e = TSourceFile(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStatic` to a raw DB element, if possible. */ - Raw::Element convertStaticToRaw(TStatic e) { e = TStatic(result) } - + Raw::Element convertStaticToRaw(TStatic e) { + e = TStatic(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStmtList` to a raw DB element, if possible. */ - Raw::Element convertStmtListToRaw(TStmtList e) { e = TStmtList(result) } - + Raw::Element convertStmtListToRaw(TStmtList e) { + e = TStmtList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStruct` to a raw DB element, if possible. */ - Raw::Element convertStructToRaw(TStruct e) { e = TStruct(result) } - + Raw::Element convertStructToRaw(TStruct e) { + e = TStruct(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructExpr` to a raw DB element, if possible. */ - Raw::Element convertStructExprToRaw(TStructExpr e) { e = TStructExpr(result) } - + Raw::Element convertStructExprToRaw(TStructExpr e) { + e = TStructExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructExprField` to a raw DB element, if possible. */ - Raw::Element convertStructExprFieldToRaw(TStructExprField e) { e = TStructExprField(result) } - + Raw::Element convertStructExprFieldToRaw(TStructExprField e) { + e = TStructExprField(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructExprFieldList` to a raw DB element, if possible. @@ -3658,31 +4089,34 @@ module Synth { Raw::Element convertStructExprFieldListToRaw(TStructExprFieldList e) { e = TStructExprFieldList(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TStructField` to a raw DB element, if possible. */ - Raw::Element convertStructFieldToRaw(TStructField e) { e = TStructField(result) } - + Raw::Element convertStructFieldToRaw(TStructField e) { + e = TStructField(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructFieldList` to a raw DB element, if possible. */ - Raw::Element convertStructFieldListToRaw(TStructFieldList e) { e = TStructFieldList(result) } - + Raw::Element convertStructFieldListToRaw(TStructFieldList e) { + e = TStructFieldList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructPat` to a raw DB element, if possible. */ - Raw::Element convertStructPatToRaw(TStructPat e) { e = TStructPat(result) } - + Raw::Element convertStructPatToRaw(TStructPat e) { + e = TStructPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructPatField` to a raw DB element, if possible. */ - Raw::Element convertStructPatFieldToRaw(TStructPatField e) { e = TStructPatField(result) } - + Raw::Element convertStructPatFieldToRaw(TStructPatField e) { + e = TStructPatField(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TStructPatFieldList` to a raw DB element, if possible. @@ -3690,133 +4124,153 @@ module Synth { Raw::Element convertStructPatFieldListToRaw(TStructPatFieldList e) { e = TStructPatFieldList(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TTokenTree` to a raw DB element, if possible. */ - Raw::Element convertTokenTreeToRaw(TTokenTree e) { e = TTokenTree(result) } - + Raw::Element convertTokenTreeToRaw(TTokenTree e) { + e = TTokenTree(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTokenTreeMeta` to a raw DB element, if possible. */ - Raw::Element convertTokenTreeMetaToRaw(TTokenTreeMeta e) { e = TTokenTreeMeta(result) } - + Raw::Element convertTokenTreeMetaToRaw(TTokenTreeMeta e) { + e = TTokenTreeMeta(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTrait` to a raw DB element, if possible. */ - Raw::Element convertTraitToRaw(TTrait e) { e = TTrait(result) } - + Raw::Element convertTraitToRaw(TTrait e) { + e = TTrait(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTryBlockModifier` to a raw DB element, if possible. */ - Raw::Element convertTryBlockModifierToRaw(TTryBlockModifier e) { e = TTryBlockModifier(result) } - + Raw::Element convertTryBlockModifierToRaw(TTryBlockModifier e) { + e = TTryBlockModifier(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTryExpr` to a raw DB element, if possible. */ - Raw::Element convertTryExprToRaw(TTryExpr e) { e = TTryExpr(result) } - + Raw::Element convertTryExprToRaw(TTryExpr e) { + e = TTryExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTupleExpr` to a raw DB element, if possible. */ - Raw::Element convertTupleExprToRaw(TTupleExpr e) { e = TTupleExpr(result) } - + Raw::Element convertTupleExprToRaw(TTupleExpr e) { + e = TTupleExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTupleField` to a raw DB element, if possible. */ - Raw::Element convertTupleFieldToRaw(TTupleField e) { e = TTupleField(result) } - + Raw::Element convertTupleFieldToRaw(TTupleField e) { + e = TTupleField(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTupleFieldList` to a raw DB element, if possible. */ - Raw::Element convertTupleFieldListToRaw(TTupleFieldList e) { e = TTupleFieldList(result) } - + Raw::Element convertTupleFieldListToRaw(TTupleFieldList e) { + e = TTupleFieldList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTuplePat` to a raw DB element, if possible. */ - Raw::Element convertTuplePatToRaw(TTuplePat e) { e = TTuplePat(result) } - + Raw::Element convertTuplePatToRaw(TTuplePat e) { + e = TTuplePat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTupleStructPat` to a raw DB element, if possible. */ - Raw::Element convertTupleStructPatToRaw(TTupleStructPat e) { e = TTupleStructPat(result) } - + Raw::Element convertTupleStructPatToRaw(TTupleStructPat e) { + e = TTupleStructPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTupleTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertTupleTypeReprToRaw(TTupleTypeRepr e) { e = TTupleTypeRepr(result) } - + Raw::Element convertTupleTypeReprToRaw(TTupleTypeRepr e) { + e = TTupleTypeRepr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeAlias` to a raw DB element, if possible. */ - Raw::Element convertTypeAliasToRaw(TTypeAlias e) { e = TTypeAlias(result) } - + Raw::Element convertTypeAliasToRaw(TTypeAlias e) { + e = TTypeAlias(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeArg` to a raw DB element, if possible. */ - Raw::Element convertTypeArgToRaw(TTypeArg e) { e = TTypeArg(result) } - + Raw::Element convertTypeArgToRaw(TTypeArg e) { + e = TTypeArg(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeBound` to a raw DB element, if possible. */ - Raw::Element convertTypeBoundToRaw(TTypeBound e) { e = TTypeBound(result) } - + Raw::Element convertTypeBoundToRaw(TTypeBound e) { + e = TTypeBound(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeBoundList` to a raw DB element, if possible. */ - Raw::Element convertTypeBoundListToRaw(TTypeBoundList e) { e = TTypeBoundList(result) } - + Raw::Element convertTypeBoundListToRaw(TTypeBoundList e) { + e = TTypeBoundList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeParam` to a raw DB element, if possible. */ - Raw::Element convertTypeParamToRaw(TTypeParam e) { e = TTypeParam(result) } - + Raw::Element convertTypeParamToRaw(TTypeParam e) { + e = TTypeParam(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUnderscoreExpr` to a raw DB element, if possible. */ - Raw::Element convertUnderscoreExprToRaw(TUnderscoreExpr e) { e = TUnderscoreExpr(result) } - + Raw::Element convertUnderscoreExprToRaw(TUnderscoreExpr e) { + e = TUnderscoreExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUnimplemented` to a raw DB element, if possible. */ - Raw::Element convertUnimplementedToRaw(TUnimplemented e) { e = TUnimplemented(result) } - + Raw::Element convertUnimplementedToRaw(TUnimplemented e) { + e = TUnimplemented(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUnion` to a raw DB element, if possible. */ - Raw::Element convertUnionToRaw(TUnion e) { e = TUnion(result) } - + Raw::Element convertUnionToRaw(TUnion e) { + e = TUnion(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUnsafeMeta` to a raw DB element, if possible. */ - Raw::Element convertUnsafeMetaToRaw(TUnsafeMeta e) { e = TUnsafeMeta(result) } - + Raw::Element convertUnsafeMetaToRaw(TUnsafeMeta e) { + e = TUnsafeMeta(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUse` to a raw DB element, if possible. */ - Raw::Element convertUseToRaw(TUse e) { e = TUse(result) } - + Raw::Element convertUseToRaw(TUse e) { + e = TUse(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUseBoundGenericArgs` to a raw DB element, if possible. @@ -3824,78 +4278,90 @@ module Synth { Raw::Element convertUseBoundGenericArgsToRaw(TUseBoundGenericArgs e) { e = TUseBoundGenericArgs(result) } - /** * INTERNAL: Do not use. * Converts a synthesized `TUseTree` to a raw DB element, if possible. */ - Raw::Element convertUseTreeToRaw(TUseTree e) { e = TUseTree(result) } - + Raw::Element convertUseTreeToRaw(TUseTree e) { + e = TUseTree(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TUseTreeList` to a raw DB element, if possible. */ - Raw::Element convertUseTreeListToRaw(TUseTreeList e) { e = TUseTreeList(result) } - + Raw::Element convertUseTreeListToRaw(TUseTreeList e) { + e = TUseTreeList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TVariant` to a raw DB element, if possible. */ - Raw::Element convertVariantToRaw(TVariant e) { e = TVariant(result) } - + Raw::Element convertVariantToRaw(TVariant e) { + e = TVariant(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TVariantList` to a raw DB element, if possible. */ - Raw::Element convertVariantListToRaw(TVariantList e) { e = TVariantList(result) } - + Raw::Element convertVariantListToRaw(TVariantList e) { + e = TVariantList(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TVisibility` to a raw DB element, if possible. */ - Raw::Element convertVisibilityToRaw(TVisibility e) { e = TVisibility(result) } - + Raw::Element convertVisibilityToRaw(TVisibility e) { + e = TVisibility(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TVisibilityInner` to a raw DB element, if possible. */ - Raw::Element convertVisibilityInnerToRaw(TVisibilityInner e) { e = TVisibilityInner(result) } - + Raw::Element convertVisibilityInnerToRaw(TVisibilityInner e) { + e = TVisibilityInner(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TWhereClause` to a raw DB element, if possible. */ - Raw::Element convertWhereClauseToRaw(TWhereClause e) { e = TWhereClause(result) } - + Raw::Element convertWhereClauseToRaw(TWhereClause e) { + e = TWhereClause(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TWherePred` to a raw DB element, if possible. */ - Raw::Element convertWherePredToRaw(TWherePred e) { e = TWherePred(result) } - + Raw::Element convertWherePredToRaw(TWherePred e) { + e = TWherePred(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TWhileExpr` to a raw DB element, if possible. */ - Raw::Element convertWhileExprToRaw(TWhileExpr e) { e = TWhileExpr(result) } - + Raw::Element convertWhileExprToRaw(TWhileExpr e) { + e = TWhileExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TWildcardPat` to a raw DB element, if possible. */ - Raw::Element convertWildcardPatToRaw(TWildcardPat e) { e = TWildcardPat(result) } - + Raw::Element convertWildcardPatToRaw(TWildcardPat e) { + e = TWildcardPat(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TYeetExpr` to a raw DB element, if possible. */ - Raw::Element convertYeetExprToRaw(TYeetExpr e) { e = TYeetExpr(result) } - + Raw::Element convertYeetExprToRaw(TYeetExpr e) { + e = TYeetExpr(result) + } /** * INTERNAL: Do not use. * Converts a synthesized `TYieldExpr` to a raw DB element, if possible. */ - Raw::Element convertYieldExprToRaw(TYieldExpr e) { e = TYieldExpr(result) } + Raw::Element convertYieldExprToRaw(TYieldExpr e) { + e = TYieldExpr(result) + } /** * INTERNAL: Do not use. @@ -3906,7 +4372,6 @@ module Synth { or result = convertVariantToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TAnyAttr` to a raw DB element, if possible. @@ -3916,7 +4381,6 @@ module Synth { or result = convertDocCommentToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TArrayExpr` to a raw DB element, if possible. @@ -3926,7 +4390,6 @@ module Synth { or result = convertArrayRepeatExprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperand` to a raw DB element, if possible. @@ -3940,7 +4403,6 @@ module Synth { or result = convertAsmSymToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TAsmPiece` to a raw DB element, if possible. @@ -3952,7 +4414,6 @@ module Synth { or result = convertAsmOptionsListToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TAssocItem` to a raw DB element, if possible. @@ -3966,7 +4427,6 @@ module Synth { or result = convertTypeAliasToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TAstNode` to a raw DB element, if possible. @@ -4106,7 +4566,6 @@ module Synth { or result = convertWherePredToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TCallable` to a raw DB element, if possible. @@ -4116,7 +4575,6 @@ module Synth { or result = convertFunctionToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TCfgPredicate` to a raw DB element, if possible. @@ -4126,7 +4584,6 @@ module Synth { or result = convertCfgCompositeToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TElement` to a raw DB element, if possible. @@ -4140,7 +4597,6 @@ module Synth { or result = convertUnextractedToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TExpr` to a raw DB element, if possible. @@ -4164,6 +4620,8 @@ module Synth { or result = convertCastExprToRaw(e) or + result = convertCfgPredExprToRaw(e) + or result = convertClosureExprToRaw(e) or result = convertContinueExprToRaw(e) @@ -4216,7 +4674,6 @@ module Synth { or result = convertYieldExprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TExternItem` to a raw DB element, if possible. @@ -4230,7 +4687,6 @@ module Synth { or result = convertTypeAliasToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TFieldList` to a raw DB element, if possible. @@ -4240,7 +4696,6 @@ module Synth { or result = convertTupleFieldListToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TGenericArg` to a raw DB element, if possible. @@ -4254,7 +4709,6 @@ module Synth { or result = convertTypeArgToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TGenericParam` to a raw DB element, if possible. @@ -4266,7 +4720,6 @@ module Synth { or result = convertTypeParamToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TItem` to a raw DB element, if possible. @@ -4296,7 +4749,6 @@ module Synth { or result = convertUseToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TLabelableExpr` to a raw DB element, if possible. @@ -4306,7 +4758,6 @@ module Synth { or result = convertLoopingExprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TLocatable` to a raw DB element, if possible. @@ -4320,7 +4771,6 @@ module Synth { or result = convertFormatArgumentToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TLoopingExpr` to a raw DB element, if possible. @@ -4332,7 +4782,6 @@ module Synth { or result = convertWhileExprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TMeta` to a raw DB element, if possible. @@ -4350,7 +4799,6 @@ module Synth { or result = convertUnsafeMetaToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TParamBase` to a raw DB element, if possible. @@ -4360,7 +4808,6 @@ module Synth { or result = convertSelfParamToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TPat` to a raw DB element, if possible. @@ -4368,6 +4815,8 @@ module Synth { Raw::Element convertPatToRaw(TPat e) { result = convertBoxPatToRaw(e) or + result = convertCfgPredPatToRaw(e) + or result = convertConstBlockPatToRaw(e) or result = convertDerefPatToRaw(e) @@ -4402,7 +4851,6 @@ module Synth { or result = convertWildcardPatToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TPathAstNode` to a raw DB element, if possible. @@ -4418,7 +4866,6 @@ module Synth { or result = convertTupleStructPatToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TPathExprBase` to a raw DB element, if possible. @@ -4428,7 +4875,6 @@ module Synth { or result = convertPathExprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TStmt` to a raw DB element, if possible. @@ -4440,13 +4886,13 @@ module Synth { or result = convertLetStmtToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TToken` to a raw DB element, if possible. */ - Raw::Element convertTokenToRaw(TToken e) { result = convertCommentToRaw(e) } - + Raw::Element convertTokenToRaw(TToken e) { + result = convertCommentToRaw(e) + } /** * INTERNAL: Do not use. * Converts a synthesized `TTypeItem` to a raw DB element, if possible. @@ -4458,7 +4904,6 @@ module Synth { or result = convertUnionToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TTypeRepr` to a raw DB element, if possible. @@ -4494,7 +4939,6 @@ module Synth { or result = convertTupleTypeReprToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TUnextracted` to a raw DB element, if possible. @@ -4504,7 +4948,6 @@ module Synth { or result = convertUnimplementedToRaw(e) } - /** * INTERNAL: Do not use. * Converts a synthesized `TUseBoundGenericArg` to a raw DB element, if possible. diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll index 65befa072bd4..e2a18a0bb2b8 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll @@ -36,6 +36,8 @@ import codeql.rust.elements.internal.CfgAtomConstructor import codeql.rust.elements.internal.CfgAttrMetaConstructor import codeql.rust.elements.internal.CfgCompositeConstructor import codeql.rust.elements.internal.CfgMetaConstructor +import codeql.rust.elements.internal.CfgPredExprConstructor +import codeql.rust.elements.internal.CfgPredPatConstructor import codeql.rust.elements.internal.ClosureExprConstructor import codeql.rust.elements.internal.CommentConstructor import codeql.rust.elements.internal.ConstConstructor diff --git a/rust/ql/lib/rust.dbscheme b/rust/ql/lib/rust.dbscheme index 3af0bba56aa5..9487e73d9da6 100644 --- a/rust/ql/lib/rust.dbscheme +++ b/rust/ql/lib/rust.dbscheme @@ -421,6 +421,7 @@ callable_attrs( | @break_expr | @call_expr | @cast_expr +| @cfg_pred_expr | @closure_expr | @continue_expr | @field_expr @@ -731,6 +732,7 @@ parenthesized_arg_list_type_args( @pat = @box_pat +| @cfg_pred_pat | @const_block_pat | @deref_pat | @ident_pat @@ -1668,6 +1670,26 @@ cfg_meta_cfg_predicates( int cfg_predicate: @cfg_predicate ref ); +cfg_pred_exprs( + unique int id: @cfg_pred_expr +); + +#keyset[id] +cfg_pred_expr_cfg_predicates( + int id: @cfg_pred_expr ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_pred_pats( + unique int id: @cfg_pred_pat +); + +#keyset[id] +cfg_pred_pat_cfg_predicates( + int id: @cfg_pred_pat ref, + int cfg_predicate: @cfg_predicate ref +); + closure_exprs( unique int id: @closure_expr ); diff --git a/rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt new file mode 100644 index 000000000000..7f96b17b1f3c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen, do not edit + +After a source file is added in this directory and codegen is run again, test queries +will appear and this file will be deleted diff --git a/rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt new file mode 100644 index 000000000000..7f96b17b1f3c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen, do not edit + +After a source file is added in this directory and codegen is run again, test queries +will appear and this file will be deleted diff --git a/rust/schema/ast.py b/rust/schema/ast.py index 578cbe627a00..2a154c79b02a 100644 --- a/rust/schema/ast.py +++ b/rust/schema/ast.py @@ -186,6 +186,12 @@ class CfgComposite(CfgPredicate, ): class CfgMeta(Meta, ): cfg_predicate: optional["CfgPredicate"] | child +class CfgPredExpr(Expr, ): + cfg_predicate: optional["CfgPredicate"] | child + +class CfgPredPat(Pat, ): + cfg_predicate: optional["CfgPredicate"] | child + class ClosureExpr(Expr, ): attrs: list["AnyAttr"] | child closure_body: optional["Expr"] | child From fbcbe1f679151d94a08feea046b48ce12295964c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:24 +0000 Subject: [PATCH 5/8] Rust: Run codegen (extractor generated code) --- rust/extractor/src/generated/.generated.list | 2 +- rust/extractor/src/generated/top.rs | 118 +++++++++++++++++++ rust/ql/.generated.list | 16 +++ rust/ql/.gitattributes | 16 +++ 4 files changed, 151 insertions(+), 1 deletion(-) diff --git a/rust/extractor/src/generated/.generated.list b/rust/extractor/src/generated/.generated.list index d16fad5869e3..9a8a55c982e9 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 159e73ea2ea65408675b4ee09db184781ce00cbe09b84589f4c9a80a400e9a23 159e73ea2ea65408675b4ee09db184781ce00cbe09b84589f4c9a80a400e9a23 +top.rs c051c8526935e63353f69a0aa8f10c56255d80db6a97aa385d4143d74c9e2d47 c051c8526935e63353f69a0aa8f10c56255d80db6a97aa385d4143d74c9e2d47 diff --git a/rust/extractor/src/generated/top.rs b/rust/extractor/src/generated/top.rs index 37f801746bbb..a46cc31744a3 100644 --- a/rust/extractor/src/generated/top.rs +++ b/rust/extractor/src/generated/top.rs @@ -4967,6 +4967,124 @@ impl From> for trap::Label { } } +#[derive(Debug)] +pub struct CfgPredExpr { + pub id: trap::TrapId, + pub cfg_predicate: Option>, +} + +impl trap::TrapEntry for CfgPredExpr { + fn extract_id(&mut self) -> trap::TrapId { + std::mem::replace(&mut self.id, trap::TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("cfg_pred_exprs", vec![id.into()]); + if let Some(v) = self.cfg_predicate { + out.add_tuple("cfg_pred_expr_cfg_predicates", vec![id.into(), v.into()]); + } + } +} + +impl trap::TrapClass for CfgPredExpr { + fn class_name() -> &'static str { "CfgPredExpr" } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredExpr is a subclass of Expr + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredExpr is a subclass of AstNode + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredExpr is a subclass of Locatable + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredExpr is a subclass of Element + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +#[derive(Debug)] +pub struct CfgPredPat { + pub id: trap::TrapId, + pub cfg_predicate: Option>, +} + +impl trap::TrapEntry for CfgPredPat { + fn extract_id(&mut self) -> trap::TrapId { + std::mem::replace(&mut self.id, trap::TrapId::Star) + } + + fn emit(self, id: trap::Label, out: &mut trap::Writer) { + out.add_tuple("cfg_pred_pats", vec![id.into()]); + if let Some(v) = self.cfg_predicate { + out.add_tuple("cfg_pred_pat_cfg_predicates", vec![id.into(), v.into()]); + } + } +} + +impl trap::TrapClass for CfgPredPat { + fn class_name() -> &'static str { "CfgPredPat" } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredPat is a subclass of Pat + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredPat is a subclass of AstNode + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredPat is a subclass of Locatable + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + +impl From> for trap::Label { + fn from(value: trap::Label) -> Self { + // SAFETY: this is safe because in the dbscheme CfgPredPat is a subclass of Element + unsafe { + Self::from_untyped(value.as_untyped()) + } + } +} + #[derive(Debug)] pub struct ClosureExpr { pub id: trap::TrapId, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 829b493891c7..f63e52fb5113 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,3 +1,4 @@ +lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll a930796c48512c3d62163b6ab5683109ef10e0f9fa620ea08229ec0430b6c302 a930796c48512c3d62163b6ab5683109ef10e0f9fa620ea08229ec0430b6c302 lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be lib/codeql/rust/elements/AnyAttr.qll 31536ed6ba02c538ff192089dc40c6f984ce808406f0522eed49539b9ae8a0da c6df96292f0f96415af4e8b3736e870475c21829ab08a8fe56d221ee4bb4cbd7 @@ -38,6 +39,8 @@ lib/codeql/rust/elements/CfgAtom.qll 0567c41550cbcf88f334f0285bac32f87726099f244 lib/codeql/rust/elements/CfgAttrMeta.qll 85f6503abce5c1c3de06df0c0d2ae8fda4206b94bc8103d54550ad2d84a93fb4 af1e7967d7c9c80f1a4725d8a045d645b247f5aa1a3a462a08eea39c4ab4491f lib/codeql/rust/elements/CfgComposite.qll 50f624532b6f6086ac507c294da7dc3a96d4154d70541449c89b4395cbe366a7 6aa0c7a1484b02833b7cc7692018f96dd6724b8f76a1e171171b7f5aac69e3a6 lib/codeql/rust/elements/CfgMeta.qll 583c4561968f787ea1fb7fe8af165273e0f35c2e1efd26364a004edeebee5786 86eca520313dc40b0e523d8941858909c2632eb32c01d74ddb1c524527fbd8eb +lib/codeql/rust/elements/CfgPredExpr.qll b0eccc0093bb78f2bcce86a0e81a9e78e32d403582a723dbbd6f9302e93ee4da b0eccc0093bb78f2bcce86a0e81a9e78e32d403582a723dbbd6f9302e93ee4da +lib/codeql/rust/elements/CfgPredPat.qll b0f72411ff7a8565154d12a04610358be901cc649ed0f3caaf8ebbceaa13a50d b0f72411ff7a8565154d12a04610358be901cc649ed0f3caaf8ebbceaa13a50d lib/codeql/rust/elements/CfgPredicate.qll e86f55f98b8f09fb5da9af550cb6c43089d8deb2e3b83d7e195e9bddc8cf201b ba30cf064ba1236139c8c55bfab204b9256e407db983b42b23319690c7ff5562 lib/codeql/rust/elements/ClosureExpr.qll 69e0b7a7c7a4c348fcada5ad4da22dd2f51747109f856be239cede315a56d695 93400650282e2d4e682b826e9f5f844aa893dda126548e41ea1c703d2bf209ca lib/codeql/rust/elements/Comment.qll e3613664af81b7a6d77466b4c37d723c74cc220121473dd8a0e552db7d9a0b71 108c4ab7455ea70dd0ccdaacb4baae31ba68b81c9f516b4c903aa9aa7db4fbc1 @@ -262,6 +265,10 @@ lib/codeql/rust/elements/internal/CfgCompositeConstructor.qll 160bfbccdd80c9b942 lib/codeql/rust/elements/internal/CfgCompositeImpl.qll 840a148dc5c4b213ffdaca6213d6f2dfa3c1dad3f99293f8244baa3bf6902909 36e9291b124c52bb2e4620bead8acf2f9be4a2281eccfd74411adaf91914dd20 lib/codeql/rust/elements/internal/CfgMetaConstructor.qll 335cb7a36e430b08a12c5548d0a91bbb9a00aaa2f9b0dc7b2fa526882ec0271e 0bd7002f58c1c19c22023d6f03874d84e083e1aa09ec9cac888661d5ad632f6b lib/codeql/rust/elements/internal/CfgMetaImpl.qll 9d820fb4dee32288e467a8b667ba191588381d8ec2a0ce0e5e8645ee437a16a8 5888fb533768a36d94f56f81058aa0d00c4a2c13721af42bdd30628747698bce +lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll 2dc5dc48249f69bbb824786fe8ff84258f8aa71d6da2182b67659624a82de672 2dc5dc48249f69bbb824786fe8ff84258f8aa71d6da2182b67659624a82de672 +lib/codeql/rust/elements/internal/CfgPredExprImpl.qll 3c1c543492f3a87891efb474d55340c6f4d8104a2253413deac5cd3b2ea04512 3c1c543492f3a87891efb474d55340c6f4d8104a2253413deac5cd3b2ea04512 +lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll 33c2b178e02d65dc96bbcbd0fb38781b413b8b7585a2d371e39730be9b45ecfc 33c2b178e02d65dc96bbcbd0fb38781b413b8b7585a2d371e39730be9b45ecfc +lib/codeql/rust/elements/internal/CfgPredPatImpl.qll 60da1eb785e66d759c4e63ebcf8e2a913afa80e14e3492710dbbe88979cd2837 60da1eb785e66d759c4e63ebcf8e2a913afa80e14e3492710dbbe88979cd2837 lib/codeql/rust/elements/internal/CfgPredicateImpl.qll 3ba6c6732a7de4df967dd2cb2b4cc99db8aefb2301b75521f1b369052e3a2ec0 c07d4366f98f374f24e235f809946dc513a16203e4c1eb151c8185a5bc79e70d lib/codeql/rust/elements/internal/ClosureExprConstructor.qll a348229d2b25c7ebd43b58461830b7915e92d31ae83436ec831e0c4873f6218a 70a1d2ac33db3ac4da5826b0e8628f2f29a8f9cdfd8e4fd0e488d90ce0031a38 lib/codeql/rust/elements/internal/CommentConstructor.qll 0b4a6a976d667bf7595500dfb91b9cfc87460a501837ba5382d9a8d8321d7736 7d02d8c94a319dc48e7978d5270e33fc5c308d443768ff96b618236d250123f1 @@ -528,6 +535,8 @@ lib/codeql/rust/elements/internal/generated/CfgAtom.qll 1b7672e06fe19c7ba484937c lib/codeql/rust/elements/internal/generated/CfgAttrMeta.qll 4531aaa627f4d44787970f18dfe30b957f51d83ab2396bac436563c40d144ca9 1731ecd335431b0a2ec70403dc1ad7bce1f8e171a4d6b575d340f1d683fa6c92 lib/codeql/rust/elements/internal/generated/CfgComposite.qll 4f30fa0495381774cd7993a38e1fbe94dff63a5742e8b836bbc35987b746df1a 595ff31b5990845085bbb963ba408dd1246aed1952bee2836ad9d92a1da6e4c7 lib/codeql/rust/elements/internal/generated/CfgMeta.qll 7fd8ee49428da70ba1e52bf9017bbe30b690443c26147c77aa9bcffd7d09338d ec4d34dbd1e7ca412ce3d242f1bd6695a5fe9f263d5bc68ce12610facedf3e93 +lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll 6b49616d1f22141b1629b1f31ba1a5f7bb7c41aaaf392b6ae3e2f0a453dec9c5 6b49616d1f22141b1629b1f31ba1a5f7bb7c41aaaf392b6ae3e2f0a453dec9c5 +lib/codeql/rust/elements/internal/generated/CfgPredPat.qll f3def25f9cecf937d8bb21d121307e72cfefdd8c183727b08a223d9fa92a2b77 f3def25f9cecf937d8bb21d121307e72cfefdd8c183727b08a223d9fa92a2b77 lib/codeql/rust/elements/internal/generated/CfgPredicate.qll 736fe7385e2af5bb86c349bb1b8dd030aef191541f6af24694e3c460b8272f61 4117ee073683eb5fb81bae9e7e49b4ad0991cfcb53e0b7b4160199931a300632 lib/codeql/rust/elements/internal/generated/ClosureExpr.qll 818aff75d86821c670d8ba0720c3270681b3e070140a9c41beab2a811b43eee6 9bf2d1d38f6c4a99d7c058f8ed096141f5ba6a75d2d26a464f0d65ed4e554222 lib/codeql/rust/elements/internal/generated/Comment.qll 9e306a2947185ca15946a3d43dea09d10000b3ba8b28b4691a4b4be6697b7a53 c3df90920fcb595afe5c6e6b614ed0cc61c7679d9785ff17aa0db7cdaedc1115 @@ -618,6 +627,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll d8e73957983491302faa56 lib/codeql/rust/elements/internal/generated/ParenExpr.qll b978629328318874e4e7044dc0ed07ee44f96f426e06848e7a3ea499f2b99f9a 84a1ba59e38460bd16d82881f409084ea35fa55f2f1c52296c510abf3694076f lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126 +lib/codeql/rust/elements/internal/generated/ParentChild.qll 537a7b27ad1e626ce858460a2c843d0721abd81eb276a26bab66c6f650f26a0e 537a7b27ad1e626ce858460a2c843d0721abd81eb276a26bab66c6f650f26a0e lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll 4e85b4bcabdbde71602d557fa0dd5ccbab09d2360d2bb470384cb85437e1611f 688af26f360655ee6454fa45b3169cc9db6ed46d8f58c2470111703e1e7a117f lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd @@ -634,6 +644,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll d7a400b238d7edf2b465 lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f lib/codeql/rust/elements/internal/generated/RangeExpr.qll 7a1ff277e5e8a6731d6cb664a09da07cce2bd6ca3541008b381cd5a5a636a15f 2a9d51363a1a55a080d39575c623ba11cb0f259c04f40351fbb5b89358b31aa6 lib/codeql/rust/elements/internal/generated/RangePat.qll a0c805eb31a773e16806384bd11592563c61b720e694bd444b93c28b5cf00d65 4b82088a62e7e5027f5930a697a18b5d4fd2a831a7bb6123d1b3f8ff4a9255ea +lib/codeql/rust/elements/internal/generated/Raw.qll 8aa72bb0695b99843411106a2e433bc2063383b5762634cf310d478b2677a0a3 8aa72bb0695b99843411106a2e433bc2063383b5762634cf310d478b2677a0a3 lib/codeql/rust/elements/internal/generated/RefExpr.qll c7b711ac05f7fe8fb97b81b09e794e7756141570265e3a995e40e7c79bb2b49d 11b572508c010e79a7edb0f1b349a4ea3e2fc68f6d7bc3f38fbeacf0c91d68e2 lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05 lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll fbab8bae4d3eac10338a9bc5743f3ac9c0feab11107d6d28825f4e97bcd59bad 224f6aec466ddcde526ce8df23d2f925887232b462730af078815a68b47c133d @@ -658,6 +669,8 @@ lib/codeql/rust/elements/internal/generated/StructFieldList.qll 2abf0688ca9659d2 lib/codeql/rust/elements/internal/generated/StructPat.qll c76fa005c2fd0448a8803233e1e8818c4123301eb66ac5cf69d0b9eaafc61e98 6e0dffccdce24bca20e87d5ba0f0995c9a1ae8983283e71e7dbfcf6fffc67a58 lib/codeql/rust/elements/internal/generated/StructPatField.qll 65fd5e42e0cb513ee2d5179d37169c02fcf91360aa2294a61657892939187b4a df48d60618f3319f544123fc615178689ceff848078bbb7b5d2c4d9f8feb0dd0 lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll 342ca25fbd8bf8fef84d06e263f59f010e21418658c1f79f40c52e5ce76ca158 c950a39a946904b84a2557fb1febd59906e42e5de4903e88d0da67ba3e14a250 +lib/codeql/rust/elements/internal/generated/Synth.qll 360a0ce21e748dfbb5842548c0b4e7c867c9ec0a4670350b5b0c6a072f0ef313 360a0ce21e748dfbb5842548c0b4e7c867c9ec0a4670350b5b0c6a072f0ef313 +lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 371d10d1ddae6bf7de8d4760d21d1a550c9b18c86272930a118aad9c647afd0d 371d10d1ddae6bf7de8d4760d21d1a550c9b18c86272930a118aad9c647afd0d lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b lib/codeql/rust/elements/internal/generated/TokenTree.qll 3d855014747ae2996375f05bdaef1dd07464692ea09f47174a92f705a5ef63bb b85fed50862f97bce98fb4cbd3f275b553ef3e8dedf215915736197078867427 lib/codeql/rust/elements/internal/generated/TokenTreeMeta.qll 390121812f4f16753747d1eca17580a16385332e49fa93de89a5a5dc029a3a36 fa1e30306690fef85c6f455f4b51b1b14efd046b862e0160b311469da14ac98d @@ -697,6 +710,7 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll e45b9ceafee6e933e37d70 lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499 lib/codeql/rust/elements/internal/generated/YeetExpr.qll c45a2a3c691b03c80aff5d1fdebe94c46856c1a00d42d6eaefec7f17222751d5 6c8e54035a6454a91f93d94e325f79dad275c7b86cdad2295248c94ebb0c5b00 lib/codeql/rust/elements/internal/generated/YieldExpr.qll ff60cf5a7c074117c3ea6721567944caa3d77034373d2fb31db8307aa9ffb4e6 39ec18ce5702bbac2580ab464dee1f6afc0a7dfbb7cc314b6ec8fb4efacba69e +lib/codeql/rust/elements.qll ff3bff2097f812d00926d00857ac925131757b056423458d91a09744f4194e80 ff3bff2097f812d00926d00857ac925131757b056423458d91a09744f4194e80 test/extractor-tests/generated/Abi/Abi.ql 086ed104ab1a7e7fe5c1ed29e03f1719a797c7096c738868bf6ebe872ab8fdaa fe23fe67ab0d9201e1177ea3f844b18ed428e13e3ce77381bf2b6910adfa3a0e test/extractor-tests/generated/ArgList/ArgList.ql da97b5b25418b2aa8cb8df793f48870c89fa00759cdade8ddba60d7f1f4bbc01 acfd5d2caf67282ad2d57b961068472100482d0f770a52a3c00214c647d18c75 test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql 97d27b10e3b76f90538102014b45b254bc223e9bac17bd8059bdaeb063b2f734 b28efee84fdb8a4a0290110fc7820dfdbc934d02ab38813dd1074f9dcf5a6b03 @@ -728,6 +742,8 @@ test/extractor-tests/generated/CfgAtom/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f4 test/extractor-tests/generated/CfgAttrMeta/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/CfgComposite/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/CfgMeta/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 +test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 b6cf5771fdbbe981aeb3f443ec7a40517b6e99ffc9817fd8872c2e344240dae1 test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql 1fe39a8ba8256bcac2d741a74d5414e4e8b329459d1747daf948f57b8d321d19 5e2296d89e386cf4b789ad8afe102d3ede78011224fe6f182b235d1550ec5e6e test/extractor-tests/generated/Comment/Comment.ql 0e0454911d2cf2e7ef5c6d860b84c57b9d490090914ebcf4fa0e8a70f777f066 cbd1c195276ef163f8d3c122344738c884dc9fb70eb2f9b7067829d735d48c4c test/extractor-tests/generated/Const/Const.ql d554b324b7ae3ed9265fea942782adf05bd1e6b7d0b3308b393b2484e4adaf68 2c4aef753236468c2b602f572dabc2fd7d8e2c137536badaba14c08d30475fc2 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 6763474c2118..f0e39bc72b63 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -1,5 +1,6 @@ /.generated.list linguist-generated /.gitattributes linguist-generated +/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll linguist-generated /lib/codeql/rust/elements/Abi.qll linguist-generated /lib/codeql/rust/elements/Addressable.qll linguist-generated /lib/codeql/rust/elements/AnyAttr.qll linguist-generated @@ -40,6 +41,8 @@ /lib/codeql/rust/elements/CfgAttrMeta.qll linguist-generated /lib/codeql/rust/elements/CfgComposite.qll linguist-generated /lib/codeql/rust/elements/CfgMeta.qll linguist-generated +/lib/codeql/rust/elements/CfgPredExpr.qll linguist-generated +/lib/codeql/rust/elements/CfgPredPat.qll linguist-generated /lib/codeql/rust/elements/CfgPredicate.qll linguist-generated /lib/codeql/rust/elements/ClosureExpr.qll linguist-generated /lib/codeql/rust/elements/Comment.qll linguist-generated @@ -264,6 +267,10 @@ /lib/codeql/rust/elements/internal/CfgCompositeImpl.qll linguist-generated /lib/codeql/rust/elements/internal/CfgMetaConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/CfgMetaImpl.qll linguist-generated +/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll linguist-generated +/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll linguist-generated +/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll linguist-generated +/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll linguist-generated /lib/codeql/rust/elements/internal/CfgPredicateImpl.qll linguist-generated /lib/codeql/rust/elements/internal/ClosureExprConstructor.qll linguist-generated /lib/codeql/rust/elements/internal/CommentConstructor.qll linguist-generated @@ -530,6 +537,8 @@ /lib/codeql/rust/elements/internal/generated/CfgAttrMeta.qll linguist-generated /lib/codeql/rust/elements/internal/generated/CfgComposite.qll linguist-generated /lib/codeql/rust/elements/internal/generated/CfgMeta.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/CfgPredicate.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ClosureExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Comment.qll linguist-generated @@ -620,6 +629,7 @@ /lib/codeql/rust/elements/internal/generated/ParenExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/ParentChild.qll linguist-generated /lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Pat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Path.qll linguist-generated @@ -636,6 +646,7 @@ /lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RangeExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RangePat.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/Raw.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll linguist-generated @@ -660,6 +671,8 @@ /lib/codeql/rust/elements/internal/generated/StructPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/StructPatField.qll linguist-generated /lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/Synth.qll linguist-generated +/lib/codeql/rust/elements/internal/generated/SynthConstructors.qll linguist-generated /lib/codeql/rust/elements/internal/generated/Token.qll linguist-generated /lib/codeql/rust/elements/internal/generated/TokenTree.qll linguist-generated /lib/codeql/rust/elements/internal/generated/TokenTreeMeta.qll linguist-generated @@ -699,6 +712,7 @@ /lib/codeql/rust/elements/internal/generated/WildcardPat.qll linguist-generated /lib/codeql/rust/elements/internal/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/elements/internal/generated/YieldExpr.qll linguist-generated +/lib/codeql/rust/elements.qll linguist-generated /test/extractor-tests/generated/Abi/Abi.ql linguist-generated /test/extractor-tests/generated/ArgList/ArgList.ql linguist-generated /test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql linguist-generated @@ -730,6 +744,8 @@ /test/extractor-tests/generated/CfgAttrMeta/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/CfgComposite/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/CfgMeta/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/CfgPredExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/CfgPredPat/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/ClosureExpr/ClosureExpr.ql linguist-generated /test/extractor-tests/generated/Comment/Comment.ql linguist-generated /test/extractor-tests/generated/Const/Const.ql linguist-generated From 15023a70726b6173dad2295a03245c1192610f7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:27 +0000 Subject: [PATCH 6/8] Rust: Add schema upgrade, downgrade and change note --- .../downgrade.ql | 23 + .../old.dbscheme | 3768 +++++++++++++++++ .../rust.dbscheme | 3746 ++++++++++++++++ .../upgrade.properties | 8 + .../2026-10-02-rust-analyzer-0.0.356.md | 4 + .../old.dbscheme | 3746 ++++++++++++++++ .../rust.dbscheme | 3768 +++++++++++++++++ .../upgrade.properties | 2 + 8 files changed, 15065 insertions(+) create mode 100644 rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/downgrade.ql create mode 100644 rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/old.dbscheme create mode 100644 rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/rust.dbscheme create mode 100644 rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/upgrade.properties create mode 100644 rust/ql/lib/change-notes/2026-10-02-rust-analyzer-0.0.356.md create mode 100644 rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/old.dbscheme create mode 100644 rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/rust.dbscheme create mode 100644 rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/upgrade.properties diff --git a/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/downgrade.ql b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/downgrade.ql new file mode 100644 index 000000000000..9d1c427699fe --- /dev/null +++ b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/downgrade.ql @@ -0,0 +1,23 @@ +class Element extends @element { + string toString() { none() } +} + +class Location extends @location_default { + string toString() { none() } +} + +// The new node kinds have no representation in the old schema. Their own relations are dropped via +// `delete` in upgrade.properties; their `locatable_locations` rows are scrubbed below. +private predicate deletedNode(Element id) { cfg_pred_exprs(id) or cfg_pred_pats(id) } + +// A deleted node, plus any comment attached to one: dropping the comment's `comments` row would +// otherwise leave its `locatable_locations` row dangling. +private predicate deletedElement(Element id) { + deletedNode(id) + or + exists(Element parent | comments(id, parent, _) and deletedNode(parent)) +} + +query predicate new_locatable_locations(Element id, Location location) { + locatable_locations(id, location) and not deletedElement(id) +} diff --git a/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/old.dbscheme b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/old.dbscheme new file mode 100644 index 000000000000..9487e73d9da6 --- /dev/null +++ b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/old.dbscheme @@ -0,0 +1,3768 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @any_attr +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @callable +| @cfg_predicate +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @impl_restriction +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @mut_restriction +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @try_block_modifier +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @visibility_inner +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +@any_attr = + @attr +| @doc_comment +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @any_attr ref +); + +@cfg_predicate = + @cfg_atom +| @cfg_composite +; + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @cfg_pred_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @include_bytes_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +impl_restrictions( + unique int id: @impl_restriction +); + +#keyset[id] +impl_restriction_visibility_inners( + int id: @impl_restriction ref, + int visibility_inner: @visibility_inner ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @any_attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +@meta = + @cfg_attr_meta +| @cfg_meta +| @key_value_meta +| @path_meta +| @token_tree_meta +| @unsafe_meta +; + +mut_restrictions( + unique int id: @mut_restriction +); + +#keyset[id] +mut_restriction_is_mut( + int id: @mut_restriction ref +); + +#keyset[id] +mut_restriction_visibility_inners( + int id: @mut_restriction ref, + int visibility_inner: @visibility_inner ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @cfg_pred_pat +| @const_block_pat +| @deref_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @not_null +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_field_default_vals( + int id: @struct_field ref, + int default_val: @const_arg ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_mut_restrictions( + int id: @struct_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +try_block_modifiers( + unique int id: @try_block_modifier +); + +#keyset[id] +try_block_modifier_is_try( + int id: @try_block_modifier ref +); + +#keyset[id] +try_block_modifier_type_reprs( + int id: @try_block_modifier ref, + int type_repr: @type_repr ref +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +tuple_field_mut_restrictions( + int id: @tuple_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @pattern_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_visibility_inners( + int id: @visibility ref, + int visibility_inner: @visibility_inner ref +); + +visibility_inners( + unique int id: @visibility_inner +); + +#keyset[id] +visibility_inner_paths( + int id: @visibility_inner ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +#keyset[id, index] +asm_clobber_abi_attrs( + int id: @asm_clobber_abi ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id, index] +asm_operand_named_attrs( + int id: @asm_operand_named ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +#keyset[id, index] +asm_options_list_attrs( + int id: @asm_options_list ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +cfg_atoms( + unique int id: @cfg_atom +); + +cfg_attr_meta( + unique int id: @cfg_attr_meta +); + +#keyset[id] +cfg_attr_meta_cfg_predicates( + int id: @cfg_attr_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +#keyset[id, index] +cfg_attr_meta_metas( + int id: @cfg_attr_meta ref, + int index: int ref, + int meta: @meta ref +); + +cfg_composites( + unique int id: @cfg_composite +); + +#keyset[id, index] +cfg_composite_cfg_predicates( + int id: @cfg_composite ref, + int index: int ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_meta( + unique int id: @cfg_meta +); + +#keyset[id] +cfg_meta_cfg_predicates( + int id: @cfg_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_pred_exprs( + unique int id: @cfg_pred_expr +); + +#keyset[id] +cfg_pred_expr_cfg_predicates( + int id: @cfg_pred_expr ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_pred_pats( + unique int id: @cfg_pred_pat +); + +#keyset[id] +cfg_pred_pat_cfg_predicates( + int id: @cfg_pred_pat ref, + int cfg_predicate: @cfg_predicate ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +deref_pats( + unique int id: @deref_pat +); + +#keyset[id] +deref_pat_pats( + int id: @deref_pat ref, + int pat: @pat ref +); + +doc_comments( + unique int id: @doc_comment +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +include_bytes_exprs( + unique int id: @include_bytes_expr +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @type_item +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +key_value_meta( + unique int id: @key_value_meta +); + +#keyset[id] +key_value_meta_exprs( + int id: @key_value_meta ref, + int expr: @expr ref +); + +#keyset[id] +key_value_meta_paths( + int id: @key_value_meta ref, + int path: @path ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +not_nulls( + unique int id: @not_null +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_meta( + unique int id: @path_meta +); + +#keyset[id] +path_meta_paths( + int id: @path_meta ref, + int path: @path ref +); + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +pattern_type_reprs( + unique int id: @pattern_type_repr +); + +#keyset[id] +pattern_type_repr_pats( + int id: @pattern_type_repr ref, + int pat: @pat ref +); + +#keyset[id] +pattern_type_repr_type_reprs( + int id: @pattern_type_repr ref, + int type_repr: @type_repr ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +token_tree_meta( + unique int id: @token_tree_meta +); + +#keyset[id] +token_tree_meta_paths( + int id: @token_tree_meta ref, + int path: @path ref +); + +#keyset[id] +token_tree_meta_token_trees( + int id: @token_tree_meta ref, + int token_tree: @token_tree ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +unsafe_meta( + unique int id: @unsafe_meta +); + +#keyset[id] +unsafe_meta_is_unsafe( + int id: @unsafe_meta ref +); + +#keyset[id] +unsafe_meta_meta( + int id: @unsafe_meta ref, + int meta: @meta ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +variant_const_args( + int id: @variant ref, + int const_arg: @const_arg ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +#keyset[id] +block_expr_try_block_modifiers( + int id: @block_expr ref, + int try_block_modifier: @try_block_modifier ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_trait_ties( + int id: @impl ref, + int trait_ty: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_impl_restrictions( + int id: @trait ref, + int impl_restriction: @impl_restriction ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +@type_item = + @enum +| @struct +| @union +; + +#keyset[id, index] +type_item_derive_macro_expansions( + int id: @type_item ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +#keyset[id, index] +type_item_attrs( + int id: @type_item ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_item_generic_param_lists( + int id: @type_item ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_item_names( + int id: @type_item ref, + int name: @name ref +); + +#keyset[id] +type_item_visibilities( + int id: @type_item ref, + int visibility: @visibility ref +); + +#keyset[id] +type_item_where_clauses( + int id: @type_item ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/rust.dbscheme b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/rust.dbscheme new file mode 100644 index 000000000000..3af0bba56aa5 --- /dev/null +++ b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/rust.dbscheme @@ -0,0 +1,3746 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @any_attr +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @callable +| @cfg_predicate +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @impl_restriction +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @mut_restriction +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @try_block_modifier +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @visibility_inner +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +@any_attr = + @attr +| @doc_comment +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @any_attr ref +); + +@cfg_predicate = + @cfg_atom +| @cfg_composite +; + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @include_bytes_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +impl_restrictions( + unique int id: @impl_restriction +); + +#keyset[id] +impl_restriction_visibility_inners( + int id: @impl_restriction ref, + int visibility_inner: @visibility_inner ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @any_attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +@meta = + @cfg_attr_meta +| @cfg_meta +| @key_value_meta +| @path_meta +| @token_tree_meta +| @unsafe_meta +; + +mut_restrictions( + unique int id: @mut_restriction +); + +#keyset[id] +mut_restriction_is_mut( + int id: @mut_restriction ref +); + +#keyset[id] +mut_restriction_visibility_inners( + int id: @mut_restriction ref, + int visibility_inner: @visibility_inner ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @deref_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @not_null +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_field_default_vals( + int id: @struct_field ref, + int default_val: @const_arg ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_mut_restrictions( + int id: @struct_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +try_block_modifiers( + unique int id: @try_block_modifier +); + +#keyset[id] +try_block_modifier_is_try( + int id: @try_block_modifier ref +); + +#keyset[id] +try_block_modifier_type_reprs( + int id: @try_block_modifier ref, + int type_repr: @type_repr ref +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +tuple_field_mut_restrictions( + int id: @tuple_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @pattern_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_visibility_inners( + int id: @visibility ref, + int visibility_inner: @visibility_inner ref +); + +visibility_inners( + unique int id: @visibility_inner +); + +#keyset[id] +visibility_inner_paths( + int id: @visibility_inner ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +#keyset[id, index] +asm_clobber_abi_attrs( + int id: @asm_clobber_abi ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id, index] +asm_operand_named_attrs( + int id: @asm_operand_named ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +#keyset[id, index] +asm_options_list_attrs( + int id: @asm_options_list ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +cfg_atoms( + unique int id: @cfg_atom +); + +cfg_attr_meta( + unique int id: @cfg_attr_meta +); + +#keyset[id] +cfg_attr_meta_cfg_predicates( + int id: @cfg_attr_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +#keyset[id, index] +cfg_attr_meta_metas( + int id: @cfg_attr_meta ref, + int index: int ref, + int meta: @meta ref +); + +cfg_composites( + unique int id: @cfg_composite +); + +#keyset[id, index] +cfg_composite_cfg_predicates( + int id: @cfg_composite ref, + int index: int ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_meta( + unique int id: @cfg_meta +); + +#keyset[id] +cfg_meta_cfg_predicates( + int id: @cfg_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +deref_pats( + unique int id: @deref_pat +); + +#keyset[id] +deref_pat_pats( + int id: @deref_pat ref, + int pat: @pat ref +); + +doc_comments( + unique int id: @doc_comment +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +include_bytes_exprs( + unique int id: @include_bytes_expr +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @type_item +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +key_value_meta( + unique int id: @key_value_meta +); + +#keyset[id] +key_value_meta_exprs( + int id: @key_value_meta ref, + int expr: @expr ref +); + +#keyset[id] +key_value_meta_paths( + int id: @key_value_meta ref, + int path: @path ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +not_nulls( + unique int id: @not_null +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_meta( + unique int id: @path_meta +); + +#keyset[id] +path_meta_paths( + int id: @path_meta ref, + int path: @path ref +); + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +pattern_type_reprs( + unique int id: @pattern_type_repr +); + +#keyset[id] +pattern_type_repr_pats( + int id: @pattern_type_repr ref, + int pat: @pat ref +); + +#keyset[id] +pattern_type_repr_type_reprs( + int id: @pattern_type_repr ref, + int type_repr: @type_repr ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +token_tree_meta( + unique int id: @token_tree_meta +); + +#keyset[id] +token_tree_meta_paths( + int id: @token_tree_meta ref, + int path: @path ref +); + +#keyset[id] +token_tree_meta_token_trees( + int id: @token_tree_meta ref, + int token_tree: @token_tree ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +unsafe_meta( + unique int id: @unsafe_meta +); + +#keyset[id] +unsafe_meta_is_unsafe( + int id: @unsafe_meta ref +); + +#keyset[id] +unsafe_meta_meta( + int id: @unsafe_meta ref, + int meta: @meta ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +variant_const_args( + int id: @variant ref, + int const_arg: @const_arg ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +#keyset[id] +block_expr_try_block_modifiers( + int id: @block_expr ref, + int try_block_modifier: @try_block_modifier ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_trait_ties( + int id: @impl ref, + int trait_ty: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_impl_restrictions( + int id: @trait ref, + int impl_restriction: @impl_restriction ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +@type_item = + @enum +| @struct +| @union +; + +#keyset[id, index] +type_item_derive_macro_expansions( + int id: @type_item ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +#keyset[id, index] +type_item_attrs( + int id: @type_item ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_item_generic_param_lists( + int id: @type_item ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_item_names( + int id: @type_item ref, + int name: @name ref +); + +#keyset[id] +type_item_visibilities( + int id: @type_item ref, + int visibility: @visibility ref +); + +#keyset[id] +type_item_where_clauses( + int id: @type_item ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/upgrade.properties b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/upgrade.properties new file mode 100644 index 000000000000..289556265df7 --- /dev/null +++ b/rust/downgrades/9487e73d9da6508522f07a34bc4aafa8d55c0f5f/upgrade.properties @@ -0,0 +1,8 @@ +description: Downgrade rust-analyzer to 0.0.352 +compatibility: partial + +locatable_locations.rel: run downgrade.ql new_locatable_locations +cfg_pred_exprs.rel: delete +cfg_pred_expr_cfg_predicates.rel: delete +cfg_pred_pats.rel: delete +cfg_pred_pat_cfg_predicates.rel: delete diff --git a/rust/ql/lib/change-notes/2026-10-02-rust-analyzer-0.0.356.md b/rust/ql/lib/change-notes/2026-10-02-rust-analyzer-0.0.356.md new file mode 100644 index 000000000000..ab18b6c5d852 --- /dev/null +++ b/rust/ql/lib/change-notes/2026-10-02-rust-analyzer-0.0.356.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* The Rust extractor has been upgraded to use `rust-analyzer` version 0.0.356. As a result, the AST exposed by the Rust libraries has changed: new `CfgPredExpr` and `CfgPredPat` classes have been added. diff --git a/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/old.dbscheme b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/old.dbscheme new file mode 100644 index 000000000000..3af0bba56aa5 --- /dev/null +++ b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/old.dbscheme @@ -0,0 +1,3746 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @any_attr +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @callable +| @cfg_predicate +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @impl_restriction +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @mut_restriction +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @try_block_modifier +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @visibility_inner +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +@any_attr = + @attr +| @doc_comment +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @any_attr ref +); + +@cfg_predicate = + @cfg_atom +| @cfg_composite +; + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @include_bytes_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +impl_restrictions( + unique int id: @impl_restriction +); + +#keyset[id] +impl_restriction_visibility_inners( + int id: @impl_restriction ref, + int visibility_inner: @visibility_inner ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @any_attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +@meta = + @cfg_attr_meta +| @cfg_meta +| @key_value_meta +| @path_meta +| @token_tree_meta +| @unsafe_meta +; + +mut_restrictions( + unique int id: @mut_restriction +); + +#keyset[id] +mut_restriction_is_mut( + int id: @mut_restriction ref +); + +#keyset[id] +mut_restriction_visibility_inners( + int id: @mut_restriction ref, + int visibility_inner: @visibility_inner ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @const_block_pat +| @deref_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @not_null +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_field_default_vals( + int id: @struct_field ref, + int default_val: @const_arg ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_mut_restrictions( + int id: @struct_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +try_block_modifiers( + unique int id: @try_block_modifier +); + +#keyset[id] +try_block_modifier_is_try( + int id: @try_block_modifier ref +); + +#keyset[id] +try_block_modifier_type_reprs( + int id: @try_block_modifier ref, + int type_repr: @type_repr ref +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +tuple_field_mut_restrictions( + int id: @tuple_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @pattern_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_visibility_inners( + int id: @visibility ref, + int visibility_inner: @visibility_inner ref +); + +visibility_inners( + unique int id: @visibility_inner +); + +#keyset[id] +visibility_inner_paths( + int id: @visibility_inner ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +#keyset[id, index] +asm_clobber_abi_attrs( + int id: @asm_clobber_abi ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id, index] +asm_operand_named_attrs( + int id: @asm_operand_named ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +#keyset[id, index] +asm_options_list_attrs( + int id: @asm_options_list ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +cfg_atoms( + unique int id: @cfg_atom +); + +cfg_attr_meta( + unique int id: @cfg_attr_meta +); + +#keyset[id] +cfg_attr_meta_cfg_predicates( + int id: @cfg_attr_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +#keyset[id, index] +cfg_attr_meta_metas( + int id: @cfg_attr_meta ref, + int index: int ref, + int meta: @meta ref +); + +cfg_composites( + unique int id: @cfg_composite +); + +#keyset[id, index] +cfg_composite_cfg_predicates( + int id: @cfg_composite ref, + int index: int ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_meta( + unique int id: @cfg_meta +); + +#keyset[id] +cfg_meta_cfg_predicates( + int id: @cfg_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +deref_pats( + unique int id: @deref_pat +); + +#keyset[id] +deref_pat_pats( + int id: @deref_pat ref, + int pat: @pat ref +); + +doc_comments( + unique int id: @doc_comment +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +include_bytes_exprs( + unique int id: @include_bytes_expr +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @type_item +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +key_value_meta( + unique int id: @key_value_meta +); + +#keyset[id] +key_value_meta_exprs( + int id: @key_value_meta ref, + int expr: @expr ref +); + +#keyset[id] +key_value_meta_paths( + int id: @key_value_meta ref, + int path: @path ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +not_nulls( + unique int id: @not_null +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_meta( + unique int id: @path_meta +); + +#keyset[id] +path_meta_paths( + int id: @path_meta ref, + int path: @path ref +); + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +pattern_type_reprs( + unique int id: @pattern_type_repr +); + +#keyset[id] +pattern_type_repr_pats( + int id: @pattern_type_repr ref, + int pat: @pat ref +); + +#keyset[id] +pattern_type_repr_type_reprs( + int id: @pattern_type_repr ref, + int type_repr: @type_repr ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +token_tree_meta( + unique int id: @token_tree_meta +); + +#keyset[id] +token_tree_meta_paths( + int id: @token_tree_meta ref, + int path: @path ref +); + +#keyset[id] +token_tree_meta_token_trees( + int id: @token_tree_meta ref, + int token_tree: @token_tree ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +unsafe_meta( + unique int id: @unsafe_meta +); + +#keyset[id] +unsafe_meta_is_unsafe( + int id: @unsafe_meta ref +); + +#keyset[id] +unsafe_meta_meta( + int id: @unsafe_meta ref, + int meta: @meta ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +variant_const_args( + int id: @variant ref, + int const_arg: @const_arg ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +#keyset[id] +block_expr_try_block_modifiers( + int id: @block_expr ref, + int try_block_modifier: @try_block_modifier ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_trait_ties( + int id: @impl ref, + int trait_ty: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_impl_restrictions( + int id: @trait ref, + int impl_restriction: @impl_restriction ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +@type_item = + @enum +| @struct +| @union +; + +#keyset[id, index] +type_item_derive_macro_expansions( + int id: @type_item ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +#keyset[id, index] +type_item_attrs( + int id: @type_item ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_item_generic_param_lists( + int id: @type_item ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_item_names( + int id: @type_item ref, + int name: @name ref +); + +#keyset[id] +type_item_visibilities( + int id: @type_item ref, + int visibility: @visibility ref +); + +#keyset[id] +type_item_where_clauses( + int id: @type_item ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/rust.dbscheme b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/rust.dbscheme new file mode 100644 index 000000000000..9487e73d9da6 --- /dev/null +++ b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/rust.dbscheme @@ -0,0 +1,3768 @@ +// generated by codegen, do not edit + +// from ../shared/tree-sitter-extractor/src/generator/prefix.dbscheme +/*- Files and folders -*/ + +/** + * The location of an element. + * The location spans column `startcolumn` of line `startline` to + * column `endcolumn` of line `endline` in file `file`. + * For more information, see + * [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/). + */ +locations_default( + unique int id: @location_default, + int file: @file ref, + int beginLine: int ref, + int beginColumn: int ref, + int endLine: int ref, + int endColumn: int ref +); + +files( + unique int id: @file, + string name: string ref +); + +folders( + unique int id: @folder, + string name: string ref +); + +@container = @file | @folder + +containerparent( + int parent: @container ref, + unique int child: @container ref +); + +/*- Empty location -*/ + +empty_location( + int location: @location_default ref +); + +/*- Source location prefix -*/ + +/** + * The source location of the snapshot. + */ +sourceLocationPrefix(string prefix : string ref); + +/*- Diagnostic messages -*/ + +diagnostics( + unique int id: @diagnostic, + int severity: int ref, + string error_tag: string ref, + string error_message: string ref, + string full_error_message: string ref, + int location: @location_default ref +); + +/*- Diagnostic messages: severity -*/ + +case @diagnostic.severity of + 10 = @diagnostic_debug +| 20 = @diagnostic_info +| 30 = @diagnostic_warning +| 40 = @diagnostic_error +; + +/*- YAML -*/ + +#keyset[parent, idx] +yaml (unique int id: @yaml_node, + int kind: int ref, + int parent: @yaml_node_parent ref, + int idx: int ref, + string tag: string ref, + string tostring: string ref); + +case @yaml_node.kind of + 0 = @yaml_scalar_node +| 1 = @yaml_mapping_node +| 2 = @yaml_sequence_node +| 3 = @yaml_alias_node +; + +@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node; + +@yaml_node_parent = @yaml_collection_node | @file; + +yaml_anchors (unique int node: @yaml_node ref, + string anchor: string ref); + +yaml_aliases (unique int alias: @yaml_alias_node ref, + string target: string ref); + +yaml_scalars (unique int scalar: @yaml_scalar_node ref, + int style: int ref, + string value: string ref); + +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + +yaml_errors (unique int id: @yaml_error, + string message: string ref); + +yaml_locations(unique int locatable: @yaml_locatable ref, + int location: @location_default ref); + +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; + +/*- Database metadata -*/ + +/** + * The CLI will automatically emit applicable tuples for this table, + * such as `databaseMetadata("isOverlay", "true")` when building an + * overlay database. + */ +databaseMetadata( + string metadataKey: string ref, + string value: string ref +); + +/*- Overlay support -*/ + +/** + * The CLI will automatically emit tuples for each new/modified/deleted file + * when building an overlay database. + */ +overlayChangedFiles( + string path: string ref +); + + +// from prefix.dbscheme +#keyset[id] +locatable_locations( + int id: @locatable ref, + int location: @location_default ref +); + + +// from schema + +@element = + @extractor_step +| @locatable +| @named_crate +| @unextracted +; + +extractor_steps( + unique int id: @extractor_step, + string action: string ref, + int duration_ms: int ref +); + +#keyset[id] +extractor_step_files( + int id: @extractor_step ref, + int file: @file ref +); + +@locatable = + @ast_node +| @crate +; + +named_crates( + unique int id: @named_crate, + string name: string ref, + int crate: @crate ref +); + +@unextracted = + @missing +| @unimplemented +; + +@ast_node = + @abi +| @addressable +| @any_attr +| @arg_list +| @asm_dir_spec +| @asm_operand +| @asm_operand_expr +| @asm_option +| @asm_piece +| @asm_reg_spec +| @assoc_item_list +| @callable +| @cfg_predicate +| @expr +| @extern_item_list +| @field_list +| @for_binder +| @format_args_arg +| @generic_arg +| @generic_arg_list +| @generic_param +| @generic_param_list +| @impl_restriction +| @item_list +| @label +| @let_else +| @macro_items +| @match_arm +| @match_arm_list +| @match_guard +| @meta +| @mut_restriction +| @name +| @param_base +| @param_list +| @parenthesized_arg_list +| @pat +| @path +| @path_ast_node +| @path_segment +| @rename +| @ret_type_repr +| @return_type_syntax +| @source_file +| @stmt +| @stmt_list +| @struct_expr_field +| @struct_expr_field_list +| @struct_field +| @struct_pat_field +| @struct_pat_field_list +| @token +| @token_tree +| @try_block_modifier +| @tuple_field +| @type_bound +| @type_bound_list +| @type_repr +| @use_bound_generic_arg +| @use_bound_generic_args +| @use_tree +| @use_tree_list +| @variant_list +| @visibility +| @visibility_inner +| @where_clause +| @where_pred +; + +crates( + unique int id: @crate +); + +#keyset[id] +crate_names( + int id: @crate ref, + string name: string ref +); + +#keyset[id] +crate_versions( + int id: @crate ref, + string version: string ref +); + +#keyset[id, index] +crate_cfg_options( + int id: @crate ref, + int index: int ref, + string cfg_option: string ref +); + +#keyset[id, index] +crate_named_dependencies( + int id: @crate ref, + int index: int ref, + int named_dependency: @named_crate ref +); + +missings( + unique int id: @missing +); + +unimplementeds( + unique int id: @unimplemented +); + +abis( + unique int id: @abi +); + +#keyset[id] +abi_abi_strings( + int id: @abi ref, + string abi_string: string ref +); + +@addressable = + @item +| @variant +; + +@any_attr = + @attr +| @doc_comment +; + +arg_lists( + unique int id: @arg_list +); + +#keyset[id, index] +arg_list_args( + int id: @arg_list ref, + int index: int ref, + int arg: @expr ref +); + +asm_dir_specs( + unique int id: @asm_dir_spec +); + +@asm_operand = + @asm_const +| @asm_label +| @asm_reg_operand +| @asm_sym +; + +asm_operand_exprs( + unique int id: @asm_operand_expr +); + +#keyset[id] +asm_operand_expr_in_exprs( + int id: @asm_operand_expr ref, + int in_expr: @expr ref +); + +#keyset[id] +asm_operand_expr_out_exprs( + int id: @asm_operand_expr ref, + int out_expr: @expr ref +); + +asm_options( + unique int id: @asm_option +); + +#keyset[id] +asm_option_is_raw( + int id: @asm_option ref +); + +@asm_piece = + @asm_clobber_abi +| @asm_operand_named +| @asm_options_list +; + +asm_reg_specs( + unique int id: @asm_reg_spec +); + +#keyset[id] +asm_reg_spec_identifiers( + int id: @asm_reg_spec ref, + int identifier: @name_ref ref +); + +assoc_item_lists( + unique int id: @assoc_item_list +); + +#keyset[id, index] +assoc_item_list_assoc_items( + int id: @assoc_item_list ref, + int index: int ref, + int assoc_item: @assoc_item ref +); + +#keyset[id, index] +assoc_item_list_attrs( + int id: @assoc_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +@callable = + @closure_expr +| @function +; + +#keyset[id] +callable_param_lists( + int id: @callable ref, + int param_list: @param_list ref +); + +#keyset[id, index] +callable_attrs( + int id: @callable ref, + int index: int ref, + int attr: @any_attr ref +); + +@cfg_predicate = + @cfg_atom +| @cfg_composite +; + +@expr = + @array_expr_internal +| @asm_expr +| @await_expr +| @become_expr +| @binary_expr +| @break_expr +| @call_expr +| @cast_expr +| @cfg_pred_expr +| @closure_expr +| @continue_expr +| @field_expr +| @format_args_expr +| @if_expr +| @include_bytes_expr +| @index_expr +| @labelable_expr +| @let_expr +| @literal_expr +| @macro_expr +| @match_expr +| @method_call_expr +| @offset_of_expr +| @paren_expr +| @path_expr_base +| @prefix_expr +| @range_expr +| @ref_expr +| @return_expr +| @struct_expr +| @try_expr +| @tuple_expr +| @underscore_expr +| @yeet_expr +| @yield_expr +; + +extern_item_lists( + unique int id: @extern_item_list +); + +#keyset[id, index] +extern_item_list_attrs( + int id: @extern_item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +extern_item_list_extern_items( + int id: @extern_item_list ref, + int index: int ref, + int extern_item: @extern_item ref +); + +@field_list = + @struct_field_list +| @tuple_field_list +; + +for_binders( + unique int id: @for_binder +); + +#keyset[id] +for_binder_generic_param_lists( + int id: @for_binder ref, + int generic_param_list: @generic_param_list ref +); + +format_args_args( + unique int id: @format_args_arg +); + +#keyset[id] +format_args_arg_exprs( + int id: @format_args_arg ref, + int expr: @expr ref +); + +#keyset[id] +format_args_arg_names( + int id: @format_args_arg ref, + int name: @name ref +); + +@generic_arg = + @assoc_type_arg +| @const_arg +| @lifetime_arg +| @type_arg +; + +generic_arg_lists( + unique int id: @generic_arg_list +); + +#keyset[id, index] +generic_arg_list_generic_args( + int id: @generic_arg_list ref, + int index: int ref, + int generic_arg: @generic_arg ref +); + +@generic_param = + @const_param +| @lifetime_param +| @type_param +; + +generic_param_lists( + unique int id: @generic_param_list +); + +#keyset[id, index] +generic_param_list_generic_params( + int id: @generic_param_list ref, + int index: int ref, + int generic_param: @generic_param ref +); + +impl_restrictions( + unique int id: @impl_restriction +); + +#keyset[id] +impl_restriction_visibility_inners( + int id: @impl_restriction ref, + int visibility_inner: @visibility_inner ref +); + +item_lists( + unique int id: @item_list +); + +#keyset[id, index] +item_list_attrs( + int id: @item_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +item_list_items( + int id: @item_list ref, + int index: int ref, + int item: @item ref +); + +labels( + unique int id: @label +); + +#keyset[id] +label_lifetimes( + int id: @label ref, + int lifetime: @lifetime ref +); + +let_elses( + unique int id: @let_else +); + +#keyset[id] +let_else_block_exprs( + int id: @let_else ref, + int block_expr: @block_expr ref +); + +macro_items( + unique int id: @macro_items +); + +#keyset[id, index] +macro_items_items( + int id: @macro_items ref, + int index: int ref, + int item: @item ref +); + +match_arms( + unique int id: @match_arm +); + +#keyset[id, index] +match_arm_attrs( + int id: @match_arm ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_arm_exprs( + int id: @match_arm ref, + int expr: @expr ref +); + +#keyset[id] +match_arm_guards( + int id: @match_arm ref, + int guard: @match_guard ref +); + +#keyset[id] +match_arm_pats( + int id: @match_arm ref, + int pat: @pat ref +); + +match_arm_lists( + unique int id: @match_arm_list +); + +#keyset[id, index] +match_arm_list_arms( + int id: @match_arm_list ref, + int index: int ref, + int arm: @match_arm ref +); + +#keyset[id, index] +match_arm_list_attrs( + int id: @match_arm_list ref, + int index: int ref, + int attr: @any_attr ref +); + +match_guards( + unique int id: @match_guard +); + +#keyset[id] +match_guard_conditions( + int id: @match_guard ref, + int condition: @expr ref +); + +@meta = + @cfg_attr_meta +| @cfg_meta +| @key_value_meta +| @path_meta +| @token_tree_meta +| @unsafe_meta +; + +mut_restrictions( + unique int id: @mut_restriction +); + +#keyset[id] +mut_restriction_is_mut( + int id: @mut_restriction ref +); + +#keyset[id] +mut_restriction_visibility_inners( + int id: @mut_restriction ref, + int visibility_inner: @visibility_inner ref +); + +names( + unique int id: @name +); + +#keyset[id] +name_texts( + int id: @name ref, + string text: string ref +); + +@param_base = + @param +| @self_param +; + +#keyset[id, index] +param_base_attrs( + int id: @param_base ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +param_base_type_reprs( + int id: @param_base ref, + int type_repr: @type_repr ref +); + +param_lists( + unique int id: @param_list +); + +#keyset[id, index] +param_list_params( + int id: @param_list ref, + int index: int ref, + int param: @param ref +); + +#keyset[id] +param_list_self_params( + int id: @param_list ref, + int self_param: @self_param ref +); + +parenthesized_arg_lists( + unique int id: @parenthesized_arg_list +); + +#keyset[id, index] +parenthesized_arg_list_type_args( + int id: @parenthesized_arg_list ref, + int index: int ref, + int type_arg: @type_arg ref +); + +@pat = + @box_pat +| @cfg_pred_pat +| @const_block_pat +| @deref_pat +| @ident_pat +| @literal_pat +| @macro_pat +| @not_null +| @or_pat +| @paren_pat +| @path_pat +| @range_pat +| @ref_pat +| @rest_pat +| @slice_pat +| @struct_pat +| @tuple_pat +| @tuple_struct_pat +| @wildcard_pat +; + +paths( + unique int id: @path +); + +#keyset[id] +path_qualifiers( + int id: @path ref, + int qualifier: @path ref +); + +#keyset[id] +path_segments_( + int id: @path ref, + int segment: @path_segment ref +); + +@path_ast_node = + @path_expr +| @path_pat +| @struct_expr +| @struct_pat +| @tuple_struct_pat +; + +#keyset[id] +path_ast_node_paths( + int id: @path_ast_node ref, + int path: @path ref +); + +path_segments( + unique int id: @path_segment +); + +#keyset[id] +path_segment_generic_arg_lists( + int id: @path_segment ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +path_segment_identifiers( + int id: @path_segment ref, + int identifier: @name_ref ref +); + +#keyset[id] +path_segment_parenthesized_arg_lists( + int id: @path_segment ref, + int parenthesized_arg_list: @parenthesized_arg_list ref +); + +#keyset[id] +path_segment_ret_types( + int id: @path_segment ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +path_segment_return_type_syntaxes( + int id: @path_segment ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +path_segment_type_reprs( + int id: @path_segment ref, + int type_repr: @type_repr ref +); + +#keyset[id] +path_segment_trait_type_reprs( + int id: @path_segment ref, + int trait_type_repr: @path_type_repr ref +); + +renames( + unique int id: @rename +); + +#keyset[id] +rename_names( + int id: @rename ref, + int name: @name ref +); + +ret_type_reprs( + unique int id: @ret_type_repr +); + +#keyset[id] +ret_type_repr_type_reprs( + int id: @ret_type_repr ref, + int type_repr: @type_repr ref +); + +return_type_syntaxes( + unique int id: @return_type_syntax +); + +source_files( + unique int id: @source_file +); + +#keyset[id, index] +source_file_attrs( + int id: @source_file ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +source_file_items( + int id: @source_file ref, + int index: int ref, + int item: @item ref +); + +@stmt = + @expr_stmt +| @item +| @let_stmt +; + +stmt_lists( + unique int id: @stmt_list +); + +#keyset[id, index] +stmt_list_attrs( + int id: @stmt_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +stmt_list_statements( + int id: @stmt_list ref, + int index: int ref, + int statement: @stmt ref +); + +#keyset[id] +stmt_list_tail_exprs( + int id: @stmt_list ref, + int tail_expr: @expr ref +); + +struct_expr_fields( + unique int id: @struct_expr_field +); + +#keyset[id, index] +struct_expr_field_attrs( + int id: @struct_expr_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_expr_field_exprs( + int id: @struct_expr_field ref, + int expr: @expr ref +); + +#keyset[id] +struct_expr_field_identifiers( + int id: @struct_expr_field ref, + int identifier: @name_ref ref +); + +struct_expr_field_lists( + unique int id: @struct_expr_field_list +); + +#keyset[id, index] +struct_expr_field_list_attrs( + int id: @struct_expr_field_list ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +struct_expr_field_list_fields( + int id: @struct_expr_field_list ref, + int index: int ref, + int field: @struct_expr_field ref +); + +#keyset[id] +struct_expr_field_list_spreads( + int id: @struct_expr_field_list ref, + int spread: @expr ref +); + +struct_fields( + unique int id: @struct_field +); + +#keyset[id, index] +struct_field_attrs( + int id: @struct_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_field_default_vals( + int id: @struct_field ref, + int default_val: @const_arg ref +); + +#keyset[id] +struct_field_is_unsafe( + int id: @struct_field ref +); + +#keyset[id] +struct_field_mut_restrictions( + int id: @struct_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +struct_field_names( + int id: @struct_field ref, + int name: @name ref +); + +#keyset[id] +struct_field_type_reprs( + int id: @struct_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +struct_field_visibilities( + int id: @struct_field ref, + int visibility: @visibility ref +); + +struct_pat_fields( + unique int id: @struct_pat_field +); + +#keyset[id, index] +struct_pat_field_attrs( + int id: @struct_pat_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +struct_pat_field_identifiers( + int id: @struct_pat_field ref, + int identifier: @name_ref ref +); + +#keyset[id] +struct_pat_field_pats( + int id: @struct_pat_field ref, + int pat: @pat ref +); + +struct_pat_field_lists( + unique int id: @struct_pat_field_list +); + +#keyset[id, index] +struct_pat_field_list_fields( + int id: @struct_pat_field_list ref, + int index: int ref, + int field: @struct_pat_field ref +); + +#keyset[id] +struct_pat_field_list_rest_pats( + int id: @struct_pat_field_list ref, + int rest_pat: @rest_pat ref +); + +@token = + @comment +; + +token_trees( + unique int id: @token_tree +); + +try_block_modifiers( + unique int id: @try_block_modifier +); + +#keyset[id] +try_block_modifier_is_try( + int id: @try_block_modifier ref +); + +#keyset[id] +try_block_modifier_type_reprs( + int id: @try_block_modifier ref, + int type_repr: @type_repr ref +); + +tuple_fields( + unique int id: @tuple_field +); + +#keyset[id, index] +tuple_field_attrs( + int id: @tuple_field ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +tuple_field_mut_restrictions( + int id: @tuple_field ref, + int mut_restriction: @mut_restriction ref +); + +#keyset[id] +tuple_field_type_reprs( + int id: @tuple_field ref, + int type_repr: @type_repr ref +); + +#keyset[id] +tuple_field_visibilities( + int id: @tuple_field ref, + int visibility: @visibility ref +); + +type_bounds( + unique int id: @type_bound +); + +#keyset[id] +type_bound_for_binders( + int id: @type_bound ref, + int for_binder: @for_binder ref +); + +#keyset[id] +type_bound_is_async( + int id: @type_bound ref +); + +#keyset[id] +type_bound_is_const( + int id: @type_bound ref +); + +#keyset[id] +type_bound_lifetimes( + int id: @type_bound ref, + int lifetime: @lifetime ref +); + +#keyset[id] +type_bound_type_reprs( + int id: @type_bound ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_bound_use_bound_generic_args( + int id: @type_bound ref, + int use_bound_generic_args: @use_bound_generic_args ref +); + +type_bound_lists( + unique int id: @type_bound_list +); + +#keyset[id, index] +type_bound_list_bounds( + int id: @type_bound_list ref, + int index: int ref, + int bound: @type_bound ref +); + +@type_repr = + @array_type_repr +| @dyn_trait_type_repr +| @fn_ptr_type_repr +| @for_type_repr +| @impl_trait_type_repr +| @infer_type_repr +| @macro_type_repr +| @never_type_repr +| @paren_type_repr +| @path_type_repr +| @pattern_type_repr +| @ptr_type_repr +| @ref_type_repr +| @slice_type_repr +| @tuple_type_repr +; + +@use_bound_generic_arg = + @lifetime +| @name_ref +; + +use_bound_generic_args( + unique int id: @use_bound_generic_args +); + +#keyset[id, index] +use_bound_generic_args_use_bound_generic_args( + int id: @use_bound_generic_args ref, + int index: int ref, + int use_bound_generic_arg: @use_bound_generic_arg ref +); + +use_trees( + unique int id: @use_tree +); + +#keyset[id] +use_tree_is_glob( + int id: @use_tree ref +); + +#keyset[id] +use_tree_paths( + int id: @use_tree ref, + int path: @path ref +); + +#keyset[id] +use_tree_renames( + int id: @use_tree ref, + int rename: @rename ref +); + +#keyset[id] +use_tree_use_tree_lists( + int id: @use_tree ref, + int use_tree_list: @use_tree_list ref +); + +use_tree_lists( + unique int id: @use_tree_list +); + +#keyset[id, index] +use_tree_list_use_trees( + int id: @use_tree_list ref, + int index: int ref, + int use_tree: @use_tree ref +); + +variant_lists( + unique int id: @variant_list +); + +#keyset[id, index] +variant_list_variants( + int id: @variant_list ref, + int index: int ref, + int variant: @variant ref +); + +visibilities( + unique int id: @visibility +); + +#keyset[id] +visibility_visibility_inners( + int id: @visibility ref, + int visibility_inner: @visibility_inner ref +); + +visibility_inners( + unique int id: @visibility_inner +); + +#keyset[id] +visibility_inner_paths( + int id: @visibility_inner ref, + int path: @path ref +); + +where_clauses( + unique int id: @where_clause +); + +#keyset[id, index] +where_clause_predicates( + int id: @where_clause ref, + int index: int ref, + int predicate: @where_pred ref +); + +where_preds( + unique int id: @where_pred +); + +#keyset[id] +where_pred_for_binders( + int id: @where_pred ref, + int for_binder: @for_binder ref +); + +#keyset[id] +where_pred_lifetimes( + int id: @where_pred ref, + int lifetime: @lifetime ref +); + +#keyset[id] +where_pred_type_reprs( + int id: @where_pred ref, + int type_repr: @type_repr ref +); + +#keyset[id] +where_pred_type_bound_lists( + int id: @where_pred ref, + int type_bound_list: @type_bound_list ref +); + +array_expr_internals( + unique int id: @array_expr_internal +); + +#keyset[id, index] +array_expr_internal_attrs( + int id: @array_expr_internal ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +array_expr_internal_exprs( + int id: @array_expr_internal ref, + int index: int ref, + int expr: @expr ref +); + +#keyset[id] +array_expr_internal_is_semicolon( + int id: @array_expr_internal ref +); + +array_type_reprs( + unique int id: @array_type_repr +); + +#keyset[id] +array_type_repr_const_args( + int id: @array_type_repr ref, + int const_arg: @const_arg ref +); + +#keyset[id] +array_type_repr_element_type_reprs( + int id: @array_type_repr ref, + int element_type_repr: @type_repr ref +); + +asm_clobber_abis( + unique int id: @asm_clobber_abi +); + +#keyset[id, index] +asm_clobber_abi_attrs( + int id: @asm_clobber_abi ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_consts( + unique int id: @asm_const +); + +#keyset[id] +asm_const_exprs( + int id: @asm_const ref, + int expr: @expr ref +); + +#keyset[id] +asm_const_is_const( + int id: @asm_const ref +); + +asm_labels( + unique int id: @asm_label +); + +#keyset[id] +asm_label_block_exprs( + int id: @asm_label ref, + int block_expr: @block_expr ref +); + +asm_operand_nameds( + unique int id: @asm_operand_named +); + +#keyset[id] +asm_operand_named_asm_operands( + int id: @asm_operand_named ref, + int asm_operand: @asm_operand ref +); + +#keyset[id, index] +asm_operand_named_attrs( + int id: @asm_operand_named ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +asm_operand_named_names( + int id: @asm_operand_named ref, + int name: @name ref +); + +asm_options_lists( + unique int id: @asm_options_list +); + +#keyset[id, index] +asm_options_list_asm_options( + int id: @asm_options_list ref, + int index: int ref, + int asm_option: @asm_option ref +); + +#keyset[id, index] +asm_options_list_attrs( + int id: @asm_options_list ref, + int index: int ref, + int attr: @any_attr ref +); + +asm_reg_operands( + unique int id: @asm_reg_operand +); + +#keyset[id] +asm_reg_operand_asm_dir_specs( + int id: @asm_reg_operand ref, + int asm_dir_spec: @asm_dir_spec ref +); + +#keyset[id] +asm_reg_operand_asm_operand_exprs( + int id: @asm_reg_operand ref, + int asm_operand_expr: @asm_operand_expr ref +); + +#keyset[id] +asm_reg_operand_asm_reg_specs( + int id: @asm_reg_operand ref, + int asm_reg_spec: @asm_reg_spec ref +); + +asm_syms( + unique int id: @asm_sym +); + +#keyset[id] +asm_sym_paths( + int id: @asm_sym ref, + int path: @path ref +); + +assoc_type_args( + unique int id: @assoc_type_arg +); + +#keyset[id] +assoc_type_arg_const_args( + int id: @assoc_type_arg ref, + int const_arg: @const_arg ref +); + +#keyset[id] +assoc_type_arg_generic_arg_lists( + int id: @assoc_type_arg ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +assoc_type_arg_identifiers( + int id: @assoc_type_arg ref, + int identifier: @name_ref ref +); + +#keyset[id] +assoc_type_arg_param_lists( + int id: @assoc_type_arg ref, + int param_list: @param_list ref +); + +#keyset[id] +assoc_type_arg_ret_types( + int id: @assoc_type_arg ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +assoc_type_arg_return_type_syntaxes( + int id: @assoc_type_arg ref, + int return_type_syntax: @return_type_syntax ref +); + +#keyset[id] +assoc_type_arg_type_reprs( + int id: @assoc_type_arg ref, + int type_repr: @type_repr ref +); + +#keyset[id] +assoc_type_arg_type_bound_lists( + int id: @assoc_type_arg ref, + int type_bound_list: @type_bound_list ref +); + +attrs( + unique int id: @attr +); + +#keyset[id] +attr_meta( + int id: @attr ref, + int meta: @meta ref +); + +await_exprs( + unique int id: @await_expr +); + +#keyset[id, index] +await_expr_attrs( + int id: @await_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +await_expr_exprs( + int id: @await_expr ref, + int expr: @expr ref +); + +become_exprs( + unique int id: @become_expr +); + +#keyset[id, index] +become_expr_attrs( + int id: @become_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +become_expr_exprs( + int id: @become_expr ref, + int expr: @expr ref +); + +binary_exprs( + unique int id: @binary_expr +); + +#keyset[id, index] +binary_expr_attrs( + int id: @binary_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +binary_expr_lhs( + int id: @binary_expr ref, + int lhs: @expr ref +); + +#keyset[id] +binary_expr_operator_names( + int id: @binary_expr ref, + string operator_name: string ref +); + +#keyset[id] +binary_expr_rhs( + int id: @binary_expr ref, + int rhs: @expr ref +); + +box_pats( + unique int id: @box_pat +); + +#keyset[id] +box_pat_pats( + int id: @box_pat ref, + int pat: @pat ref +); + +break_exprs( + unique int id: @break_expr +); + +#keyset[id, index] +break_expr_attrs( + int id: @break_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +break_expr_exprs( + int id: @break_expr ref, + int expr: @expr ref +); + +#keyset[id] +break_expr_lifetimes( + int id: @break_expr ref, + int lifetime: @lifetime ref +); + +call_exprs( + unique int id: @call_expr +); + +#keyset[id] +call_expr_arg_lists( + int id: @call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +call_expr_attrs( + int id: @call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +call_expr_functions( + int id: @call_expr ref, + int function: @expr ref +); + +cast_exprs( + unique int id: @cast_expr +); + +#keyset[id, index] +cast_expr_attrs( + int id: @cast_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +cast_expr_exprs( + int id: @cast_expr ref, + int expr: @expr ref +); + +#keyset[id] +cast_expr_type_reprs( + int id: @cast_expr ref, + int type_repr: @type_repr ref +); + +cfg_atoms( + unique int id: @cfg_atom +); + +cfg_attr_meta( + unique int id: @cfg_attr_meta +); + +#keyset[id] +cfg_attr_meta_cfg_predicates( + int id: @cfg_attr_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +#keyset[id, index] +cfg_attr_meta_metas( + int id: @cfg_attr_meta ref, + int index: int ref, + int meta: @meta ref +); + +cfg_composites( + unique int id: @cfg_composite +); + +#keyset[id, index] +cfg_composite_cfg_predicates( + int id: @cfg_composite ref, + int index: int ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_meta( + unique int id: @cfg_meta +); + +#keyset[id] +cfg_meta_cfg_predicates( + int id: @cfg_meta ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_pred_exprs( + unique int id: @cfg_pred_expr +); + +#keyset[id] +cfg_pred_expr_cfg_predicates( + int id: @cfg_pred_expr ref, + int cfg_predicate: @cfg_predicate ref +); + +cfg_pred_pats( + unique int id: @cfg_pred_pat +); + +#keyset[id] +cfg_pred_pat_cfg_predicates( + int id: @cfg_pred_pat ref, + int cfg_predicate: @cfg_predicate ref +); + +closure_exprs( + unique int id: @closure_expr +); + +#keyset[id] +closure_expr_closure_bodies( + int id: @closure_expr ref, + int closure_body: @expr ref +); + +#keyset[id] +closure_expr_for_binders( + int id: @closure_expr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +closure_expr_is_async( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_const( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_gen( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_move( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_is_static( + int id: @closure_expr ref +); + +#keyset[id] +closure_expr_ret_types( + int id: @closure_expr ref, + int ret_type: @ret_type_repr ref +); + +comments( + unique int id: @comment, + int parent: @ast_node ref, + string text: string ref +); + +const_args( + unique int id: @const_arg +); + +#keyset[id] +const_arg_exprs( + int id: @const_arg ref, + int expr: @expr ref +); + +const_block_pats( + unique int id: @const_block_pat +); + +#keyset[id] +const_block_pat_block_exprs( + int id: @const_block_pat ref, + int block_expr: @block_expr ref +); + +#keyset[id] +const_block_pat_is_const( + int id: @const_block_pat ref +); + +const_params( + unique int id: @const_param +); + +#keyset[id, index] +const_param_attrs( + int id: @const_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_param_default_vals( + int id: @const_param ref, + int default_val: @const_arg ref +); + +#keyset[id] +const_param_is_const( + int id: @const_param ref +); + +#keyset[id] +const_param_names( + int id: @const_param ref, + int name: @name ref +); + +#keyset[id] +const_param_type_reprs( + int id: @const_param ref, + int type_repr: @type_repr ref +); + +continue_exprs( + unique int id: @continue_expr +); + +#keyset[id, index] +continue_expr_attrs( + int id: @continue_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +continue_expr_lifetimes( + int id: @continue_expr ref, + int lifetime: @lifetime ref +); + +deref_pats( + unique int id: @deref_pat +); + +#keyset[id] +deref_pat_pats( + int id: @deref_pat ref, + int pat: @pat ref +); + +doc_comments( + unique int id: @doc_comment +); + +dyn_trait_type_reprs( + unique int id: @dyn_trait_type_repr +); + +#keyset[id] +dyn_trait_type_repr_type_bound_lists( + int id: @dyn_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +expr_stmts( + unique int id: @expr_stmt +); + +#keyset[id] +expr_stmt_exprs( + int id: @expr_stmt ref, + int expr: @expr ref +); + +field_exprs( + unique int id: @field_expr +); + +#keyset[id, index] +field_expr_attrs( + int id: @field_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +field_expr_containers( + int id: @field_expr ref, + int container: @expr ref +); + +#keyset[id] +field_expr_identifiers( + int id: @field_expr ref, + int identifier: @name_ref ref +); + +fn_ptr_type_reprs( + unique int id: @fn_ptr_type_repr +); + +#keyset[id] +fn_ptr_type_repr_abis( + int id: @fn_ptr_type_repr ref, + int abi: @abi ref +); + +#keyset[id] +fn_ptr_type_repr_is_async( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_const( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_is_unsafe( + int id: @fn_ptr_type_repr ref +); + +#keyset[id] +fn_ptr_type_repr_param_lists( + int id: @fn_ptr_type_repr ref, + int param_list: @param_list ref +); + +#keyset[id] +fn_ptr_type_repr_ret_types( + int id: @fn_ptr_type_repr ref, + int ret_type: @ret_type_repr ref +); + +for_type_reprs( + unique int id: @for_type_repr +); + +#keyset[id] +for_type_repr_for_binders( + int id: @for_type_repr ref, + int for_binder: @for_binder ref +); + +#keyset[id] +for_type_repr_type_reprs( + int id: @for_type_repr ref, + int type_repr: @type_repr ref +); + +format_args_exprs( + unique int id: @format_args_expr +); + +#keyset[id, index] +format_args_expr_args( + int id: @format_args_expr ref, + int index: int ref, + int arg: @format_args_arg ref +); + +#keyset[id, index] +format_args_expr_attrs( + int id: @format_args_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +format_args_expr_templates( + int id: @format_args_expr ref, + int template: @expr ref +); + +ident_pats( + unique int id: @ident_pat +); + +#keyset[id, index] +ident_pat_attrs( + int id: @ident_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ident_pat_is_mut( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_is_ref( + int id: @ident_pat ref +); + +#keyset[id] +ident_pat_names( + int id: @ident_pat ref, + int name: @name ref +); + +#keyset[id] +ident_pat_pats( + int id: @ident_pat ref, + int pat: @pat ref +); + +if_exprs( + unique int id: @if_expr +); + +#keyset[id, index] +if_expr_attrs( + int id: @if_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +if_expr_conditions( + int id: @if_expr ref, + int condition: @expr ref +); + +#keyset[id] +if_expr_elses( + int id: @if_expr ref, + int else: @expr ref +); + +#keyset[id] +if_expr_thens( + int id: @if_expr ref, + int then: @block_expr ref +); + +impl_trait_type_reprs( + unique int id: @impl_trait_type_repr +); + +#keyset[id] +impl_trait_type_repr_type_bound_lists( + int id: @impl_trait_type_repr ref, + int type_bound_list: @type_bound_list ref +); + +include_bytes_exprs( + unique int id: @include_bytes_expr +); + +index_exprs( + unique int id: @index_expr +); + +#keyset[id, index] +index_expr_attrs( + int id: @index_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +index_expr_bases( + int id: @index_expr ref, + int base: @expr ref +); + +#keyset[id] +index_expr_indices( + int id: @index_expr ref, + int index: @expr ref +); + +infer_type_reprs( + unique int id: @infer_type_repr +); + +@item = + @asm_expr +| @assoc_item +| @extern_block +| @extern_crate +| @extern_item +| @impl +| @macro_def +| @macro_rules +| @module +| @trait +| @type_item +| @use +; + +#keyset[id] +item_attribute_macro_expansions( + int id: @item ref, + int attribute_macro_expansion: @macro_items ref +); + +key_value_meta( + unique int id: @key_value_meta +); + +#keyset[id] +key_value_meta_exprs( + int id: @key_value_meta ref, + int expr: @expr ref +); + +#keyset[id] +key_value_meta_paths( + int id: @key_value_meta ref, + int path: @path ref +); + +@labelable_expr = + @block_expr +| @looping_expr +; + +#keyset[id] +labelable_expr_labels( + int id: @labelable_expr ref, + int label: @label ref +); + +let_exprs( + unique int id: @let_expr +); + +#keyset[id, index] +let_expr_attrs( + int id: @let_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_expr_scrutinees( + int id: @let_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +let_expr_pats( + int id: @let_expr ref, + int pat: @pat ref +); + +let_stmts( + unique int id: @let_stmt +); + +#keyset[id, index] +let_stmt_attrs( + int id: @let_stmt ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +let_stmt_initializers( + int id: @let_stmt ref, + int initializer: @expr ref +); + +#keyset[id] +let_stmt_let_elses( + int id: @let_stmt ref, + int let_else: @let_else ref +); + +#keyset[id] +let_stmt_pats( + int id: @let_stmt ref, + int pat: @pat ref +); + +#keyset[id] +let_stmt_type_reprs( + int id: @let_stmt ref, + int type_repr: @type_repr ref +); + +lifetimes( + unique int id: @lifetime +); + +#keyset[id] +lifetime_texts( + int id: @lifetime ref, + string text: string ref +); + +lifetime_args( + unique int id: @lifetime_arg +); + +#keyset[id] +lifetime_arg_lifetimes( + int id: @lifetime_arg ref, + int lifetime: @lifetime ref +); + +lifetime_params( + unique int id: @lifetime_param +); + +#keyset[id, index] +lifetime_param_attrs( + int id: @lifetime_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +lifetime_param_lifetimes( + int id: @lifetime_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +lifetime_param_type_bound_lists( + int id: @lifetime_param ref, + int type_bound_list: @type_bound_list ref +); + +literal_exprs( + unique int id: @literal_expr +); + +#keyset[id, index] +literal_expr_attrs( + int id: @literal_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +literal_expr_text_values( + int id: @literal_expr ref, + string text_value: string ref +); + +literal_pats( + unique int id: @literal_pat +); + +#keyset[id] +literal_pat_literals( + int id: @literal_pat ref, + int literal: @literal_expr ref +); + +macro_exprs( + unique int id: @macro_expr +); + +#keyset[id] +macro_expr_macro_calls( + int id: @macro_expr ref, + int macro_call: @macro_call ref +); + +macro_pats( + unique int id: @macro_pat +); + +#keyset[id] +macro_pat_macro_calls( + int id: @macro_pat ref, + int macro_call: @macro_call ref +); + +macro_type_reprs( + unique int id: @macro_type_repr +); + +#keyset[id] +macro_type_repr_macro_calls( + int id: @macro_type_repr ref, + int macro_call: @macro_call ref +); + +match_exprs( + unique int id: @match_expr +); + +#keyset[id, index] +match_expr_attrs( + int id: @match_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +match_expr_scrutinees( + int id: @match_expr ref, + int scrutinee: @expr ref +); + +#keyset[id] +match_expr_match_arm_lists( + int id: @match_expr ref, + int match_arm_list: @match_arm_list ref +); + +method_call_exprs( + unique int id: @method_call_expr +); + +#keyset[id] +method_call_expr_arg_lists( + int id: @method_call_expr ref, + int arg_list: @arg_list ref +); + +#keyset[id, index] +method_call_expr_attrs( + int id: @method_call_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +method_call_expr_generic_arg_lists( + int id: @method_call_expr ref, + int generic_arg_list: @generic_arg_list ref +); + +#keyset[id] +method_call_expr_identifiers( + int id: @method_call_expr ref, + int identifier: @name_ref ref +); + +#keyset[id] +method_call_expr_receivers( + int id: @method_call_expr ref, + int receiver: @expr ref +); + +name_refs( + unique int id: @name_ref +); + +#keyset[id] +name_ref_texts( + int id: @name_ref ref, + string text: string ref +); + +never_type_reprs( + unique int id: @never_type_repr +); + +not_nulls( + unique int id: @not_null +); + +offset_of_exprs( + unique int id: @offset_of_expr +); + +#keyset[id, index] +offset_of_expr_attrs( + int id: @offset_of_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +offset_of_expr_fields( + int id: @offset_of_expr ref, + int index: int ref, + int field: @name_ref ref +); + +#keyset[id] +offset_of_expr_type_reprs( + int id: @offset_of_expr ref, + int type_repr: @type_repr ref +); + +or_pats( + unique int id: @or_pat +); + +#keyset[id, index] +or_pat_pats( + int id: @or_pat ref, + int index: int ref, + int pat: @pat ref +); + +params( + unique int id: @param +); + +#keyset[id] +param_pats( + int id: @param ref, + int pat: @pat ref +); + +paren_exprs( + unique int id: @paren_expr +); + +#keyset[id, index] +paren_expr_attrs( + int id: @paren_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +paren_expr_exprs( + int id: @paren_expr ref, + int expr: @expr ref +); + +paren_pats( + unique int id: @paren_pat +); + +#keyset[id] +paren_pat_pats( + int id: @paren_pat ref, + int pat: @pat ref +); + +paren_type_reprs( + unique int id: @paren_type_repr +); + +#keyset[id] +paren_type_repr_type_reprs( + int id: @paren_type_repr ref, + int type_repr: @type_repr ref +); + +@path_expr_base = + @path_expr +; + +path_meta( + unique int id: @path_meta +); + +#keyset[id] +path_meta_paths( + int id: @path_meta ref, + int path: @path ref +); + +path_pats( + unique int id: @path_pat +); + +path_type_reprs( + unique int id: @path_type_repr +); + +#keyset[id] +path_type_repr_paths( + int id: @path_type_repr ref, + int path: @path ref +); + +pattern_type_reprs( + unique int id: @pattern_type_repr +); + +#keyset[id] +pattern_type_repr_pats( + int id: @pattern_type_repr ref, + int pat: @pat ref +); + +#keyset[id] +pattern_type_repr_type_reprs( + int id: @pattern_type_repr ref, + int type_repr: @type_repr ref +); + +prefix_exprs( + unique int id: @prefix_expr +); + +#keyset[id, index] +prefix_expr_attrs( + int id: @prefix_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +prefix_expr_exprs( + int id: @prefix_expr ref, + int expr: @expr ref +); + +#keyset[id] +prefix_expr_operator_names( + int id: @prefix_expr ref, + string operator_name: string ref +); + +ptr_type_reprs( + unique int id: @ptr_type_repr +); + +#keyset[id] +ptr_type_repr_is_const( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_is_mut( + int id: @ptr_type_repr ref +); + +#keyset[id] +ptr_type_repr_type_reprs( + int id: @ptr_type_repr ref, + int type_repr: @type_repr ref +); + +range_exprs( + unique int id: @range_expr +); + +#keyset[id, index] +range_expr_attrs( + int id: @range_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +range_expr_ends( + int id: @range_expr ref, + int end: @expr ref +); + +#keyset[id] +range_expr_operator_names( + int id: @range_expr ref, + string operator_name: string ref +); + +#keyset[id] +range_expr_starts( + int id: @range_expr ref, + int start: @expr ref +); + +range_pats( + unique int id: @range_pat +); + +#keyset[id] +range_pat_ends( + int id: @range_pat ref, + int end: @pat ref +); + +#keyset[id] +range_pat_operator_names( + int id: @range_pat ref, + string operator_name: string ref +); + +#keyset[id] +range_pat_starts( + int id: @range_pat ref, + int start: @pat ref +); + +ref_exprs( + unique int id: @ref_expr +); + +#keyset[id, index] +ref_expr_attrs( + int id: @ref_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +ref_expr_exprs( + int id: @ref_expr ref, + int expr: @expr ref +); + +#keyset[id] +ref_expr_is_const( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_mut( + int id: @ref_expr ref +); + +#keyset[id] +ref_expr_is_raw( + int id: @ref_expr ref +); + +ref_pats( + unique int id: @ref_pat +); + +#keyset[id] +ref_pat_is_mut( + int id: @ref_pat ref +); + +#keyset[id] +ref_pat_pats( + int id: @ref_pat ref, + int pat: @pat ref +); + +ref_type_reprs( + unique int id: @ref_type_repr +); + +#keyset[id] +ref_type_repr_is_mut( + int id: @ref_type_repr ref +); + +#keyset[id] +ref_type_repr_lifetimes( + int id: @ref_type_repr ref, + int lifetime: @lifetime ref +); + +#keyset[id] +ref_type_repr_type_reprs( + int id: @ref_type_repr ref, + int type_repr: @type_repr ref +); + +rest_pats( + unique int id: @rest_pat +); + +#keyset[id, index] +rest_pat_attrs( + int id: @rest_pat ref, + int index: int ref, + int attr: @any_attr ref +); + +return_exprs( + unique int id: @return_expr +); + +#keyset[id, index] +return_expr_attrs( + int id: @return_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +return_expr_exprs( + int id: @return_expr ref, + int expr: @expr ref +); + +self_params( + unique int id: @self_param +); + +#keyset[id] +self_param_is_ref( + int id: @self_param ref +); + +#keyset[id] +self_param_is_mut( + int id: @self_param ref +); + +#keyset[id] +self_param_lifetimes( + int id: @self_param ref, + int lifetime: @lifetime ref +); + +#keyset[id] +self_param_names( + int id: @self_param ref, + int name: @name ref +); + +slice_pats( + unique int id: @slice_pat +); + +#keyset[id, index] +slice_pat_pats( + int id: @slice_pat ref, + int index: int ref, + int pat: @pat ref +); + +slice_type_reprs( + unique int id: @slice_type_repr +); + +#keyset[id] +slice_type_repr_type_reprs( + int id: @slice_type_repr ref, + int type_repr: @type_repr ref +); + +struct_exprs( + unique int id: @struct_expr +); + +#keyset[id] +struct_expr_struct_expr_field_lists( + int id: @struct_expr ref, + int struct_expr_field_list: @struct_expr_field_list ref +); + +struct_field_lists( + unique int id: @struct_field_list +); + +#keyset[id, index] +struct_field_list_fields( + int id: @struct_field_list ref, + int index: int ref, + int field: @struct_field ref +); + +struct_pats( + unique int id: @struct_pat +); + +#keyset[id] +struct_pat_struct_pat_field_lists( + int id: @struct_pat ref, + int struct_pat_field_list: @struct_pat_field_list ref +); + +token_tree_meta( + unique int id: @token_tree_meta +); + +#keyset[id] +token_tree_meta_paths( + int id: @token_tree_meta ref, + int path: @path ref +); + +#keyset[id] +token_tree_meta_token_trees( + int id: @token_tree_meta ref, + int token_tree: @token_tree ref +); + +try_exprs( + unique int id: @try_expr +); + +#keyset[id, index] +try_expr_attrs( + int id: @try_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +try_expr_exprs( + int id: @try_expr ref, + int expr: @expr ref +); + +tuple_exprs( + unique int id: @tuple_expr +); + +#keyset[id, index] +tuple_expr_attrs( + int id: @tuple_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +tuple_expr_fields( + int id: @tuple_expr ref, + int index: int ref, + int field: @expr ref +); + +tuple_field_lists( + unique int id: @tuple_field_list +); + +#keyset[id, index] +tuple_field_list_fields( + int id: @tuple_field_list ref, + int index: int ref, + int field: @tuple_field ref +); + +tuple_pats( + unique int id: @tuple_pat +); + +#keyset[id, index] +tuple_pat_fields( + int id: @tuple_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_struct_pats( + unique int id: @tuple_struct_pat +); + +#keyset[id, index] +tuple_struct_pat_fields( + int id: @tuple_struct_pat ref, + int index: int ref, + int field: @pat ref +); + +tuple_type_reprs( + unique int id: @tuple_type_repr +); + +#keyset[id, index] +tuple_type_repr_fields( + int id: @tuple_type_repr ref, + int index: int ref, + int field: @type_repr ref +); + +type_args( + unique int id: @type_arg +); + +#keyset[id] +type_arg_type_reprs( + int id: @type_arg ref, + int type_repr: @type_repr ref +); + +type_params( + unique int id: @type_param +); + +#keyset[id, index] +type_param_attrs( + int id: @type_param ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_param_default_types( + int id: @type_param ref, + int default_type: @type_repr ref +); + +#keyset[id] +type_param_names( + int id: @type_param ref, + int name: @name ref +); + +#keyset[id] +type_param_type_bound_lists( + int id: @type_param ref, + int type_bound_list: @type_bound_list ref +); + +underscore_exprs( + unique int id: @underscore_expr +); + +#keyset[id, index] +underscore_expr_attrs( + int id: @underscore_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +unsafe_meta( + unique int id: @unsafe_meta +); + +#keyset[id] +unsafe_meta_is_unsafe( + int id: @unsafe_meta ref +); + +#keyset[id] +unsafe_meta_meta( + int id: @unsafe_meta ref, + int meta: @meta ref +); + +variants( + unique int id: @variant +); + +#keyset[id, index] +variant_attrs( + int id: @variant ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +variant_const_args( + int id: @variant ref, + int const_arg: @const_arg ref +); + +#keyset[id] +variant_field_lists( + int id: @variant ref, + int field_list: @field_list ref +); + +#keyset[id] +variant_names( + int id: @variant ref, + int name: @name ref +); + +#keyset[id] +variant_visibilities( + int id: @variant ref, + int visibility: @visibility ref +); + +wildcard_pats( + unique int id: @wildcard_pat +); + +yeet_exprs( + unique int id: @yeet_expr +); + +#keyset[id, index] +yeet_expr_attrs( + int id: @yeet_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yeet_expr_exprs( + int id: @yeet_expr ref, + int expr: @expr ref +); + +yield_exprs( + unique int id: @yield_expr +); + +#keyset[id, index] +yield_expr_attrs( + int id: @yield_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +yield_expr_exprs( + int id: @yield_expr ref, + int expr: @expr ref +); + +asm_exprs( + unique int id: @asm_expr +); + +#keyset[id, index] +asm_expr_asm_pieces( + int id: @asm_expr ref, + int index: int ref, + int asm_piece: @asm_piece ref +); + +#keyset[id, index] +asm_expr_attrs( + int id: @asm_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id, index] +asm_expr_templates( + int id: @asm_expr ref, + int index: int ref, + int template: @expr ref +); + +@assoc_item = + @const +| @function +| @macro_call +| @type_alias +; + +block_exprs( + unique int id: @block_expr +); + +#keyset[id, index] +block_expr_attrs( + int id: @block_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +block_expr_is_async( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_const( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_gen( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_move( + int id: @block_expr ref +); + +#keyset[id] +block_expr_is_unsafe( + int id: @block_expr ref +); + +#keyset[id] +block_expr_stmt_lists( + int id: @block_expr ref, + int stmt_list: @stmt_list ref +); + +#keyset[id] +block_expr_try_block_modifiers( + int id: @block_expr ref, + int try_block_modifier: @try_block_modifier ref +); + +extern_blocks( + unique int id: @extern_block +); + +#keyset[id] +extern_block_abis( + int id: @extern_block ref, + int abi: @abi ref +); + +#keyset[id, index] +extern_block_attrs( + int id: @extern_block ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_block_extern_item_lists( + int id: @extern_block ref, + int extern_item_list: @extern_item_list ref +); + +#keyset[id] +extern_block_is_unsafe( + int id: @extern_block ref +); + +extern_crates( + unique int id: @extern_crate +); + +#keyset[id, index] +extern_crate_attrs( + int id: @extern_crate ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +extern_crate_identifiers( + int id: @extern_crate ref, + int identifier: @name_ref ref +); + +#keyset[id] +extern_crate_renames( + int id: @extern_crate ref, + int rename: @rename ref +); + +#keyset[id] +extern_crate_visibilities( + int id: @extern_crate ref, + int visibility: @visibility ref +); + +@extern_item = + @function +| @macro_call +| @static +| @type_alias +; + +impls( + unique int id: @impl +); + +#keyset[id] +impl_assoc_item_lists( + int id: @impl ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +impl_attrs( + int id: @impl ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +impl_generic_param_lists( + int id: @impl ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +impl_is_const( + int id: @impl ref +); + +#keyset[id] +impl_is_default( + int id: @impl ref +); + +#keyset[id] +impl_is_unsafe( + int id: @impl ref +); + +#keyset[id] +impl_self_ties( + int id: @impl ref, + int self_ty: @type_repr ref +); + +#keyset[id] +impl_trait_ties( + int id: @impl ref, + int trait_ty: @type_repr ref +); + +#keyset[id] +impl_visibilities( + int id: @impl ref, + int visibility: @visibility ref +); + +#keyset[id] +impl_where_clauses( + int id: @impl ref, + int where_clause: @where_clause ref +); + +@looping_expr = + @for_expr +| @loop_expr +| @while_expr +; + +#keyset[id] +looping_expr_loop_bodies( + int id: @looping_expr ref, + int loop_body: @block_expr ref +); + +macro_defs( + unique int id: @macro_def +); + +#keyset[id] +macro_def_args( + int id: @macro_def ref, + int args: @token_tree ref +); + +#keyset[id, index] +macro_def_attrs( + int id: @macro_def ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_def_bodies( + int id: @macro_def ref, + int body: @token_tree ref +); + +#keyset[id] +macro_def_names( + int id: @macro_def ref, + int name: @name ref +); + +#keyset[id] +macro_def_visibilities( + int id: @macro_def ref, + int visibility: @visibility ref +); + +macro_rules( + unique int id: @macro_rules +); + +#keyset[id, index] +macro_rules_attrs( + int id: @macro_rules ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_rules_names( + int id: @macro_rules ref, + int name: @name ref +); + +#keyset[id] +macro_rules_token_trees( + int id: @macro_rules ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_rules_visibilities( + int id: @macro_rules ref, + int visibility: @visibility ref +); + +modules( + unique int id: @module +); + +#keyset[id, index] +module_attrs( + int id: @module ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +module_item_lists( + int id: @module ref, + int item_list: @item_list ref +); + +#keyset[id] +module_names( + int id: @module ref, + int name: @name ref +); + +#keyset[id] +module_visibilities( + int id: @module ref, + int visibility: @visibility ref +); + +path_exprs( + unique int id: @path_expr +); + +#keyset[id, index] +path_expr_attrs( + int id: @path_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +traits( + unique int id: @trait +); + +#keyset[id] +trait_assoc_item_lists( + int id: @trait ref, + int assoc_item_list: @assoc_item_list ref +); + +#keyset[id, index] +trait_attrs( + int id: @trait ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +trait_generic_param_lists( + int id: @trait ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +trait_impl_restrictions( + int id: @trait ref, + int impl_restriction: @impl_restriction ref +); + +#keyset[id] +trait_is_auto( + int id: @trait ref +); + +#keyset[id] +trait_is_unsafe( + int id: @trait ref +); + +#keyset[id] +trait_names( + int id: @trait ref, + int name: @name ref +); + +#keyset[id] +trait_type_bound_lists( + int id: @trait ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +trait_visibilities( + int id: @trait ref, + int visibility: @visibility ref +); + +#keyset[id] +trait_where_clauses( + int id: @trait ref, + int where_clause: @where_clause ref +); + +@type_item = + @enum +| @struct +| @union +; + +#keyset[id, index] +type_item_derive_macro_expansions( + int id: @type_item ref, + int index: int ref, + int derive_macro_expansion: @macro_items ref +); + +#keyset[id, index] +type_item_attrs( + int id: @type_item ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_item_generic_param_lists( + int id: @type_item ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_item_names( + int id: @type_item ref, + int name: @name ref +); + +#keyset[id] +type_item_visibilities( + int id: @type_item ref, + int visibility: @visibility ref +); + +#keyset[id] +type_item_where_clauses( + int id: @type_item ref, + int where_clause: @where_clause ref +); + +uses( + unique int id: @use +); + +#keyset[id, index] +use_attrs( + int id: @use ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +use_use_trees( + int id: @use ref, + int use_tree: @use_tree ref +); + +#keyset[id] +use_visibilities( + int id: @use ref, + int visibility: @visibility ref +); + +consts( + unique int id: @const +); + +#keyset[id, index] +const_attrs( + int id: @const ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +const_bodies( + int id: @const ref, + int body: @expr ref +); + +#keyset[id] +const_generic_param_lists( + int id: @const ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +const_is_const( + int id: @const ref +); + +#keyset[id] +const_is_default( + int id: @const ref +); + +#keyset[id] +const_names( + int id: @const ref, + int name: @name ref +); + +#keyset[id] +const_type_reprs( + int id: @const ref, + int type_repr: @type_repr ref +); + +#keyset[id] +const_visibilities( + int id: @const ref, + int visibility: @visibility ref +); + +#keyset[id] +const_where_clauses( + int id: @const ref, + int where_clause: @where_clause ref +); + +#keyset[id] +const_has_implementation( + int id: @const ref +); + +enums( + unique int id: @enum +); + +#keyset[id] +enum_variant_lists( + int id: @enum ref, + int variant_list: @variant_list ref +); + +for_exprs( + unique int id: @for_expr +); + +#keyset[id, index] +for_expr_attrs( + int id: @for_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +for_expr_iterables( + int id: @for_expr ref, + int iterable: @expr ref +); + +#keyset[id] +for_expr_pats( + int id: @for_expr ref, + int pat: @pat ref +); + +functions( + unique int id: @function +); + +#keyset[id] +function_abis( + int id: @function ref, + int abi: @abi ref +); + +#keyset[id] +function_function_bodies( + int id: @function ref, + int function_body: @block_expr ref +); + +#keyset[id] +function_generic_param_lists( + int id: @function ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +function_is_async( + int id: @function ref +); + +#keyset[id] +function_is_const( + int id: @function ref +); + +#keyset[id] +function_is_default( + int id: @function ref +); + +#keyset[id] +function_is_gen( + int id: @function ref +); + +#keyset[id] +function_is_unsafe( + int id: @function ref +); + +#keyset[id] +function_names( + int id: @function ref, + int name: @name ref +); + +#keyset[id] +function_ret_types( + int id: @function ref, + int ret_type: @ret_type_repr ref +); + +#keyset[id] +function_visibilities( + int id: @function ref, + int visibility: @visibility ref +); + +#keyset[id] +function_where_clauses( + int id: @function ref, + int where_clause: @where_clause ref +); + +#keyset[id] +function_has_implementation( + int id: @function ref +); + +loop_exprs( + unique int id: @loop_expr +); + +#keyset[id, index] +loop_expr_attrs( + int id: @loop_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +macro_calls( + unique int id: @macro_call +); + +#keyset[id, index] +macro_call_attrs( + int id: @macro_call ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +macro_call_paths( + int id: @macro_call ref, + int path: @path ref +); + +#keyset[id] +macro_call_token_trees( + int id: @macro_call ref, + int token_tree: @token_tree ref +); + +#keyset[id] +macro_call_macro_call_expansions( + int id: @macro_call ref, + int macro_call_expansion: @ast_node ref +); + +statics( + unique int id: @static +); + +#keyset[id, index] +static_attrs( + int id: @static ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +static_bodies( + int id: @static ref, + int body: @expr ref +); + +#keyset[id] +static_is_mut( + int id: @static ref +); + +#keyset[id] +static_is_static( + int id: @static ref +); + +#keyset[id] +static_is_unsafe( + int id: @static ref +); + +#keyset[id] +static_names( + int id: @static ref, + int name: @name ref +); + +#keyset[id] +static_type_reprs( + int id: @static ref, + int type_repr: @type_repr ref +); + +#keyset[id] +static_visibilities( + int id: @static ref, + int visibility: @visibility ref +); + +structs( + unique int id: @struct +); + +#keyset[id] +struct_field_lists_( + int id: @struct ref, + int field_list: @field_list ref +); + +type_aliases( + unique int id: @type_alias +); + +#keyset[id, index] +type_alias_attrs( + int id: @type_alias ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +type_alias_generic_param_lists( + int id: @type_alias ref, + int generic_param_list: @generic_param_list ref +); + +#keyset[id] +type_alias_is_default( + int id: @type_alias ref +); + +#keyset[id] +type_alias_names( + int id: @type_alias ref, + int name: @name ref +); + +#keyset[id] +type_alias_type_reprs( + int id: @type_alias ref, + int type_repr: @type_repr ref +); + +#keyset[id] +type_alias_type_bound_lists( + int id: @type_alias ref, + int type_bound_list: @type_bound_list ref +); + +#keyset[id] +type_alias_visibilities( + int id: @type_alias ref, + int visibility: @visibility ref +); + +#keyset[id] +type_alias_where_clauses( + int id: @type_alias ref, + int where_clause: @where_clause ref +); + +unions( + unique int id: @union +); + +#keyset[id] +union_struct_field_lists( + int id: @union ref, + int struct_field_list: @struct_field_list ref +); + +while_exprs( + unique int id: @while_expr +); + +#keyset[id, index] +while_expr_attrs( + int id: @while_expr ref, + int index: int ref, + int attr: @any_attr ref +); + +#keyset[id] +while_expr_conditions( + int id: @while_expr ref, + int condition: @expr ref +); diff --git a/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/upgrade.properties b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/upgrade.properties new file mode 100644 index 000000000000..7a0f2901994c --- /dev/null +++ b/rust/ql/lib/upgrades/3af0bba56aa51dfb325939cc3b52cd0a3eb0965f/upgrade.properties @@ -0,0 +1,2 @@ +description: Update rust-analyzer to 0.0.356 +compatibility: full From 01bf6d65ef32c631251c059fe456d5026d65b362 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 08:29:30 +0000 Subject: [PATCH 7/8] Rust: Update fixed toolchain --- rust/extractor/src/toolchain.rs | 2 +- rust/ql/integration-tests/conftest.py | 2 +- rust/ql/test/setup.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/extractor/src/toolchain.rs b/rust/extractor/src/toolchain.rs index 83b3e38115b7..e9074977ea50 100644 --- a/rust/extractor/src/toolchain.rs +++ b/rust/extractor/src/toolchain.rs @@ -24,7 +24,7 @@ use tracing::{info, warn}; /// toolchain release that precedes our version of rust-analyzer. /// /// When rust-analyzer is updated this version should be updated accordingly. -const FIXED_RUST_TOOLCHAIN: &str = "1.98.1"; +const FIXED_RUST_TOOLCHAIN: &str = "1.99.0"; /// The date of the oldest nightly toolchain known to work with our version of /// rust-analyzer. diff --git a/rust/ql/integration-tests/conftest.py b/rust/ql/integration-tests/conftest.py index 34bfa63e2e23..d7d6738100ab 100644 --- a/rust/ql/integration-tests/conftest.py +++ b/rust/ql/integration-tests/conftest.py @@ -11,7 +11,7 @@ def pytest_configure(config): # match `FIXED_RUST_TOOLCHAIN`. if not hasattr(config, "workerinput"): commands.run( - "rustup toolchain install 1.98.1 --profile minimal --component rust-src" + "rustup toolchain install 1.99.0 --profile minimal --component rust-src" ) diff --git a/rust/ql/test/setup.sh b/rust/ql/test/setup.sh index 2f4dbe2fdb08..d69b1b77143c 100755 --- a/rust/ql/test/setup.sh +++ b/rust/ql/test/setup.sh @@ -10,7 +10,7 @@ set -euo pipefail cd "$(dirname "$0")" # Install the fixed toolchain used by the extractor. The version here should # match `FIXED_RUST_TOOLCHAIN`. -rustup toolchain install 1.98.1 --profile minimal --component rust-src +rustup toolchain install 1.99.0 --profile minimal --component rust-src pushd ../../extractor/src/nightly-toolchain rustup install popd From 9a8726a56d79d54aa9f88f1a5b864a1e4d04bd05 Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Fri, 2 Oct 2026 11:23:53 +0200 Subject: [PATCH 8/8] Rust: Auto-format QL --- rust/ql/.generated.list | 24 +- .../internal/generated/CfgNodes.qll | 5342 ++++------ .../lib/codeql/rust/elements/CfgPredExpr.qll | 2 +- .../lib/codeql/rust/elements/CfgPredPat.qll | 2 +- .../internal/CfgPredExprConstructor.qll | 6 +- .../elements/internal/CfgPredExprImpl.qll | 6 +- .../internal/CfgPredPatConstructor.qll | 6 +- .../rust/elements/internal/CfgPredPatImpl.qll | 6 +- .../internal/generated/CfgPredExpr.qll | 11 +- .../internal/generated/CfgPredPat.qll | 11 +- .../internal/generated/ParentChild.qll | 6596 ++++++------ .../rust/elements/internal/generated/Raw.qll | 9480 +++++++---------- .../elements/internal/generated/Synth.qll | 2442 ++--- 13 files changed, 10507 insertions(+), 13427 deletions(-) diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index f63e52fb5113..5c18625dcfd6 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,4 +1,4 @@ -lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll a930796c48512c3d62163b6ab5683109ef10e0f9fa620ea08229ec0430b6c302 a930796c48512c3d62163b6ab5683109ef10e0f9fa620ea08229ec0430b6c302 +lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll a930796c48512c3d62163b6ab5683109ef10e0f9fa620ea08229ec0430b6c302 377246276407e62bb4b4bceace683a44e8c57beffa444a9c85169bf2455a2d09 lib/codeql/rust/elements/Abi.qll 485a2e79f6f7bfd1c02a6e795a71e62dede3c3e150149d5f8f18b761253b7208 6159ba175e7ead0dd2e3f2788f49516c306ee11b1a443bd4bdc00b7017d559bd lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be lib/codeql/rust/elements/AnyAttr.qll 31536ed6ba02c538ff192089dc40c6f984ce808406f0522eed49539b9ae8a0da c6df96292f0f96415af4e8b3736e870475c21829ab08a8fe56d221ee4bb4cbd7 @@ -39,8 +39,8 @@ lib/codeql/rust/elements/CfgAtom.qll 0567c41550cbcf88f334f0285bac32f87726099f244 lib/codeql/rust/elements/CfgAttrMeta.qll 85f6503abce5c1c3de06df0c0d2ae8fda4206b94bc8103d54550ad2d84a93fb4 af1e7967d7c9c80f1a4725d8a045d645b247f5aa1a3a462a08eea39c4ab4491f lib/codeql/rust/elements/CfgComposite.qll 50f624532b6f6086ac507c294da7dc3a96d4154d70541449c89b4395cbe366a7 6aa0c7a1484b02833b7cc7692018f96dd6724b8f76a1e171171b7f5aac69e3a6 lib/codeql/rust/elements/CfgMeta.qll 583c4561968f787ea1fb7fe8af165273e0f35c2e1efd26364a004edeebee5786 86eca520313dc40b0e523d8941858909c2632eb32c01d74ddb1c524527fbd8eb -lib/codeql/rust/elements/CfgPredExpr.qll b0eccc0093bb78f2bcce86a0e81a9e78e32d403582a723dbbd6f9302e93ee4da b0eccc0093bb78f2bcce86a0e81a9e78e32d403582a723dbbd6f9302e93ee4da -lib/codeql/rust/elements/CfgPredPat.qll b0f72411ff7a8565154d12a04610358be901cc649ed0f3caaf8ebbceaa13a50d b0f72411ff7a8565154d12a04610358be901cc649ed0f3caaf8ebbceaa13a50d +lib/codeql/rust/elements/CfgPredExpr.qll b0eccc0093bb78f2bcce86a0e81a9e78e32d403582a723dbbd6f9302e93ee4da 8e75a1b24512955dc23707a8f1766edb04dab444db7dcda6bc7b9f88fc08e5d5 +lib/codeql/rust/elements/CfgPredPat.qll b0f72411ff7a8565154d12a04610358be901cc649ed0f3caaf8ebbceaa13a50d 51c19f38a0d3a7d5dd044a621091293595c32b50d57dd496f61170be94c7f1ff lib/codeql/rust/elements/CfgPredicate.qll e86f55f98b8f09fb5da9af550cb6c43089d8deb2e3b83d7e195e9bddc8cf201b ba30cf064ba1236139c8c55bfab204b9256e407db983b42b23319690c7ff5562 lib/codeql/rust/elements/ClosureExpr.qll 69e0b7a7c7a4c348fcada5ad4da22dd2f51747109f856be239cede315a56d695 93400650282e2d4e682b826e9f5f844aa893dda126548e41ea1c703d2bf209ca lib/codeql/rust/elements/Comment.qll e3613664af81b7a6d77466b4c37d723c74cc220121473dd8a0e552db7d9a0b71 108c4ab7455ea70dd0ccdaacb4baae31ba68b81c9f516b4c903aa9aa7db4fbc1 @@ -265,10 +265,10 @@ lib/codeql/rust/elements/internal/CfgCompositeConstructor.qll 160bfbccdd80c9b942 lib/codeql/rust/elements/internal/CfgCompositeImpl.qll 840a148dc5c4b213ffdaca6213d6f2dfa3c1dad3f99293f8244baa3bf6902909 36e9291b124c52bb2e4620bead8acf2f9be4a2281eccfd74411adaf91914dd20 lib/codeql/rust/elements/internal/CfgMetaConstructor.qll 335cb7a36e430b08a12c5548d0a91bbb9a00aaa2f9b0dc7b2fa526882ec0271e 0bd7002f58c1c19c22023d6f03874d84e083e1aa09ec9cac888661d5ad632f6b lib/codeql/rust/elements/internal/CfgMetaImpl.qll 9d820fb4dee32288e467a8b667ba191588381d8ec2a0ce0e5e8645ee437a16a8 5888fb533768a36d94f56f81058aa0d00c4a2c13721af42bdd30628747698bce -lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll 2dc5dc48249f69bbb824786fe8ff84258f8aa71d6da2182b67659624a82de672 2dc5dc48249f69bbb824786fe8ff84258f8aa71d6da2182b67659624a82de672 -lib/codeql/rust/elements/internal/CfgPredExprImpl.qll 3c1c543492f3a87891efb474d55340c6f4d8104a2253413deac5cd3b2ea04512 3c1c543492f3a87891efb474d55340c6f4d8104a2253413deac5cd3b2ea04512 -lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll 33c2b178e02d65dc96bbcbd0fb38781b413b8b7585a2d371e39730be9b45ecfc 33c2b178e02d65dc96bbcbd0fb38781b413b8b7585a2d371e39730be9b45ecfc -lib/codeql/rust/elements/internal/CfgPredPatImpl.qll 60da1eb785e66d759c4e63ebcf8e2a913afa80e14e3492710dbbe88979cd2837 60da1eb785e66d759c4e63ebcf8e2a913afa80e14e3492710dbbe88979cd2837 +lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll 2dc5dc48249f69bbb824786fe8ff84258f8aa71d6da2182b67659624a82de672 abb538b0a7907d59e1e1305f8f200d16860a4f8e38a39832f2f3f7668ae3248c +lib/codeql/rust/elements/internal/CfgPredExprImpl.qll 3c1c543492f3a87891efb474d55340c6f4d8104a2253413deac5cd3b2ea04512 d9b61b32a824fe18a03141cd1994352bcd336bb1c2016815b33f93c011b13396 +lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll 33c2b178e02d65dc96bbcbd0fb38781b413b8b7585a2d371e39730be9b45ecfc 6df70c182b75140f6704045cbbfac34c122fec8a791232b8a2f569f9f86008ec +lib/codeql/rust/elements/internal/CfgPredPatImpl.qll 60da1eb785e66d759c4e63ebcf8e2a913afa80e14e3492710dbbe88979cd2837 2fb96fc7248364a67ea167b007c5c5e321cdf30ee07ca55f9d503acc1539c083 lib/codeql/rust/elements/internal/CfgPredicateImpl.qll 3ba6c6732a7de4df967dd2cb2b4cc99db8aefb2301b75521f1b369052e3a2ec0 c07d4366f98f374f24e235f809946dc513a16203e4c1eb151c8185a5bc79e70d lib/codeql/rust/elements/internal/ClosureExprConstructor.qll a348229d2b25c7ebd43b58461830b7915e92d31ae83436ec831e0c4873f6218a 70a1d2ac33db3ac4da5826b0e8628f2f29a8f9cdfd8e4fd0e488d90ce0031a38 lib/codeql/rust/elements/internal/CommentConstructor.qll 0b4a6a976d667bf7595500dfb91b9cfc87460a501837ba5382d9a8d8321d7736 7d02d8c94a319dc48e7978d5270e33fc5c308d443768ff96b618236d250123f1 @@ -535,8 +535,8 @@ lib/codeql/rust/elements/internal/generated/CfgAtom.qll 1b7672e06fe19c7ba484937c lib/codeql/rust/elements/internal/generated/CfgAttrMeta.qll 4531aaa627f4d44787970f18dfe30b957f51d83ab2396bac436563c40d144ca9 1731ecd335431b0a2ec70403dc1ad7bce1f8e171a4d6b575d340f1d683fa6c92 lib/codeql/rust/elements/internal/generated/CfgComposite.qll 4f30fa0495381774cd7993a38e1fbe94dff63a5742e8b836bbc35987b746df1a 595ff31b5990845085bbb963ba408dd1246aed1952bee2836ad9d92a1da6e4c7 lib/codeql/rust/elements/internal/generated/CfgMeta.qll 7fd8ee49428da70ba1e52bf9017bbe30b690443c26147c77aa9bcffd7d09338d ec4d34dbd1e7ca412ce3d242f1bd6695a5fe9f263d5bc68ce12610facedf3e93 -lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll 6b49616d1f22141b1629b1f31ba1a5f7bb7c41aaaf392b6ae3e2f0a453dec9c5 6b49616d1f22141b1629b1f31ba1a5f7bb7c41aaaf392b6ae3e2f0a453dec9c5 -lib/codeql/rust/elements/internal/generated/CfgPredPat.qll f3def25f9cecf937d8bb21d121307e72cfefdd8c183727b08a223d9fa92a2b77 f3def25f9cecf937d8bb21d121307e72cfefdd8c183727b08a223d9fa92a2b77 +lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll 6b49616d1f22141b1629b1f31ba1a5f7bb7c41aaaf392b6ae3e2f0a453dec9c5 8528c388962a105e86a936e1c896b890525341d9e7706afa63745b69da30df9a +lib/codeql/rust/elements/internal/generated/CfgPredPat.qll f3def25f9cecf937d8bb21d121307e72cfefdd8c183727b08a223d9fa92a2b77 65b4a37a9fdd0d4bdd129db66be9f44faf6b71113281148e040c40e24d7a6902 lib/codeql/rust/elements/internal/generated/CfgPredicate.qll 736fe7385e2af5bb86c349bb1b8dd030aef191541f6af24694e3c460b8272f61 4117ee073683eb5fb81bae9e7e49b4ad0991cfcb53e0b7b4160199931a300632 lib/codeql/rust/elements/internal/generated/ClosureExpr.qll 818aff75d86821c670d8ba0720c3270681b3e070140a9c41beab2a811b43eee6 9bf2d1d38f6c4a99d7c058f8ed096141f5ba6a75d2d26a464f0d65ed4e554222 lib/codeql/rust/elements/internal/generated/Comment.qll 9e306a2947185ca15946a3d43dea09d10000b3ba8b28b4691a4b4be6697b7a53 c3df90920fcb595afe5c6e6b614ed0cc61c7679d9785ff17aa0db7cdaedc1115 @@ -627,7 +627,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll d8e73957983491302faa56 lib/codeql/rust/elements/internal/generated/ParenExpr.qll b978629328318874e4e7044dc0ed07ee44f96f426e06848e7a3ea499f2b99f9a 84a1ba59e38460bd16d82881f409084ea35fa55f2f1c52296c510abf3694076f lib/codeql/rust/elements/internal/generated/ParenPat.qll 24f9dc7fce75827d6fddb856cd48f80168143151b27295c0bab6db5a06567a09 ebadbc6f5498e9ed754b39893ce0763840409a0721036a25b56e1ead7dcc09aa lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 03f5c5b96a37adeb845352d7fcea3e098da9050e534972d14ac0f70d60a2d776 ed3d6e5d02086523087adebce4e89e35461eb95f2a66d1d4100fe23fc691b126 -lib/codeql/rust/elements/internal/generated/ParentChild.qll 537a7b27ad1e626ce858460a2c843d0721abd81eb276a26bab66c6f650f26a0e 537a7b27ad1e626ce858460a2c843d0721abd81eb276a26bab66c6f650f26a0e +lib/codeql/rust/elements/internal/generated/ParentChild.qll 537a7b27ad1e626ce858460a2c843d0721abd81eb276a26bab66c6f650f26a0e 31c41a4ea3b32d391c6fad3d4d9332e7c4b5fdf30eea5565e1005868358a6aef lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll 4e85b4bcabdbde71602d557fa0dd5ccbab09d2360d2bb470384cb85437e1611f 688af26f360655ee6454fa45b3169cc9db6ed46d8f58c2470111703e1e7a117f lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd @@ -644,7 +644,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll d7a400b238d7edf2b465 lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f lib/codeql/rust/elements/internal/generated/RangeExpr.qll 7a1ff277e5e8a6731d6cb664a09da07cce2bd6ca3541008b381cd5a5a636a15f 2a9d51363a1a55a080d39575c623ba11cb0f259c04f40351fbb5b89358b31aa6 lib/codeql/rust/elements/internal/generated/RangePat.qll a0c805eb31a773e16806384bd11592563c61b720e694bd444b93c28b5cf00d65 4b82088a62e7e5027f5930a697a18b5d4fd2a831a7bb6123d1b3f8ff4a9255ea -lib/codeql/rust/elements/internal/generated/Raw.qll 8aa72bb0695b99843411106a2e433bc2063383b5762634cf310d478b2677a0a3 8aa72bb0695b99843411106a2e433bc2063383b5762634cf310d478b2677a0a3 +lib/codeql/rust/elements/internal/generated/Raw.qll 8aa72bb0695b99843411106a2e433bc2063383b5762634cf310d478b2677a0a3 5ced366f89dc64c9ce347166f2932656d56ba8e8ce2f17c01c446b157905d0bb lib/codeql/rust/elements/internal/generated/RefExpr.qll c7b711ac05f7fe8fb97b81b09e794e7756141570265e3a995e40e7c79bb2b49d 11b572508c010e79a7edb0f1b349a4ea3e2fc68f6d7bc3f38fbeacf0c91d68e2 lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05 lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll fbab8bae4d3eac10338a9bc5743f3ac9c0feab11107d6d28825f4e97bcd59bad 224f6aec466ddcde526ce8df23d2f925887232b462730af078815a68b47c133d @@ -669,7 +669,7 @@ lib/codeql/rust/elements/internal/generated/StructFieldList.qll 2abf0688ca9659d2 lib/codeql/rust/elements/internal/generated/StructPat.qll c76fa005c2fd0448a8803233e1e8818c4123301eb66ac5cf69d0b9eaafc61e98 6e0dffccdce24bca20e87d5ba0f0995c9a1ae8983283e71e7dbfcf6fffc67a58 lib/codeql/rust/elements/internal/generated/StructPatField.qll 65fd5e42e0cb513ee2d5179d37169c02fcf91360aa2294a61657892939187b4a df48d60618f3319f544123fc615178689ceff848078bbb7b5d2c4d9f8feb0dd0 lib/codeql/rust/elements/internal/generated/StructPatFieldList.qll 342ca25fbd8bf8fef84d06e263f59f010e21418658c1f79f40c52e5ce76ca158 c950a39a946904b84a2557fb1febd59906e42e5de4903e88d0da67ba3e14a250 -lib/codeql/rust/elements/internal/generated/Synth.qll 360a0ce21e748dfbb5842548c0b4e7c867c9ec0a4670350b5b0c6a072f0ef313 360a0ce21e748dfbb5842548c0b4e7c867c9ec0a4670350b5b0c6a072f0ef313 +lib/codeql/rust/elements/internal/generated/Synth.qll 360a0ce21e748dfbb5842548c0b4e7c867c9ec0a4670350b5b0c6a072f0ef313 1a1bfe65be484d44b08c27447b40bb7a31e6011690e5b97f493ac920b7828691 lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 371d10d1ddae6bf7de8d4760d21d1a550c9b18c86272930a118aad9c647afd0d 371d10d1ddae6bf7de8d4760d21d1a550c9b18c86272930a118aad9c647afd0d lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b lib/codeql/rust/elements/internal/generated/TokenTree.qll 3d855014747ae2996375f05bdaef1dd07464692ea09f47174a92f705a5ef63bb b85fed50862f97bce98fb4cbd3f275b553ef3e8dedf215915736197078867427 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 15718c868990..4bac01f686f9 100644 --- a/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll +++ b/rust/ql/lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll @@ -72,7 +72,7 @@ module MakeCfgNodes Input> { /** Provides sub classes of `CfgNode`. */ module Nodes { - private final class ParentArrayExpr extends ParentAstNode, ArrayExpr { + final private class ParentArrayExpr extends ParentAstNode, ArrayExpr { override predicate relevantChild(AstNode child) { none() or @@ -81,91 +81,73 @@ module MakeCfgNodes Input> { } /** - * The base class for array expressions. For example: - * ```rust - * [1, 2, 3]; - * [1; 10]; - * ``` - */ + * The base class for array expressions. For example: + * ```rust + * [1, 2, 3]; + * [1; 10]; + * ``` + */ final class ArrayExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ArrayExpr node; - ArrayExprCfgNode() { - node = this.getAstNode() - } + ArrayExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ArrayExpr`. */ ArrayExpr getArrayExpr() { result = node } - + /** - * Gets the `index`th expression of this array expression (0-based). - * - */ + * Gets the `index`th expression of this array expression (0-based). + */ ExprCfgNode getExpr(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(index), this, result) } - /** - * Gets any of the expressions of this array expression. - */ - ExprCfgNode getAnExpr() { - result = this.getExpr(_) - } + * Gets any of the expressions of this array expression. + */ + ExprCfgNode getAnExpr() { result = this.getExpr(_) } /** - * Gets the number of expressions of this array expression. - */ - int getNumberOfExprs() { - result = count(int i | exists(this.getExpr(i))) - } - /** - * Gets the `index`th attr of this array expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Gets the number of expressions of this array expression. + */ + int getNumberOfExprs() { result = count(int i | exists(this.getExpr(i))) } + /** + * Gets the `index`th attr of this array expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this array expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this array expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this array expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this array expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } } - private final class ParentArrayListExpr extends ParentAstNode, ArrayListExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentArrayListExpr extends ParentAstNode, ArrayListExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * An array expression with a list of elements. For example: - * ```rust - * [1, 2, 3]; - * ``` - */ + * An array expression with a list of elements. For example: + * ```rust + * [1, 2, 3]; + * ``` + */ final class ArrayListExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode { private ArrayListExpr node; - ArrayListExprCfgNode() { - node = this.getAstNode() - } + ArrayListExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ArrayListExpr`. */ ArrayListExpr getArrayListExpr() { result = node } - } - private final class ParentArrayRepeatExpr extends ParentAstNode, ArrayRepeatExpr { + + final private class ParentArrayRepeatExpr extends ParentAstNode, ArrayRepeatExpr { override predicate relevantChild(AstNode child) { none() or @@ -176,39 +158,35 @@ module MakeCfgNodes Input> { } /** - * An array expression with a repeat operand and a repeat length. For example: - * ```rust - * [1; 10]; - * ``` - */ + * An array expression with a repeat operand and a repeat length. For example: + * ```rust + * [1; 10]; + * ``` + */ final class ArrayRepeatExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode { private ArrayRepeatExpr node; - ArrayRepeatExprCfgNode() { - node = this.getAstNode() - } + ArrayRepeatExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ArrayRepeatExpr`. */ ArrayRepeatExpr getArrayRepeatExpr() { result = node } - + /** - * Gets the repeat operand of this array repeat expression. - * - */ + * Gets the repeat operand of this array repeat expression. + */ ExprCfgNode getRepeatOperand() { any(ChildMapping mapping).hasCfgChild(node, node.getRepeatOperand(), this, result) } /** - * Gets the repeat length of this array repeat expression. - * - */ + * Gets the repeat length of this array repeat expression. + */ ExprCfgNode getRepeatLength() { any(ChildMapping mapping).hasCfgChild(node, node.getRepeatLength(), this, result) } - } - private final class ParentAsmExpr extends ParentAstNode, AsmExpr { + + final private class ParentAsmExpr extends ParentAstNode, AsmExpr { override predicate relevantChild(AstNode child) { none() or @@ -217,92 +195,71 @@ module MakeCfgNodes Input> { } /** - * An inline assembly expression. For example: - * ```rust - * unsafe { - * #[inline(always)] - * builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b); - * } - * ``` - */ + * An inline assembly expression. For example: + * ```rust + * unsafe { + * #[inline(always)] + * builtin # asm("cmp {0}, {1}", in(reg) a, in(reg) b); + * } + * ``` + */ final class AsmExprCfgNode extends CfgNodeFinal, ExprCfgNode { private AsmExpr node; - AsmExprCfgNode() { - node = this.getAstNode() - } + AsmExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `AsmExpr`. */ AsmExpr getAsmExpr() { result = node } - - /** - * Gets the `index`th asm piece of this asm expression (0-based). - * - */ - AsmPiece getAsmPiece(int index) { - result = node.getAsmPiece(index) - } - /** - * Gets any of the asm pieces of this asm expression. - */ - AsmPiece getAnAsmPiece() { - result = this.getAsmPiece(_) - } + * Gets the `index`th asm piece of this asm expression (0-based). + */ + AsmPiece getAsmPiece(int index) { result = node.getAsmPiece(index) } /** - * Gets the number of asm pieces of this asm expression. - */ - int getNumberOfAsmPieces() { - result = count(int i | exists(this.getAsmPiece(i))) - } + * Gets any of the asm pieces of this asm expression. + */ + AsmPiece getAnAsmPiece() { result = this.getAsmPiece(_) } + /** - * Gets the `index`th attr of this asm expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Gets the number of asm pieces of this asm expression. + */ + int getNumberOfAsmPieces() { result = count(int i | exists(this.getAsmPiece(i))) } + /** + * Gets the `index`th attr of this asm expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this asm expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this asm expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this asm expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this asm expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the `index`th template of this asm expression (0-based). - * - */ + * Gets the `index`th template of this asm expression (0-based). + */ ExprCfgNode getTemplate(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getTemplate(index), this, result) } - /** - * Gets any of the templates of this asm expression. - */ - ExprCfgNode getATemplate() { - result = this.getTemplate(_) - } + * Gets any of the templates of this asm expression. + */ + ExprCfgNode getATemplate() { result = this.getTemplate(_) } /** - * Gets the number of templates of this asm expression. - */ - int getNumberOfTemplates() { - result = count(int i | exists(this.getTemplate(i))) - } + * Gets the number of templates of this asm expression. + */ + int getNumberOfTemplates() { result = count(int i | exists(this.getTemplate(i))) } } - private final class ParentAwaitExpr extends ParentAstNode, AwaitExpr { + + final private class ParentAwaitExpr extends ParentAstNode, AwaitExpr { override predicate relevantChild(AstNode child) { none() or @@ -311,62 +268,51 @@ module MakeCfgNodes Input> { } /** - * An `await` expression. For example: - * ```rust - * async { - * let x = foo().await; - * x - * } - * ``` - */ + * An `await` expression. For example: + * ```rust + * async { + * let x = foo().await; + * x + * } + * ``` + */ final class AwaitExprCfgNode extends CfgNodeFinal, ExprCfgNode { private AwaitExpr node; - AwaitExprCfgNode() { - node = this.getAstNode() - } + AwaitExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `AwaitExpr`. */ AwaitExpr getAwaitExpr() { result = node } - - /** - * Gets the `index`th attr of this await expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this await expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this await expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this await expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this await expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this await expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this await expression, if it exists. - * - */ + * Gets the expression of this await expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } - private final class ParentBecomeExpr extends ParentAstNode, BecomeExpr { + + final private class ParentBecomeExpr extends ParentAstNode, BecomeExpr { override predicate relevantChild(AstNode child) { none() or @@ -375,65 +321,54 @@ module MakeCfgNodes Input> { } /** - * A `become` expression. For example: - * ```rust - * fn fact_a(n: i32, a: i32) -> i32 { - * if n == 0 { - * a - * } else { - * become fact_a(n - 1, n * a) - * } - * } - * ``` - */ + * A `become` expression. For example: + * ```rust + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } + * ``` + */ final class BecomeExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BecomeExpr node; - BecomeExprCfgNode() { - node = this.getAstNode() - } + BecomeExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `BecomeExpr`. */ BecomeExpr getBecomeExpr() { result = node } - - /** - * Gets the `index`th attr of this become expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this become expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this become expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this become expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this become expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this become expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this become expression, if it exists. - * - */ + * Gets the expression of this become expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } - private final class ParentBinaryExpr extends ParentAstNode, BinaryExpr { + + final private class ParentBinaryExpr extends ParentAstNode, BinaryExpr { override predicate relevantChild(AstNode child) { none() or @@ -444,212 +379,161 @@ module MakeCfgNodes Input> { } /** - * A binary operation expression. For example: - * ```rust - * x + y; - * x && y; - * x <= y; - * x = y; - * x += y; - * ``` - */ + * A binary operation expression. For example: + * ```rust + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ final class BinaryExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BinaryExpr node; - BinaryExprCfgNode() { - node = this.getAstNode() - } + BinaryExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `BinaryExpr`. */ BinaryExpr getBinaryExpr() { result = node } - - /** - * Gets the `index`th attr of this binary expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this binary expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this binary expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this binary expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this binary expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this binary expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the lhs of this binary expression, if it exists. - * - */ + * Gets the lhs of this binary expression, if it exists. + */ ExprCfgNode getLhs() { any(ChildMapping mapping).hasCfgChild(node, node.getLhs(), this, result) } /** - * Holds if `getLhs()` exists. - */ - predicate hasLhs() { - exists(this.getLhs()) - } + * Holds if `getLhs()` exists. + */ + predicate hasLhs() { exists(this.getLhs()) } + /** - * Gets the operator name of this binary expression, if it exists. - * - */ - string getOperatorName() { - result = node.getOperatorName() - } + * Gets the operator name of this binary expression, if it exists. + */ + string getOperatorName() { result = node.getOperatorName() } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { - exists(this.getOperatorName()) - } + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { exists(this.getOperatorName()) } + /** - * Gets the rhs of this binary expression, if it exists. - * - */ + * Gets the rhs of this binary expression, if it exists. + */ ExprCfgNode getRhs() { any(ChildMapping mapping).hasCfgChild(node, node.getRhs(), this, result) } /** - * Holds if `getRhs()` exists. - */ - predicate hasRhs() { - exists(this.getRhs()) - } + * Holds if `getRhs()` exists. + */ + predicate hasRhs() { exists(this.getRhs()) } } - private final class ParentBlockExpr extends ParentAstNode, BlockExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentBlockExpr extends ParentAstNode, BlockExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A block expression. For example: - * ```rust - * { - * let x = 42; - * } - * ``` - * ```rust - * 'label: { - * let x = 42; - * x - * } - * ``` - */ + * A block expression. For example: + * ```rust + * { + * let x = 42; + * } + * ``` + * ```rust + * 'label: { + * let x = 42; + * x + * } + * ``` + */ final class BlockExprCfgNode extends CfgNodeFinal, LabelableExprCfgNode { private BlockExpr node; - BlockExprCfgNode() { - node = this.getAstNode() - } + BlockExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `BlockExpr`. */ BlockExpr getBlockExpr() { result = node } - - /** - * Gets the `index`th attr of this block expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this block expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this block expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this block expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this block expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this block expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Holds if this block expression is async. - * - */ - predicate isAsync() { - node.isAsync() - } + * Holds if this block expression is async. + */ + predicate isAsync() { node.isAsync() } /** - * Holds if this block expression is const. - * - */ - predicate isConst() { - node.isConst() - } + * Holds if this block expression is const. + */ + predicate isConst() { node.isConst() } /** - * Holds if this block expression is gen. - * - */ - predicate isGen() { - node.isGen() - } + * Holds if this block expression is gen. + */ + predicate isGen() { node.isGen() } /** - * Holds if this block expression is move. - * - */ - predicate isMove() { - node.isMove() - } + * Holds if this block expression is move. + */ + predicate isMove() { node.isMove() } /** - * Holds if this block expression is unsafe. - * - */ - predicate isUnsafe() { - node.isUnsafe() - } + * Holds if this block expression is unsafe. + */ + predicate isUnsafe() { node.isUnsafe() } /** - * Gets the statement list of this block expression, if it exists. - * - */ - StmtList getStmtList() { - result = node.getStmtList() - } + * Gets the statement list of this block expression, if it exists. + */ + StmtList getStmtList() { result = node.getStmtList() } /** - * Holds if `getStmtList()` exists. - */ - predicate hasStmtList() { - exists(this.getStmtList()) - } + * Holds if `getStmtList()` exists. + */ + predicate hasStmtList() { exists(this.getStmtList()) } + /** - * Gets the try block modifier of this block expression, if it exists. - * - */ - TryBlockModifier getTryBlockModifier() { - result = node.getTryBlockModifier() - } + * Gets the try block modifier of this block expression, if it exists. + */ + TryBlockModifier getTryBlockModifier() { result = node.getTryBlockModifier() } /** - * Holds if `getTryBlockModifier()` exists. - */ - predicate hasTryBlockModifier() { - exists(this.getTryBlockModifier()) - } + * Holds if `getTryBlockModifier()` exists. + */ + predicate hasTryBlockModifier() { exists(this.getTryBlockModifier()) } } - private final class ParentBoxPat extends ParentAstNode, BoxPat { + + final private class ParentBoxPat extends ParentAstNode, BoxPat { override predicate relevantChild(AstNode child) { none() or @@ -658,40 +542,36 @@ module MakeCfgNodes Input> { } /** - * A box pattern. For example: - * ```rust - * match x { - * box Option::Some(y) => y, - * box Option::None => 0, - * }; - * ``` - */ + * A box pattern. For example: + * ```rust + * match x { + * box Option::Some(y) => y, + * box Option::None => 0, + * }; + * ``` + */ final class BoxPatCfgNode extends CfgNodeFinal, PatCfgNode { private BoxPat node; - BoxPatCfgNode() { - node = this.getAstNode() - } + BoxPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `BoxPat`. */ BoxPat getBoxPat() { result = node } - + /** - * Gets the pattern of this box pattern, if it exists. - * - */ + * Gets the pattern of this box pattern, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentBreakExpr extends ParentAstNode, BreakExpr { + + final private class ParentBreakExpr extends ParentAstNode, BreakExpr { override predicate relevantChild(AstNode child) { none() or @@ -700,92 +580,77 @@ module MakeCfgNodes Input> { } /** - * A break expression. For example: - * ```rust - * loop { - * if not_ready() { - * break; - * } - * } - * ``` - * ```rust - * let x = 'label: loop { - * if done() { - * break 'label 42; - * } - * }; - * ``` - * ```rust - * let x = 'label: { - * if exit() { - * break 'label 42; - * } - * 0; - * }; - * ``` - */ + * A break expression. For example: + * ```rust + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ```rust + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + * ```rust + * let x = 'label: { + * if exit() { + * break 'label 42; + * } + * 0; + * }; + * ``` + */ final class BreakExprCfgNode extends CfgNodeFinal, ExprCfgNode { private BreakExpr node; - BreakExprCfgNode() { - node = this.getAstNode() - } + BreakExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `BreakExpr`. */ BreakExpr getBreakExpr() { result = node } - - /** - * Gets the `index`th attr of this break expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this break expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this break expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this break expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this break expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this break expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this break expression, if it exists. - * - */ + * Gets the expression of this break expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } + /** - * Gets the lifetime of this break expression, if it exists. - * - */ - Lifetime getLifetime() { - result = node.getLifetime() - } + * Gets the lifetime of this break expression, if it exists. + */ + Lifetime getLifetime() { result = node.getLifetime() } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { - exists(this.getLifetime()) - } + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { exists(this.getLifetime()) } } - private final class ParentCallExpr extends ParentAstNode, CallExpr { + + final private class ParentCallExpr extends ParentAstNode, CallExpr { override predicate relevantChild(AstNode child) { none() or @@ -794,79 +659,64 @@ module MakeCfgNodes Input> { } /** - * NOTE: Consider using `Call` instead, as that excludes call expressions that are - * instantiations of tuple structs and tuple variants. - * - * A call expression. For example: - * ```rust - * foo(42); - * foo::(42); - * foo[0](42); - * Option::Some(42); // tuple variant instantiation - * ``` - */ + * NOTE: Consider using `Call` instead, as that excludes call expressions that are + * instantiations of tuple structs and tuple variants. + * + * A call expression. For example: + * ```rust + * foo(42); + * foo::(42); + * foo[0](42); + * Option::Some(42); // tuple variant instantiation + * ``` + */ final class CallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CallExpr node; - CallExprCfgNode() { - node = this.getAstNode() - } + CallExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `CallExpr`. */ CallExpr getCallExpr() { result = node } - - /** - * Gets the argument list of this call expression, if it exists. - * - */ - ArgList getArgList() { - result = node.getArgList() - } /** - * Holds if `getArgList()` exists. - */ - predicate hasArgList() { - exists(this.getArgList()) - } + * Gets the argument list of this call expression, if it exists. + */ + ArgList getArgList() { result = node.getArgList() } + /** - * Gets the `index`th attr of this call expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { exists(this.getArgList()) } + /** + * Gets the `index`th attr of this call expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this call expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this call expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this call expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this call expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the function of this call expression, if it exists. - * - */ + * Gets the function of this call expression, if it exists. + */ ExprCfgNode getFunction() { any(ChildMapping mapping).hasCfgChild(node, node.getFunction(), this, result) } /** - * Holds if `getFunction()` exists. - */ - predicate hasFunction() { - exists(this.getFunction()) - } + * Holds if `getFunction()` exists. + */ + predicate hasFunction() { exists(this.getFunction()) } } - private final class ParentCastExpr extends ParentAstNode, CastExpr { + + final private class ParentCastExpr extends ParentAstNode, CastExpr { override predicate relevantChild(AstNode child) { none() or @@ -875,139 +725,108 @@ module MakeCfgNodes Input> { } /** - * A type cast expression. For example: - * ```rust - * value as u64; - * ``` - */ + * A type cast expression. For example: + * ```rust + * value as u64; + * ``` + */ final class CastExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CastExpr node; - CastExprCfgNode() { - node = this.getAstNode() - } + CastExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `CastExpr`. */ CastExpr getCastExpr() { result = node } - - /** - * Gets the `index`th attr of this cast expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this cast expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this cast expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this cast expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this cast expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this cast expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this cast expression, if it exists. - * - */ + * Gets the expression of this cast expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } + /** - * Gets the type representation of this cast expression, if it exists. - * - */ - TypeRepr getTypeRepr() { - result = node.getTypeRepr() - } + * Gets the type representation of this cast expression, if it exists. + */ + TypeRepr getTypeRepr() { result = node.getTypeRepr() } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { - exists(this.getTypeRepr()) - } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { exists(this.getTypeRepr()) } } - private final class ParentCfgPredExpr extends ParentAstNode, CfgPredExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentCfgPredExpr extends ParentAstNode, CfgPredExpr { + override predicate relevantChild(AstNode child) { none() } } /** - */ + */ final class CfgPredExprCfgNode extends CfgNodeFinal, ExprCfgNode { private CfgPredExpr node; - CfgPredExprCfgNode() { - node = this.getAstNode() - } + CfgPredExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `CfgPredExpr`. */ CfgPredExpr getCfgPredExpr() { result = node } - + /** - * Gets the cfg predicate of this cfg pred expression, if it exists. - * - */ - CfgPredicate getCfgPredicate() { - result = node.getCfgPredicate() - } + * Gets the cfg predicate of this cfg pred expression, if it exists. + */ + CfgPredicate getCfgPredicate() { result = node.getCfgPredicate() } /** - * Holds if `getCfgPredicate()` exists. - */ - predicate hasCfgPredicate() { - exists(this.getCfgPredicate()) - } + * Holds if `getCfgPredicate()` exists. + */ + predicate hasCfgPredicate() { exists(this.getCfgPredicate()) } } - private final class ParentCfgPredPat extends ParentAstNode, CfgPredPat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentCfgPredPat extends ParentAstNode, CfgPredPat { + override predicate relevantChild(AstNode child) { none() } } /** - */ + */ final class CfgPredPatCfgNode extends CfgNodeFinal, PatCfgNode { private CfgPredPat node; - CfgPredPatCfgNode() { - node = this.getAstNode() - } + CfgPredPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `CfgPredPat`. */ CfgPredPat getCfgPredPat() { result = node } - + /** - * Gets the cfg predicate of this cfg pred pattern, if it exists. - * - */ - CfgPredicate getCfgPredicate() { - result = node.getCfgPredicate() - } + * Gets the cfg predicate of this cfg pred pattern, if it exists. + */ + CfgPredicate getCfgPredicate() { result = node.getCfgPredicate() } /** - * Holds if `getCfgPredicate()` exists. - */ - predicate hasCfgPredicate() { - exists(this.getCfgPredicate()) - } + * Holds if `getCfgPredicate()` exists. + */ + predicate hasCfgPredicate() { exists(this.getCfgPredicate()) } } - private final class ParentConstBlockPat extends ParentAstNode, ConstBlockPat { + + final private class ParentConstBlockPat extends ParentAstNode, ConstBlockPat { override predicate relevantChild(AstNode child) { none() or @@ -1016,118 +835,96 @@ module MakeCfgNodes Input> { } /** - * A const block pattern. For example: - * ```rust - * match x { - * const { 1 + 2 + 3 } => "ok", - * _ => "fail", - * }; - * ``` - */ + * A const block pattern. For example: + * ```rust + * match x { + * const { 1 + 2 + 3 } => "ok", + * _ => "fail", + * }; + * ``` + */ final class ConstBlockPatCfgNode extends CfgNodeFinal, PatCfgNode { private ConstBlockPat node; - ConstBlockPatCfgNode() { - node = this.getAstNode() - } + ConstBlockPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `ConstBlockPat`. */ ConstBlockPat getConstBlockPat() { result = node } - + /** - * Gets the block expression of this const block pattern, if it exists. - * - */ + * Gets the block expression of this const block pattern, if it exists. + */ BlockExprCfgNode getBlockExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getBlockExpr(), this, result) } /** - * Holds if `getBlockExpr()` exists. - */ - predicate hasBlockExpr() { - exists(this.getBlockExpr()) - } - /** - * Holds if this const block pattern is const. - * - */ - predicate isConst() { - node.isConst() - } + * Holds if `getBlockExpr()` exists. + */ + predicate hasBlockExpr() { exists(this.getBlockExpr()) } + /** + * Holds if this const block pattern is const. + */ + predicate isConst() { node.isConst() } } - private final class ParentContinueExpr extends ParentAstNode, ContinueExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentContinueExpr extends ParentAstNode, ContinueExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A continue expression. For example: - * ```rust - * loop { - * if not_ready() { - * continue; - * } - * } - * ``` - * ```rust - * 'label: loop { - * if not_ready() { - * continue 'label; - * } - * } - * ``` - */ + * A continue expression. For example: + * ```rust + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ```rust + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ final class ContinueExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ContinueExpr node; - ContinueExprCfgNode() { - node = this.getAstNode() - } + ContinueExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ContinueExpr`. */ ContinueExpr getContinueExpr() { result = node } - - /** - * Gets the `index`th attr of this continue expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this continue expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this continue expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this continue expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this continue expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this continue expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the lifetime of this continue expression, if it exists. - * - */ - Lifetime getLifetime() { - result = node.getLifetime() - } + * Gets the lifetime of this continue expression, if it exists. + */ + Lifetime getLifetime() { result = node.getLifetime() } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { - exists(this.getLifetime()) - } + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { exists(this.getLifetime()) } } - private final class ParentDerefPat extends ParentAstNode, DerefPat { + + final private class ParentDerefPat extends ParentAstNode, DerefPat { override predicate relevantChild(AstNode child) { none() or @@ -1136,62 +933,54 @@ module MakeCfgNodes Input> { } /** - * A deref pattern, matching the value behind a smart pointer. This is an experimental - * Rust feature that cannot be written directly in stable Rust; the example below uses - * rust-analyzer's canonical `builtin#deref` syntax for such patterns: - * ```rust - * match x { - * builtin#deref(y) => y, - * _ => 0, - * }; - * ``` - */ + * A deref pattern, matching the value behind a smart pointer. This is an experimental + * Rust feature that cannot be written directly in stable Rust; the example below uses + * rust-analyzer's canonical `builtin#deref` syntax for such patterns: + * ```rust + * match x { + * builtin#deref(y) => y, + * _ => 0, + * }; + * ``` + */ final class DerefPatCfgNode extends CfgNodeFinal, PatCfgNode { private DerefPat node; - DerefPatCfgNode() { - node = this.getAstNode() - } + DerefPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `DerefPat`. */ DerefPat getDerefPat() { result = node } - + /** - * Gets the pattern of this deref pattern, if it exists. - * - */ + * Gets the pattern of this deref pattern, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentExpr extends ParentAstNode, Expr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentExpr extends ParentAstNode, Expr { + override predicate relevantChild(AstNode child) { none() } } /** - * The base class for expressions. - */ + * The base class for expressions. + */ final class ExprCfgNode extends CfgNodeFinal { private Expr node; - ExprCfgNode() { - node = this.getAstNode() - } + ExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `Expr`. */ Expr getExpr() { result = node } - } - private final class ParentFieldExpr extends ParentAstNode, FieldExpr { + + final private class ParentFieldExpr extends ParentAstNode, FieldExpr { override predicate relevantChild(AstNode child) { none() or @@ -1200,73 +989,58 @@ module MakeCfgNodes Input> { } /** - * A field access expression. For example: - * ```rust - * x.foo - * ``` - */ + * A field access expression. For example: + * ```rust + * x.foo + * ``` + */ final class FieldExprCfgNode extends CfgNodeFinal, ExprCfgNode { private FieldExpr node; - FieldExprCfgNode() { - node = this.getAstNode() - } + FieldExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `FieldExpr`. */ FieldExpr getFieldExpr() { result = node } - - /** - * Gets the `index`th attr of this field expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this field expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this field expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this field expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this field expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this field expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the container of this field expression, if it exists. - * - */ + * Gets the container of this field expression, if it exists. + */ ExprCfgNode getContainer() { any(ChildMapping mapping).hasCfgChild(node, node.getContainer(), this, result) } /** - * Holds if `getContainer()` exists. - */ - predicate hasContainer() { - exists(this.getContainer()) - } + * Holds if `getContainer()` exists. + */ + predicate hasContainer() { exists(this.getContainer()) } + /** - * Gets the identifier of this field expression, if it exists. - * - */ - NameRef getIdentifier() { - result = node.getIdentifier() - } + * Gets the identifier of this field expression, if it exists. + */ + NameRef getIdentifier() { result = node.getIdentifier() } /** - * Holds if `getIdentifier()` exists. - */ - predicate hasIdentifier() { - exists(this.getIdentifier()) - } + * Holds if `getIdentifier()` exists. + */ + predicate hasIdentifier() { exists(this.getIdentifier()) } } - private final class ParentForExpr extends ParentAstNode, ForExpr { + + final private class ParentForExpr extends ParentAstNode, ForExpr { override predicate relevantChild(AstNode child) { none() or @@ -1277,77 +1051,64 @@ module MakeCfgNodes Input> { } /** - * A for loop expression. - * - * For example: - * ```rust - * for x in 0..10 { - * println!("{}", x); - * } - * ``` - */ + * A for loop expression. + * + * For example: + * ```rust + * for x in 0..10 { + * println!("{}", x); + * } + * ``` + */ final class ForExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private ForExpr node; - ForExprCfgNode() { - node = this.getAstNode() - } + ForExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ForExpr`. */ ForExpr getForExpr() { result = node } - + /** - * Gets the `index`th attr of this for expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Gets the `index`th attr of this for expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } + /** + * Gets any of the attrs of this for expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets any of the attrs of this for expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets the number of attrs of this for expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } /** - * Gets the number of attrs of this for expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } - /** - * Gets the iterable of this for expression, if it exists. - * - */ + * Gets the iterable of this for expression, if it exists. + */ ExprCfgNode getIterable() { any(ChildMapping mapping).hasCfgChild(node, node.getIterable(), this, result) } /** - * Holds if `getIterable()` exists. - */ - predicate hasIterable() { - exists(this.getIterable()) - } + * Holds if `getIterable()` exists. + */ + predicate hasIterable() { exists(this.getIterable()) } + /** - * Gets the pattern of this for expression, if it exists. - * - */ + * Gets the pattern of this for expression, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentFormatArgsArg extends ParentAstNode, FormatArgsArg { + + final private class ParentFormatArgsArg extends ParentAstNode, FormatArgsArg { override predicate relevantChild(AstNode child) { none() or @@ -1358,51 +1119,45 @@ module MakeCfgNodes Input> { } /** - * A FormatArgsArg. For example the `"world"` in: - * ```rust - * format_args!("Hello, {}!", "world") - * ``` - */ + * A FormatArgsArg. For example the `"world"` in: + * ```rust + * format_args!("Hello, {}!", "world") + * ``` + */ final class FormatArgsArgCfgNode extends CfgNodeFinal { private FormatArgsArg node; - FormatArgsArgCfgNode() { - node = this.getAstNode() - } + FormatArgsArgCfgNode() { node = this.getAstNode() } /** Gets the underlying `FormatArgsArg`. */ FormatArgsArg getFormatArgsArg() { result = node } - + /** - * Gets the expression of this format arguments argument, if it exists. - * - */ + * Gets the expression of this format arguments argument, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } + /** - * Gets the name of this format arguments argument, if it exists. - * - */ + * Gets the name of this format arguments argument, if it exists. + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { - exists(this.getName()) - } + * Holds if `getName()` exists. + */ + predicate hasName() { exists(this.getName()) } } - private final class ParentFormatArgsExpr extends ParentAstNode, FormatArgsExpr { + + final private class ParentFormatArgsExpr extends ParentAstNode, FormatArgsExpr { override predicate relevantChild(AstNode child) { none() or @@ -1413,126 +1168,101 @@ module MakeCfgNodes Input> { } /** - * A FormatArgsExpr. For example: - * ```rust - * format_args!("no args"); - * format_args!("{} foo {:?}", 1, 2); - * format_args!("{b} foo {a:?}", a=1, b=2); - * let (x, y) = (1, 42); - * format_args!("{x}, {y}"); - * ``` - */ + * A FormatArgsExpr. For example: + * ```rust + * format_args!("no args"); + * format_args!("{} foo {:?}", 1, 2); + * format_args!("{b} foo {a:?}", a=1, b=2); + * let (x, y) = (1, 42); + * format_args!("{x}, {y}"); + * ``` + */ final class FormatArgsExprCfgNode extends CfgNodeFinal, ExprCfgNode { private FormatArgsExpr node; - FormatArgsExprCfgNode() { - node = this.getAstNode() - } + FormatArgsExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `FormatArgsExpr`. */ FormatArgsExpr getFormatArgsExpr() { result = node } - + /** - * Gets the `index`th argument of this format arguments expression (0-based). - * - */ + * Gets the `index`th argument of this format arguments expression (0-based). + */ FormatArgsArgCfgNode getArg(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getArg(index), this, result) } - /** - * Gets any of the arguments of this format arguments expression. - */ - FormatArgsArgCfgNode getAnArg() { - result = this.getArg(_) - } + * Gets any of the arguments of this format arguments expression. + */ + FormatArgsArgCfgNode getAnArg() { result = this.getArg(_) } /** - * Gets the number of arguments of this format arguments expression. - */ - int getNumberOfArgs() { - result = count(int i | exists(this.getArg(i))) - } - /** - * Gets the `index`th attr of this format arguments expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Gets the number of arguments of this format arguments expression. + */ + int getNumberOfArgs() { result = count(int i | exists(this.getArg(i))) } + /** + * Gets the `index`th attr of this format arguments expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this format arguments expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this format arguments expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this format arguments expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this format arguments expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the template of this format arguments expression, if it exists. - * - */ + * Gets the template of this format arguments expression, if it exists. + */ ExprCfgNode getTemplate() { any(ChildMapping mapping).hasCfgChild(node, node.getTemplate(), this, result) } /** - * Holds if `getTemplate()` exists. - */ - predicate hasTemplate() { - exists(this.getTemplate()) - } - /** - * Gets the `index`th format of this format arguments expression (0-based). - * - */ - Format getFormat(int index) { - result = node.getFormat(index) - } + * Holds if `getTemplate()` exists. + */ + predicate hasTemplate() { exists(this.getTemplate()) } + /** + * Gets the `index`th format of this format arguments expression (0-based). + */ + Format getFormat(int index) { result = node.getFormat(index) } /** - * Gets any of the formats of this format arguments expression. - */ - Format getAFormat() { - result = this.getFormat(_) - } + * Gets any of the formats of this format arguments expression. + */ + Format getAFormat() { result = this.getFormat(_) } /** - * Gets the number of formats of this format arguments expression. - */ - int getNumberOfFormats() { - result = count(int i | exists(this.getFormat(i))) - } + * Gets the number of formats of this format arguments expression. + */ + int getNumberOfFormats() { result = count(int i | exists(this.getFormat(i))) } } - private final class ParentFormatTemplateVariableAccess extends ParentAstNode, FormatTemplateVariableAccess { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentFormatTemplateVariableAccess extends ParentAstNode, + FormatTemplateVariableAccess + { + override predicate relevantChild(AstNode child) { none() } } /** - */ + */ final class FormatTemplateVariableAccessCfgNode extends CfgNodeFinal, PathExprBaseCfgNode { private FormatTemplateVariableAccess node; - FormatTemplateVariableAccessCfgNode() { - node = this.getAstNode() - } + FormatTemplateVariableAccessCfgNode() { node = this.getAstNode() } /** Gets the underlying `FormatTemplateVariableAccess`. */ FormatTemplateVariableAccess getFormatTemplateVariableAccess() { result = node } - } - private final class ParentIdentPat extends ParentAstNode, IdentPat { + + final private class ParentIdentPat extends ParentAstNode, IdentPat { override predicate relevantChild(AstNode child) { none() or @@ -1543,98 +1273,79 @@ module MakeCfgNodes Input> { } /** - * A binding pattern. For example: - * ```rust - * match x { - * Option::Some(y) => y, - * Option::None => 0, - * }; - * ``` - * ```rust - * match x { - * y@Option::Some(_) => y, - * Option::None => 0, - * }; - * ``` - */ + * A binding pattern. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * }; + * ``` + * ```rust + * match x { + * y@Option::Some(_) => y, + * Option::None => 0, + * }; + * ``` + */ final class IdentPatCfgNode extends CfgNodeFinal, PatCfgNode { private IdentPat node; - IdentPatCfgNode() { - node = this.getAstNode() - } + IdentPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `IdentPat`. */ IdentPat getIdentPat() { result = node } - - /** - * Gets the `index`th attr of this ident pattern (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this ident pattern (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this ident pattern. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this ident pattern. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this ident pattern. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this ident pattern. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Holds if this ident pattern is mut. - * - */ - predicate isMut() { - node.isMut() - } + * Holds if this ident pattern is mut. + */ + predicate isMut() { node.isMut() } /** - * Holds if this ident pattern is reference. - * - */ - predicate isRef() { - node.isRef() - } + * Holds if this ident pattern is reference. + */ + predicate isRef() { node.isRef() } /** - * Gets the name of this ident pattern, if it exists. - * - */ + * Gets the name of this ident pattern, if it exists. + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { - exists(this.getName()) - } + * Holds if `getName()` exists. + */ + predicate hasName() { exists(this.getName()) } + /** - * Gets the pattern of this ident pattern, if it exists. - * - */ + * Gets the pattern of this ident pattern, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentIfExpr extends ParentAstNode, IfExpr { + + final private class ParentIfExpr extends ParentAstNode, IfExpr { override predicate relevantChild(AstNode child) { none() or @@ -1647,119 +1358,100 @@ module MakeCfgNodes Input> { } /** - * An `if` expression. For example: - * ```rust - * if x == 42 { - * println!("that's the answer"); - * } - * ``` - * ```rust - * let y = if x > 0 { - * 1 - * } else { - * 0 - * }; - * ``` - */ + * An `if` expression. For example: + * ```rust + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ```rust + * let y = if x > 0 { + * 1 + * } else { + * 0 + * }; + * ``` + */ final class IfExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IfExpr node; - IfExprCfgNode() { - node = this.getAstNode() - } + IfExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `IfExpr`. */ IfExpr getIfExpr() { result = node } - - /** - * Gets the `index`th attr of this if expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this if expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this if expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this if expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this if expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this if expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the condition of this if expression, if it exists. - * - */ + * Gets the condition of this if expression, if it exists. + */ ExprCfgNode getCondition() { any(ChildMapping mapping).hasCfgChild(node, node.getCondition(), this, result) } /** - * Holds if `getCondition()` exists. - */ - predicate hasCondition() { - exists(this.getCondition()) - } + * Holds if `getCondition()` exists. + */ + predicate hasCondition() { exists(this.getCondition()) } + /** - * Gets the else of this if expression, if it exists. - * - */ + * Gets the else of this if expression, if it exists. + */ ExprCfgNode getElse() { any(ChildMapping mapping).hasCfgChild(node, node.getElse(), this, result) } /** - * Holds if `getElse()` exists. - */ - predicate hasElse() { - exists(this.getElse()) - } + * Holds if `getElse()` exists. + */ + predicate hasElse() { exists(this.getElse()) } + /** - * Gets the then of this if expression, if it exists. - * - */ + * Gets the then of this if expression, if it exists. + */ BlockExprCfgNode getThen() { any(ChildMapping mapping).hasCfgChild(node, node.getThen(), this, result) } /** - * Holds if `getThen()` exists. - */ - predicate hasThen() { - exists(this.getThen()) - } + * Holds if `getThen()` exists. + */ + predicate hasThen() { exists(this.getThen()) } } - private final class ParentIncludeBytesExpr extends ParentAstNode, IncludeBytesExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentIncludeBytesExpr extends ParentAstNode, IncludeBytesExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * An expression produced by the built-in `include_bytes!` macro, embedding the contents of a file as a byte array. For example: - * ```rust - * let data = include_bytes!("data.bin"); - * ``` - */ + * An expression produced by the built-in `include_bytes!` macro, embedding the contents of a file as a byte array. For example: + * ```rust + * let data = include_bytes!("data.bin"); + * ``` + */ final class IncludeBytesExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IncludeBytesExpr node; - IncludeBytesExprCfgNode() { - node = this.getAstNode() - } + IncludeBytesExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `IncludeBytesExpr`. */ IncludeBytesExpr getIncludeBytesExpr() { result = node } - } - private final class ParentIndexExpr extends ParentAstNode, IndexExpr { + + final private class ParentIndexExpr extends ParentAstNode, IndexExpr { override predicate relevantChild(AstNode child) { none() or @@ -1770,108 +1462,87 @@ module MakeCfgNodes Input> { } /** - * An index expression. For example: - * ```rust - * list[42]; - * list[42] = 1; - * ``` - */ + * An index expression. For example: + * ```rust + * list[42]; + * list[42] = 1; + * ``` + */ final class IndexExprCfgNode extends CfgNodeFinal, ExprCfgNode { private IndexExpr node; - IndexExprCfgNode() { - node = this.getAstNode() - } + IndexExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `IndexExpr`. */ IndexExpr getIndexExpr() { result = node } - - /** - * Gets the `index`th attr of this index expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this index expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this index expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this index expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this index expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this index expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the base of this index expression, if it exists. - * - */ + * Gets the base of this index expression, if it exists. + */ ExprCfgNode getBase() { any(ChildMapping mapping).hasCfgChild(node, node.getBase(), this, result) } /** - * Holds if `getBase()` exists. - */ - predicate hasBase() { - exists(this.getBase()) - } + * Holds if `getBase()` exists. + */ + predicate hasBase() { exists(this.getBase()) } + /** - * Gets the index of this index expression, if it exists. - * - */ + * Gets the index of this index expression, if it exists. + */ ExprCfgNode getIndex() { any(ChildMapping mapping).hasCfgChild(node, node.getIndex(), this, result) } /** - * Holds if `getIndex()` exists. - */ - predicate hasIndex() { - exists(this.getIndex()) - } + * Holds if `getIndex()` exists. + */ + predicate hasIndex() { exists(this.getIndex()) } } - private final class ParentLabelableExpr extends ParentAstNode, LabelableExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentLabelableExpr extends ParentAstNode, LabelableExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). - */ + * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). + */ final class LabelableExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LabelableExpr node; - LabelableExprCfgNode() { - node = this.getAstNode() - } + LabelableExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `LabelableExpr`. */ LabelableExpr getLabelableExpr() { result = node } - + /** - * Gets the label of this labelable expression, if it exists. - * - */ - Label getLabel() { - result = node.getLabel() - } + * Gets the label of this labelable expression, if it exists. + */ + Label getLabel() { result = node.getLabel() } /** - * Holds if `getLabel()` exists. - */ - predicate hasLabel() { - exists(this.getLabel()) - } + * Holds if `getLabel()` exists. + */ + predicate hasLabel() { exists(this.getLabel()) } } - private final class ParentLetExpr extends ParentAstNode, LetExpr { + + final private class ParentLetExpr extends ParentAstNode, LetExpr { override predicate relevantChild(AstNode child) { none() or @@ -1882,75 +1553,62 @@ module MakeCfgNodes Input> { } /** - * A `let` expression. For example: - * ```rust - * if let Some(x) = maybe_some { - * println!("{}", x); - * } - * ``` - */ + * A `let` expression. For example: + * ```rust + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ final class LetExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LetExpr node; - LetExprCfgNode() { - node = this.getAstNode() - } + LetExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `LetExpr`. */ LetExpr getLetExpr() { result = node } - - /** - * Gets the `index`th attr of this let expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this let expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this let expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this let expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this let expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this let expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the scrutinee of this let expression, if it exists. - * - */ + * Gets the scrutinee of this let expression, if it exists. + */ ExprCfgNode getScrutinee() { any(ChildMapping mapping).hasCfgChild(node, node.getScrutinee(), this, result) } /** - * Holds if `getScrutinee()` exists. - */ - predicate hasScrutinee() { - exists(this.getScrutinee()) - } + * Holds if `getScrutinee()` exists. + */ + predicate hasScrutinee() { exists(this.getScrutinee()) } + /** - * Gets the pattern of this let expression, if it exists. - * - */ + * Gets the pattern of this let expression, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentLetStmt extends ParentAstNode, LetStmt { + + final private class ParentLetStmt extends ParentAstNode, LetStmt { override predicate relevantChild(AstNode child) { none() or @@ -1961,174 +1619,138 @@ module MakeCfgNodes Input> { } /** - * A let statement. For example: - * ```rust - * let x = 42; - * let x: i32 = 42; - * let x: i32; - * let x; - * let (x, y) = (1, 2); - * let Some(x) = std::env::var("FOO") else { - * return; - * }; - * ``` - */ + * A let statement. For example: + * ```rust + * let x = 42; + * let x: i32 = 42; + * let x: i32; + * let x; + * let (x, y) = (1, 2); + * let Some(x) = std::env::var("FOO") else { + * return; + * }; + * ``` + */ final class LetStmtCfgNode extends CfgNodeFinal { private LetStmt node; - LetStmtCfgNode() { - node = this.getAstNode() - } + LetStmtCfgNode() { node = this.getAstNode() } /** Gets the underlying `LetStmt`. */ LetStmt getLetStmt() { result = node } - - /** - * Gets the `index`th attr of this let statement (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this let statement (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this let statement. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this let statement. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this let statement. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this let statement. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the initializer of this let statement, if it exists. - * - */ + * Gets the initializer of this let statement, if it exists. + */ ExprCfgNode getInitializer() { any(ChildMapping mapping).hasCfgChild(node, node.getInitializer(), this, result) } /** - * Holds if `getInitializer()` exists. - */ - predicate hasInitializer() { - exists(this.getInitializer()) - } + * Holds if `getInitializer()` exists. + */ + predicate hasInitializer() { exists(this.getInitializer()) } + /** - * Gets the let else of this let statement, if it exists. - * - */ - LetElse getLetElse() { - result = node.getLetElse() - } + * Gets the let else of this let statement, if it exists. + */ + LetElse getLetElse() { result = node.getLetElse() } /** - * Holds if `getLetElse()` exists. - */ - predicate hasLetElse() { - exists(this.getLetElse()) - } + * Holds if `getLetElse()` exists. + */ + predicate hasLetElse() { exists(this.getLetElse()) } + /** - * Gets the pattern of this let statement, if it exists. - * - */ + * Gets the pattern of this let statement, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } + /** - * Gets the type representation of this let statement, if it exists. - * - */ - TypeRepr getTypeRepr() { - result = node.getTypeRepr() - } + * Gets the type representation of this let statement, if it exists. + */ + TypeRepr getTypeRepr() { result = node.getTypeRepr() } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { - exists(this.getTypeRepr()) - } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { exists(this.getTypeRepr()) } } - private final class ParentLiteralExpr extends ParentAstNode, LiteralExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentLiteralExpr extends ParentAstNode, LiteralExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A literal expression. For example: - * ```rust - * 42; - * 42.0; - * "Hello, world!"; - * b"Hello, world!"; - * 'x'; - * b'x'; - * r"Hello, world!"; - * true; - * ``` - */ + * A literal expression. For example: + * ```rust + * 42; + * 42.0; + * "Hello, world!"; + * b"Hello, world!"; + * 'x'; + * b'x'; + * r"Hello, world!"; + * true; + * ``` + */ final class LiteralExprCfgNode extends CfgNodeFinal, ExprCfgNode { private LiteralExpr node; - LiteralExprCfgNode() { - node = this.getAstNode() - } + LiteralExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `LiteralExpr`. */ LiteralExpr getLiteralExpr() { result = node } - - /** - * Gets the `index`th attr of this literal expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this literal expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this literal expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this literal expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this literal expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this literal expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the text value of this literal expression, if it exists. - * - */ - string getTextValue() { - result = node.getTextValue() - } + * Gets the text value of this literal expression, if it exists. + */ + string getTextValue() { result = node.getTextValue() } /** - * Holds if `getTextValue()` exists. - */ - predicate hasTextValue() { - exists(this.getTextValue()) - } + * Holds if `getTextValue()` exists. + */ + predicate hasTextValue() { exists(this.getTextValue()) } } - private final class ParentLiteralPat extends ParentAstNode, LiteralPat { + + final private class ParentLiteralPat extends ParentAstNode, LiteralPat { override predicate relevantChild(AstNode child) { none() or @@ -2137,103 +1759,88 @@ module MakeCfgNodes Input> { } /** - * A literal pattern. For example: - * ```rust - * match x { - * 42 => "ok", - * _ => "fail", - * } - * ``` - */ + * A literal pattern. For example: + * ```rust + * match x { + * 42 => "ok", + * _ => "fail", + * } + * ``` + */ final class LiteralPatCfgNode extends CfgNodeFinal, PatCfgNode { private LiteralPat node; - LiteralPatCfgNode() { - node = this.getAstNode() - } + LiteralPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `LiteralPat`. */ LiteralPat getLiteralPat() { result = node } - + /** - * Gets the literal of this literal pattern, if it exists. - * - */ + * Gets the literal of this literal pattern, if it exists. + */ LiteralExprCfgNode getLiteral() { any(ChildMapping mapping).hasCfgChild(node, node.getLiteral(), this, result) } /** - * Holds if `getLiteral()` exists. - */ - predicate hasLiteral() { - exists(this.getLiteral()) - } + * Holds if `getLiteral()` exists. + */ + predicate hasLiteral() { exists(this.getLiteral()) } } - private final class ParentLoopExpr extends ParentAstNode, LoopExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentLoopExpr extends ParentAstNode, LoopExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A loop expression. For example: - * ```rust - * loop { - * println!("Hello, world (again)!"); - * }; - * ``` - * ```rust - * 'label: loop { - * println!("Hello, world (once)!"); - * break 'label; - * }; - * ``` - * ```rust - * let mut x = 0; - * loop { - * if x < 10 { - * x += 1; - * } else { - * break; - * } - * }; - * ``` - */ + * A loop expression. For example: + * ```rust + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ```rust + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ```rust + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ final class LoopExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private LoopExpr node; - LoopExprCfgNode() { - node = this.getAstNode() - } + LoopExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `LoopExpr`. */ LoopExpr getLoopExpr() { result = node } - - /** - * Gets the `index`th attr of this loop expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this loop expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this loop expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this loop expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this loop expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this loop expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } } - private final class ParentLoopingExpr extends ParentAstNode, LoopingExpr { + + final private class ParentLoopingExpr extends ParentAstNode, LoopingExpr { override predicate relevantChild(AstNode child) { none() or @@ -2242,123 +1849,96 @@ module MakeCfgNodes Input> { } /** - * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). - */ + * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). + */ final class LoopingExprCfgNode extends CfgNodeFinal, LabelableExprCfgNode { private LoopingExpr node; - LoopingExprCfgNode() { - node = this.getAstNode() - } + LoopingExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `LoopingExpr`. */ LoopingExpr getLoopingExpr() { result = node } - + /** - * Gets the loop body of this looping expression, if it exists. - * - */ + * Gets the loop body of this looping expression, if it exists. + */ BlockExprCfgNode getLoopBody() { any(ChildMapping mapping).hasCfgChild(node, node.getLoopBody(), this, result) } /** - * Holds if `getLoopBody()` exists. - */ - predicate hasLoopBody() { - exists(this.getLoopBody()) - } + * Holds if `getLoopBody()` exists. + */ + predicate hasLoopBody() { exists(this.getLoopBody()) } } - private final class ParentMacroCall extends ParentAstNode, MacroCall { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentMacroCall extends ParentAstNode, MacroCall { + override predicate relevantChild(AstNode child) { none() } } /** - * A macro invocation. - * - * For example: - * ```rust - * println!("Hello, world!"); - * ``` - */ + * A macro invocation. + * + * For example: + * ```rust + * println!("Hello, world!"); + * ``` + */ final class MacroCallCfgNode extends CfgNodeFinal { private MacroCall node; - MacroCallCfgNode() { - node = this.getAstNode() - } + MacroCallCfgNode() { node = this.getAstNode() } /** Gets the underlying `MacroCall`. */ MacroCall getMacroCall() { result = node } - - /** - * Gets the `index`th attr of this macro call (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this macro call (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this macro call. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this macro call. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this macro call. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this macro call. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the path of this macro call, if it exists. - * - */ - Path getPath() { - result = node.getPath() - } + * Gets the path of this macro call, if it exists. + */ + Path getPath() { result = node.getPath() } /** - * Holds if `getPath()` exists. - */ - predicate hasPath() { - exists(this.getPath()) - } + * Holds if `getPath()` exists. + */ + predicate hasPath() { exists(this.getPath()) } + /** - * Gets the token tree of this macro call, if it exists. - * - */ - TokenTree getTokenTree() { - result = node.getTokenTree() - } + * Gets the token tree of this macro call, if it exists. + */ + TokenTree getTokenTree() { result = node.getTokenTree() } /** - * Holds if `getTokenTree()` exists. - */ - predicate hasTokenTree() { - exists(this.getTokenTree()) - } + * Holds if `getTokenTree()` exists. + */ + predicate hasTokenTree() { exists(this.getTokenTree()) } + /** - * Gets the macro call expansion of this macro call, if it exists. - * - */ - AstNode getMacroCallExpansion() { - result = node.getMacroCallExpansion() - } + * Gets the macro call expansion of this macro call, if it exists. + */ + AstNode getMacroCallExpansion() { result = node.getMacroCallExpansion() } /** - * Holds if `getMacroCallExpansion()` exists. - */ - predicate hasMacroCallExpansion() { - exists(this.getMacroCallExpansion()) - } + * Holds if `getMacroCallExpansion()` exists. + */ + predicate hasMacroCallExpansion() { exists(this.getMacroCallExpansion()) } } - private final class ParentMacroExpr extends ParentAstNode, MacroExpr { + + final private class ParentMacroExpr extends ParentAstNode, MacroExpr { override predicate relevantChild(AstNode child) { none() or @@ -2367,39 +1947,35 @@ module MakeCfgNodes Input> { } /** - * A macro expression, representing the invocation of a macro that produces an expression. - * - * For example: - * ```rust - * let y = vec![1, 2, 3]; - * ``` - */ + * A macro expression, representing the invocation of a macro that produces an expression. + * + * For example: + * ```rust + * let y = vec![1, 2, 3]; + * ``` + */ final class MacroExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MacroExpr node; - MacroExprCfgNode() { - node = this.getAstNode() - } + MacroExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `MacroExpr`. */ MacroExpr getMacroExpr() { result = node } - + /** - * Gets the macro call of this macro expression, if it exists. - * - */ + * Gets the macro call of this macro expression, if it exists. + */ MacroCallCfgNode getMacroCall() { any(ChildMapping mapping).hasCfgChild(node, node.getMacroCall(), this, result) } /** - * Holds if `getMacroCall()` exists. - */ - predicate hasMacroCall() { - exists(this.getMacroCall()) - } + * Holds if `getMacroCall()` exists. + */ + predicate hasMacroCall() { exists(this.getMacroCall()) } } - private final class ParentMacroPat extends ParentAstNode, MacroPat { + + final private class ParentMacroPat extends ParentAstNode, MacroPat { override predicate relevantChild(AstNode child) { none() or @@ -2408,48 +1984,44 @@ module MakeCfgNodes Input> { } /** - * A macro pattern, representing the invocation of a macro that produces a pattern. - * - * For example: - * ```rust - * macro_rules! my_macro { - * () => { - * Ok(_) - * }; - * } - * match x { - * my_macro!() => "matched", - * // ^^^^^^^^^^^ - * _ => "not matched", - * } - * ``` - */ + * A macro pattern, representing the invocation of a macro that produces a pattern. + * + * For example: + * ```rust + * macro_rules! my_macro { + * () => { + * Ok(_) + * }; + * } + * match x { + * my_macro!() => "matched", + * // ^^^^^^^^^^^ + * _ => "not matched", + * } + * ``` + */ final class MacroPatCfgNode extends CfgNodeFinal, PatCfgNode { private MacroPat node; - MacroPatCfgNode() { - node = this.getAstNode() - } + MacroPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `MacroPat`. */ MacroPat getMacroPat() { result = node } - + /** - * Gets the macro call of this macro pattern, if it exists. - * - */ + * Gets the macro call of this macro pattern, if it exists. + */ MacroCallCfgNode getMacroCall() { any(ChildMapping mapping).hasCfgChild(node, node.getMacroCall(), this, result) } /** - * Holds if `getMacroCall()` exists. - */ - predicate hasMacroCall() { - exists(this.getMacroCall()) - } + * Holds if `getMacroCall()` exists. + */ + predicate hasMacroCall() { exists(this.getMacroCall()) } } - private final class ParentMatchExpr extends ParentAstNode, MatchExpr { + + final private class ParentMatchExpr extends ParentAstNode, MatchExpr { override predicate relevantChild(AstNode child) { none() or @@ -2458,82 +2030,67 @@ module MakeCfgNodes Input> { } /** - * A match expression. For example: - * ```rust - * match x { - * Option::Some(y) => y, - * Option::None => 0, - * } - * ``` - * ```rust - * match x { - * Some(y) if y != 0 => 1 / y, - * _ => 0, - * } - * ``` - */ + * A match expression. For example: + * ```rust + * match x { + * Option::Some(y) => y, + * Option::None => 0, + * } + * ``` + * ```rust + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ final class MatchExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MatchExpr node; - MatchExprCfgNode() { - node = this.getAstNode() - } + MatchExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `MatchExpr`. */ MatchExpr getMatchExpr() { result = node } - - /** - * Gets the `index`th attr of this match expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this match expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this match expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this match expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this match expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this match expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the scrutinee (the expression being matched) of this match expression, if it exists. - * - */ + * Gets the scrutinee (the expression being matched) of this match expression, if it exists. + */ ExprCfgNode getScrutinee() { any(ChildMapping mapping).hasCfgChild(node, node.getScrutinee(), this, result) } /** - * Holds if `getScrutinee()` exists. - */ - predicate hasScrutinee() { - exists(this.getScrutinee()) - } + * Holds if `getScrutinee()` exists. + */ + predicate hasScrutinee() { exists(this.getScrutinee()) } + /** - * Gets the match arm list of this match expression, if it exists. - * - */ - MatchArmList getMatchArmList() { - result = node.getMatchArmList() - } + * Gets the match arm list of this match expression, if it exists. + */ + MatchArmList getMatchArmList() { result = node.getMatchArmList() } /** - * Holds if `getMatchArmList()` exists. - */ - predicate hasMatchArmList() { - exists(this.getMatchArmList()) - } + * Holds if `getMatchArmList()` exists. + */ + predicate hasMatchArmList() { exists(this.getMatchArmList()) } } - private final class ParentMethodCallExpr extends ParentAstNode, MethodCallExpr { + + final private class ParentMethodCallExpr extends ParentAstNode, MethodCallExpr { override predicate relevantChild(AstNode child) { none() or @@ -2542,253 +2099,196 @@ module MakeCfgNodes Input> { } /** - * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using - * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and - * indexing syntax (such as `x[y]`). - * - * A method call expression. For example: - * ```rust - * x.foo(42); - * x.foo::(42); - * ``` - */ + * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using + * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and + * indexing syntax (such as `x[y]`). + * + * A method call expression. For example: + * ```rust + * x.foo(42); + * x.foo::(42); + * ``` + */ final class MethodCallExprCfgNode extends CfgNodeFinal, ExprCfgNode { private MethodCallExpr node; - MethodCallExprCfgNode() { - node = this.getAstNode() - } + MethodCallExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `MethodCallExpr`. */ MethodCallExpr getMethodCallExpr() { result = node } - - /** - * Gets the argument list of this method call expression, if it exists. - * - */ - ArgList getArgList() { - result = node.getArgList() - } /** - * Holds if `getArgList()` exists. - */ - predicate hasArgList() { - exists(this.getArgList()) - } + * Gets the argument list of this method call expression, if it exists. + */ + ArgList getArgList() { result = node.getArgList() } + /** - * Gets the `index`th attr of this method call expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + * Holds if `getArgList()` exists. + */ + predicate hasArgList() { exists(this.getArgList()) } + /** + * Gets the `index`th attr of this method call expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this method call expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this method call expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this method call expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this method call expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the generic argument list of this method call expression, if it exists. - * - */ - GenericArgList getGenericArgList() { - result = node.getGenericArgList() - } + * Gets the generic argument list of this method call expression, if it exists. + */ + GenericArgList getGenericArgList() { result = node.getGenericArgList() } /** - * Holds if `getGenericArgList()` exists. - */ - predicate hasGenericArgList() { - exists(this.getGenericArgList()) - } + * Holds if `getGenericArgList()` exists. + */ + predicate hasGenericArgList() { exists(this.getGenericArgList()) } + /** - * Gets the identifier of this method call expression, if it exists. - * - */ - NameRef getIdentifier() { - result = node.getIdentifier() - } + * Gets the identifier of this method call expression, if it exists. + */ + NameRef getIdentifier() { result = node.getIdentifier() } /** - * Holds if `getIdentifier()` exists. - */ - predicate hasIdentifier() { - exists(this.getIdentifier()) - } + * Holds if `getIdentifier()` exists. + */ + predicate hasIdentifier() { exists(this.getIdentifier()) } + /** - * Gets the receiver of this method call expression, if it exists. - * - */ + * Gets the receiver of this method call expression, if it exists. + */ ExprCfgNode getReceiver() { any(ChildMapping mapping).hasCfgChild(node, node.getReceiver(), this, result) } /** - * Holds if `getReceiver()` exists. - */ - predicate hasReceiver() { - exists(this.getReceiver()) - } + * Holds if `getReceiver()` exists. + */ + predicate hasReceiver() { exists(this.getReceiver()) } } - private final class ParentName extends ParentAstNode, Name { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentName extends ParentAstNode, Name { + override predicate relevantChild(AstNode child) { none() } } /** - * An identifier name. - * - * For example: - * ```rust - * let foo = 1; - * // ^^^ - * ``` - */ + * An identifier name. + * + * For example: + * ```rust + * let foo = 1; + * // ^^^ + * ``` + */ final class NameCfgNode extends CfgNodeFinal { private Name node; - NameCfgNode() { - node = this.getAstNode() - } + NameCfgNode() { node = this.getAstNode() } /** Gets the underlying `Name`. */ Name getName() { result = node } - + /** - * Gets the text of this name, if it exists. - * - */ - string getText() { - result = node.getText() - } + * Gets the text of this name, if it exists. + */ + string getText() { result = node.getText() } /** - * Holds if `getText()` exists. - */ - predicate hasText() { - exists(this.getText()) - } + * Holds if `getText()` exists. + */ + predicate hasText() { exists(this.getText()) } } - private final class ParentNotNull extends ParentAstNode, NotNull { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentNotNull extends ParentAstNode, NotNull { + override predicate relevantChild(AstNode child) { none() } } /** - * The `!null` pattern used in a pattern type to denote a non-null value. Pattern types - * are an experimental, mostly compiler-internal feature (used in the standard library for - * types such as `NonZero` and `NonNull`) and cannot be written directly in stable Rust; - * the example below uses rust-analyzer's canonical `builtin#pattern_type` syntax: - * ```rust - * type NonNull = builtin#pattern_type(*const () is !null); - * ``` - */ + * The `!null` pattern used in a pattern type to denote a non-null value. Pattern types + * are an experimental, mostly compiler-internal feature (used in the standard library for + * types such as `NonZero` and `NonNull`) and cannot be written directly in stable Rust; + * the example below uses rust-analyzer's canonical `builtin#pattern_type` syntax: + * ```rust + * type NonNull = builtin#pattern_type(*const () is !null); + * ``` + */ final class NotNullCfgNode extends CfgNodeFinal, PatCfgNode { private NotNull node; - NotNullCfgNode() { - node = this.getAstNode() - } + NotNullCfgNode() { node = this.getAstNode() } /** Gets the underlying `NotNull`. */ NotNull getNotNull() { result = node } - } - private final class ParentOffsetOfExpr extends ParentAstNode, OffsetOfExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentOffsetOfExpr extends ParentAstNode, OffsetOfExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * An `offset_of` expression. For example: - * ```rust - * builtin # offset_of(Struct, field); - * ``` - */ + * An `offset_of` expression. For example: + * ```rust + * builtin # offset_of(Struct, field); + * ``` + */ final class OffsetOfExprCfgNode extends CfgNodeFinal, ExprCfgNode { private OffsetOfExpr node; - OffsetOfExprCfgNode() { - node = this.getAstNode() - } + OffsetOfExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `OffsetOfExpr`. */ OffsetOfExpr getOffsetOfExpr() { result = node } - - /** - * Gets the `index`th attr of this offset of expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } - /** - * Gets any of the attrs of this offset of expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets the `index`th attr of this offset of expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets the number of attrs of this offset of expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets any of the attrs of this offset of expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } + /** - * Gets the `index`th field of this offset of expression (0-based). - * - */ - NameRef getField(int index) { - result = node.getField(index) - } + * Gets the number of attrs of this offset of expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** + * Gets the `index`th field of this offset of expression (0-based). + */ + NameRef getField(int index) { result = node.getField(index) } /** - * Gets any of the fields of this offset of expression. - */ - NameRef getAField() { - result = this.getField(_) - } + * Gets any of the fields of this offset of expression. + */ + NameRef getAField() { result = this.getField(_) } /** - * Gets the number of fields of this offset of expression. - */ - int getNumberOfFields() { - result = count(int i | exists(this.getField(i))) - } + * Gets the number of fields of this offset of expression. + */ + int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } + /** - * Gets the type representation of this offset of expression, if it exists. - * - */ - TypeRepr getTypeRepr() { - result = node.getTypeRepr() - } + * Gets the type representation of this offset of expression, if it exists. + */ + TypeRepr getTypeRepr() { result = node.getTypeRepr() } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { - exists(this.getTypeRepr()) - } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { exists(this.getTypeRepr()) } } - private final class ParentOrPat extends ParentAstNode, OrPat { + + final private class ParentOrPat extends ParentAstNode, OrPat { override predicate relevantChild(AstNode child) { none() or @@ -2797,47 +2297,40 @@ module MakeCfgNodes Input> { } /** - * An or pattern. For example: - * ```rust - * match x { - * Option::Some(y) | Option::None => 0, - * } - * ``` - */ + * An or pattern. For example: + * ```rust + * match x { + * Option::Some(y) | Option::None => 0, + * } + * ``` + */ final class OrPatCfgNode extends CfgNodeFinal, PatCfgNode { private OrPat node; - OrPatCfgNode() { - node = this.getAstNode() - } + OrPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `OrPat`. */ OrPat getOrPat() { result = node } - + /** - * Gets the `index`th pattern of this or pattern (0-based). - * - */ + * Gets the `index`th pattern of this or pattern (0-based). + */ PatCfgNode getPat(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getPat(index), this, result) } - /** - * Gets any of the patterns of this or pattern. - */ - PatCfgNode getAPat() { - result = this.getPat(_) - } + * Gets any of the patterns of this or pattern. + */ + PatCfgNode getAPat() { result = this.getPat(_) } /** - * Gets the number of patterns of this or pattern. - */ - int getNumberOfPats() { - result = count(int i | exists(this.getPat(i))) - } + * Gets the number of patterns of this or pattern. + */ + int getNumberOfPats() { result = count(int i | exists(this.getPat(i))) } } - private final class ParentParam extends ParentAstNode, Param { + + final private class ParentParam extends ParentAstNode, Param { override predicate relevantChild(AstNode child) { none() or @@ -2846,209 +2339,167 @@ module MakeCfgNodes Input> { } /** - * A parameter in a function or method. For example `x` in: - * ```rust - * fn new(x: T) -> Foo { - * // ... - * } - * ``` - */ + * A parameter in a function or method. For example `x` in: + * ```rust + * fn new(x: T) -> Foo { + * // ... + * } + * ``` + */ final class ParamCfgNode extends CfgNodeFinal, ParamBaseCfgNode { private Param node; - ParamCfgNode() { - node = this.getAstNode() - } + ParamCfgNode() { node = this.getAstNode() } /** Gets the underlying `Param`. */ Param getParam() { result = node } - + /** - * Gets the pattern of this parameter, if it exists. - * - */ + * Gets the pattern of this parameter, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentParamBase extends ParentAstNode, ParamBase { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentParamBase extends ParentAstNode, ParamBase { + override predicate relevantChild(AstNode child) { none() } } /** - * A normal parameter, `Param`, or a self parameter `SelfParam`. - */ + * A normal parameter, `Param`, or a self parameter `SelfParam`. + */ final class ParamBaseCfgNode extends CfgNodeFinal { private ParamBase node; - ParamBaseCfgNode() { - node = this.getAstNode() - } + ParamBaseCfgNode() { node = this.getAstNode() } /** Gets the underlying `ParamBase`. */ ParamBase getParamBase() { result = node } - - /** - * Gets the `index`th attr of this parameter base (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this parameter base (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this parameter base. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this parameter base. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this parameter base. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this parameter base. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the type representation of this parameter base, if it exists. - * - */ - TypeRepr getTypeRepr() { - result = node.getTypeRepr() - } + * Gets the type representation of this parameter base, if it exists. + */ + TypeRepr getTypeRepr() { result = node.getTypeRepr() } /** - * Holds if `getTypeRepr()` exists. - */ - predicate hasTypeRepr() { - exists(this.getTypeRepr()) - } + * Holds if `getTypeRepr()` exists. + */ + predicate hasTypeRepr() { exists(this.getTypeRepr()) } } - private final class ParentPat extends ParentAstNode, Pat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentPat extends ParentAstNode, Pat { + override predicate relevantChild(AstNode child) { none() } } /** - * The base class for patterns. - */ + * The base class for patterns. + */ final class PatCfgNode extends CfgNodeFinal { private Pat node; - PatCfgNode() { - node = this.getAstNode() - } + PatCfgNode() { node = this.getAstNode() } /** Gets the underlying `Pat`. */ Pat getPat() { result = node } - } - private final class ParentPathExpr extends ParentAstNode, PathExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentPathExpr extends ParentAstNode, PathExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A path expression. For example: - * ```rust - * let x = variable; - * let x = foo::bar; - * let y = ::foo; - * let z = ::foo; - * ``` - */ + * A path expression. For example: + * ```rust + * let x = variable; + * let x = foo::bar; + * let y = ::foo; + * let z = ::foo; + * ``` + */ final class PathExprCfgNode extends CfgNodeFinal, PathExprBaseCfgNode { private PathExpr node; - PathExprCfgNode() { - node = this.getAstNode() - } + PathExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `PathExpr`. */ PathExpr getPathExpr() { result = node } - - /** - * Gets the `index`th attr of this path expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this path expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this path expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this path expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this path expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this path expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } } - private final class ParentPathExprBase extends ParentAstNode, PathExprBase { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentPathExprBase extends ParentAstNode, PathExprBase { + override predicate relevantChild(AstNode child) { none() } } /** - * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. - */ + * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. + */ final class PathExprBaseCfgNode extends CfgNodeFinal, ExprCfgNode { private PathExprBase node; - PathExprBaseCfgNode() { - node = this.getAstNode() - } + PathExprBaseCfgNode() { node = this.getAstNode() } /** Gets the underlying `PathExprBase`. */ PathExprBase getPathExprBase() { result = node } - } - private final class ParentPathPat extends ParentAstNode, PathPat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentPathPat extends ParentAstNode, PathPat { + override predicate relevantChild(AstNode child) { none() } } /** - * A path pattern. For example: - * ```rust - * match x { - * Foo::Bar => "ok", - * _ => "fail", - * } - * ``` - */ + * A path pattern. For example: + * ```rust + * match x { + * Foo::Bar => "ok", + * _ => "fail", + * } + * ``` + */ final class PathPatCfgNode extends CfgNodeFinal, PatCfgNode { private PathPat node; - PathPatCfgNode() { - node = this.getAstNode() - } + PathPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `PathPat`. */ PathPat getPathPat() { result = node } - } - private final class ParentPrefixExpr extends ParentAstNode, PrefixExpr { + + final private class ParentPrefixExpr extends ParentAstNode, PrefixExpr { override predicate relevantChild(AstNode child) { none() or @@ -3057,75 +2508,60 @@ module MakeCfgNodes Input> { } /** - * A unary operation expression. For example: - * ```rust - * let x = -42; - * let y = !true; - * let z = *ptr; - * ``` - */ + * A unary operation expression. For example: + * ```rust + * let x = -42; + * let y = !true; + * let z = *ptr; + * ``` + */ final class PrefixExprCfgNode extends CfgNodeFinal, ExprCfgNode { private PrefixExpr node; - PrefixExprCfgNode() { - node = this.getAstNode() - } + PrefixExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `PrefixExpr`. */ PrefixExpr getPrefixExpr() { result = node } - - /** - * Gets the `index`th attr of this prefix expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this prefix expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this prefix expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this prefix expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this prefix expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this prefix expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this prefix expression, if it exists. - * - */ + * Gets the expression of this prefix expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } + /** - * Gets the operator name of this prefix expression, if it exists. - * - */ - string getOperatorName() { - result = node.getOperatorName() - } + * Gets the operator name of this prefix expression, if it exists. + */ + string getOperatorName() { result = node.getOperatorName() } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { - exists(this.getOperatorName()) - } + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { exists(this.getOperatorName()) } } - private final class ParentRangeExpr extends ParentAstNode, RangeExpr { + + final private class ParentRangeExpr extends ParentAstNode, RangeExpr { override predicate relevantChild(AstNode child) { none() or @@ -3136,92 +2572,75 @@ module MakeCfgNodes Input> { } /** - * A range expression. For example: - * ```rust - * let x = 1..=10; - * let x = 1..10; - * let x = 10..; - * let x = ..10; - * let x = ..=10; - * let x = ..; - * ``` - */ + * A range expression. For example: + * ```rust + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ final class RangeExprCfgNode extends CfgNodeFinal, ExprCfgNode { private RangeExpr node; - RangeExprCfgNode() { - node = this.getAstNode() - } + RangeExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `RangeExpr`. */ RangeExpr getRangeExpr() { result = node } - - /** - * Gets the `index`th attr of this range expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this range expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this range expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this range expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this range expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this range expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the end of this range expression, if it exists. - * - */ + * Gets the end of this range expression, if it exists. + */ ExprCfgNode getEnd() { any(ChildMapping mapping).hasCfgChild(node, node.getEnd(), this, result) } /** - * Holds if `getEnd()` exists. - */ - predicate hasEnd() { - exists(this.getEnd()) - } + * Holds if `getEnd()` exists. + */ + predicate hasEnd() { exists(this.getEnd()) } + /** - * Gets the operator name of this range expression, if it exists. - * - */ - string getOperatorName() { - result = node.getOperatorName() - } + * Gets the operator name of this range expression, if it exists. + */ + string getOperatorName() { result = node.getOperatorName() } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { - exists(this.getOperatorName()) - } + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { exists(this.getOperatorName()) } + /** - * Gets the start of this range expression, if it exists. - * - */ + * Gets the start of this range expression, if it exists. + */ ExprCfgNode getStart() { any(ChildMapping mapping).hasCfgChild(node, node.getStart(), this, result) } /** - * Holds if `getStart()` exists. - */ - predicate hasStart() { - exists(this.getStart()) - } + * Holds if `getStart()` exists. + */ + predicate hasStart() { exists(this.getStart()) } } - private final class ParentRangePat extends ParentAstNode, RangePat { + + final private class ParentRangePat extends ParentAstNode, RangePat { override predicate relevantChild(AstNode child) { none() or @@ -3232,69 +2651,59 @@ module MakeCfgNodes Input> { } /** - * A range pattern. For example: - * ```rust - * match x { - * ..15 => "too cold", - * 16..=25 => "just right", - * 26.. => "too hot", - * } - * ``` - */ + * A range pattern. For example: + * ```rust + * match x { + * ..15 => "too cold", + * 16..=25 => "just right", + * 26.. => "too hot", + * } + * ``` + */ final class RangePatCfgNode extends CfgNodeFinal, PatCfgNode { private RangePat node; - RangePatCfgNode() { - node = this.getAstNode() - } + RangePatCfgNode() { node = this.getAstNode() } /** Gets the underlying `RangePat`. */ RangePat getRangePat() { result = node } - + /** - * Gets the end of this range pattern, if it exists. - * - */ + * Gets the end of this range pattern, if it exists. + */ PatCfgNode getEnd() { any(ChildMapping mapping).hasCfgChild(node, node.getEnd(), this, result) } /** - * Holds if `getEnd()` exists. - */ - predicate hasEnd() { - exists(this.getEnd()) - } + * Holds if `getEnd()` exists. + */ + predicate hasEnd() { exists(this.getEnd()) } + /** - * Gets the operator name of this range pattern, if it exists. - * - */ - string getOperatorName() { - result = node.getOperatorName() - } + * Gets the operator name of this range pattern, if it exists. + */ + string getOperatorName() { result = node.getOperatorName() } /** - * Holds if `getOperatorName()` exists. - */ - predicate hasOperatorName() { - exists(this.getOperatorName()) - } + * Holds if `getOperatorName()` exists. + */ + predicate hasOperatorName() { exists(this.getOperatorName()) } + /** - * Gets the start of this range pattern, if it exists. - * - */ + * Gets the start of this range pattern, if it exists. + */ PatCfgNode getStart() { any(ChildMapping mapping).hasCfgChild(node, node.getStart(), this, result) } /** - * Holds if `getStart()` exists. - */ - predicate hasStart() { - exists(this.getStart()) - } + * Holds if `getStart()` exists. + */ + predicate hasStart() { exists(this.getStart()) } } - private final class ParentRefExpr extends ParentAstNode, RefExpr { + + final private class ParentRefExpr extends ParentAstNode, RefExpr { override predicate relevantChild(AstNode child) { none() or @@ -3303,86 +2712,66 @@ module MakeCfgNodes Input> { } /** - * A reference expression. For example: - * ```rust - * let ref_const = &foo; - * let ref_mut = &mut foo; - * let raw_const: &mut i32 = &raw const foo; - * let raw_mut: &mut i32 = &raw mut foo; - * ``` - */ + * A reference expression. For example: + * ```rust + * let ref_const = &foo; + * let ref_mut = &mut foo; + * let raw_const: &mut i32 = &raw const foo; + * let raw_mut: &mut i32 = &raw mut foo; + * ``` + */ final class RefExprCfgNode extends CfgNodeFinal, ExprCfgNode { private RefExpr node; - RefExprCfgNode() { - node = this.getAstNode() - } + RefExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `RefExpr`. */ RefExpr getRefExpr() { result = node } - - /** - * Gets the `index`th attr of this reference expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this reference expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this reference expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this reference expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this reference expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this reference expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this reference expression, if it exists. - * - */ + * Gets the expression of this reference expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } - /** - * Holds if this reference expression is const. - * - */ - predicate isConst() { - node.isConst() - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } /** - * Holds if this reference expression is mut. - * - */ - predicate isMut() { - node.isMut() - } + * Holds if this reference expression is const. + */ + predicate isConst() { node.isConst() } /** - * Holds if this reference expression is raw. - * - */ - predicate isRaw() { - node.isRaw() - } + * Holds if this reference expression is mut. + */ + predicate isMut() { node.isMut() } + /** + * Holds if this reference expression is raw. + */ + predicate isRaw() { node.isRaw() } } - private final class ParentRefPat extends ParentAstNode, RefPat { + + final private class ParentRefPat extends ParentAstNode, RefPat { override predicate relevantChild(AstNode child) { none() or @@ -3391,96 +2780,78 @@ module MakeCfgNodes Input> { } /** - * A reference pattern. For example: - * ```rust - * match x { - * &mut Option::Some(y) => y, - * &Option::None => 0, - * }; - * ``` - */ + * A reference pattern. For example: + * ```rust + * match x { + * &mut Option::Some(y) => y, + * &Option::None => 0, + * }; + * ``` + */ final class RefPatCfgNode extends CfgNodeFinal, PatCfgNode { private RefPat node; - RefPatCfgNode() { - node = this.getAstNode() - } + RefPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `RefPat`. */ RefPat getRefPat() { result = node } - + /** - * Holds if this reference pattern is mut. - * - */ - predicate isMut() { - node.isMut() - } + * Holds if this reference pattern is mut. + */ + predicate isMut() { node.isMut() } /** - * Gets the pattern of this reference pattern, if it exists. - * - */ + * Gets the pattern of this reference pattern, if it exists. + */ PatCfgNode getPat() { any(ChildMapping mapping).hasCfgChild(node, node.getPat(), this, result) } /** - * Holds if `getPat()` exists. - */ - predicate hasPat() { - exists(this.getPat()) - } + * Holds if `getPat()` exists. + */ + predicate hasPat() { exists(this.getPat()) } } - private final class ParentRestPat extends ParentAstNode, RestPat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentRestPat extends ParentAstNode, RestPat { + override predicate relevantChild(AstNode child) { none() } } /** - * A rest pattern (`..`) in a tuple, slice, or struct pattern. - * - * For example: - * ```rust - * let (a, .., z) = (1, 2, 3); - * // ^^ - * ``` - */ + * A rest pattern (`..`) in a tuple, slice, or struct pattern. + * + * For example: + * ```rust + * let (a, .., z) = (1, 2, 3); + * // ^^ + * ``` + */ final class RestPatCfgNode extends CfgNodeFinal, PatCfgNode { private RestPat node; - RestPatCfgNode() { - node = this.getAstNode() - } + RestPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `RestPat`. */ RestPat getRestPat() { result = node } - - /** - * Gets the `index`th attr of this rest pattern (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this rest pattern (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this rest pattern. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this rest pattern. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this rest pattern. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this rest pattern. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } } - private final class ParentReturnExpr extends ParentAstNode, ReturnExpr { + + final private class ParentReturnExpr extends ParentAstNode, ReturnExpr { override predicate relevantChild(AstNode child) { none() or @@ -3489,66 +2860,55 @@ module MakeCfgNodes Input> { } /** - * A return expression. For example: - * ```rust - * fn some_value() -> i32 { - * return 42; - * } - * ``` - * ```rust - * fn no_value() -> () { - * return; - * } - * ``` - */ + * A return expression. For example: + * ```rust + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ```rust + * fn no_value() -> () { + * return; + * } + * ``` + */ final class ReturnExprCfgNode extends CfgNodeFinal, ExprCfgNode { private ReturnExpr node; - ReturnExprCfgNode() { - node = this.getAstNode() - } + ReturnExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `ReturnExpr`. */ ReturnExpr getReturnExpr() { result = node } - - /** - * Gets the `index`th attr of this return expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this return expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this return expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this return expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this return expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this return expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this return expression, if it exists. - * - */ + * Gets the expression of this return expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } - private final class ParentSelfParam extends ParentAstNode, SelfParam { + + final private class ParentSelfParam extends ParentAstNode, SelfParam { override predicate relevantChild(AstNode child) { none() or @@ -3557,74 +2917,60 @@ module MakeCfgNodes Input> { } /** - * A `self` parameter. For example `self` in: - * ```rust - * struct X; - * impl X { - * fn one(&self) {} - * fn two(&mut self) {} - * fn three(self) {} - * fn four(mut self) {} - * fn five<'a>(&'a self) {} - * } - * ``` - */ + * A `self` parameter. For example `self` in: + * ```rust + * struct X; + * impl X { + * fn one(&self) {} + * fn two(&mut self) {} + * fn three(self) {} + * fn four(mut self) {} + * fn five<'a>(&'a self) {} + * } + * ``` + */ final class SelfParamCfgNode extends CfgNodeFinal, ParamBaseCfgNode { private SelfParam node; - SelfParamCfgNode() { - node = this.getAstNode() - } + SelfParamCfgNode() { node = this.getAstNode() } /** Gets the underlying `SelfParam`. */ SelfParam getSelfParam() { result = node } - + /** - * Holds if this self parameter is reference. - * - */ - predicate isRef() { - node.isRef() - } + * Holds if this self parameter is reference. + */ + predicate isRef() { node.isRef() } /** - * Holds if this self parameter is mut. - * - */ - predicate isMut() { - node.isMut() - } + * Holds if this self parameter is mut. + */ + predicate isMut() { node.isMut() } /** - * Gets the lifetime of this self parameter, if it exists. - * - */ - Lifetime getLifetime() { - result = node.getLifetime() - } + * Gets the lifetime of this self parameter, if it exists. + */ + Lifetime getLifetime() { result = node.getLifetime() } /** - * Holds if `getLifetime()` exists. - */ - predicate hasLifetime() { - exists(this.getLifetime()) - } + * Holds if `getLifetime()` exists. + */ + predicate hasLifetime() { exists(this.getLifetime()) } + /** - * Gets the name of this self parameter, if it exists. - * - */ + * Gets the name of this self parameter, if it exists. + */ NameCfgNode getName() { any(ChildMapping mapping).hasCfgChild(node, node.getName(), this, result) } /** - * Holds if `getName()` exists. - */ - predicate hasName() { - exists(this.getName()) - } + * Holds if `getName()` exists. + */ + predicate hasName() { exists(this.getName()) } } - private final class ParentSlicePat extends ParentAstNode, SlicePat { + + final private class ParentSlicePat extends ParentAstNode, SlicePat { override predicate relevantChild(AstNode child) { none() or @@ -3633,129 +2979,106 @@ module MakeCfgNodes Input> { } /** - * A slice pattern. For example: - * ```rust - * match x { - * [1, 2, 3, 4, 5] => "ok", - * [1, 2, ..] => "fail", - * [x, y, .., z, 7] => "fail", - * } - * ``` - */ + * A slice pattern. For example: + * ```rust + * match x { + * [1, 2, 3, 4, 5] => "ok", + * [1, 2, ..] => "fail", + * [x, y, .., z, 7] => "fail", + * } + * ``` + */ final class SlicePatCfgNode extends CfgNodeFinal, PatCfgNode { private SlicePat node; - SlicePatCfgNode() { - node = this.getAstNode() - } + SlicePatCfgNode() { node = this.getAstNode() } /** Gets the underlying `SlicePat`. */ SlicePat getSlicePat() { result = node } - + /** - * Gets the `index`th pattern of this slice pattern (0-based). - * - */ + * Gets the `index`th pattern of this slice pattern (0-based). + */ PatCfgNode getPat(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getPat(index), this, result) } - /** - * Gets any of the patterns of this slice pattern. - */ - PatCfgNode getAPat() { - result = this.getPat(_) - } + * Gets any of the patterns of this slice pattern. + */ + PatCfgNode getAPat() { result = this.getPat(_) } /** - * Gets the number of patterns of this slice pattern. - */ - int getNumberOfPats() { - result = count(int i | exists(this.getPat(i))) - } + * Gets the number of patterns of this slice pattern. + */ + int getNumberOfPats() { result = count(int i | exists(this.getPat(i))) } } - private final class ParentStructExpr extends ParentAstNode, StructExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentStructExpr extends ParentAstNode, StructExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * A struct expression. For example: - * ```rust - * let first = Foo { a: 1, b: 2 }; - * let second = Foo { a: 2, ..first }; - * let n = Foo { a: 1, b: 2 }.b; - * Foo { a: m, .. } = second; - * ``` - */ + * A struct expression. For example: + * ```rust + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * let n = Foo { a: 1, b: 2 }.b; + * Foo { a: m, .. } = second; + * ``` + */ final class StructExprCfgNode extends CfgNodeFinal, ExprCfgNode { private StructExpr node; - StructExprCfgNode() { - node = this.getAstNode() - } + StructExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `StructExpr`. */ StructExpr getStructExpr() { result = node } - + /** - * Gets the struct expression field list of this struct expression, if it exists. - * - */ - StructExprFieldList getStructExprFieldList() { - result = node.getStructExprFieldList() - } + * Gets the struct expression field list of this struct expression, if it exists. + */ + StructExprFieldList getStructExprFieldList() { result = node.getStructExprFieldList() } /** - * Holds if `getStructExprFieldList()` exists. - */ - predicate hasStructExprFieldList() { - exists(this.getStructExprFieldList()) - } + * Holds if `getStructExprFieldList()` exists. + */ + predicate hasStructExprFieldList() { exists(this.getStructExprFieldList()) } } - private final class ParentStructPat extends ParentAstNode, StructPat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentStructPat extends ParentAstNode, StructPat { + override predicate relevantChild(AstNode child) { none() } } /** - * A struct pattern. For example: - * ```rust - * match x { - * Foo { a: 1, b: 2 } => "ok", - * Foo { .. } => "fail", - * } - * ``` - */ + * A struct pattern. For example: + * ```rust + * match x { + * Foo { a: 1, b: 2 } => "ok", + * Foo { .. } => "fail", + * } + * ``` + */ final class StructPatCfgNode extends CfgNodeFinal, PatCfgNode { private StructPat node; - StructPatCfgNode() { - node = this.getAstNode() - } + StructPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `StructPat`. */ StructPat getStructPat() { result = node } - + /** - * Gets the struct pattern field list of this struct pattern, if it exists. - * - */ - StructPatFieldList getStructPatFieldList() { - result = node.getStructPatFieldList() - } + * Gets the struct pattern field list of this struct pattern, if it exists. + */ + StructPatFieldList getStructPatFieldList() { result = node.getStructPatFieldList() } /** - * Holds if `getStructPatFieldList()` exists. - */ - predicate hasStructPatFieldList() { - exists(this.getStructPatFieldList()) - } + * Holds if `getStructPatFieldList()` exists. + */ + predicate hasStructPatFieldList() { exists(this.getStructPatFieldList()) } } - private final class ParentTryExpr extends ParentAstNode, TryExpr { + + final private class ParentTryExpr extends ParentAstNode, TryExpr { override predicate relevantChild(AstNode child) { none() or @@ -3764,62 +3087,51 @@ module MakeCfgNodes Input> { } /** - * A try expression using the `?` operator. - * - * For example: - * ```rust - * let x = foo()?; - * // ^ - * ``` - */ + * A try expression using the `?` operator. + * + * For example: + * ```rust + * let x = foo()?; + * // ^ + * ``` + */ final class TryExprCfgNode extends CfgNodeFinal, ExprCfgNode { private TryExpr node; - TryExprCfgNode() { - node = this.getAstNode() - } + TryExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `TryExpr`. */ TryExpr getTryExpr() { result = node } - - /** - * Gets the `index`th attr of this try expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this try expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this try expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this try expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this try expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this try expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this try expression, if it exists. - * - */ + * Gets the expression of this try expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } - private final class ParentTupleExpr extends ParentAstNode, TupleExpr { + + final private class ParentTupleExpr extends ParentAstNode, TupleExpr { override predicate relevantChild(AstNode child) { none() or @@ -3828,69 +3140,55 @@ module MakeCfgNodes Input> { } /** - * A tuple expression. For example: - * ```rust - * let tuple = (1, "one"); - * let n = (2, "two").0; - * let (a, b) = tuple; - * ``` - */ + * A tuple expression. For example: + * ```rust + * let tuple = (1, "one"); + * let n = (2, "two").0; + * let (a, b) = tuple; + * ``` + */ final class TupleExprCfgNode extends CfgNodeFinal, ExprCfgNode { private TupleExpr node; - TupleExprCfgNode() { - node = this.getAstNode() - } + TupleExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `TupleExpr`. */ TupleExpr getTupleExpr() { result = node } - - /** - * Gets the `index`th attr of this tuple expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this tuple expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this tuple expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this tuple expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this tuple expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this tuple expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the `index`th field of this tuple expression (0-based). - * - */ + * Gets the `index`th field of this tuple expression (0-based). + */ ExprCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } - /** - * Gets any of the fields of this tuple expression. - */ - ExprCfgNode getAField() { - result = this.getField(_) - } + * Gets any of the fields of this tuple expression. + */ + ExprCfgNode getAField() { result = this.getField(_) } /** - * Gets the number of fields of this tuple expression. - */ - int getNumberOfFields() { - result = count(int i | exists(this.getField(i))) - } + * Gets the number of fields of this tuple expression. + */ + int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } } - private final class ParentTuplePat extends ParentAstNode, TuplePat { + + final private class ParentTuplePat extends ParentAstNode, TuplePat { override predicate relevantChild(AstNode child) { none() or @@ -3899,46 +3197,39 @@ module MakeCfgNodes Input> { } /** - * A tuple pattern. For example: - * ```rust - * let (x, y) = (1, 2); - * let (a, b, .., z) = (1, 2, 3, 4, 5); - * ``` - */ + * A tuple pattern. For example: + * ```rust + * let (x, y) = (1, 2); + * let (a, b, .., z) = (1, 2, 3, 4, 5); + * ``` + */ final class TuplePatCfgNode extends CfgNodeFinal, PatCfgNode { private TuplePat node; - TuplePatCfgNode() { - node = this.getAstNode() - } + TuplePatCfgNode() { node = this.getAstNode() } /** Gets the underlying `TuplePat`. */ TuplePat getTuplePat() { result = node } - + /** - * Gets the `index`th field of this tuple pattern (0-based). - * - */ + * Gets the `index`th field of this tuple pattern (0-based). + */ PatCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } - /** - * Gets any of the fields of this tuple pattern. - */ - PatCfgNode getAField() { - result = this.getField(_) - } + * Gets any of the fields of this tuple pattern. + */ + PatCfgNode getAField() { result = this.getField(_) } /** - * Gets the number of fields of this tuple pattern. - */ - int getNumberOfFields() { - result = count(int i | exists(this.getField(i))) - } + * Gets the number of fields of this tuple pattern. + */ + int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } } - private final class ParentTupleStructPat extends ParentAstNode, TupleStructPat { + + final private class ParentTupleStructPat extends ParentAstNode, TupleStructPat { override predicate relevantChild(AstNode child) { none() or @@ -3947,94 +3238,76 @@ module MakeCfgNodes Input> { } /** - * A tuple struct pattern. For example: - * ```rust - * match x { - * Tuple("a", 1, 2, 3) => "great", - * Tuple(.., 3) => "fine", - * Tuple(..) => "fail", - * }; - * ``` - */ + * A tuple struct pattern. For example: + * ```rust + * match x { + * Tuple("a", 1, 2, 3) => "great", + * Tuple(.., 3) => "fine", + * Tuple(..) => "fail", + * }; + * ``` + */ final class TupleStructPatCfgNode extends CfgNodeFinal, PatCfgNode { private TupleStructPat node; - TupleStructPatCfgNode() { - node = this.getAstNode() - } + TupleStructPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `TupleStructPat`. */ TupleStructPat getTupleStructPat() { result = node } - + /** - * Gets the `index`th field of this tuple struct pattern (0-based). - * - */ + * Gets the `index`th field of this tuple struct pattern (0-based). + */ PatCfgNode getField(int index) { any(ChildMapping mapping).hasCfgChild(node, node.getField(index), this, result) } - /** - * Gets any of the fields of this tuple struct pattern. - */ - PatCfgNode getAField() { - result = this.getField(_) - } + * Gets any of the fields of this tuple struct pattern. + */ + PatCfgNode getAField() { result = this.getField(_) } /** - * Gets the number of fields of this tuple struct pattern. - */ - int getNumberOfFields() { - result = count(int i | exists(this.getField(i))) - } + * Gets the number of fields of this tuple struct pattern. + */ + int getNumberOfFields() { result = count(int i | exists(this.getField(i))) } } - private final class ParentUnderscoreExpr extends ParentAstNode, UnderscoreExpr { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentUnderscoreExpr extends ParentAstNode, UnderscoreExpr { + override predicate relevantChild(AstNode child) { none() } } /** - * An underscore expression. For example: - * ```rust - * _ = 42; - * ``` - */ + * An underscore expression. For example: + * ```rust + * _ = 42; + * ``` + */ final class UnderscoreExprCfgNode extends CfgNodeFinal, ExprCfgNode { private UnderscoreExpr node; - UnderscoreExprCfgNode() { - node = this.getAstNode() - } + UnderscoreExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `UnderscoreExpr`. */ UnderscoreExpr getUnderscoreExpr() { result = node } - - /** - * Gets the `index`th attr of this underscore expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this underscore expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this underscore expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this underscore expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this underscore expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this underscore expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } } - private final class ParentWhileExpr extends ParentAstNode, WhileExpr { + + final private class ParentWhileExpr extends ParentAstNode, WhileExpr { override predicate relevantChild(AstNode child) { none() or @@ -4043,86 +3316,71 @@ module MakeCfgNodes Input> { } /** - * A while loop expression. - * - * For example: - * ```rust - * while x < 10 { - * x += 1; - * } - * ``` - */ + * A while loop expression. + * + * For example: + * ```rust + * while x < 10 { + * x += 1; + * } + * ``` + */ final class WhileExprCfgNode extends CfgNodeFinal, LoopingExprCfgNode { private WhileExpr node; - WhileExprCfgNode() { - node = this.getAstNode() - } + WhileExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `WhileExpr`. */ WhileExpr getWhileExpr() { result = node } - - /** - * Gets the `index`th attr of this while expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this while expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this while expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this while expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this while expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this while expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the condition of this while expression, if it exists. - * - */ + * Gets the condition of this while expression, if it exists. + */ ExprCfgNode getCondition() { any(ChildMapping mapping).hasCfgChild(node, node.getCondition(), this, result) } /** - * Holds if `getCondition()` exists. - */ - predicate hasCondition() { - exists(this.getCondition()) - } + * Holds if `getCondition()` exists. + */ + predicate hasCondition() { exists(this.getCondition()) } } - private final class ParentWildcardPat extends ParentAstNode, WildcardPat { - override predicate relevantChild(AstNode child) { - none() - } + + final private class ParentWildcardPat extends ParentAstNode, WildcardPat { + override predicate relevantChild(AstNode child) { none() } } /** - * A wildcard pattern. For example: - * ```rust - * let _ = 42; - * ``` - */ + * A wildcard pattern. For example: + * ```rust + * let _ = 42; + * ``` + */ final class WildcardPatCfgNode extends CfgNodeFinal, PatCfgNode { private WildcardPat node; - WildcardPatCfgNode() { - node = this.getAstNode() - } + WildcardPatCfgNode() { node = this.getAstNode() } /** Gets the underlying `WildcardPat`. */ WildcardPat getWildcardPat() { result = node } - } - private final class ParentYeetExpr extends ParentAstNode, YeetExpr { + + final private class ParentYeetExpr extends ParentAstNode, YeetExpr { override predicate relevantChild(AstNode child) { none() or @@ -4131,61 +3389,50 @@ module MakeCfgNodes Input> { } /** - * A `yeet` expression. For example: - * ```rust - * if x < size { - * do yeet "index out of bounds"; - * } - * ``` - */ + * A `yeet` expression. For example: + * ```rust + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ final class YeetExprCfgNode extends CfgNodeFinal, ExprCfgNode { private YeetExpr node; - YeetExprCfgNode() { - node = this.getAstNode() - } + YeetExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `YeetExpr`. */ YeetExpr getYeetExpr() { result = node } - - /** - * Gets the `index`th attr of this yeet expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this yeet expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this yeet expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this yeet expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this yeet expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this yeet expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this yeet expression, if it exists. - * - */ + * Gets the expression of this yeet expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } - private final class ParentYieldExpr extends ParentAstNode, YieldExpr { + + final private class ParentYieldExpr extends ParentAstNode, YieldExpr { override predicate relevantChild(AstNode child) { none() or @@ -4194,697 +3441,732 @@ module MakeCfgNodes Input> { } /** - * A `yield` expression. For example: - * ```rust - * let one = #[coroutine] - * || { - * yield 1; - * }; - * ``` - */ + * A `yield` expression. For example: + * ```rust + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ final class YieldExprCfgNode extends CfgNodeFinal, ExprCfgNode { private YieldExpr node; - YieldExprCfgNode() { - node = this.getAstNode() - } + YieldExprCfgNode() { node = this.getAstNode() } /** Gets the underlying `YieldExpr`. */ YieldExpr getYieldExpr() { result = node } - - /** - * Gets the `index`th attr of this yield expression (0-based). - * - */ - AnyAttr getAttr(int index) { - result = node.getAttr(index) - } + /** + * Gets the `index`th attr of this yield expression (0-based). + */ + AnyAttr getAttr(int index) { result = node.getAttr(index) } /** - * Gets any of the attrs of this yield expression. - */ - AnyAttr getAnAttr() { - result = this.getAttr(_) - } + * Gets any of the attrs of this yield expression. + */ + AnyAttr getAnAttr() { result = this.getAttr(_) } /** - * Gets the number of attrs of this yield expression. - */ - int getNumberOfAttrs() { - result = count(int i | exists(this.getAttr(i))) - } + * Gets the number of attrs of this yield expression. + */ + int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) } + /** - * Gets the expression of this yield expression, if it exists. - * - */ + * Gets the expression of this yield expression, if it exists. + */ ExprCfgNode getExpr() { any(ChildMapping mapping).hasCfgChild(node, node.getExpr(), this, result) } /** - * Holds if `getExpr()` exists. - */ - predicate hasExpr() { - exists(this.getExpr()) - } + * Holds if `getExpr()` exists. + */ + predicate hasExpr() { exists(this.getExpr()) } } } module Consistency { - private predicate hasCfgNode(AstNode astNode) { - astNode = any(CfgNode cfgNode).getAstNode() - } + private predicate hasCfgNode(AstNode astNode) { astNode = any(CfgNode cfgNode).getAstNode() } query predicate missingCfgChild(CfgNode parent, string pred, int i, AstNode child) { none() or pred = "getExpr" and - parent = any(Nodes::ArrayExprCfgNode cfgNode, ArrayExpr astNode | - astNode = cfgNode.getArrayExpr() and - child = getDesugared(astNode.getExpr(i)) - and - hasCfgNode(child) and - not child = cfgNode.getExpr(i).getAstNode() + parent = + any(Nodes::ArrayExprCfgNode cfgNode, ArrayExpr astNode | + astNode = cfgNode.getArrayExpr() and + child = getDesugared(astNode.getExpr(i)) and + hasCfgNode(child) and + not child = cfgNode.getExpr(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRepeatOperand" and - parent = any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | - astNode = cfgNode.getArrayRepeatExpr() and - child = getDesugared(astNode.getRepeatOperand()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRepeatOperand().getAstNode() + parent = + any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | + astNode = cfgNode.getArrayRepeatExpr() and + child = getDesugared(astNode.getRepeatOperand()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRepeatOperand().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRepeatLength" and - parent = any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | - astNode = cfgNode.getArrayRepeatExpr() and - child = getDesugared(astNode.getRepeatLength()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRepeatLength().getAstNode() + parent = + any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode | + astNode = cfgNode.getArrayRepeatExpr() and + child = getDesugared(astNode.getRepeatLength()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRepeatLength().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getTemplate" and - parent = any(Nodes::AsmExprCfgNode cfgNode, AsmExpr astNode | - astNode = cfgNode.getAsmExpr() and - child = getDesugared(astNode.getTemplate(i)) - and - hasCfgNode(child) and - not child = cfgNode.getTemplate(i).getAstNode() + parent = + any(Nodes::AsmExprCfgNode cfgNode, AsmExpr astNode | + astNode = cfgNode.getAsmExpr() and + child = getDesugared(astNode.getTemplate(i)) and + hasCfgNode(child) and + not child = cfgNode.getTemplate(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::AwaitExprCfgNode cfgNode, AwaitExpr astNode | - astNode = cfgNode.getAwaitExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::AwaitExprCfgNode cfgNode, AwaitExpr astNode | + astNode = cfgNode.getAwaitExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::BecomeExprCfgNode cfgNode, BecomeExpr astNode | - astNode = cfgNode.getBecomeExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::BecomeExprCfgNode cfgNode, BecomeExpr astNode | + astNode = cfgNode.getBecomeExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLhs" and - parent = any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | - astNode = cfgNode.getBinaryExpr() and - child = getDesugared(astNode.getLhs()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLhs().getAstNode() + parent = + any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | + astNode = cfgNode.getBinaryExpr() and + child = getDesugared(astNode.getLhs()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLhs().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getRhs" and - parent = any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | - astNode = cfgNode.getBinaryExpr() and - child = getDesugared(astNode.getRhs()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getRhs().getAstNode() + parent = + any(Nodes::BinaryExprCfgNode cfgNode, BinaryExpr astNode | + astNode = cfgNode.getBinaryExpr() and + child = getDesugared(astNode.getRhs()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getRhs().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::BoxPatCfgNode cfgNode, BoxPat astNode | - astNode = cfgNode.getBoxPat() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::BoxPatCfgNode cfgNode, BoxPat astNode | + astNode = cfgNode.getBoxPat() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::BreakExprCfgNode cfgNode, BreakExpr astNode | - astNode = cfgNode.getBreakExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::BreakExprCfgNode cfgNode, BreakExpr astNode | + astNode = cfgNode.getBreakExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getFunction" and - parent = any(Nodes::CallExprCfgNode cfgNode, CallExpr astNode | - astNode = cfgNode.getCallExpr() and - child = getDesugared(astNode.getFunction()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getFunction().getAstNode() + parent = + any(Nodes::CallExprCfgNode cfgNode, CallExpr astNode | + astNode = cfgNode.getCallExpr() and + child = getDesugared(astNode.getFunction()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getFunction().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::CastExprCfgNode cfgNode, CastExpr astNode | - astNode = cfgNode.getCastExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::CastExprCfgNode cfgNode, CastExpr astNode | + astNode = cfgNode.getCastExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getBlockExpr" and - parent = any(Nodes::ConstBlockPatCfgNode cfgNode, ConstBlockPat astNode | - astNode = cfgNode.getConstBlockPat() and - child = getDesugared(astNode.getBlockExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getBlockExpr().getAstNode() + parent = + any(Nodes::ConstBlockPatCfgNode cfgNode, ConstBlockPat astNode | + astNode = cfgNode.getConstBlockPat() and + child = getDesugared(astNode.getBlockExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getBlockExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::DerefPatCfgNode cfgNode, DerefPat astNode | - astNode = cfgNode.getDerefPat() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::DerefPatCfgNode cfgNode, DerefPat astNode | + astNode = cfgNode.getDerefPat() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getContainer" and - parent = any(Nodes::FieldExprCfgNode cfgNode, FieldExpr astNode | - astNode = cfgNode.getFieldExpr() and - child = getDesugared(astNode.getContainer()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getContainer().getAstNode() + parent = + any(Nodes::FieldExprCfgNode cfgNode, FieldExpr astNode | + astNode = cfgNode.getFieldExpr() and + child = getDesugared(astNode.getContainer()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getContainer().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getIterable" and - parent = any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | - astNode = cfgNode.getForExpr() and - child = getDesugared(astNode.getIterable()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getIterable().getAstNode() + parent = + any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | + astNode = cfgNode.getForExpr() and + child = getDesugared(astNode.getIterable()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getIterable().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | - astNode = cfgNode.getForExpr() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::ForExprCfgNode cfgNode, ForExpr astNode | + astNode = cfgNode.getForExpr() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | - astNode = cfgNode.getFormatArgsArg() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | + astNode = cfgNode.getFormatArgsArg() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | - astNode = cfgNode.getFormatArgsArg() and - child = getDesugared(astNode.getName()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = + any(Nodes::FormatArgsArgCfgNode cfgNode, FormatArgsArg astNode | + astNode = cfgNode.getFormatArgsArg() and + child = getDesugared(astNode.getName()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getArg" and - parent = any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | - astNode = cfgNode.getFormatArgsExpr() and - child = getDesugared(astNode.getArg(i)) - and - hasCfgNode(child) and - not child = cfgNode.getArg(i).getAstNode() + parent = + any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | + astNode = cfgNode.getFormatArgsExpr() and + child = getDesugared(astNode.getArg(i)) and + hasCfgNode(child) and + not child = cfgNode.getArg(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getTemplate" and - parent = any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | - astNode = cfgNode.getFormatArgsExpr() and - child = getDesugared(astNode.getTemplate()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getTemplate().getAstNode() + parent = + any(Nodes::FormatArgsExprCfgNode cfgNode, FormatArgsExpr astNode | + astNode = cfgNode.getFormatArgsExpr() and + child = getDesugared(astNode.getTemplate()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getTemplate().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | - astNode = cfgNode.getIdentPat() and - child = getDesugared(astNode.getName()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = + any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | + astNode = cfgNode.getIdentPat() and + child = getDesugared(astNode.getName()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | - astNode = cfgNode.getIdentPat() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::IdentPatCfgNode cfgNode, IdentPat astNode | + astNode = cfgNode.getIdentPat() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getCondition" and - parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getCondition()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getCondition().getAstNode() + parent = + any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getCondition()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getCondition().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getElse" and - parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getElse()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getElse().getAstNode() + parent = + any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getElse()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getElse().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getThen" and - parent = any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | - astNode = cfgNode.getIfExpr() and - child = getDesugared(astNode.getThen()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getThen().getAstNode() + parent = + any(Nodes::IfExprCfgNode cfgNode, IfExpr astNode | + astNode = cfgNode.getIfExpr() and + child = getDesugared(astNode.getThen()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getThen().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getBase" and - parent = any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | - astNode = cfgNode.getIndexExpr() and - child = getDesugared(astNode.getBase()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getBase().getAstNode() + parent = + any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | + astNode = cfgNode.getIndexExpr() and + child = getDesugared(astNode.getBase()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getBase().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getIndex" and - parent = any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | - astNode = cfgNode.getIndexExpr() and - child = getDesugared(astNode.getIndex()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getIndex().getAstNode() + parent = + any(Nodes::IndexExprCfgNode cfgNode, IndexExpr astNode | + astNode = cfgNode.getIndexExpr() and + child = getDesugared(astNode.getIndex()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getIndex().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getScrutinee" and - parent = any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | - astNode = cfgNode.getLetExpr() and - child = getDesugared(astNode.getScrutinee()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getScrutinee().getAstNode() + parent = + any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | + astNode = cfgNode.getLetExpr() and + child = getDesugared(astNode.getScrutinee()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getScrutinee().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | - astNode = cfgNode.getLetExpr() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::LetExprCfgNode cfgNode, LetExpr astNode | + astNode = cfgNode.getLetExpr() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getInitializer" and - parent = any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | - astNode = cfgNode.getLetStmt() and - child = getDesugared(astNode.getInitializer()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getInitializer().getAstNode() + parent = + any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | + astNode = cfgNode.getLetStmt() and + child = getDesugared(astNode.getInitializer()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getInitializer().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | - astNode = cfgNode.getLetStmt() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::LetStmtCfgNode cfgNode, LetStmt astNode | + astNode = cfgNode.getLetStmt() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLiteral" and - parent = any(Nodes::LiteralPatCfgNode cfgNode, LiteralPat astNode | - astNode = cfgNode.getLiteralPat() and - child = getDesugared(astNode.getLiteral()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLiteral().getAstNode() + parent = + any(Nodes::LiteralPatCfgNode cfgNode, LiteralPat astNode | + astNode = cfgNode.getLiteralPat() and + child = getDesugared(astNode.getLiteral()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLiteral().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getLoopBody" and - parent = any(Nodes::LoopingExprCfgNode cfgNode, LoopingExpr astNode | - astNode = cfgNode.getLoopingExpr() and - child = getDesugared(astNode.getLoopBody()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getLoopBody().getAstNode() + parent = + any(Nodes::LoopingExprCfgNode cfgNode, LoopingExpr astNode | + astNode = cfgNode.getLoopingExpr() and + child = getDesugared(astNode.getLoopBody()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getLoopBody().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getMacroCall" and - parent = any(Nodes::MacroExprCfgNode cfgNode, MacroExpr astNode | - astNode = cfgNode.getMacroExpr() and - child = getDesugared(astNode.getMacroCall()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getMacroCall().getAstNode() + parent = + any(Nodes::MacroExprCfgNode cfgNode, MacroExpr astNode | + astNode = cfgNode.getMacroExpr() and + child = getDesugared(astNode.getMacroCall()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getMacroCall().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getMacroCall" and - parent = any(Nodes::MacroPatCfgNode cfgNode, MacroPat astNode | - astNode = cfgNode.getMacroPat() and - child = getDesugared(astNode.getMacroCall()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getMacroCall().getAstNode() + parent = + any(Nodes::MacroPatCfgNode cfgNode, MacroPat astNode | + astNode = cfgNode.getMacroPat() and + child = getDesugared(astNode.getMacroCall()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getMacroCall().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getScrutinee" and - parent = any(Nodes::MatchExprCfgNode cfgNode, MatchExpr astNode | - astNode = cfgNode.getMatchExpr() and - child = getDesugared(astNode.getScrutinee()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getScrutinee().getAstNode() + parent = + any(Nodes::MatchExprCfgNode cfgNode, MatchExpr astNode | + astNode = cfgNode.getMatchExpr() and + child = getDesugared(astNode.getScrutinee()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getScrutinee().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getReceiver" and - parent = any(Nodes::MethodCallExprCfgNode cfgNode, MethodCallExpr astNode | - astNode = cfgNode.getMethodCallExpr() and - child = getDesugared(astNode.getReceiver()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getReceiver().getAstNode() + parent = + any(Nodes::MethodCallExprCfgNode cfgNode, MethodCallExpr astNode | + astNode = cfgNode.getMethodCallExpr() and + child = getDesugared(astNode.getReceiver()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getReceiver().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::OrPatCfgNode cfgNode, OrPat astNode | - astNode = cfgNode.getOrPat() and - child = getDesugared(astNode.getPat(i)) - and - hasCfgNode(child) and - not child = cfgNode.getPat(i).getAstNode() + parent = + any(Nodes::OrPatCfgNode cfgNode, OrPat astNode | + astNode = cfgNode.getOrPat() and + child = getDesugared(astNode.getPat(i)) and + hasCfgNode(child) and + not child = cfgNode.getPat(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::ParamCfgNode cfgNode, Param astNode | - astNode = cfgNode.getParam() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::ParamCfgNode cfgNode, Param astNode | + astNode = cfgNode.getParam() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::PrefixExprCfgNode cfgNode, PrefixExpr astNode | - astNode = cfgNode.getPrefixExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::PrefixExprCfgNode cfgNode, PrefixExpr astNode | + astNode = cfgNode.getPrefixExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getEnd" and - parent = any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | - astNode = cfgNode.getRangeExpr() and - child = getDesugared(astNode.getEnd()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getEnd().getAstNode() + parent = + any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | + astNode = cfgNode.getRangeExpr() and + child = getDesugared(astNode.getEnd()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getEnd().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getStart" and - parent = any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | - astNode = cfgNode.getRangeExpr() and - child = getDesugared(astNode.getStart()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getStart().getAstNode() + parent = + any(Nodes::RangeExprCfgNode cfgNode, RangeExpr astNode | + astNode = cfgNode.getRangeExpr() and + child = getDesugared(astNode.getStart()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getStart().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getEnd" and - parent = any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | - astNode = cfgNode.getRangePat() and - child = getDesugared(astNode.getEnd()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getEnd().getAstNode() + parent = + any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | + astNode = cfgNode.getRangePat() and + child = getDesugared(astNode.getEnd()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getEnd().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getStart" and - parent = any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | - astNode = cfgNode.getRangePat() and - child = getDesugared(astNode.getStart()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getStart().getAstNode() + parent = + any(Nodes::RangePatCfgNode cfgNode, RangePat astNode | + astNode = cfgNode.getRangePat() and + child = getDesugared(astNode.getStart()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getStart().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::RefExprCfgNode cfgNode, RefExpr astNode | - astNode = cfgNode.getRefExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::RefExprCfgNode cfgNode, RefExpr astNode | + astNode = cfgNode.getRefExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::RefPatCfgNode cfgNode, RefPat astNode | - astNode = cfgNode.getRefPat() and - child = getDesugared(astNode.getPat()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getPat().getAstNode() + parent = + any(Nodes::RefPatCfgNode cfgNode, RefPat astNode | + astNode = cfgNode.getRefPat() and + child = getDesugared(astNode.getPat()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getPat().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::ReturnExprCfgNode cfgNode, ReturnExpr astNode | - astNode = cfgNode.getReturnExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::ReturnExprCfgNode cfgNode, ReturnExpr astNode | + astNode = cfgNode.getReturnExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getName" and - parent = any(Nodes::SelfParamCfgNode cfgNode, SelfParam astNode | - astNode = cfgNode.getSelfParam() and - child = getDesugared(astNode.getName()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getName().getAstNode() + parent = + any(Nodes::SelfParamCfgNode cfgNode, SelfParam astNode | + astNode = cfgNode.getSelfParam() and + child = getDesugared(astNode.getName()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getName().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getPat" and - parent = any(Nodes::SlicePatCfgNode cfgNode, SlicePat astNode | - astNode = cfgNode.getSlicePat() and - child = getDesugared(astNode.getPat(i)) - and - hasCfgNode(child) and - not child = cfgNode.getPat(i).getAstNode() + parent = + any(Nodes::SlicePatCfgNode cfgNode, SlicePat astNode | + astNode = cfgNode.getSlicePat() and + child = getDesugared(astNode.getPat(i)) and + hasCfgNode(child) and + not child = cfgNode.getPat(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::TryExprCfgNode cfgNode, TryExpr astNode | - astNode = cfgNode.getTryExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::TryExprCfgNode cfgNode, TryExpr astNode | + astNode = cfgNode.getTryExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = any(Nodes::TupleExprCfgNode cfgNode, TupleExpr astNode | - astNode = cfgNode.getTupleExpr() and - child = getDesugared(astNode.getField(i)) - and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = + any(Nodes::TupleExprCfgNode cfgNode, TupleExpr astNode | + astNode = cfgNode.getTupleExpr() and + child = getDesugared(astNode.getField(i)) and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = any(Nodes::TuplePatCfgNode cfgNode, TuplePat astNode | - astNode = cfgNode.getTuplePat() and - child = getDesugared(astNode.getField(i)) - and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = + any(Nodes::TuplePatCfgNode cfgNode, TuplePat astNode | + astNode = cfgNode.getTuplePat() and + child = getDesugared(astNode.getField(i)) and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getField" and - parent = any(Nodes::TupleStructPatCfgNode cfgNode, TupleStructPat astNode | - astNode = cfgNode.getTupleStructPat() and - child = getDesugared(astNode.getField(i)) - and - hasCfgNode(child) and - not child = cfgNode.getField(i).getAstNode() + parent = + any(Nodes::TupleStructPatCfgNode cfgNode, TupleStructPat astNode | + astNode = cfgNode.getTupleStructPat() and + child = getDesugared(astNode.getField(i)) and + hasCfgNode(child) and + not child = cfgNode.getField(i).getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getCondition" and - parent = any(Nodes::WhileExprCfgNode cfgNode, WhileExpr astNode | - astNode = cfgNode.getWhileExpr() and - child = getDesugared(astNode.getCondition()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getCondition().getAstNode() + parent = + any(Nodes::WhileExprCfgNode cfgNode, WhileExpr astNode | + astNode = cfgNode.getWhileExpr() and + child = getDesugared(astNode.getCondition()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getCondition().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::YeetExprCfgNode cfgNode, YeetExpr astNode | - astNode = cfgNode.getYeetExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::YeetExprCfgNode cfgNode, YeetExpr astNode | + astNode = cfgNode.getYeetExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) or pred = "getExpr" and - parent = any(Nodes::YieldExprCfgNode cfgNode, YieldExpr astNode | - astNode = cfgNode.getYieldExpr() and - child = getDesugared(astNode.getExpr()) - and i = -1 and - hasCfgNode(child) and - not child = cfgNode.getExpr().getAstNode() + parent = + any(Nodes::YieldExprCfgNode cfgNode, YieldExpr astNode | + astNode = cfgNode.getYieldExpr() and + child = getDesugared(astNode.getExpr()) and + i = -1 and + hasCfgNode(child) and + not child = cfgNode.getExpr().getAstNode() | - cfgNode - ) + cfgNode + ) } } -} \ No newline at end of file +} diff --git a/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll b/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll index 8277d4b631a1..955cd49e4c15 100644 --- a/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CfgPredExpr.qll @@ -7,4 +7,4 @@ private import internal.CfgPredExprImpl import codeql.rust.elements.CfgPredicate import codeql.rust.elements.Expr -final class CfgPredExpr = Impl::CfgPredExpr; \ No newline at end of file +final class CfgPredExpr = Impl::CfgPredExpr; diff --git a/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll b/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll index b540149aedbe..1a6dfe04135b 100644 --- a/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll +++ b/rust/ql/lib/codeql/rust/elements/CfgPredPat.qll @@ -7,4 +7,4 @@ private import internal.CfgPredPatImpl import codeql.rust.elements.CfgPredicate import codeql.rust.elements.Pat -final class CfgPredPat = Impl::CfgPredPat; \ No newline at end of file +final class CfgPredPat = Impl::CfgPredPat; diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll index 7b613ff28f66..93c1466a6c6c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprConstructor.qll @@ -4,13 +4,11 @@ * `CfgPredExpr` synthesized instances. * INTERNAL: Do not use. */ + private import codeql.rust.elements.internal.generated.Raw /** * The characteristic predicate of `CfgPredExpr` synthesized instances. * INTERNAL: Do not use. */ -predicate constructCfgPredExpr(Raw::CfgPredExpr id) { - - any() -} +predicate constructCfgPredExpr(Raw::CfgPredExpr id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll index 0942dac25de1..0dd2a9c0aa0b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredExprImpl.qll @@ -4,6 +4,7 @@ * * INTERNAL: Do not use. */ + private import codeql.rust.elements.internal.generated.CfgPredExpr /** @@ -11,6 +12,5 @@ private import codeql.rust.elements.internal.generated.CfgPredExpr * be referenced directly. */ module Impl { - class CfgPredExpr extends Generated::CfgPredExpr { - } -} \ No newline at end of file + class CfgPredExpr extends Generated::CfgPredExpr { } +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll index 7035ea40a4f6..d3066b0f1dd1 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatConstructor.qll @@ -4,13 +4,11 @@ * `CfgPredPat` synthesized instances. * INTERNAL: Do not use. */ + private import codeql.rust.elements.internal.generated.Raw /** * The characteristic predicate of `CfgPredPat` synthesized instances. * INTERNAL: Do not use. */ -predicate constructCfgPredPat(Raw::CfgPredPat id) { - - any() -} +predicate constructCfgPredPat(Raw::CfgPredPat id) { any() } diff --git a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll index 5e1a8de6ef22..8cf8e83faeff 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CfgPredPatImpl.qll @@ -4,6 +4,7 @@ * * INTERNAL: Do not use. */ + private import codeql.rust.elements.internal.generated.CfgPredPat /** @@ -11,6 +12,5 @@ private import codeql.rust.elements.internal.generated.CfgPredPat * be referenced directly. */ module Impl { - class CfgPredPat extends Generated::CfgPredPat { - } -} \ No newline at end of file + class CfgPredPat extends Generated::CfgPredPat { } +} diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll index 4c45bce54835..5c2c473c1edd 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredExpr.qll @@ -8,6 +8,7 @@ private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.elements.internal.generated.Raw import codeql.rust.elements.CfgPredicate import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl + /** * INTERNAL: This module contains the fully generated definition of `CfgPredExpr` and should not * be referenced directly. @@ -24,17 +25,17 @@ module Generated { /** * Gets the cfg predicate of this cfg pred expression, if it exists. - * */ CfgPredicate getCfgPredicate() { - result = Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredExprToRaw(this).(Raw::CfgPredExpr).getCfgPredicate()) + result = + Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredExprToRaw(this) + .(Raw::CfgPredExpr) + .getCfgPredicate()) } /** * Holds if `getCfgPredicate()` exists. */ - final predicate hasCfgPredicate() { - exists(this.getCfgPredicate()) - } + final predicate hasCfgPredicate() { exists(this.getCfgPredicate()) } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll index b295474b2e46..a6637a55d4aa 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/CfgPredPat.qll @@ -8,6 +8,7 @@ private import codeql.rust.elements.internal.generated.Synth private import codeql.rust.elements.internal.generated.Raw import codeql.rust.elements.CfgPredicate import codeql.rust.elements.internal.PatImpl::Impl as PatImpl + /** * INTERNAL: This module contains the fully generated definition of `CfgPredPat` and should not * be referenced directly. @@ -24,17 +25,17 @@ module Generated { /** * Gets the cfg predicate of this cfg pred pattern, if it exists. - * */ CfgPredicate getCfgPredicate() { - result = Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredPatToRaw(this).(Raw::CfgPredPat).getCfgPredicate()) + result = + Synth::convertCfgPredicateFromRaw(Synth::convertCfgPredPatToRaw(this) + .(Raw::CfgPredPat) + .getCfgPredicate()) } /** * Holds if `getCfgPredicate()` exists. */ - final predicate hasCfgPredicate() { - exists(this.getCfgPredicate()) - } + final predicate hasCfgPredicate() { exists(this.getCfgPredicate()) } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll index 90224b4f7cba..4d917343d90d 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/ParentChild.qll @@ -9,3382 +9,3618 @@ import codeql.rust.elements.internal.ExtractorStep import codeql.rust.elements.internal.NamedCrate private module Impl { - private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfNamedCrate(NamedCrate e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfCrate(Crate e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfFormat(Format e, int index, string partialPredicateCall) { - - exists(int n, int nArgumentRef, int nWidthArgument, int nPrecisionArgument | - n = 0 - and - nArgumentRef = n + 1 - and - nWidthArgument = nArgumentRef + 1 - and - nPrecisionArgument = nWidthArgument + 1 - and ( - none() - or - index = n and result = e.getArgumentRef() and partialPredicateCall = "ArgumentRef()" - or - index = nArgumentRef and result = e.getWidthArgument() and partialPredicateCall = "WidthArgument()" - or - index = nWidthArgument and result = e.getPrecisionArgument() and partialPredicateCall = "PrecisionArgument()" - )) - } - private Element getImmediateChildOfFormatArgument(FormatArgument e, int index, string partialPredicateCall) { - - exists(int n, int nVariable | - n = 0 - and - nVariable = n + 1 - and ( - none() - or - index = n and result = e.getVariable() and partialPredicateCall = "Variable()" - )) - } - private Element getImmediateChildOfMissing(Missing e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfUnimplemented(Unimplemented e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfAbi(Abi e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfArgList(ArgList e, int index, string partialPredicateCall) { - - exists(int n, int nArg | - n = 0 - and - nArg = n + e.getNumberOfArgs() - and ( - none() - or - result = e.getArg(index - n) and partialPredicateCall = "Arg(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfAsmOperandExpr(AsmOperandExpr e, int index, string partialPredicateCall) { - - exists(int n, int nInExpr, int nOutExpr | - n = 0 - and - nInExpr = n + 1 - and - nOutExpr = nInExpr + 1 - and ( - none() - or - index = n and result = e.getInExpr() and partialPredicateCall = "InExpr()" - or - index = nInExpr and result = e.getOutExpr() and partialPredicateCall = "OutExpr()" - )) - } - private Element getImmediateChildOfAsmOption(AsmOption e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index, string partialPredicateCall) { - - exists(int n, int nIdentifier | - n = 0 - and - nIdentifier = n + 1 - and ( - none() - or - index = n and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - )) - } - private Element getImmediateChildOfAssocItemList(AssocItemList e, int index, string partialPredicateCall) { - - exists(int n, int nAssocItem, int nAttr | - n = 0 - and - nAssocItem = n + e.getNumberOfAssocItems() - and - nAttr = nAssocItem + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAssocItem(index - n) and partialPredicateCall = "AssocItem(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nAssocItem) and partialPredicateCall = "Attr(" + (index - nAssocItem).toString() + ")" - )) - } - private Element getImmediateChildOfExternItemList(ExternItemList e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExternItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExternItem = nAttr + e.getNumberOfExternItems() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getExternItem(index - nAttr) and partialPredicateCall = "ExternItem(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfForBinder(ForBinder e, int index, string partialPredicateCall) { - - exists(int n, int nGenericParamList | - n = 0 - and - nGenericParamList = n + 1 - and ( - none() - or - index = n and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - )) - } - private Element getImmediateChildOfFormatArgsArg(FormatArgsArg e, int index, string partialPredicateCall) { - - exists(int n, int nExpr, int nName | - n = 0 - and - nExpr = n + 1 - and - nName = nExpr + 1 - and ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getName() and partialPredicateCall = "Name()" - )) - } - private Element getImmediateChildOfGenericArgList(GenericArgList e, int index, string partialPredicateCall) { - - exists(int n, int nGenericArg | - n = 0 - and - nGenericArg = n + e.getNumberOfGenericArgs() - and ( - none() - or - result = e.getGenericArg(index - n) and partialPredicateCall = "GenericArg(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfGenericParamList(GenericParamList e, int index, string partialPredicateCall) { - - exists(int n, int nGenericParam | - n = 0 - and - nGenericParam = n + e.getNumberOfGenericParams() - and ( - none() - or - result = e.getGenericParam(index - n) and partialPredicateCall = "GenericParam(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfImplRestriction(ImplRestriction e, int index, string partialPredicateCall) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - )) - } - private Element getImmediateChildOfItemList(ItemList e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nItem = nAttr + e.getNumberOfItems() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getItem(index - nAttr) and partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfLabel(Label e, int index, string partialPredicateCall) { - - exists(int n, int nLifetime | - n = 0 - and - nLifetime = n + 1 - and ( - none() - or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - )) - } - private Element getImmediateChildOfLetElse(LetElse e, int index, string partialPredicateCall) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - )) - } - private Element getImmediateChildOfMacroItems(MacroItems e, int index, string partialPredicateCall) { - - exists(int n, int nItem | - n = 0 - and - nItem = n + e.getNumberOfItems() - and ( - none() - or - result = e.getItem(index - n) and partialPredicateCall = "Item(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfMatchArm(MatchArm e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr, int nGuard, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nGuard = nExpr + 1 - and - nPat = nGuard + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getGuard() and partialPredicateCall = "Guard()" - or - index = nGuard and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfMatchArmList(MatchArmList e, int index, string partialPredicateCall) { - - exists(int n, int nArm, int nAttr | - n = 0 - and - nArm = n + e.getNumberOfArms() - and - nAttr = nArm + e.getNumberOfAttrs() - and ( - none() - or - result = e.getArm(index - n) and partialPredicateCall = "Arm(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nArm) and partialPredicateCall = "Attr(" + (index - nArm).toString() + ")" - )) - } - private Element getImmediateChildOfMatchGuard(MatchGuard e, int index, string partialPredicateCall) { - - exists(int n, int nCondition | - n = 0 - and - nCondition = n + 1 - and ( - none() - or - index = n and result = e.getCondition() and partialPredicateCall = "Condition()" - )) - } - private Element getImmediateChildOfMutRestriction(MutRestriction e, int index, string partialPredicateCall) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - )) - } - private Element getImmediateChildOfName(Name e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfParamList(ParamList e, int index, string partialPredicateCall) { - - exists(int n, int nParam, int nSelfParam | - n = 0 - and - nParam = n + e.getNumberOfParams() - and - nSelfParam = nParam + 1 - and ( - none() - or - result = e.getParam(index - n) and partialPredicateCall = "Param(" + (index - n).toString() + ")" - or - index = nParam and result = e.getSelfParam() and partialPredicateCall = "SelfParam()" - )) - } - private Element getImmediateChildOfParenthesizedArgList(ParenthesizedArgList e, int index, string partialPredicateCall) { - - exists(int n, int nTypeArg | - n = 0 - and - nTypeArg = n + e.getNumberOfTypeArgs() - and ( - none() - or - result = e.getTypeArg(index - n) and partialPredicateCall = "TypeArg(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfPath(Path e, int index, string partialPredicateCall) { - - exists(int n, int nQualifier, int nSegment | - n = 0 - and - nQualifier = n + 1 - and - nSegment = nQualifier + 1 - and ( - none() - or - index = n and result = e.getQualifier() and partialPredicateCall = "Qualifier()" - or - index = nQualifier and result = e.getSegment() and partialPredicateCall = "Segment()" - )) - } - private Element getImmediateChildOfPathSegment(PathSegment e, int index, string partialPredicateCall) { - - exists(int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr | - n = 0 - and - nGenericArgList = n + 1 - and - nIdentifier = nGenericArgList + 1 - and - nParenthesizedArgList = nIdentifier + 1 - and - nRetType = nParenthesizedArgList + 1 - and - nReturnTypeSyntax = nRetType + 1 - and - nTypeRepr = nReturnTypeSyntax + 1 - and - nTraitTypeRepr = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getParenthesizedArgList() and partialPredicateCall = "ParenthesizedArgList()" - or - index = nParenthesizedArgList and result = e.getRetType() and partialPredicateCall = "RetType()" - or - index = nRetType and result = e.getReturnTypeSyntax() and partialPredicateCall = "ReturnTypeSyntax()" - or - index = nReturnTypeSyntax and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getTraitTypeRepr() and partialPredicateCall = "TraitTypeRepr()" - )) - } - private Element getImmediateChildOfRename(Rename e, int index, string partialPredicateCall) { - - exists(int n, int nName | - n = 0 - and - nName = n + 1 - and ( - none() - or - index = n and result = e.getName() and partialPredicateCall = "Name()" - )) - } - private Element getImmediateChildOfRetTypeRepr(RetTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfSourceFile(SourceFile e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nItem = nAttr + e.getNumberOfItems() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getItem(index - nAttr) and partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfStmtList(StmtList e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nStatement, int nTailExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nStatement = nAttr + e.getNumberOfStatements() - and - nTailExpr = nStatement + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getStatement(index - nAttr) and partialPredicateCall = "Statement(" + (index - nAttr).toString() + ")" - or - index = nStatement and result = e.getTailExpr() and partialPredicateCall = "TailExpr()" - )) - } - private Element getImmediateChildOfStructExprField(StructExprField e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr, int nIdentifier | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nIdentifier = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - )) - } - private Element getImmediateChildOfStructExprFieldList(StructExprFieldList e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nField, int nSpread | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and - nSpread = nField + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - or - index = nField and result = e.getSpread() and partialPredicateCall = "Spread()" - )) - } - private Element getImmediateChildOfStructField(StructField e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultVal = nAttr + 1 - and - nMutRestriction = nDefaultVal + 1 - and - nName = nMutRestriction + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" - or - index = nDefaultVal and result = e.getMutRestriction() and partialPredicateCall = "MutRestriction()" - or - index = nMutRestriction and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfStructPatField(StructPatField e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nIdentifier, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nIdentifier = nAttr + 1 - and - nPat = nIdentifier + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfStructPatFieldList(StructPatFieldList e, int index, string partialPredicateCall) { - - exists(int n, int nField, int nRestPat | - n = 0 - and - nField = n + e.getNumberOfFields() - and - nRestPat = nField + 1 - and ( - none() - or - result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" - or - index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()" - )) - } - private Element getImmediateChildOfTokenTree(TokenTree e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfTryBlockModifier(TryBlockModifier e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfTupleField(TupleField e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nMutRestriction = nAttr + 1 - and - nTypeRepr = nMutRestriction + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getMutRestriction() and partialPredicateCall = "MutRestriction()" - or - index = nMutRestriction and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfTypeBound(TypeBound e, int index, string partialPredicateCall) { - - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | - n = 0 - and - nForBinder = n + 1 - and - nLifetime = nForBinder + 1 - and - nTypeRepr = nLifetime + 1 - and - nUseBoundGenericArgs = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getUseBoundGenericArgs() and partialPredicateCall = "UseBoundGenericArgs()" - )) - } - private Element getImmediateChildOfTypeBoundList(TypeBoundList e, int index, string partialPredicateCall) { - - exists(int n, int nBound | - n = 0 - and - nBound = n + e.getNumberOfBounds() - and ( - none() - or - result = e.getBound(index - n) and partialPredicateCall = "Bound(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfUseBoundGenericArgs(UseBoundGenericArgs e, int index, string partialPredicateCall) { - - exists(int n, int nUseBoundGenericArg | - n = 0 - and - nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() - and ( - none() - or - result = e.getUseBoundGenericArg(index - n) and partialPredicateCall = "UseBoundGenericArg(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfUseTree(UseTree e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nRename, int nUseTreeList | - n = 0 - and - nPath = n + 1 - and - nRename = nPath + 1 - and - nUseTreeList = nRename + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getRename() and partialPredicateCall = "Rename()" - or - index = nRename and result = e.getUseTreeList() and partialPredicateCall = "UseTreeList()" - )) - } - private Element getImmediateChildOfUseTreeList(UseTreeList e, int index, string partialPredicateCall) { - - exists(int n, int nUseTree | - n = 0 - and - nUseTree = n + e.getNumberOfUseTrees() - and ( - none() - or - result = e.getUseTree(index - n) and partialPredicateCall = "UseTree(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfVariantList(VariantList e, int index, string partialPredicateCall) { - - exists(int n, int nVariant | - n = 0 - and - nVariant = n + e.getNumberOfVariants() - and ( - none() - or - result = e.getVariant(index - n) and partialPredicateCall = "Variant(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfVisibility(Visibility e, int index, string partialPredicateCall) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" - )) - } - private Element getImmediateChildOfVisibilityInner(VisibilityInner e, int index, string partialPredicateCall) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfWhereClause(WhereClause e, int index, string partialPredicateCall) { - - exists(int n, int nPredicate | - n = 0 - and - nPredicate = n + e.getNumberOfPredicates() - and ( - none() - or - result = e.getPredicate(index - n) and partialPredicateCall = "Predicate(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfWherePred(WherePred e, int index, string partialPredicateCall) { - - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | - n = 0 - and - nForBinder = n + 1 - and - nLifetime = nForBinder + 1 - and - nTypeRepr = nLifetime + 1 - and - nTypeBoundList = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfArrayExprInternal(ArrayExprInternal e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + e.getNumberOfExprs() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getExpr(index - nAttr) and partialPredicateCall = "Expr(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfArrayTypeRepr(ArrayTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nConstArg, int nElementTypeRepr | - n = 0 - and - nConstArg = n + 1 - and - nElementTypeRepr = nConstArg + 1 - and ( - none() - or - index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" - or - index = nConstArg and result = e.getElementTypeRepr() and partialPredicateCall = "ElementTypeRepr()" - )) - } - private Element getImmediateChildOfAsmClobberAbi(AsmClobberAbi e, int index, string partialPredicateCall) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfAsmConst(AsmConst e, int index, string partialPredicateCall) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfAsmLabel(AsmLabel e, int index, string partialPredicateCall) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - )) - } - private Element getImmediateChildOfAsmOperandNamed(AsmOperandNamed e, int index, string partialPredicateCall) { - - exists(int n, int nAsmOperand, int nAttr, int nName | - n = 0 - and - nAsmOperand = n + 1 - and - nAttr = nAsmOperand + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and ( - none() - or - index = n and result = e.getAsmOperand() and partialPredicateCall = "AsmOperand()" - or - result = e.getAttr(index - nAsmOperand) and partialPredicateCall = "Attr(" + (index - nAsmOperand).toString() + ")" - or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" - )) - } - private Element getImmediateChildOfAsmOptionsList(AsmOptionsList e, int index, string partialPredicateCall) { - - exists(int n, int nAsmOption, int nAttr | - n = 0 - and - nAsmOption = n + e.getNumberOfAsmOptions() - and - nAttr = nAsmOption + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAsmOption(index - n) and partialPredicateCall = "AsmOption(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nAsmOption) and partialPredicateCall = "Attr(" + (index - nAsmOption).toString() + ")" - )) - } - private Element getImmediateChildOfAsmRegOperand(AsmRegOperand e, int index, string partialPredicateCall) { - - exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | - n = 0 - and - nAsmDirSpec = n + 1 - and - nAsmOperandExpr = nAsmDirSpec + 1 - and - nAsmRegSpec = nAsmOperandExpr + 1 - and ( - none() - or - index = n and result = e.getAsmDirSpec() and partialPredicateCall = "AsmDirSpec()" - or - index = nAsmDirSpec and result = e.getAsmOperandExpr() and partialPredicateCall = "AsmOperandExpr()" - or - index = nAsmOperandExpr and result = e.getAsmRegSpec() and partialPredicateCall = "AsmRegSpec()" - )) - } - private Element getImmediateChildOfAsmSym(AsmSym e, int index, string partialPredicateCall) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfAssocTypeArg(AssocTypeArg e, int index, string partialPredicateCall) { - - exists(int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList | - n = 0 - and - nConstArg = n + 1 - and - nGenericArgList = nConstArg + 1 - and - nIdentifier = nGenericArgList + 1 - and - nParamList = nIdentifier + 1 - and - nRetType = nParamList + 1 - and - nReturnTypeSyntax = nRetType + 1 - and - nTypeRepr = nReturnTypeSyntax + 1 - and - nTypeBoundList = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" - or - index = nConstArg and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" - or - index = nRetType and result = e.getReturnTypeSyntax() and partialPredicateCall = "ReturnTypeSyntax()" - or - index = nReturnTypeSyntax and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfAttr(Attr e, int index, string partialPredicateCall) { - - exists(int n, int nMeta | - n = 0 - and - nMeta = n + 1 - and ( - none() - or - index = n and result = e.getMeta() and partialPredicateCall = "Meta()" - )) - } - private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nLhs, int nRhs | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLhs = nAttr + 1 - and - nRhs = nLhs + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLhs() and partialPredicateCall = "Lhs()" - or - index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" - )) - } - private Element getImmediateChildOfBoxPat(BoxPat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfBreakExpr(BreakExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr, int nLifetime | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nLifetime = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - )) - } - private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { - - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 - and - nArgList = n + 1 - and - nAttr = nArgList + e.getNumberOfAttrs() - and - nFunction = nAttr + 1 - and ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" - )) - } - private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nTypeRepr = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfCfgAtom(CfgAtom e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfCfgAttrMeta(CfgAttrMeta e, int index, string partialPredicateCall) { - - exists(int n, int nCfgPredicate, int nMeta | - n = 0 - and - nCfgPredicate = n + 1 - and - nMeta = nCfgPredicate + e.getNumberOfMetas() - and ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - or - result = e.getMeta(index - nCfgPredicate) and partialPredicateCall = "Meta(" + (index - nCfgPredicate).toString() + ")" - )) - } - private Element getImmediateChildOfCfgComposite(CfgComposite e, int index, string partialPredicateCall) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + e.getNumberOfCfgPredicates() - and ( - none() - or - result = e.getCfgPredicate(index - n) and partialPredicateCall = "CfgPredicate(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfCfgMeta(CfgMeta e, int index, string partialPredicateCall) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - )) - } - private Element getImmediateChildOfCfgPredExpr(CfgPredExpr e, int index, string partialPredicateCall) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - )) - } - private Element getImmediateChildOfCfgPredPat(CfgPredPat e, int index, string partialPredicateCall) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" - )) - } - private Element getImmediateChildOfClosureExpr(ClosureExpr e, int index, string partialPredicateCall) { - - exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | - n = 0 - and - nParamList = n + 1 - and - nAttr = nParamList + e.getNumberOfAttrs() - and - nClosureBody = nAttr + 1 - and - nForBinder = nClosureBody + 1 - and - nRetType = nForBinder + 1 - and ( - none() - or - index = n and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - result = e.getAttr(index - nParamList) and partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" - or - index = nAttr and result = e.getClosureBody() and partialPredicateCall = "ClosureBody()" - or - index = nClosureBody and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getRetType() and partialPredicateCall = "RetType()" - )) - } - private Element getImmediateChildOfComment(Comment e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfConstArg(ConstArg e, int index, string partialPredicateCall) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfConstBlockPat(ConstBlockPat e, int index, string partialPredicateCall) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" - )) - } - private Element getImmediateChildOfConstParam(ConstParam e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultVal = nAttr + 1 - and - nName = nDefaultVal + 1 - and - nTypeRepr = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" - or - index = nDefaultVal and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfContinueExpr(ContinueExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nLifetime | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLifetime = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - )) - } - private Element getImmediateChildOfDerefPat(DerefPat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfDocComment(DocComment e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfDynTraitTypeRepr(DynTraitTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeBoundList | - n = 0 - and - nTypeBoundList = n + 1 - and ( - none() - or - index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfExprStmt(ExprStmt e, int index, string partialPredicateCall) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfFieldExpr(FieldExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nContainer, int nIdentifier | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nContainer = nAttr + 1 - and - nIdentifier = nContainer + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getContainer() and partialPredicateCall = "Container()" - or - index = nContainer and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - )) - } - private Element getImmediateChildOfFnPtrTypeRepr(FnPtrTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nAbi, int nParamList, int nRetType | - n = 0 - and - nAbi = n + 1 - and - nParamList = nAbi + 1 - and - nRetType = nParamList + 1 - and ( - none() - or - index = n and result = e.getAbi() and partialPredicateCall = "Abi()" - or - index = nAbi and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" - )) - } - private Element getImmediateChildOfForTypeRepr(ForTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nForBinder, int nTypeRepr | - n = 0 - and - nForBinder = n + 1 - and - nTypeRepr = nForBinder + 1 - and ( - none() - or - index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" - or - index = nForBinder and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfFormatArgsExpr(FormatArgsExpr e, int index, string partialPredicateCall) { - - exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | - n = 0 - and - nArg = n + e.getNumberOfArgs() - and - nAttr = nArg + e.getNumberOfAttrs() - and - nTemplate = nAttr + 1 - and - nFormat = nTemplate + e.getNumberOfFormats() - and ( - none() - or - result = e.getArg(index - n) and partialPredicateCall = "Arg(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nArg) and partialPredicateCall = "Attr(" + (index - nArg).toString() + ")" - or - index = nAttr and result = e.getTemplate() and partialPredicateCall = "Template()" - or - result = e.getFormat(index - nTemplate) and partialPredicateCall = "Format(" + (index - nTemplate).toString() + ")" - )) - } - private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nName, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and - nPat = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfIfExpr(IfExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nCondition, int nElse, int nThen | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nCondition = nAttr + 1 - and - nElse = nCondition + 1 - and - nThen = nElse + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" - or - index = nCondition and result = e.getElse() and partialPredicateCall = "Else()" - or - index = nElse and result = e.getThen() and partialPredicateCall = "Then()" - )) - } - private Element getImmediateChildOfImplTraitTypeRepr(ImplTraitTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeBoundList | - n = 0 - and - nTypeBoundList = n + 1 - and ( - none() - or - index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfIndexExpr(IndexExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nBase, int nIndex | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nBase = nAttr + 1 - and - nIndex = nBase + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getBase() and partialPredicateCall = "Base()" - or - index = nBase and result = e.getIndex() and partialPredicateCall = "Index()" - )) - } - private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfKeyValueMeta(KeyValueMeta e, int index, string partialPredicateCall) { - - exists(int n, int nExpr, int nPath | - n = 0 - and - nExpr = n + 1 - and - nPath = nExpr + 1 - and ( - none() - or - index = n and result = e.getExpr() and partialPredicateCall = "Expr()" - or - index = nExpr and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfLetExpr(LetExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nScrutinee, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nScrutinee = nAttr + 1 - and - nPat = nScrutinee + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" - or - index = nScrutinee and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfLetStmt(LetStmt e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nInitializer = nAttr + 1 - and - nLetElse = nInitializer + 1 - and - nPat = nLetElse + 1 - and - nTypeRepr = nPat + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getInitializer() and partialPredicateCall = "Initializer()" - or - index = nInitializer and result = e.getLetElse() and partialPredicateCall = "LetElse()" - or - index = nLetElse and result = e.getPat() and partialPredicateCall = "Pat()" - or - index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfLifetime(Lifetime e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfLifetimeArg(LifetimeArg e, int index, string partialPredicateCall) { - - exists(int n, int nLifetime | - n = 0 - and - nLifetime = n + 1 - and ( - none() - or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - )) - } - private Element getImmediateChildOfLifetimeParam(LifetimeParam e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nLifetime, int nTypeBoundList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLifetime = nAttr + 1 - and - nTypeBoundList = nLifetime + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfLiteralExpr(LiteralExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfLiteralPat(LiteralPat e, int index, string partialPredicateCall) { - - exists(int n, int nLiteral | - n = 0 - and - nLiteral = n + 1 - and ( - none() - or - index = n and result = e.getLiteral() and partialPredicateCall = "Literal()" - )) - } - private Element getImmediateChildOfMacroExpr(MacroExpr e, int index, string partialPredicateCall) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - )) - } - private Element getImmediateChildOfMacroPat(MacroPat e, int index, string partialPredicateCall) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - )) - } - private Element getImmediateChildOfMacroTypeRepr(MacroTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" - )) - } - private Element getImmediateChildOfMatchExpr(MatchExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nScrutinee, int nMatchArmList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nScrutinee = nAttr + 1 - and - nMatchArmList = nScrutinee + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" - or - index = nScrutinee and result = e.getMatchArmList() and partialPredicateCall = "MatchArmList()" - )) - } - private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index, string partialPredicateCall) { - - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 - and - nArgList = n + 1 - and - nAttr = nArgList + e.getNumberOfAttrs() - and - nGenericArgList = nAttr + 1 - and - nIdentifier = nGenericArgList + 1 - and - nReceiver = nIdentifier + 1 - and ( - none() - or - index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" - or - result = e.getAttr(index - nArgList) and partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" - or - index = nAttr and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" - or - index = nGenericArgList and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" - )) - } - private Element getImmediateChildOfNameRef(NameRef e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfNotNull(NotNull e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfOffsetOfExpr(OffsetOfExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nField, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and - nTypeRepr = nField + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - or - index = nField and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfOrPat(OrPat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + e.getNumberOfPats() - and ( - none() - or - result = e.getPat(index - n) and partialPredicateCall = "Pat(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfParam(Param e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nTypeRepr, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nTypeRepr = nAttr + 1 - and - nPat = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfParenExpr(ParenExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfParenPat(ParenPat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfParenTypeRepr(ParenTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfPathMeta(PathMeta e, int index, string partialPredicateCall) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfPathPat(PathPat e, int index, string partialPredicateCall) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfPathTypeRepr(PathTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - )) - } - private Element getImmediateChildOfPatternTypeRepr(PatternTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nPat, int nTypeRepr | - n = 0 - and - nPat = n + 1 - and - nTypeRepr = nPat + 1 - and ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - or - index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfPtrTypeRepr(PtrTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfRangeExpr(RangeExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nEnd, int nStart | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nEnd = nAttr + 1 - and - nStart = nEnd + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getEnd() and partialPredicateCall = "End()" - or - index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" - )) - } - private Element getImmediateChildOfRangePat(RangePat e, int index, string partialPredicateCall) { - - exists(int n, int nEnd, int nStart | - n = 0 - and - nEnd = n + 1 - and - nStart = nEnd + 1 - and ( - none() - or - index = n and result = e.getEnd() and partialPredicateCall = "End()" - or - index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" - )) - } - private Element getImmediateChildOfRefExpr(RefExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfRefPat(RefPat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfRefTypeRepr(RefTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nLifetime, int nTypeRepr | - n = 0 - and - nLifetime = n + 1 - and - nTypeRepr = nLifetime + 1 - and ( - none() - or - index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfRestPat(RestPat e, int index, string partialPredicateCall) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfSelfParam(SelfParam e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nTypeRepr = nAttr + 1 - and - nLifetime = nTypeRepr + 1 - and - nName = nLifetime + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" - or - index = nLifetime and result = e.getName() and partialPredicateCall = "Name()" - )) - } - private Element getImmediateChildOfSlicePat(SlicePat e, int index, string partialPredicateCall) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + e.getNumberOfPats() - and ( - none() - or - result = e.getPat(index - n) and partialPredicateCall = "Pat(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfSliceTypeRepr(SliceTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfStructExpr(StructExpr e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nStructExprFieldList | - n = 0 - and - nPath = n + 1 - and - nStructExprFieldList = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getStructExprFieldList() and partialPredicateCall = "StructExprFieldList()" - )) - } - private Element getImmediateChildOfStructFieldList(StructFieldList e, int index, string partialPredicateCall) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfStructPat(StructPat e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nStructPatFieldList | - n = 0 - and - nPath = n + 1 - and - nStructPatFieldList = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getStructPatFieldList() and partialPredicateCall = "StructPatFieldList()" - )) - } - private Element getImmediateChildOfTokenTreeMeta(TokenTreeMeta e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nTokenTree | - n = 0 - and - nPath = n + 1 - and - nTokenTree = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" - )) - } - private Element getImmediateChildOfTryExpr(TryExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfTupleExpr(TupleExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nField | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - result = e.getField(index - nAttr) and partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfTupleFieldList(TupleFieldList e, int index, string partialPredicateCall) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfTuplePat(TuplePat e, int index, string partialPredicateCall) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfTupleStructPat(TupleStructPat e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nField | - n = 0 - and - nPath = n + 1 - and - nField = nPath + e.getNumberOfFields() - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - result = e.getField(index - nPath) and partialPredicateCall = "Field(" + (index - nPath).toString() + ")" - )) - } - private Element getImmediateChildOfTupleTypeRepr(TupleTypeRepr e, int index, string partialPredicateCall) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) and partialPredicateCall = "Field(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfTypeArg(TypeArg e, int index, string partialPredicateCall) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - )) - } - private Element getImmediateChildOfTypeParam(TypeParam e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultType = nAttr + 1 - and - nName = nDefaultType + 1 - and - nTypeBoundList = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getDefaultType() and partialPredicateCall = "DefaultType()" - or - index = nDefaultType and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - )) - } - private Element getImmediateChildOfUnderscoreExpr(UnderscoreExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - )) - } - private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index, string partialPredicateCall) { - - exists(int n, int nMeta | - n = 0 - and - nMeta = n + 1 - and ( - none() - or - index = n and result = e.getMeta() and partialPredicateCall = "Meta()" - )) - } - private Element getImmediateChildOfVariant(Variant e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nConstArg = nAttr + 1 - and - nFieldList = nConstArg + 1 - and - nName = nFieldList + 1 - and - nVisibility = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getConstArg() and partialPredicateCall = "ConstArg()" - or - index = nConstArg and result = e.getFieldList() and partialPredicateCall = "FieldList()" - or - index = nFieldList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfWildcardPat(WildcardPat e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfYeetExpr(YeetExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfYieldExpr(YieldExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) and partialPredicateCall = "Attr(" + (index - n).toString() + ")" - or - index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" - )) - } - private Element getImmediateChildOfArrayListExpr(ArrayListExpr e, int index, string partialPredicateCall) { - - exists(int n, int nExpr, int nAttr | - n = 0 - and - nExpr = n + e.getNumberOfExprs() - and - nAttr = nExpr + e.getNumberOfAttrs() - and ( - none() - or - result = e.getExpr(index - n) and partialPredicateCall = "Expr(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nExpr) and partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" - )) - } - private Element getImmediateChildOfArrayRepeatExpr(ArrayRepeatExpr e, int index, string partialPredicateCall) { - - exists(int n, int nExpr, int nAttr, int nRepeatOperand, int nRepeatLength | - n = 0 - and - nExpr = n + e.getNumberOfExprs() - and - nAttr = nExpr + e.getNumberOfAttrs() - and - nRepeatOperand = nAttr + 1 - and - nRepeatLength = nRepeatOperand + 1 - and ( - none() - or - result = e.getExpr(index - n) and partialPredicateCall = "Expr(" + (index - n).toString() + ")" - or - result = e.getAttr(index - nExpr) and partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" - or - index = nAttr and result = e.getRepeatOperand() and partialPredicateCall = "RepeatOperand()" - or - index = nRepeatOperand and result = e.getRepeatLength() and partialPredicateCall = "RepeatLength()" - )) - } - private Element getImmediateChildOfAsmExpr(AsmExpr e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() - and - nAttr = nAsmPiece + e.getNumberOfAttrs() - and - nTemplate = nAttr + e.getNumberOfTemplates() - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAsmPiece(index - nAttributeMacroExpansion) and partialPredicateCall = "AsmPiece(" + (index - nAttributeMacroExpansion).toString() + ")" - or - result = e.getAttr(index - nAsmPiece) and partialPredicateCall = "Attr(" + (index - nAsmPiece).toString() + ")" - or - result = e.getTemplate(index - nAttr) and partialPredicateCall = "Template(" + (index - nAttr).toString() + ")" - )) - } - private Element getImmediateChildOfBlockExpr(BlockExpr e, int index, string partialPredicateCall) { - - exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | - n = 0 - and - nLabel = n + 1 - and - nAttr = nLabel + e.getNumberOfAttrs() - and - nStmtList = nAttr + 1 - and - nTryBlockModifier = nStmtList + 1 - and ( - none() - or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" - or - result = e.getAttr(index - nLabel) and partialPredicateCall = "Attr(" + (index - nLabel).toString() + ")" - or - index = nAttr and result = e.getStmtList() and partialPredicateCall = "StmtList()" - or - index = nStmtList and result = e.getTryBlockModifier() and partialPredicateCall = "TryBlockModifier()" - )) - } - private Element getImmediateChildOfExternBlock(ExternBlock e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAbi = nAttributeMacroExpansion + 1 - and - nAttr = nAbi + e.getNumberOfAttrs() - and - nExternItemList = nAttr + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - index = nAttributeMacroExpansion and result = e.getAbi() and partialPredicateCall = "Abi()" - or - result = e.getAttr(index - nAbi) and partialPredicateCall = "Attr(" + (index - nAbi).toString() + ")" - or - index = nAttr and result = e.getExternItemList() and partialPredicateCall = "ExternItemList()" - )) - } - private Element getImmediateChildOfExternCrate(ExternCrate e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nIdentifier = nAttr + 1 - and - nRename = nIdentifier + 1 - and - nVisibility = nRename + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" - or - index = nIdentifier and result = e.getRename() and partialPredicateCall = "Rename()" - or - index = nRename and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfFormatTemplateVariableAccess(FormatTemplateVariableAccess e, int index, string partialPredicateCall) { - none() - } - private Element getImmediateChildOfImpl(Impl e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAssocItemList = nAttributeMacroExpansion + 1 - and - nAttr = nAssocItemList + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nSelfTy = nGenericParamList + 1 - and - nTraitTy = nSelfTy + 1 - and - nVisibility = nTraitTy + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() and partialPredicateCall = "AssocItemList()" - or - result = e.getAttr(index - nAssocItemList) and partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getSelfTy() and partialPredicateCall = "SelfTy()" - or - index = nSelfTy and result = e.getTraitTy() and partialPredicateCall = "TraitTy()" - or - index = nTraitTy and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - )) - } - private Element getImmediateChildOfMacroDef(MacroDef e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nArgs = nAttributeMacroExpansion + 1 - and - nAttr = nArgs + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nName = nBody + 1 - and - nVisibility = nName + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - index = nAttributeMacroExpansion and result = e.getArgs() and partialPredicateCall = "Args()" - or - result = e.getAttr(index - nArgs) and partialPredicateCall = "Attr(" + (index - nArgs).toString() + ")" - or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" - or - index = nBody and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfMacroRules(MacroRules e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and - nTokenTree = nName + 1 - and - nVisibility = nTokenTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" - or - index = nTokenTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nItemList = nAttr + 1 - and - nName = nItemList + 1 - and - nVisibility = nName + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getItemList() and partialPredicateCall = "ItemList()" - or - index = nItemList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfPathExpr(PathExpr e, int index, string partialPredicateCall) { - - exists(int n, int nPath, int nAttr | - n = 0 - and - nPath = n + 1 - and - nAttr = nPath + e.getNumberOfAttrs() - and ( - none() - or - index = n and result = e.getPath() and partialPredicateCall = "Path()" - or - result = e.getAttr(index - nPath) and partialPredicateCall = "Attr(" + (index - nPath).toString() + ")" - )) - } - private Element getImmediateChildOfTrait(Trait e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAssocItemList = nAttributeMacroExpansion + 1 - and - nAttr = nAssocItemList + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nImplRestriction = nGenericParamList + 1 - and - nName = nImplRestriction + 1 - and - nTypeBoundList = nName + 1 - and - nVisibility = nTypeBoundList + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() and partialPredicateCall = "AssocItemList()" - or - result = e.getAttr(index - nAssocItemList) and partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getImplRestriction() and partialPredicateCall = "ImplRestriction()" - or - index = nImplRestriction and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - or - index = nTypeBoundList and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - )) - } - private Element getImmediateChildOfUse(Use e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nUseTree = nAttr + 1 - and - nVisibility = nUseTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getUseTree() and partialPredicateCall = "UseTree()" - or - index = nUseTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfConst(Const e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, int nTypeRepr, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nGenericParamList = nBody + 1 - and - nName = nGenericParamList + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" - or - index = nBody and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - )) - } - private Element getImmediateChildOfEnum(Enum e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nVariantList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" - or - result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - or - index = nWhereClause and result = e.getVariantList() and partialPredicateCall = "VariantList()" - )) - } - private Element getImmediateChildOfForExpr(ForExpr e, int index, string partialPredicateCall) { - - exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and - nIterable = nAttr + 1 - and - nPat = nIterable + 1 - and ( - none() - or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" - or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" - or - result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" - or - index = nAttr and result = e.getIterable() and partialPredicateCall = "Iterable()" - or - index = nIterable and result = e.getPat() and partialPredicateCall = "Pat()" - )) - } - private Element getImmediateChildOfFunction(Function e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nParamList = nAttributeMacroExpansion + 1 - and - nAttr = nParamList + e.getNumberOfAttrs() - and - nAbi = nAttr + 1 - and - nFunctionBody = nAbi + 1 - and - nGenericParamList = nFunctionBody + 1 - and - nName = nGenericParamList + 1 - and - nRetType = nName + 1 - and - nVisibility = nRetType + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - index = nAttributeMacroExpansion and result = e.getParamList() and partialPredicateCall = "ParamList()" - or - result = e.getAttr(index - nParamList) and partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" - or - index = nAttr and result = e.getAbi() and partialPredicateCall = "Abi()" - or - index = nAbi and result = e.getFunctionBody() and partialPredicateCall = "FunctionBody()" - or - index = nFunctionBody and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getRetType() and partialPredicateCall = "RetType()" - or - index = nRetType and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - )) - } - private Element getImmediateChildOfLoopExpr(LoopExpr e, int index, string partialPredicateCall) { - - exists(int n, int nLabel, int nLoopBody, int nAttr | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and ( - none() - or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" - or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" - or - result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" - )) - } - private Element getImmediateChildOfMacroCall(MacroCall e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, int nMacroCallExpansion | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nPath = nAttr + 1 - and - nTokenTree = nPath + 1 - and - nMacroCallExpansion = nTokenTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getPath() and partialPredicateCall = "Path()" - or - index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" - or - index = nTokenTree and result = e.getMacroCallExpansion() and partialPredicateCall = "MacroCallExpansion()" - )) - } - private Element getImmediateChildOfStatic(Static e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nName = nBody + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" - or - index = nBody and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" - )) - } - private Element getImmediateChildOfStruct(Struct e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nFieldList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" - or - result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - or - index = nWhereClause and result = e.getFieldList() and partialPredicateCall = "FieldList()" - )) - } - private Element getImmediateChildOfTypeAlias(TypeAlias e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nTypeRepr = nName + 1 - and - nTypeBoundList = nTypeRepr + 1 - and - nVisibility = nTypeBoundList + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getAttr(index - nAttributeMacroExpansion) and partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" - or - index = nTypeRepr and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" - or - index = nTypeBoundList and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - )) - } - private Element getImmediateChildOfUnion(Union e, int index, string partialPredicateCall) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nStructFieldList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() and partialPredicateCall = "AttributeMacroExpansion()" - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and partialPredicateCall = "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" - or - result = e.getAttr(index - nDeriveMacroExpansion) and partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" - or - index = nAttr and result = e.getGenericParamList() and partialPredicateCall = "GenericParamList()" - or - index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" - or - index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" - or - index = nVisibility and result = e.getWhereClause() and partialPredicateCall = "WhereClause()" - or - index = nWhereClause and result = e.getStructFieldList() and partialPredicateCall = "StructFieldList()" - )) - } - private Element getImmediateChildOfWhileExpr(WhileExpr e, int index, string partialPredicateCall) { - - exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and - nCondition = nAttr + 1 - and ( - none() - or - index = n and result = e.getLabel() and partialPredicateCall = "Label()" - or - index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" - or - result = e.getAttr(index - nLoopBody) and partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" - or - index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" - )) - } -cached -Element getImmediateChild(Element e, int index, string partialAccessor) { -// why does this look more complicated than it should? -// * none() simplifies generation, as we can append `or ...` without a special case for the first item -none() + private Element getImmediateChildOfExtractorStep( + ExtractorStep e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfNamedCrate(NamedCrate e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfCrate(Crate e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfFormat(Format e, int index, string partialPredicateCall) { + exists(int n, int nArgumentRef, int nWidthArgument, int nPrecisionArgument | + n = 0 and + nArgumentRef = n + 1 and + nWidthArgument = nArgumentRef + 1 and + nPrecisionArgument = nWidthArgument + 1 and + ( + none() + or + index = n and result = e.getArgumentRef() and partialPredicateCall = "ArgumentRef()" + or + index = nArgumentRef and + result = e.getWidthArgument() and + partialPredicateCall = "WidthArgument()" + or + index = nWidthArgument and + result = e.getPrecisionArgument() and + partialPredicateCall = "PrecisionArgument()" + ) + ) + } + + private Element getImmediateChildOfFormatArgument( + FormatArgument e, int index, string partialPredicateCall + ) { + exists(int n, int nVariable | + n = 0 and + nVariable = n + 1 and + ( + none() + or + index = n and result = e.getVariable() and partialPredicateCall = "Variable()" + ) + ) + } + + private Element getImmediateChildOfMissing(Missing e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfUnimplemented( + Unimplemented e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfAbi(Abi e, int index, string partialPredicateCall) { none() } + + private Element getImmediateChildOfArgList(ArgList e, int index, string partialPredicateCall) { + exists(int n, int nArg | + n = 0 and + nArg = n + e.getNumberOfArgs() and + ( + none() + or + result = e.getArg(index - n) and + partialPredicateCall = "Arg(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfAsmOperandExpr( + AsmOperandExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nInExpr, int nOutExpr | + n = 0 and + nInExpr = n + 1 and + nOutExpr = nInExpr + 1 and + ( + none() + or + index = n and result = e.getInExpr() and partialPredicateCall = "InExpr()" + or + index = nInExpr and result = e.getOutExpr() and partialPredicateCall = "OutExpr()" + ) + ) + } + + private Element getImmediateChildOfAsmOption(AsmOption e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index, string partialPredicateCall) { + exists(int n, int nIdentifier | + n = 0 and + nIdentifier = n + 1 and + ( + none() + or + index = n and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + ) + ) + } + + private Element getImmediateChildOfAssocItemList( + AssocItemList e, int index, string partialPredicateCall + ) { + exists(int n, int nAssocItem, int nAttr | + n = 0 and + nAssocItem = n + e.getNumberOfAssocItems() and + nAttr = nAssocItem + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAssocItem(index - n) and + partialPredicateCall = "AssocItem(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nAssocItem) and + partialPredicateCall = "Attr(" + (index - nAssocItem).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfExternItemList( + ExternItemList e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nExternItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExternItem = nAttr + e.getNumberOfExternItems() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getExternItem(index - nAttr) and + partialPredicateCall = "ExternItem(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfForBinder(ForBinder e, int index, string partialPredicateCall) { + exists(int n, int nGenericParamList | + n = 0 and + nGenericParamList = n + 1 and + ( + none() + or + index = n and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" + ) + ) + } + + private Element getImmediateChildOfFormatArgsArg( + FormatArgsArg e, int index, string partialPredicateCall + ) { + exists(int n, int nExpr, int nName | + n = 0 and + nExpr = n + 1 and + nName = nExpr + 1 and + ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getName() and partialPredicateCall = "Name()" + ) + ) + } + + private Element getImmediateChildOfGenericArgList( + GenericArgList e, int index, string partialPredicateCall + ) { + exists(int n, int nGenericArg | + n = 0 and + nGenericArg = n + e.getNumberOfGenericArgs() and + ( + none() + or + result = e.getGenericArg(index - n) and + partialPredicateCall = "GenericArg(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfGenericParamList( + GenericParamList e, int index, string partialPredicateCall + ) { + exists(int n, int nGenericParam | + n = 0 and + nGenericParam = n + e.getNumberOfGenericParams() and + ( + none() + or + result = e.getGenericParam(index - n) and + partialPredicateCall = "GenericParam(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfImplRestriction( + ImplRestriction e, int index, string partialPredicateCall + ) { + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + ) + ) + } + + private Element getImmediateChildOfItemList(ItemList e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nItem = nAttr + e.getNumberOfItems() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getItem(index - nAttr) and + partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfLabel(Label e, int index, string partialPredicateCall) { + exists(int n, int nLifetime | + n = 0 and + nLifetime = n + 1 and + ( + none() + or + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + ) + ) + } + + private Element getImmediateChildOfLetElse(LetElse e, int index, string partialPredicateCall) { + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + ) + ) + } + + private Element getImmediateChildOfMacroItems(MacroItems e, int index, string partialPredicateCall) { + exists(int n, int nItem | + n = 0 and + nItem = n + e.getNumberOfItems() and + ( + none() + or + result = e.getItem(index - n) and + partialPredicateCall = "Item(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfMatchArm(MatchArm e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr, int nGuard, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nGuard = nExpr + 1 and + nPat = nGuard + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getGuard() and partialPredicateCall = "Guard()" + or + index = nGuard and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfMatchArmList( + MatchArmList e, int index, string partialPredicateCall + ) { + exists(int n, int nArm, int nAttr | + n = 0 and + nArm = n + e.getNumberOfArms() and + nAttr = nArm + e.getNumberOfAttrs() and + ( + none() + or + result = e.getArm(index - n) and + partialPredicateCall = "Arm(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nArm) and + partialPredicateCall = "Attr(" + (index - nArm).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfMatchGuard(MatchGuard e, int index, string partialPredicateCall) { + exists(int n, int nCondition | + n = 0 and + nCondition = n + 1 and + ( + none() + or + index = n and result = e.getCondition() and partialPredicateCall = "Condition()" + ) + ) + } + + private Element getImmediateChildOfMutRestriction( + MutRestriction e, int index, string partialPredicateCall + ) { + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + ) + ) + } + + private Element getImmediateChildOfName(Name e, int index, string partialPredicateCall) { none() } + + private Element getImmediateChildOfParamList(ParamList e, int index, string partialPredicateCall) { + exists(int n, int nParam, int nSelfParam | + n = 0 and + nParam = n + e.getNumberOfParams() and + nSelfParam = nParam + 1 and + ( + none() + or + result = e.getParam(index - n) and + partialPredicateCall = "Param(" + (index - n).toString() + ")" + or + index = nParam and result = e.getSelfParam() and partialPredicateCall = "SelfParam()" + ) + ) + } + + private Element getImmediateChildOfParenthesizedArgList( + ParenthesizedArgList e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeArg | + n = 0 and + nTypeArg = n + e.getNumberOfTypeArgs() and + ( + none() + or + result = e.getTypeArg(index - n) and + partialPredicateCall = "TypeArg(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfPath(Path e, int index, string partialPredicateCall) { + exists(int n, int nQualifier, int nSegment | + n = 0 and + nQualifier = n + 1 and + nSegment = nQualifier + 1 and + ( + none() + or + index = n and result = e.getQualifier() and partialPredicateCall = "Qualifier()" + or + index = nQualifier and result = e.getSegment() and partialPredicateCall = "Segment()" + ) + ) + } + + private Element getImmediateChildOfPathSegment( + PathSegment e, int index, string partialPredicateCall + ) { + exists( + int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, + int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr + | + n = 0 and + nGenericArgList = n + 1 and + nIdentifier = nGenericArgList + 1 and + nParenthesizedArgList = nIdentifier + 1 and + nRetType = nParenthesizedArgList + 1 and + nReturnTypeSyntax = nRetType + 1 and + nTypeRepr = nReturnTypeSyntax + 1 and + nTraitTypeRepr = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and + result = e.getIdentifier() and + partialPredicateCall = "Identifier()" + or + index = nIdentifier and + result = e.getParenthesizedArgList() and + partialPredicateCall = "ParenthesizedArgList()" + or + index = nParenthesizedArgList and + result = e.getRetType() and + partialPredicateCall = "RetType()" + or + index = nRetType and + result = e.getReturnTypeSyntax() and + partialPredicateCall = "ReturnTypeSyntax()" + or + index = nReturnTypeSyntax and + result = e.getTypeRepr() and + partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and + result = e.getTraitTypeRepr() and + partialPredicateCall = "TraitTypeRepr()" + ) + ) + } + + private Element getImmediateChildOfRename(Rename e, int index, string partialPredicateCall) { + exists(int n, int nName | + n = 0 and + nName = n + 1 and + ( + none() + or + index = n and result = e.getName() and partialPredicateCall = "Name()" + ) + ) + } + + private Element getImmediateChildOfRetTypeRepr( + RetTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfReturnTypeSyntax( + ReturnTypeSyntax e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfSourceFile(SourceFile e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nItem = nAttr + e.getNumberOfItems() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getItem(index - nAttr) and + partialPredicateCall = "Item(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfStmtList(StmtList e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nStatement, int nTailExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nStatement = nAttr + e.getNumberOfStatements() and + nTailExpr = nStatement + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getStatement(index - nAttr) and + partialPredicateCall = "Statement(" + (index - nAttr).toString() + ")" + or + index = nStatement and result = e.getTailExpr() and partialPredicateCall = "TailExpr()" + ) + ) + } + + private Element getImmediateChildOfStructExprField( + StructExprField e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nExpr, int nIdentifier | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nIdentifier = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + ) + ) + } + + private Element getImmediateChildOfStructExprFieldList( + StructExprFieldList e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nField, int nSpread | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + nSpread = nField + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getField(index - nAttr) and + partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + or + index = nField and result = e.getSpread() and partialPredicateCall = "Spread()" + ) + ) + } + + private Element getImmediateChildOfStructField( + StructField e, int index, string partialPredicateCall + ) { + exists( + int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, + int nVisibility + | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultVal = nAttr + 1 and + nMutRestriction = nDefaultVal + 1 and + nName = nMutRestriction + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" + or + index = nDefaultVal and + result = e.getMutRestriction() and + partialPredicateCall = "MutRestriction()" + or + index = nMutRestriction and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfStructPatField( + StructPatField e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nIdentifier, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nIdentifier = nAttr + 1 and + nPat = nIdentifier + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfStructPatFieldList( + StructPatFieldList e, int index, string partialPredicateCall + ) { + exists(int n, int nField, int nRestPat | + n = 0 and + nField = n + e.getNumberOfFields() and + nRestPat = nField + 1 and + ( + none() + or + result = e.getField(index - n) and + partialPredicateCall = "Field(" + (index - n).toString() + ")" + or + index = nField and result = e.getRestPat() and partialPredicateCall = "RestPat()" + ) + ) + } + + private Element getImmediateChildOfTokenTree(TokenTree e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfTryBlockModifier( + TryBlockModifier e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfTupleField(TupleField e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nMutRestriction = nAttr + 1 and + nTypeRepr = nMutRestriction + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and + result = e.getMutRestriction() and + partialPredicateCall = "MutRestriction()" + or + index = nMutRestriction and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfTypeBound(TypeBound e, int index, string partialPredicateCall) { + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | + n = 0 and + nForBinder = n + 1 and + nLifetime = nForBinder + 1 and + nTypeRepr = nLifetime + 1 and + nUseBoundGenericArgs = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and + result = e.getUseBoundGenericArgs() and + partialPredicateCall = "UseBoundGenericArgs()" + ) + ) + } + + private Element getImmediateChildOfTypeBoundList( + TypeBoundList e, int index, string partialPredicateCall + ) { + exists(int n, int nBound | + n = 0 and + nBound = n + e.getNumberOfBounds() and + ( + none() + or + result = e.getBound(index - n) and + partialPredicateCall = "Bound(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfUseBoundGenericArgs( + UseBoundGenericArgs e, int index, string partialPredicateCall + ) { + exists(int n, int nUseBoundGenericArg | + n = 0 and + nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() and + ( + none() + or + result = e.getUseBoundGenericArg(index - n) and + partialPredicateCall = "UseBoundGenericArg(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfUseTree(UseTree e, int index, string partialPredicateCall) { + exists(int n, int nPath, int nRename, int nUseTreeList | + n = 0 and + nPath = n + 1 and + nRename = nPath + 1 and + nUseTreeList = nRename + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + or + index = nPath and result = e.getRename() and partialPredicateCall = "Rename()" + or + index = nRename and result = e.getUseTreeList() and partialPredicateCall = "UseTreeList()" + ) + ) + } + + private Element getImmediateChildOfUseTreeList( + UseTreeList e, int index, string partialPredicateCall + ) { + exists(int n, int nUseTree | + n = 0 and + nUseTree = n + e.getNumberOfUseTrees() and + ( + none() + or + result = e.getUseTree(index - n) and + partialPredicateCall = "UseTree(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfVariantList( + VariantList e, int index, string partialPredicateCall + ) { + exists(int n, int nVariant | + n = 0 and + nVariant = n + e.getNumberOfVariants() and + ( + none() + or + result = e.getVariant(index - n) and + partialPredicateCall = "Variant(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfVisibility(Visibility e, int index, string partialPredicateCall) { + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() and partialPredicateCall = "VisibilityInner()" + ) + ) + } + + private Element getImmediateChildOfVisibilityInner( + VisibilityInner e, int index, string partialPredicateCall + ) { + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfWhereClause( + WhereClause e, int index, string partialPredicateCall + ) { + exists(int n, int nPredicate | + n = 0 and + nPredicate = n + e.getNumberOfPredicates() and + ( + none() + or + result = e.getPredicate(index - n) and + partialPredicateCall = "Predicate(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfWherePred(WherePred e, int index, string partialPredicateCall) { + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | + n = 0 and + nForBinder = n + 1 and + nLifetime = nForBinder + 1 and + nTypeRepr = nLifetime + 1 and + nTypeBoundList = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and + result = e.getTypeBoundList() and + partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfArrayExprInternal( + ArrayExprInternal e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + e.getNumberOfExprs() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getExpr(index - nAttr) and + partialPredicateCall = "Expr(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfArrayTypeRepr( + ArrayTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nConstArg, int nElementTypeRepr | + n = 0 and + nConstArg = n + 1 and + nElementTypeRepr = nConstArg + 1 and + ( + none() + or + index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + or + index = nConstArg and + result = e.getElementTypeRepr() and + partialPredicateCall = "ElementTypeRepr()" + ) + ) + } + + private Element getImmediateChildOfAsmClobberAbi( + AsmClobberAbi e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfAsmConst(AsmConst e, int index, string partialPredicateCall) { + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfAsmLabel(AsmLabel e, int index, string partialPredicateCall) { + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + ) + ) + } + + private Element getImmediateChildOfAsmOperandNamed( + AsmOperandNamed e, int index, string partialPredicateCall + ) { + exists(int n, int nAsmOperand, int nAttr, int nName | + n = 0 and + nAsmOperand = n + 1 and + nAttr = nAsmOperand + e.getNumberOfAttrs() and + nName = nAttr + 1 and + ( + none() + or + index = n and result = e.getAsmOperand() and partialPredicateCall = "AsmOperand()" + or + result = e.getAttr(index - nAsmOperand) and + partialPredicateCall = "Attr(" + (index - nAsmOperand).toString() + ")" + or + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + ) + ) + } + + private Element getImmediateChildOfAsmOptionsList( + AsmOptionsList e, int index, string partialPredicateCall + ) { + exists(int n, int nAsmOption, int nAttr | + n = 0 and + nAsmOption = n + e.getNumberOfAsmOptions() and + nAttr = nAsmOption + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAsmOption(index - n) and + partialPredicateCall = "AsmOption(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nAsmOption) and + partialPredicateCall = "Attr(" + (index - nAsmOption).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfAsmRegOperand( + AsmRegOperand e, int index, string partialPredicateCall + ) { + exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | + n = 0 and + nAsmDirSpec = n + 1 and + nAsmOperandExpr = nAsmDirSpec + 1 and + nAsmRegSpec = nAsmOperandExpr + 1 and + ( + none() + or + index = n and result = e.getAsmDirSpec() and partialPredicateCall = "AsmDirSpec()" + or + index = nAsmDirSpec and + result = e.getAsmOperandExpr() and + partialPredicateCall = "AsmOperandExpr()" + or + index = nAsmOperandExpr and + result = e.getAsmRegSpec() and + partialPredicateCall = "AsmRegSpec()" + ) + ) + } + + private Element getImmediateChildOfAsmSym(AsmSym e, int index, string partialPredicateCall) { + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfAssocTypeArg( + AssocTypeArg e, int index, string partialPredicateCall + ) { + exists( + int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, + int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList + | + n = 0 and + nConstArg = n + 1 and + nGenericArgList = nConstArg + 1 and + nIdentifier = nGenericArgList + 1 and + nParamList = nIdentifier + 1 and + nRetType = nParamList + 1 and + nReturnTypeSyntax = nRetType + 1 and + nTypeRepr = nReturnTypeSyntax + 1 and + nTypeBoundList = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getConstArg() and partialPredicateCall = "ConstArg()" + or + index = nConstArg and + result = e.getGenericArgList() and + partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and + result = e.getIdentifier() and + partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" + or + index = nRetType and + result = e.getReturnTypeSyntax() and + partialPredicateCall = "ReturnTypeSyntax()" + or + index = nReturnTypeSyntax and + result = e.getTypeRepr() and + partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and + result = e.getTypeBoundList() and + partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfAttr(Attr e, int index, string partialPredicateCall) { + exists(int n, int nMeta | + n = 0 and + nMeta = n + 1 and + ( + none() + or + index = n and result = e.getMeta() and partialPredicateCall = "Meta()" + ) + ) + } + + private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nLhs, int nRhs | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLhs = nAttr + 1 and + nRhs = nLhs + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLhs() and partialPredicateCall = "Lhs()" + or + index = nLhs and result = e.getRhs() and partialPredicateCall = "Rhs()" + ) + ) + } + + private Element getImmediateChildOfBoxPat(BoxPat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfBreakExpr(BreakExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr, int nLifetime | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nLifetime = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + ) + ) + } + + private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) { + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nFunction = nAttr + 1 and + ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and + partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and result = e.getFunction() and partialPredicateCall = "Function()" + ) + ) + } + + private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nTypeRepr = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfCfgAtom(CfgAtom e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfCfgAttrMeta( + CfgAttrMeta e, int index, string partialPredicateCall + ) { + exists(int n, int nCfgPredicate, int nMeta | + n = 0 and + nCfgPredicate = n + 1 and + nMeta = nCfgPredicate + e.getNumberOfMetas() and + ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + or + result = e.getMeta(index - nCfgPredicate) and + partialPredicateCall = "Meta(" + (index - nCfgPredicate).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfCfgComposite( + CfgComposite e, int index, string partialPredicateCall + ) { + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + e.getNumberOfCfgPredicates() and + ( + none() + or + result = e.getCfgPredicate(index - n) and + partialPredicateCall = "CfgPredicate(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfCfgMeta(CfgMeta e, int index, string partialPredicateCall) { + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + ) + ) + } + + private Element getImmediateChildOfCfgPredExpr( + CfgPredExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + ) + ) + } + + private Element getImmediateChildOfCfgPredPat(CfgPredPat e, int index, string partialPredicateCall) { + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() and partialPredicateCall = "CfgPredicate()" + ) + ) + } + + private Element getImmediateChildOfClosureExpr( + ClosureExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | + n = 0 and + nParamList = n + 1 and + nAttr = nParamList + e.getNumberOfAttrs() and + nClosureBody = nAttr + 1 and + nForBinder = nClosureBody + 1 and + nRetType = nForBinder + 1 and + ( + none() + or + index = n and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + result = e.getAttr(index - nParamList) and + partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" + or + index = nAttr and result = e.getClosureBody() and partialPredicateCall = "ClosureBody()" + or + index = nClosureBody and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getRetType() and partialPredicateCall = "RetType()" + ) + ) + } + + private Element getImmediateChildOfComment(Comment e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfConstArg(ConstArg e, int index, string partialPredicateCall) { + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfConstBlockPat( + ConstBlockPat e, int index, string partialPredicateCall + ) { + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() and partialPredicateCall = "BlockExpr()" + ) + ) + } + + private Element getImmediateChildOfConstParam(ConstParam e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultVal = nAttr + 1 and + nName = nDefaultVal + 1 and + nTypeRepr = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getDefaultVal() and partialPredicateCall = "DefaultVal()" + or + index = nDefaultVal and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfContinueExpr( + ContinueExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nLifetime | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLifetime = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + ) + ) + } + + private Element getImmediateChildOfDerefPat(DerefPat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfDocComment(DocComment e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfDynTraitTypeRepr( + DynTraitTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeBoundList | + n = 0 and + nTypeBoundList = n + 1 and + ( + none() + or + index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfExprStmt(ExprStmt e, int index, string partialPredicateCall) { + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfFieldExpr(FieldExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nContainer, int nIdentifier | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nContainer = nAttr + 1 and + nIdentifier = nContainer + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getContainer() and partialPredicateCall = "Container()" + or + index = nContainer and result = e.getIdentifier() and partialPredicateCall = "Identifier()" + ) + ) + } + + private Element getImmediateChildOfFnPtrTypeRepr( + FnPtrTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nAbi, int nParamList, int nRetType | + n = 0 and + nAbi = n + 1 and + nParamList = nAbi + 1 and + nRetType = nParamList + 1 and + ( + none() + or + index = n and result = e.getAbi() and partialPredicateCall = "Abi()" + or + index = nAbi and result = e.getParamList() and partialPredicateCall = "ParamList()" + or + index = nParamList and result = e.getRetType() and partialPredicateCall = "RetType()" + ) + ) + } + + private Element getImmediateChildOfForTypeRepr( + ForTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nForBinder, int nTypeRepr | + n = 0 and + nForBinder = n + 1 and + nTypeRepr = nForBinder + 1 and + ( + none() + or + index = n and result = e.getForBinder() and partialPredicateCall = "ForBinder()" + or + index = nForBinder and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfFormatArgsExpr( + FormatArgsExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | + n = 0 and + nArg = n + e.getNumberOfArgs() and + nAttr = nArg + e.getNumberOfAttrs() and + nTemplate = nAttr + 1 and + nFormat = nTemplate + e.getNumberOfFormats() and + ( + none() + or + result = e.getArg(index - n) and + partialPredicateCall = "Arg(" + (index - n).toString() + ")" + or + result = e.getAttr(index - nArg) and + partialPredicateCall = "Attr(" + (index - nArg).toString() + ")" + or + index = nAttr and result = e.getTemplate() and partialPredicateCall = "Template()" + or + result = e.getFormat(index - nTemplate) and + partialPredicateCall = "Format(" + (index - nTemplate).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nName, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nName = nAttr + 1 and + nPat = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" + or + index = nName and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfIfExpr(IfExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nCondition, int nElse, int nThen | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nCondition = nAttr + 1 and + nElse = nCondition + 1 and + nThen = nElse + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" + or + index = nCondition and result = e.getElse() and partialPredicateCall = "Else()" + or + index = nElse and result = e.getThen() and partialPredicateCall = "Then()" + ) + ) + } + + private Element getImmediateChildOfImplTraitTypeRepr( + ImplTraitTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeBoundList | + n = 0 and + nTypeBoundList = n + 1 and + ( + none() + or + index = n and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfIncludeBytesExpr( + IncludeBytesExpr e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfIndexExpr(IndexExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nBase, int nIndex | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nBase = nAttr + 1 and + nIndex = nBase + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getBase() and partialPredicateCall = "Base()" + or + index = nBase and result = e.getIndex() and partialPredicateCall = "Index()" + ) + ) + } + + private Element getImmediateChildOfInferTypeRepr( + InferTypeRepr e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfKeyValueMeta( + KeyValueMeta e, int index, string partialPredicateCall + ) { + exists(int n, int nExpr, int nPath | + n = 0 and + nExpr = n + 1 and + nPath = nExpr + 1 and + ( + none() + or + index = n and result = e.getExpr() and partialPredicateCall = "Expr()" + or + index = nExpr and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfLetExpr(LetExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nScrutinee, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nScrutinee = nAttr + 1 and + nPat = nScrutinee + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" + or + index = nScrutinee and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfLetStmt(LetStmt e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nInitializer = nAttr + 1 and + nLetElse = nInitializer + 1 and + nPat = nLetElse + 1 and + nTypeRepr = nPat + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getInitializer() and partialPredicateCall = "Initializer()" + or + index = nInitializer and result = e.getLetElse() and partialPredicateCall = "LetElse()" + or + index = nLetElse and result = e.getPat() and partialPredicateCall = "Pat()" + or + index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfLifetime(Lifetime e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfLifetimeArg( + LifetimeArg e, int index, string partialPredicateCall + ) { + exists(int n, int nLifetime | + n = 0 and + nLifetime = n + 1 and + ( + none() + or + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + ) + ) + } + + private Element getImmediateChildOfLifetimeParam( + LifetimeParam e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nLifetime, int nTypeBoundList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLifetime = nAttr + 1 and + nTypeBoundList = nLifetime + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" + or + index = nLifetime and + result = e.getTypeBoundList() and + partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfLiteralExpr( + LiteralExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfLiteralPat(LiteralPat e, int index, string partialPredicateCall) { + exists(int n, int nLiteral | + n = 0 and + nLiteral = n + 1 and + ( + none() + or + index = n and result = e.getLiteral() and partialPredicateCall = "Literal()" + ) + ) + } + + private Element getImmediateChildOfMacroExpr(MacroExpr e, int index, string partialPredicateCall) { + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + ) + ) + } + + private Element getImmediateChildOfMacroPat(MacroPat e, int index, string partialPredicateCall) { + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + ) + ) + } + + private Element getImmediateChildOfMacroTypeRepr( + MacroTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() and partialPredicateCall = "MacroCall()" + ) + ) + } + + private Element getImmediateChildOfMatchExpr(MatchExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nScrutinee, int nMatchArmList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nScrutinee = nAttr + 1 and + nMatchArmList = nScrutinee + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getScrutinee() and partialPredicateCall = "Scrutinee()" + or + index = nScrutinee and + result = e.getMatchArmList() and + partialPredicateCall = "MatchArmList()" + ) + ) + } + + private Element getImmediateChildOfMethodCallExpr( + MethodCallExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nGenericArgList = nAttr + 1 and + nIdentifier = nGenericArgList + 1 and + nReceiver = nIdentifier + 1 and + ( + none() + or + index = n and result = e.getArgList() and partialPredicateCall = "ArgList()" + or + result = e.getAttr(index - nArgList) and + partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")" + or + index = nAttr and + result = e.getGenericArgList() and + partialPredicateCall = "GenericArgList()" + or + index = nGenericArgList and + result = e.getIdentifier() and + partialPredicateCall = "Identifier()" + or + index = nIdentifier and result = e.getReceiver() and partialPredicateCall = "Receiver()" + ) + ) + } + + private Element getImmediateChildOfNameRef(NameRef e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfNeverTypeRepr( + NeverTypeRepr e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfNotNull(NotNull e, int index, string partialPredicateCall) { + none() + } + + private Element getImmediateChildOfOffsetOfExpr( + OffsetOfExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr, int nField, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + nTypeRepr = nField + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + result = e.getField(index - nAttr) and + partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + or + index = nField and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfOrPat(OrPat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + e.getNumberOfPats() and + ( + none() + or + result = e.getPat(index - n) and + partialPredicateCall = "Pat(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfParam(Param e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nTypeRepr, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nTypeRepr = nAttr + 1 and + nPat = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + or + index = nTypeRepr and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfParenExpr(ParenExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfParenPat(ParenPat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfParenTypeRepr( + ParenTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfPathMeta(PathMeta e, int index, string partialPredicateCall) { + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfPathPat(PathPat e, int index, string partialPredicateCall) { + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfPathTypeRepr( + PathTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() and partialPredicateCall = "Path()" + ) + ) + } + + private Element getImmediateChildOfPatternTypeRepr( + PatternTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nPat, int nTypeRepr | + n = 0 and + nPat = n + 1 and + nTypeRepr = nPat + 1 and + ( + none() + or + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + or + index = nPat and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfPtrTypeRepr( + PtrTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfRangeExpr(RangeExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nEnd, int nStart | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nEnd = nAttr + 1 and + nStart = nEnd + 1 and + ( + none() + or + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + or + index = nAttr and result = e.getEnd() and partialPredicateCall = "End()" + or + index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" + ) + ) + } + + private Element getImmediateChildOfRangePat(RangePat e, int index, string partialPredicateCall) { + exists(int n, int nEnd, int nStart | + n = 0 and + nEnd = n + 1 and + nStart = nEnd + 1 and + ( + none() + or + index = n and result = e.getEnd() and partialPredicateCall = "End()" + or + index = nEnd and result = e.getStart() and partialPredicateCall = "Start()" + ) + ) + } + + private Element getImmediateChildOfRefExpr(RefExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() or - result = getImmediateChildOfExtractorStep(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfNamedCrate(e, index, partialAccessor) + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfRefPat(RefPat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() or - result = getImmediateChildOfCrate(e, index, partialAccessor) + index = n and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfRefTypeRepr( + RefTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nLifetime, int nTypeRepr | + n = 0 and + nLifetime = n + 1 and + nTypeRepr = nLifetime + 1 and + ( + none() or - result = getImmediateChildOfFormat(e, index, partialAccessor) + index = n and result = e.getLifetime() and partialPredicateCall = "Lifetime()" or - result = getImmediateChildOfFormatArgument(e, index, partialAccessor) + index = nLifetime and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfRestPat(RestPat e, int index, string partialPredicateCall) { + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() or - result = getImmediateChildOfMissing(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() or - result = getImmediateChildOfUnimplemented(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfAbi(e, index, partialAccessor) + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfSelfParam(SelfParam e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nTypeRepr = nAttr + 1 and + nLifetime = nTypeRepr + 1 and + nName = nLifetime + 1 and + ( + none() or - result = getImmediateChildOfArgList(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfAsmDirSpec(e, index, partialAccessor) + index = nAttr and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" or - result = getImmediateChildOfAsmOperandExpr(e, index, partialAccessor) + index = nTypeRepr and result = e.getLifetime() and partialPredicateCall = "Lifetime()" or - result = getImmediateChildOfAsmOption(e, index, partialAccessor) + index = nLifetime and result = e.getName() and partialPredicateCall = "Name()" + ) + ) + } + + private Element getImmediateChildOfSlicePat(SlicePat e, int index, string partialPredicateCall) { + exists(int n, int nPat | + n = 0 and + nPat = n + e.getNumberOfPats() and + ( + none() or - result = getImmediateChildOfAsmRegSpec(e, index, partialAccessor) + result = e.getPat(index - n) and + partialPredicateCall = "Pat(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfSliceTypeRepr( + SliceTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() or - result = getImmediateChildOfAssocItemList(e, index, partialAccessor) + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfStructExpr(StructExpr e, int index, string partialPredicateCall) { + exists(int n, int nPath, int nStructExprFieldList | + n = 0 and + nPath = n + 1 and + nStructExprFieldList = nPath + 1 and + ( + none() or - result = getImmediateChildOfExternItemList(e, index, partialAccessor) + index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfForBinder(e, index, partialAccessor) + index = nPath and + result = e.getStructExprFieldList() and + partialPredicateCall = "StructExprFieldList()" + ) + ) + } + + private Element getImmediateChildOfStructFieldList( + StructFieldList e, int index, string partialPredicateCall + ) { + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfFormatArgsArg(e, index, partialAccessor) + result = e.getField(index - n) and + partialPredicateCall = "Field(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfStructPat(StructPat e, int index, string partialPredicateCall) { + exists(int n, int nPath, int nStructPatFieldList | + n = 0 and + nPath = n + 1 and + nStructPatFieldList = nPath + 1 and + ( + none() or - result = getImmediateChildOfGenericArgList(e, index, partialAccessor) + index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfGenericParamList(e, index, partialAccessor) + index = nPath and + result = e.getStructPatFieldList() and + partialPredicateCall = "StructPatFieldList()" + ) + ) + } + + private Element getImmediateChildOfTokenTreeMeta( + TokenTreeMeta e, int index, string partialPredicateCall + ) { + exists(int n, int nPath, int nTokenTree | + n = 0 and + nPath = n + 1 and + nTokenTree = nPath + 1 and + ( + none() or - result = getImmediateChildOfImplRestriction(e, index, partialAccessor) + index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfItemList(e, index, partialAccessor) + index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" + ) + ) + } + + private Element getImmediateChildOfTryExpr(TryExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() or - result = getImmediateChildOfLabel(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfLetElse(e, index, partialAccessor) + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfTupleExpr(TupleExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nField | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfMacroItems(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfMatchArm(e, index, partialAccessor) + result = e.getField(index - nAttr) and + partialPredicateCall = "Field(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTupleFieldList( + TupleFieldList e, int index, string partialPredicateCall + ) { + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfMatchArmList(e, index, partialAccessor) + result = e.getField(index - n) and + partialPredicateCall = "Field(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTuplePat(TuplePat e, int index, string partialPredicateCall) { + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfMatchGuard(e, index, partialAccessor) + result = e.getField(index - n) and + partialPredicateCall = "Field(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTupleStructPat( + TupleStructPat e, int index, string partialPredicateCall + ) { + exists(int n, int nPath, int nField | + n = 0 and + nPath = n + 1 and + nField = nPath + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfMutRestriction(e, index, partialAccessor) + index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfName(e, index, partialAccessor) + result = e.getField(index - nPath) and + partialPredicateCall = "Field(" + (index - nPath).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTupleTypeRepr( + TupleTypeRepr e, int index, string partialPredicateCall + ) { + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() or - result = getImmediateChildOfParamList(e, index, partialAccessor) + result = e.getField(index - n) and + partialPredicateCall = "Field(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTypeArg(TypeArg e, int index, string partialPredicateCall) { + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() or - result = getImmediateChildOfParenthesizedArgList(e, index, partialAccessor) + index = n and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" + ) + ) + } + + private Element getImmediateChildOfTypeParam(TypeParam e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultType = nAttr + 1 and + nName = nDefaultType + 1 and + nTypeBoundList = nName + 1 and + ( + none() or - result = getImmediateChildOfPath(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfPathSegment(e, index, partialAccessor) + index = nAttr and result = e.getDefaultType() and partialPredicateCall = "DefaultType()" or - result = getImmediateChildOfRename(e, index, partialAccessor) + index = nDefaultType and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfRetTypeRepr(e, index, partialAccessor) + index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" + ) + ) + } + + private Element getImmediateChildOfUnderscoreExpr( + UnderscoreExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() or - result = getImmediateChildOfReturnTypeSyntax(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index, string partialPredicateCall) { + exists(int n, int nMeta | + n = 0 and + nMeta = n + 1 and + ( + none() or - result = getImmediateChildOfSourceFile(e, index, partialAccessor) + index = n and result = e.getMeta() and partialPredicateCall = "Meta()" + ) + ) + } + + private Element getImmediateChildOfVariant(Variant e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nConstArg = nAttr + 1 and + nFieldList = nConstArg + 1 and + nName = nFieldList + 1 and + nVisibility = nName + 1 and + ( + none() or - result = getImmediateChildOfStmtList(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfStructExprField(e, index, partialAccessor) + index = nAttr and result = e.getConstArg() and partialPredicateCall = "ConstArg()" or - result = getImmediateChildOfStructExprFieldList(e, index, partialAccessor) + index = nConstArg and result = e.getFieldList() and partialPredicateCall = "FieldList()" or - result = getImmediateChildOfStructField(e, index, partialAccessor) + index = nFieldList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfStructPatField(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfWildcardPat( + WildcardPat e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfYeetExpr(YeetExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() or - result = getImmediateChildOfStructPatFieldList(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfTokenTree(e, index, partialAccessor) + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfYieldExpr(YieldExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() or - result = getImmediateChildOfTryBlockModifier(e, index, partialAccessor) + result = e.getAttr(index - n) and + partialPredicateCall = "Attr(" + (index - n).toString() + ")" or - result = getImmediateChildOfTupleField(e, index, partialAccessor) + index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()" + ) + ) + } + + private Element getImmediateChildOfArrayListExpr( + ArrayListExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nExpr, int nAttr | + n = 0 and + nExpr = n + e.getNumberOfExprs() and + nAttr = nExpr + e.getNumberOfAttrs() and + ( + none() or - result = getImmediateChildOfTypeBound(e, index, partialAccessor) + result = e.getExpr(index - n) and + partialPredicateCall = "Expr(" + (index - n).toString() + ")" or - result = getImmediateChildOfTypeBoundList(e, index, partialAccessor) + result = e.getAttr(index - nExpr) and + partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfArrayRepeatExpr( + ArrayRepeatExpr e, int index, string partialPredicateCall + ) { + exists(int n, int nExpr, int nAttr, int nRepeatOperand, int nRepeatLength | + n = 0 and + nExpr = n + e.getNumberOfExprs() and + nAttr = nExpr + e.getNumberOfAttrs() and + nRepeatOperand = nAttr + 1 and + nRepeatLength = nRepeatOperand + 1 and + ( + none() or - result = getImmediateChildOfUseBoundGenericArgs(e, index, partialAccessor) + result = e.getExpr(index - n) and + partialPredicateCall = "Expr(" + (index - n).toString() + ")" or - result = getImmediateChildOfUseTree(e, index, partialAccessor) + result = e.getAttr(index - nExpr) and + partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")" or - result = getImmediateChildOfUseTreeList(e, index, partialAccessor) + index = nAttr and result = e.getRepeatOperand() and partialPredicateCall = "RepeatOperand()" or - result = getImmediateChildOfVariantList(e, index, partialAccessor) + index = nRepeatOperand and + result = e.getRepeatLength() and + partialPredicateCall = "RepeatLength()" + ) + ) + } + + private Element getImmediateChildOfAsmExpr(AsmExpr e, int index, string partialPredicateCall) { + exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() and + nAttr = nAsmPiece + e.getNumberOfAttrs() and + nTemplate = nAttr + e.getNumberOfTemplates() and + ( + none() or - result = getImmediateChildOfVisibility(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfVisibilityInner(e, index, partialAccessor) + result = e.getAsmPiece(index - nAttributeMacroExpansion) and + partialPredicateCall = "AsmPiece(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfWhereClause(e, index, partialAccessor) + result = e.getAttr(index - nAsmPiece) and + partialPredicateCall = "Attr(" + (index - nAsmPiece).toString() + ")" or - result = getImmediateChildOfWherePred(e, index, partialAccessor) + result = e.getTemplate(index - nAttr) and + partialPredicateCall = "Template(" + (index - nAttr).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfBlockExpr(BlockExpr e, int index, string partialPredicateCall) { + exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | + n = 0 and + nLabel = n + 1 and + nAttr = nLabel + e.getNumberOfAttrs() and + nStmtList = nAttr + 1 and + nTryBlockModifier = nStmtList + 1 and + ( + none() or - result = getImmediateChildOfArrayExprInternal(e, index, partialAccessor) + index = n and result = e.getLabel() and partialPredicateCall = "Label()" or - result = getImmediateChildOfArrayTypeRepr(e, index, partialAccessor) + result = e.getAttr(index - nLabel) and + partialPredicateCall = "Attr(" + (index - nLabel).toString() + ")" or - result = getImmediateChildOfAsmClobberAbi(e, index, partialAccessor) + index = nAttr and result = e.getStmtList() and partialPredicateCall = "StmtList()" or - result = getImmediateChildOfAsmConst(e, index, partialAccessor) + index = nStmtList and + result = e.getTryBlockModifier() and + partialPredicateCall = "TryBlockModifier()" + ) + ) + } + + private Element getImmediateChildOfExternBlock( + ExternBlock e, int index, string partialPredicateCall + ) { + exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAbi = nAttributeMacroExpansion + 1 and + nAttr = nAbi + e.getNumberOfAttrs() and + nExternItemList = nAttr + 1 and + ( + none() or - result = getImmediateChildOfAsmLabel(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfAsmOperandNamed(e, index, partialAccessor) + index = nAttributeMacroExpansion and result = e.getAbi() and partialPredicateCall = "Abi()" or - result = getImmediateChildOfAsmOptionsList(e, index, partialAccessor) + result = e.getAttr(index - nAbi) and + partialPredicateCall = "Attr(" + (index - nAbi).toString() + ")" or - result = getImmediateChildOfAsmRegOperand(e, index, partialAccessor) + index = nAttr and + result = e.getExternItemList() and + partialPredicateCall = "ExternItemList()" + ) + ) + } + + private Element getImmediateChildOfExternCrate( + ExternCrate e, int index, string partialPredicateCall + ) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nIdentifier = nAttr + 1 and + nRename = nIdentifier + 1 and + nVisibility = nRename + 1 and + ( + none() or - result = getImmediateChildOfAsmSym(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfAssocTypeArg(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfAttr(e, index, partialAccessor) + index = nAttr and result = e.getIdentifier() and partialPredicateCall = "Identifier()" or - result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) + index = nIdentifier and result = e.getRename() and partialPredicateCall = "Rename()" or - result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) + index = nRename and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfFormatTemplateVariableAccess( + FormatTemplateVariableAccess e, int index, string partialPredicateCall + ) { + none() + } + + private Element getImmediateChildOfImpl(Impl e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, + int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAssocItemList = nAttributeMacroExpansion + 1 and + nAttr = nAssocItemList + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nSelfTy = nGenericParamList + 1 and + nTraitTy = nSelfTy + 1 and + nVisibility = nTraitTy + 1 and + nWhereClause = nVisibility + 1 and + ( + none() or - result = getImmediateChildOfBinaryExpr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfBoxPat(e, index, partialAccessor) + index = nAttributeMacroExpansion and + result = e.getAssocItemList() and + partialPredicateCall = "AssocItemList()" or - result = getImmediateChildOfBreakExpr(e, index, partialAccessor) + result = e.getAttr(index - nAssocItemList) and + partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" or - result = getImmediateChildOfCallExpr(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfCastExpr(e, index, partialAccessor) + index = nGenericParamList and result = e.getSelfTy() and partialPredicateCall = "SelfTy()" or - result = getImmediateChildOfCfgAtom(e, index, partialAccessor) + index = nSelfTy and result = e.getTraitTy() and partialPredicateCall = "TraitTy()" or - result = getImmediateChildOfCfgAttrMeta(e, index, partialAccessor) + index = nTraitTy and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfCfgComposite(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" + ) + ) + } + + private Element getImmediateChildOfMacroDef(MacroDef e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, + int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nArgs = nAttributeMacroExpansion + 1 and + nAttr = nArgs + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nName = nBody + 1 and + nVisibility = nName + 1 and + ( + none() or - result = getImmediateChildOfCfgMeta(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfCfgPredExpr(e, index, partialAccessor) + index = nAttributeMacroExpansion and + result = e.getArgs() and + partialPredicateCall = "Args()" or - result = getImmediateChildOfCfgPredPat(e, index, partialAccessor) + result = e.getAttr(index - nArgs) and + partialPredicateCall = "Attr(" + (index - nArgs).toString() + ")" or - result = getImmediateChildOfClosureExpr(e, index, partialAccessor) + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" or - result = getImmediateChildOfComment(e, index, partialAccessor) + index = nBody and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfConstArg(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfMacroRules(MacroRules e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nName = nAttr + 1 and + nTokenTree = nName + 1 and + nVisibility = nTokenTree + 1 and + ( + none() or - result = getImmediateChildOfConstBlockPat(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfConstParam(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfContinueExpr(e, index, partialAccessor) + index = nAttr and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfDerefPat(e, index, partialAccessor) + index = nName and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" or - result = getImmediateChildOfDocComment(e, index, partialAccessor) + index = nTokenTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nItemList = nAttr + 1 and + nName = nItemList + 1 and + nVisibility = nName + 1 and + ( + none() or - result = getImmediateChildOfDynTraitTypeRepr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfExprStmt(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfFieldExpr(e, index, partialAccessor) + index = nAttr and result = e.getItemList() and partialPredicateCall = "ItemList()" or - result = getImmediateChildOfFnPtrTypeRepr(e, index, partialAccessor) + index = nItemList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfForTypeRepr(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfPathExpr(PathExpr e, int index, string partialPredicateCall) { + exists(int n, int nPath, int nAttr | + n = 0 and + nPath = n + 1 and + nAttr = nPath + e.getNumberOfAttrs() and + ( + none() or - result = getImmediateChildOfFormatArgsExpr(e, index, partialAccessor) + index = n and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfIdentPat(e, index, partialAccessor) + result = e.getAttr(index - nPath) and + partialPredicateCall = "Attr(" + (index - nPath).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfTrait(Trait e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, + int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAssocItemList = nAttributeMacroExpansion + 1 and + nAttr = nAssocItemList + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nImplRestriction = nGenericParamList + 1 and + nName = nImplRestriction + 1 and + nTypeBoundList = nName + 1 and + nVisibility = nTypeBoundList + 1 and + nWhereClause = nVisibility + 1 and + ( + none() or - result = getImmediateChildOfIfExpr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfImplTraitTypeRepr(e, index, partialAccessor) + index = nAttributeMacroExpansion and + result = e.getAssocItemList() and + partialPredicateCall = "AssocItemList()" or - result = getImmediateChildOfIncludeBytesExpr(e, index, partialAccessor) + result = e.getAttr(index - nAssocItemList) and + partialPredicateCall = "Attr(" + (index - nAssocItemList).toString() + ")" or - result = getImmediateChildOfIndexExpr(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfInferTypeRepr(e, index, partialAccessor) + index = nGenericParamList and + result = e.getImplRestriction() and + partialPredicateCall = "ImplRestriction()" or - result = getImmediateChildOfKeyValueMeta(e, index, partialAccessor) + index = nImplRestriction and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfLetExpr(e, index, partialAccessor) + index = nName and result = e.getTypeBoundList() and partialPredicateCall = "TypeBoundList()" or - result = getImmediateChildOfLetStmt(e, index, partialAccessor) + index = nTypeBoundList and + result = e.getVisibility() and + partialPredicateCall = "Visibility()" or - result = getImmediateChildOfLifetime(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" + ) + ) + } + + private Element getImmediateChildOfUse(Use e, int index, string partialPredicateCall) { + exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nUseTree = nAttr + 1 and + nVisibility = nUseTree + 1 and + ( + none() or - result = getImmediateChildOfLifetimeArg(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfLifetimeParam(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) + index = nAttr and result = e.getUseTree() and partialPredicateCall = "UseTree()" or - result = getImmediateChildOfLiteralPat(e, index, partialAccessor) + index = nUseTree and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfConst(Const e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, + int nTypeRepr, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nGenericParamList = nBody + 1 and + nName = nGenericParamList + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + nWhereClause = nVisibility + 1 and + ( + none() or - result = getImmediateChildOfMacroExpr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfMacroPat(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfMacroTypeRepr(e, index, partialAccessor) + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" or - result = getImmediateChildOfMatchExpr(e, index, partialAccessor) + index = nBody and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfNameRef(e, index, partialAccessor) + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" or - result = getImmediateChildOfNeverTypeRepr(e, index, partialAccessor) + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfNotNull(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" + ) + ) + } + + private Element getImmediateChildOfEnum(Enum e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nVariantList = nWhereClause + 1 and + ( + none() or - result = getImmediateChildOfOffsetOfExpr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfOrPat(e, index, partialAccessor) + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and + partialPredicateCall = + "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfParam(e, index, partialAccessor) + result = e.getAttr(index - nDeriveMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" or - result = getImmediateChildOfParenExpr(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfParenPat(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfParenTypeRepr(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfPathMeta(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" or - result = getImmediateChildOfPathPat(e, index, partialAccessor) + index = nWhereClause and + result = e.getVariantList() and + partialPredicateCall = "VariantList()" + ) + ) + } + + private Element getImmediateChildOfForExpr(ForExpr e, int index, string partialPredicateCall) { + exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + nIterable = nAttr + 1 and + nPat = nIterable + 1 and + ( + none() or - result = getImmediateChildOfPathTypeRepr(e, index, partialAccessor) + index = n and result = e.getLabel() and partialPredicateCall = "Label()" or - result = getImmediateChildOfPatternTypeRepr(e, index, partialAccessor) + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" or - result = getImmediateChildOfPrefixExpr(e, index, partialAccessor) + result = e.getAttr(index - nLoopBody) and + partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" or - result = getImmediateChildOfPtrTypeRepr(e, index, partialAccessor) + index = nAttr and result = e.getIterable() and partialPredicateCall = "Iterable()" or - result = getImmediateChildOfRangeExpr(e, index, partialAccessor) + index = nIterable and result = e.getPat() and partialPredicateCall = "Pat()" + ) + ) + } + + private Element getImmediateChildOfFunction(Function e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, + int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nParamList = nAttributeMacroExpansion + 1 and + nAttr = nParamList + e.getNumberOfAttrs() and + nAbi = nAttr + 1 and + nFunctionBody = nAbi + 1 and + nGenericParamList = nFunctionBody + 1 and + nName = nGenericParamList + 1 and + nRetType = nName + 1 and + nVisibility = nRetType + 1 and + nWhereClause = nVisibility + 1 and + ( + none() or - result = getImmediateChildOfRangePat(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfRefExpr(e, index, partialAccessor) + index = nAttributeMacroExpansion and + result = e.getParamList() and + partialPredicateCall = "ParamList()" or - result = getImmediateChildOfRefPat(e, index, partialAccessor) + result = e.getAttr(index - nParamList) and + partialPredicateCall = "Attr(" + (index - nParamList).toString() + ")" or - result = getImmediateChildOfRefTypeRepr(e, index, partialAccessor) + index = nAttr and result = e.getAbi() and partialPredicateCall = "Abi()" or - result = getImmediateChildOfRestPat(e, index, partialAccessor) + index = nAbi and result = e.getFunctionBody() and partialPredicateCall = "FunctionBody()" or - result = getImmediateChildOfReturnExpr(e, index, partialAccessor) + index = nFunctionBody and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfSelfParam(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfSlicePat(e, index, partialAccessor) + index = nName and result = e.getRetType() and partialPredicateCall = "RetType()" or - result = getImmediateChildOfSliceTypeRepr(e, index, partialAccessor) + index = nRetType and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfStructExpr(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" + ) + ) + } + + private Element getImmediateChildOfLoopExpr(LoopExpr e, int index, string partialPredicateCall) { + exists(int n, int nLabel, int nLoopBody, int nAttr | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + ( + none() or - result = getImmediateChildOfStructFieldList(e, index, partialAccessor) + index = n and result = e.getLabel() and partialPredicateCall = "Label()" or - result = getImmediateChildOfStructPat(e, index, partialAccessor) + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" or - result = getImmediateChildOfTokenTreeMeta(e, index, partialAccessor) + result = e.getAttr(index - nLoopBody) and + partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" + ) + ) + } + + private Element getImmediateChildOfMacroCall(MacroCall e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, + int nMacroCallExpansion + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nPath = nAttr + 1 and + nTokenTree = nPath + 1 and + nMacroCallExpansion = nTokenTree + 1 and + ( + none() or - result = getImmediateChildOfTryExpr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfTupleExpr(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfTupleFieldList(e, index, partialAccessor) + index = nAttr and result = e.getPath() and partialPredicateCall = "Path()" or - result = getImmediateChildOfTuplePat(e, index, partialAccessor) + index = nPath and result = e.getTokenTree() and partialPredicateCall = "TokenTree()" or - result = getImmediateChildOfTupleStructPat(e, index, partialAccessor) + index = nTokenTree and + result = e.getMacroCallExpansion() and + partialPredicateCall = "MacroCallExpansion()" + ) + ) + } + + private Element getImmediateChildOfStatic(Static e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, + int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nName = nBody + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() or - result = getImmediateChildOfTupleTypeRepr(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfTypeArg(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfTypeParam(e, index, partialAccessor) + index = nAttr and result = e.getBody() and partialPredicateCall = "Body()" or - result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) + index = nBody and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfUnsafeMeta(e, index, partialAccessor) + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" or - result = getImmediateChildOfVariant(e, index, partialAccessor) + index = nTypeRepr and result = e.getVisibility() and partialPredicateCall = "Visibility()" + ) + ) + } + + private Element getImmediateChildOfStruct(Struct e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nFieldList = nWhereClause + 1 and + ( + none() or - result = getImmediateChildOfWildcardPat(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfYeetExpr(e, index, partialAccessor) + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and + partialPredicateCall = + "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfYieldExpr(e, index, partialAccessor) + result = e.getAttr(index - nDeriveMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" or - result = getImmediateChildOfArrayListExpr(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfArrayRepeatExpr(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfAsmExpr(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfBlockExpr(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" or - result = getImmediateChildOfExternBlock(e, index, partialAccessor) + index = nWhereClause and result = e.getFieldList() and partialPredicateCall = "FieldList()" + ) + ) + } + + private Element getImmediateChildOfTypeAlias(TypeAlias e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, + int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nTypeRepr = nName + 1 and + nTypeBoundList = nTypeRepr + 1 and + nVisibility = nTypeBoundList + 1 and + nWhereClause = nVisibility + 1 and + ( + none() or - result = getImmediateChildOfExternCrate(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfFormatTemplateVariableAccess(e, index, partialAccessor) + result = e.getAttr(index - nAttributeMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfImpl(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfMacroDef(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfMacroRules(e, index, partialAccessor) + index = nName and result = e.getTypeRepr() and partialPredicateCall = "TypeRepr()" or - result = getImmediateChildOfModule(e, index, partialAccessor) + index = nTypeRepr and + result = e.getTypeBoundList() and + partialPredicateCall = "TypeBoundList()" or - result = getImmediateChildOfPathExpr(e, index, partialAccessor) + index = nTypeBoundList and + result = e.getVisibility() and + partialPredicateCall = "Visibility()" or - result = getImmediateChildOfTrait(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" + ) + ) + } + + private Element getImmediateChildOfUnion(Union e, int index, string partialPredicateCall) { + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nStructFieldList = nWhereClause + 1 and + ( + none() or - result = getImmediateChildOfUse(e, index, partialAccessor) + index = n and + result = e.getAttributeMacroExpansion() and + partialPredicateCall = "AttributeMacroExpansion()" or - result = getImmediateChildOfConst(e, index, partialAccessor) + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) and + partialPredicateCall = + "DeriveMacroExpansion(" + (index - nAttributeMacroExpansion).toString() + ")" or - result = getImmediateChildOfEnum(e, index, partialAccessor) + result = e.getAttr(index - nDeriveMacroExpansion) and + partialPredicateCall = "Attr(" + (index - nDeriveMacroExpansion).toString() + ")" or - result = getImmediateChildOfForExpr(e, index, partialAccessor) + index = nAttr and + result = e.getGenericParamList() and + partialPredicateCall = "GenericParamList()" or - result = getImmediateChildOfFunction(e, index, partialAccessor) + index = nGenericParamList and result = e.getName() and partialPredicateCall = "Name()" or - result = getImmediateChildOfLoopExpr(e, index, partialAccessor) + index = nName and result = e.getVisibility() and partialPredicateCall = "Visibility()" or - result = getImmediateChildOfMacroCall(e, index, partialAccessor) + index = nVisibility and + result = e.getWhereClause() and + partialPredicateCall = "WhereClause()" or - result = getImmediateChildOfStatic(e, index, partialAccessor) + index = nWhereClause and + result = e.getStructFieldList() and + partialPredicateCall = "StructFieldList()" + ) + ) + } + + private Element getImmediateChildOfWhileExpr(WhileExpr e, int index, string partialPredicateCall) { + exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + nCondition = nAttr + 1 and + ( + none() or - result = getImmediateChildOfStruct(e, index, partialAccessor) + index = n and result = e.getLabel() and partialPredicateCall = "Label()" or - result = getImmediateChildOfTypeAlias(e, index, partialAccessor) + index = nLabel and result = e.getLoopBody() and partialPredicateCall = "LoopBody()" or - result = getImmediateChildOfUnion(e, index, partialAccessor) + result = e.getAttr(index - nLoopBody) and + partialPredicateCall = "Attr(" + (index - nLoopBody).toString() + ")" or - result = getImmediateChildOfWhileExpr(e, index, partialAccessor) -} + index = nAttr and result = e.getCondition() and partialPredicateCall = "Condition()" + ) + ) + } + + cached + Element getImmediateChild(Element e, int index, string partialAccessor) { + // why does this look more complicated than it should? + // * none() simplifies generation, as we can append `or ...` without a special case for the first item + none() + or + result = getImmediateChildOfExtractorStep(e, index, partialAccessor) + or + result = getImmediateChildOfNamedCrate(e, index, partialAccessor) + or + result = getImmediateChildOfCrate(e, index, partialAccessor) + or + result = getImmediateChildOfFormat(e, index, partialAccessor) + or + result = getImmediateChildOfFormatArgument(e, index, partialAccessor) + or + result = getImmediateChildOfMissing(e, index, partialAccessor) + or + result = getImmediateChildOfUnimplemented(e, index, partialAccessor) + or + result = getImmediateChildOfAbi(e, index, partialAccessor) + or + result = getImmediateChildOfArgList(e, index, partialAccessor) + or + result = getImmediateChildOfAsmDirSpec(e, index, partialAccessor) + or + result = getImmediateChildOfAsmOperandExpr(e, index, partialAccessor) + or + result = getImmediateChildOfAsmOption(e, index, partialAccessor) + or + result = getImmediateChildOfAsmRegSpec(e, index, partialAccessor) + or + result = getImmediateChildOfAssocItemList(e, index, partialAccessor) + or + result = getImmediateChildOfExternItemList(e, index, partialAccessor) + or + result = getImmediateChildOfForBinder(e, index, partialAccessor) + or + result = getImmediateChildOfFormatArgsArg(e, index, partialAccessor) + or + result = getImmediateChildOfGenericArgList(e, index, partialAccessor) + or + result = getImmediateChildOfGenericParamList(e, index, partialAccessor) + or + result = getImmediateChildOfImplRestriction(e, index, partialAccessor) + or + result = getImmediateChildOfItemList(e, index, partialAccessor) + or + result = getImmediateChildOfLabel(e, index, partialAccessor) + or + result = getImmediateChildOfLetElse(e, index, partialAccessor) + or + result = getImmediateChildOfMacroItems(e, index, partialAccessor) + or + result = getImmediateChildOfMatchArm(e, index, partialAccessor) + or + result = getImmediateChildOfMatchArmList(e, index, partialAccessor) + or + result = getImmediateChildOfMatchGuard(e, index, partialAccessor) + or + result = getImmediateChildOfMutRestriction(e, index, partialAccessor) + or + result = getImmediateChildOfName(e, index, partialAccessor) + or + result = getImmediateChildOfParamList(e, index, partialAccessor) + or + result = getImmediateChildOfParenthesizedArgList(e, index, partialAccessor) + or + result = getImmediateChildOfPath(e, index, partialAccessor) + or + result = getImmediateChildOfPathSegment(e, index, partialAccessor) + or + result = getImmediateChildOfRename(e, index, partialAccessor) + or + result = getImmediateChildOfRetTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfReturnTypeSyntax(e, index, partialAccessor) + or + result = getImmediateChildOfSourceFile(e, index, partialAccessor) + or + result = getImmediateChildOfStmtList(e, index, partialAccessor) + or + result = getImmediateChildOfStructExprField(e, index, partialAccessor) + or + result = getImmediateChildOfStructExprFieldList(e, index, partialAccessor) + or + result = getImmediateChildOfStructField(e, index, partialAccessor) + or + result = getImmediateChildOfStructPatField(e, index, partialAccessor) + or + result = getImmediateChildOfStructPatFieldList(e, index, partialAccessor) + or + result = getImmediateChildOfTokenTree(e, index, partialAccessor) + or + result = getImmediateChildOfTryBlockModifier(e, index, partialAccessor) + or + result = getImmediateChildOfTupleField(e, index, partialAccessor) + or + result = getImmediateChildOfTypeBound(e, index, partialAccessor) + or + result = getImmediateChildOfTypeBoundList(e, index, partialAccessor) + or + result = getImmediateChildOfUseBoundGenericArgs(e, index, partialAccessor) + or + result = getImmediateChildOfUseTree(e, index, partialAccessor) + or + result = getImmediateChildOfUseTreeList(e, index, partialAccessor) + or + result = getImmediateChildOfVariantList(e, index, partialAccessor) + or + result = getImmediateChildOfVisibility(e, index, partialAccessor) + or + result = getImmediateChildOfVisibilityInner(e, index, partialAccessor) + or + result = getImmediateChildOfWhereClause(e, index, partialAccessor) + or + result = getImmediateChildOfWherePred(e, index, partialAccessor) + or + result = getImmediateChildOfArrayExprInternal(e, index, partialAccessor) + or + result = getImmediateChildOfArrayTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfAsmClobberAbi(e, index, partialAccessor) + or + result = getImmediateChildOfAsmConst(e, index, partialAccessor) + or + result = getImmediateChildOfAsmLabel(e, index, partialAccessor) + or + result = getImmediateChildOfAsmOperandNamed(e, index, partialAccessor) + or + result = getImmediateChildOfAsmOptionsList(e, index, partialAccessor) + or + result = getImmediateChildOfAsmRegOperand(e, index, partialAccessor) + or + result = getImmediateChildOfAsmSym(e, index, partialAccessor) + or + result = getImmediateChildOfAssocTypeArg(e, index, partialAccessor) + or + result = getImmediateChildOfAttr(e, index, partialAccessor) + or + result = getImmediateChildOfAwaitExpr(e, index, partialAccessor) + or + result = getImmediateChildOfBecomeExpr(e, index, partialAccessor) + or + result = getImmediateChildOfBinaryExpr(e, index, partialAccessor) + or + result = getImmediateChildOfBoxPat(e, index, partialAccessor) + or + result = getImmediateChildOfBreakExpr(e, index, partialAccessor) + or + result = getImmediateChildOfCallExpr(e, index, partialAccessor) + or + result = getImmediateChildOfCastExpr(e, index, partialAccessor) + or + result = getImmediateChildOfCfgAtom(e, index, partialAccessor) + or + result = getImmediateChildOfCfgAttrMeta(e, index, partialAccessor) + or + result = getImmediateChildOfCfgComposite(e, index, partialAccessor) + or + result = getImmediateChildOfCfgMeta(e, index, partialAccessor) + or + result = getImmediateChildOfCfgPredExpr(e, index, partialAccessor) + or + result = getImmediateChildOfCfgPredPat(e, index, partialAccessor) + or + result = getImmediateChildOfClosureExpr(e, index, partialAccessor) + or + result = getImmediateChildOfComment(e, index, partialAccessor) + or + result = getImmediateChildOfConstArg(e, index, partialAccessor) + or + result = getImmediateChildOfConstBlockPat(e, index, partialAccessor) + or + result = getImmediateChildOfConstParam(e, index, partialAccessor) + or + result = getImmediateChildOfContinueExpr(e, index, partialAccessor) + or + result = getImmediateChildOfDerefPat(e, index, partialAccessor) + or + result = getImmediateChildOfDocComment(e, index, partialAccessor) + or + result = getImmediateChildOfDynTraitTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfExprStmt(e, index, partialAccessor) + or + result = getImmediateChildOfFieldExpr(e, index, partialAccessor) + or + result = getImmediateChildOfFnPtrTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfForTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfFormatArgsExpr(e, index, partialAccessor) + or + result = getImmediateChildOfIdentPat(e, index, partialAccessor) + or + result = getImmediateChildOfIfExpr(e, index, partialAccessor) + or + result = getImmediateChildOfImplTraitTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfIncludeBytesExpr(e, index, partialAccessor) + or + result = getImmediateChildOfIndexExpr(e, index, partialAccessor) + or + result = getImmediateChildOfInferTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfKeyValueMeta(e, index, partialAccessor) + or + result = getImmediateChildOfLetExpr(e, index, partialAccessor) + or + result = getImmediateChildOfLetStmt(e, index, partialAccessor) + or + result = getImmediateChildOfLifetime(e, index, partialAccessor) + or + result = getImmediateChildOfLifetimeArg(e, index, partialAccessor) + or + result = getImmediateChildOfLifetimeParam(e, index, partialAccessor) + or + result = getImmediateChildOfLiteralExpr(e, index, partialAccessor) + or + result = getImmediateChildOfLiteralPat(e, index, partialAccessor) + or + result = getImmediateChildOfMacroExpr(e, index, partialAccessor) + or + result = getImmediateChildOfMacroPat(e, index, partialAccessor) + or + result = getImmediateChildOfMacroTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfMatchExpr(e, index, partialAccessor) + or + result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor) + or + result = getImmediateChildOfNameRef(e, index, partialAccessor) + or + result = getImmediateChildOfNeverTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfNotNull(e, index, partialAccessor) + or + result = getImmediateChildOfOffsetOfExpr(e, index, partialAccessor) + or + result = getImmediateChildOfOrPat(e, index, partialAccessor) + or + result = getImmediateChildOfParam(e, index, partialAccessor) + or + result = getImmediateChildOfParenExpr(e, index, partialAccessor) + or + result = getImmediateChildOfParenPat(e, index, partialAccessor) + or + result = getImmediateChildOfParenTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfPathMeta(e, index, partialAccessor) + or + result = getImmediateChildOfPathPat(e, index, partialAccessor) + or + result = getImmediateChildOfPathTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfPatternTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfPrefixExpr(e, index, partialAccessor) + or + result = getImmediateChildOfPtrTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfRangeExpr(e, index, partialAccessor) + or + result = getImmediateChildOfRangePat(e, index, partialAccessor) + or + result = getImmediateChildOfRefExpr(e, index, partialAccessor) + or + result = getImmediateChildOfRefPat(e, index, partialAccessor) + or + result = getImmediateChildOfRefTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfRestPat(e, index, partialAccessor) + or + result = getImmediateChildOfReturnExpr(e, index, partialAccessor) + or + result = getImmediateChildOfSelfParam(e, index, partialAccessor) + or + result = getImmediateChildOfSlicePat(e, index, partialAccessor) + or + result = getImmediateChildOfSliceTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfStructExpr(e, index, partialAccessor) + or + result = getImmediateChildOfStructFieldList(e, index, partialAccessor) + or + result = getImmediateChildOfStructPat(e, index, partialAccessor) + or + result = getImmediateChildOfTokenTreeMeta(e, index, partialAccessor) + or + result = getImmediateChildOfTryExpr(e, index, partialAccessor) + or + result = getImmediateChildOfTupleExpr(e, index, partialAccessor) + or + result = getImmediateChildOfTupleFieldList(e, index, partialAccessor) + or + result = getImmediateChildOfTuplePat(e, index, partialAccessor) + or + result = getImmediateChildOfTupleStructPat(e, index, partialAccessor) + or + result = getImmediateChildOfTupleTypeRepr(e, index, partialAccessor) + or + result = getImmediateChildOfTypeArg(e, index, partialAccessor) + or + result = getImmediateChildOfTypeParam(e, index, partialAccessor) + or + result = getImmediateChildOfUnderscoreExpr(e, index, partialAccessor) + or + result = getImmediateChildOfUnsafeMeta(e, index, partialAccessor) + or + result = getImmediateChildOfVariant(e, index, partialAccessor) + or + result = getImmediateChildOfWildcardPat(e, index, partialAccessor) + or + result = getImmediateChildOfYeetExpr(e, index, partialAccessor) + or + result = getImmediateChildOfYieldExpr(e, index, partialAccessor) + or + result = getImmediateChildOfArrayListExpr(e, index, partialAccessor) + or + result = getImmediateChildOfArrayRepeatExpr(e, index, partialAccessor) + or + result = getImmediateChildOfAsmExpr(e, index, partialAccessor) + or + result = getImmediateChildOfBlockExpr(e, index, partialAccessor) + or + result = getImmediateChildOfExternBlock(e, index, partialAccessor) + or + result = getImmediateChildOfExternCrate(e, index, partialAccessor) + or + result = getImmediateChildOfFormatTemplateVariableAccess(e, index, partialAccessor) + or + result = getImmediateChildOfImpl(e, index, partialAccessor) + or + result = getImmediateChildOfMacroDef(e, index, partialAccessor) + or + result = getImmediateChildOfMacroRules(e, index, partialAccessor) + or + result = getImmediateChildOfModule(e, index, partialAccessor) + or + result = getImmediateChildOfPathExpr(e, index, partialAccessor) + or + result = getImmediateChildOfTrait(e, index, partialAccessor) + or + result = getImmediateChildOfUse(e, index, partialAccessor) + or + result = getImmediateChildOfConst(e, index, partialAccessor) + or + result = getImmediateChildOfEnum(e, index, partialAccessor) + or + result = getImmediateChildOfForExpr(e, index, partialAccessor) + or + result = getImmediateChildOfFunction(e, index, partialAccessor) + or + result = getImmediateChildOfLoopExpr(e, index, partialAccessor) + or + result = getImmediateChildOfMacroCall(e, index, partialAccessor) + or + result = getImmediateChildOfStatic(e, index, partialAccessor) + or + result = getImmediateChildOfStruct(e, index, partialAccessor) + or + result = getImmediateChildOfTypeAlias(e, index, partialAccessor) + or + result = getImmediateChildOfUnion(e, index, partialAccessor) + or + result = getImmediateChildOfWhileExpr(e, index, partialAccessor) + } } /** -* Gets the "immediate" parent of `e`. "Immediate" means not taking into account node resolution: for example -* if `e` has conversions, `getImmediateParent(e)` will give the innermost conversion in the hidden AST. -*/ + * Gets the "immediate" parent of `e`. "Immediate" means not taking into account node resolution: for example + * if `e` has conversions, `getImmediateParent(e)` will give the innermost conversion in the hidden AST. + */ Element getImmediateParent(Element e) { - // `unique` is used here to tell the optimizer that there is in fact only one result - // this is tested by the `library-tests/parent/no_double_parents.ql` test - result = unique(Element x | e = Impl::getImmediateChild(x, _, _) | x) + // `unique` is used here to tell the optimizer that there is in fact only one result + // this is tested by the `library-tests/parent/no_double_parents.ql` test + result = unique(Element x | e = Impl::getImmediateChild(x, _, _) | x) } /** -* Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. -*/ + * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. + */ Element getImmediateChild(Element e, int index) { result = Impl::getImmediateChild(e, index, _) } /** -* Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. -*/ + * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. + */ Element getImmediateChildAndAccessor(Element e, int index, string accessor) { - exists(string partialAccessor | result = Impl::getImmediateChild(e, index, partialAccessor) and accessor = "get" + partialAccessor) + exists(string partialAccessor | + result = Impl::getImmediateChild(e, index, partialAccessor) and + accessor = "get" + partialAccessor + ) } /** -* Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. -*/ + * Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. + */ Element getChildAndAccessor(Element e, int index, string accessor) { - exists(string partialAccessor | result = Impl::getImmediateChild(e, index, partialAccessor).resolve() and accessor = "get" + partialAccessor) + exists(string partialAccessor | + result = Impl::getImmediateChild(e, index, partialAccessor).resolve() and + accessor = "get" + partialAccessor + ) } /** -* Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. -*/ -Element getChild(Element e, int index) { - result = Impl::getImmediateChild(e, index, _).resolve() -} + * Gets the child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. `accessor` is bound the member predicate call resulting in the given child. + */ +Element getChild(Element e, int index) { result = Impl::getImmediateChild(e, index, _).resolve() } 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 6bcab8836037..e05baeebf6f0 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -10,85 +10,55 @@ module Raw { */ class Element extends @element { string toString() { none() } - - } - - /** * INTERNAL: Do not use. */ class ExtractorStep extends @extractor_step, Element { - override string toString() { result = "ExtractorStep" } /** * Gets the action of this extractor step. - * */ - string getAction() { - extractor_steps(this, result, _) - } + string getAction() { extractor_steps(this, result, _) } + /** * Gets the file of this extractor step, if it exists. - * */ - File getFile() { - extractor_step_files(this, result) - } + File getFile() { extractor_step_files(this, result) } + /** * Gets the duration ms of this extractor step. - * */ - int getDurationMs() { - extractor_steps(this, _, result) - } + int getDurationMs() { extractor_steps(this, _, result) } } - - private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index) { - none() - } + private Element getImmediateChildOfExtractorStep(ExtractorStep e, int index) { none() } /** * INTERNAL: Do not use. */ - class Locatable extends @locatable, Element { - - - - } - - + class Locatable extends @locatable, Element { } /** * INTERNAL: Do not use. */ class NamedCrate extends @named_crate, Element { - override string toString() { result = "NamedCrate" } /** * Gets the name of this named crate. - * */ - string getName() { - named_crates(this, result, _) - } + string getName() { named_crates(this, result, _) } + /** * Gets the crate of this named crate. - * */ - Crate getCrate() { - named_crates(this, _, result) - } + Crate getCrate() { named_crates(this, _, result) } } - - private Element getImmediateChildOfNamedCrate(NamedCrate e, int index) { - none() - } + private Element getImmediateChildOfNamedCrate(NamedCrate e, int index) { none() } /** * INTERNAL: Do not use. @@ -97,66 +67,44 @@ module Raw { * * insufficient context information * * yet unimplemented parts of the extractor */ - class Unextracted extends @unextracted, Element { - - - - } - - + class Unextracted extends @unextracted, Element { } /** * INTERNAL: Do not use. */ - class AstNode extends @ast_node, Locatable { - - - - } - - + class AstNode extends @ast_node, Locatable { } /** * INTERNAL: Do not use. */ class Crate extends @crate, Locatable { - override string toString() { result = "Crate" } /** * Gets the name of this crate, if it exists. - * */ - string getName() { - crate_names(this, result) - } + string getName() { crate_names(this, result) } + /** * Gets the version of this crate, if it exists. - * */ - string getVersion() { - crate_versions(this, result) - } + string getVersion() { crate_versions(this, result) } + /** * Gets the `index`th cfg option of this crate (0-based). - * */ - string getCfgOption(int index) { - crate_cfg_options(this, index, result) - } + string getCfgOption(int index) { crate_cfg_options(this, index, result) } + /** * Gets the number of cfg options of this crate. */ - int getNumberOfCfgOptions() { - result = count(int i | crate_cfg_options(this, i, _)) - } + int getNumberOfCfgOptions() { result = count(int i | crate_cfg_options(this, i, _)) } + /** * Gets the `index`th named dependency of this crate (0-based). - * */ - NamedCrate getNamedDependency(int index) { - crate_named_dependencies(this, index, result) - } + NamedCrate getNamedDependency(int index) { crate_named_dependencies(this, index, result) } + /** * Gets the number of named dependencies of this crate. * INTERNAL: Do not use. @@ -166,45 +114,32 @@ module Raw { } } - - private Element getImmediateChildOfCrate(Crate e, int index) { - none() - } + private Element getImmediateChildOfCrate(Crate e, int index) { none() } /** * INTERNAL: Do not use. * The base class marking errors during parsing or resolution. */ class Missing extends @missing, Unextracted { - override string toString() { result = "Missing" } - } - - private Element getImmediateChildOfMissing(Missing e, int index) { - none() - } + private Element getImmediateChildOfMissing(Missing e, int index) { none() } /** * INTERNAL: Do not use. * The base class for unimplemented nodes. This is used to mark nodes that are not yet extracted. */ class Unimplemented extends @unimplemented, Unextracted { - override string toString() { result = "Unimplemented" } - } - - private Element getImmediateChildOfUnimplemented(Unimplemented e, int index) { - none() - } + private Element getImmediateChildOfUnimplemented(Unimplemented e, int index) { none() } /** * INTERNAL: Do not use. * An ABI specification for an extern function or block. - * + * * For example: * ```rust * extern "C" fn foo() {} @@ -212,52 +147,33 @@ module Raw { * ``` */ class Abi extends @abi, AstNode { - override string toString() { result = "Abi" } /** * Gets the abi string of this abi, if it exists. - * */ - string getAbiString() { - abi_abi_strings(this, result) - } + string getAbiString() { abi_abi_strings(this, result) } } - - private Element getImmediateChildOfAbi(Abi e, int index) { - none() - } + private Element getImmediateChildOfAbi(Abi e, int index) { none() } /** * INTERNAL: Do not use. * Something that can be addressed by a path. - * + * * TODO: This does not yet include all possible cases. */ - class Addressable extends @addressable, AstNode { - - - - } - - + class Addressable extends @addressable, AstNode { } /** * INTERNAL: Do not use. */ - class AnyAttr extends @any_attr, AstNode { - - - - } - - + class AnyAttr extends @any_attr, AstNode { } /** * INTERNAL: Do not use. * A list of arguments in a function or method call. - * + * * For example: * ```rust * foo(1, 2, 3); @@ -265,42 +181,35 @@ module Raw { * ``` */ class ArgList extends @arg_list, AstNode { - override string toString() { result = "ArgList" } /** * Gets the `index`th argument of this argument list (0-based). - * */ - Expr getArg(int index) { - arg_list_args(this, index, result) - } + Expr getArg(int index) { arg_list_args(this, index, result) } + /** * Gets the number of arguments of this argument list. */ - int getNumberOfArgs() { - result = count(int i | arg_list_args(this, i, _)) - } + int getNumberOfArgs() { result = count(int i | arg_list_args(this, i, _)) } } - private Element getImmediateChildOfArgList(ArgList e, int index) { - - exists(int n, int nArg | - n = 0 - and - nArg = n + e.getNumberOfArgs() - and ( - none() - or - result = e.getArg(index - n) - )) - } + exists(int n, int nArg | + n = 0 and + nArg = n + e.getNumberOfArgs() and + ( + none() + or + result = e.getArg(index - n) + ) + ) + } /** * INTERNAL: Do not use. * An inline assembly direction specifier. - * + * * For example: * ```rust * use core::arch::asm; @@ -309,31 +218,20 @@ module Raw { * ``` */ class AsmDirSpec extends @asm_dir_spec, AstNode { - override string toString() { result = "AsmDirSpec" } - } - - private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index) { - none() - } + private Element getImmediateChildOfAsmDirSpec(AsmDirSpec e, int index) { none() } /** * INTERNAL: Do not use. */ - class AsmOperand extends @asm_operand, AstNode { - - - - } - - + class AsmOperand extends @asm_operand, AstNode { } /** * INTERNAL: Do not use. * An operand expression in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -342,47 +240,38 @@ module Raw { * ``` */ class AsmOperandExpr extends @asm_operand_expr, AstNode { - override string toString() { result = "AsmOperandExpr" } /** * Gets the in expression of this asm operand expression, if it exists. - * */ - Expr getInExpr() { - asm_operand_expr_in_exprs(this, result) - } + Expr getInExpr() { asm_operand_expr_in_exprs(this, result) } + /** * Gets the out expression of this asm operand expression, if it exists. - * */ - Expr getOutExpr() { - asm_operand_expr_out_exprs(this, result) - } + Expr getOutExpr() { asm_operand_expr_out_exprs(this, result) } } - private Element getImmediateChildOfAsmOperandExpr(AsmOperandExpr e, int index) { - - exists(int n, int nInExpr, int nOutExpr | - n = 0 - and - nInExpr = n + 1 - and - nOutExpr = nInExpr + 1 - and ( - none() - or - index = n and result = e.getInExpr() - or - index = nInExpr and result = e.getOutExpr() - )) - } + exists(int n, int nInExpr, int nOutExpr | + n = 0 and + nInExpr = n + 1 and + nOutExpr = nInExpr + 1 and + ( + none() + or + index = n and result = e.getInExpr() + or + index = nInExpr and result = e.getOutExpr() + ) + ) + } /** * INTERNAL: Do not use. * An option in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -391,38 +280,25 @@ module Raw { * ``` */ class AsmOption extends @asm_option, AstNode { - override string toString() { result = "AsmOption" } /** * Holds if this asm option is raw. - * */ - predicate isRaw() { - asm_option_is_raw(this) - } + predicate isRaw() { asm_option_is_raw(this) } } - - private Element getImmediateChildOfAsmOption(AsmOption e, int index) { - none() - } + private Element getImmediateChildOfAsmOption(AsmOption e, int index) { none() } /** * INTERNAL: Do not use. */ - class AsmPiece extends @asm_piece, AstNode { - - - - } - - + class AsmPiece extends @asm_piece, AstNode { } /** * INTERNAL: Do not use. * A register specification in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -431,145 +307,105 @@ module Raw { * ``` */ class AsmRegSpec extends @asm_reg_spec, AstNode { - override string toString() { result = "AsmRegSpec" } /** * Gets the identifier of this asm reg spec, if it exists. - * */ - NameRef getIdentifier() { - asm_reg_spec_identifiers(this, result) - } + NameRef getIdentifier() { asm_reg_spec_identifiers(this, result) } } - private Element getImmediateChildOfAsmRegSpec(AsmRegSpec e, int index) { - - exists(int n, int nIdentifier | - n = 0 - and - nIdentifier = n + 1 - and ( - none() - or - index = n and result = e.getIdentifier() - )) - } + exists(int n, int nIdentifier | + n = 0 and + nIdentifier = n + 1 and + ( + none() + or + index = n and result = e.getIdentifier() + ) + ) + } /** * INTERNAL: Do not use. * A list of `AssocItem` elements, as appearing in a `Trait` or `Impl`. */ class AssocItemList extends @assoc_item_list, AstNode { - override string toString() { result = "AssocItemList" } /** * Gets the `index`th assoc item of this assoc item list (0-based). - * */ - AssocItem getAssocItem(int index) { - assoc_item_list_assoc_items(this, index, result) - } + AssocItem getAssocItem(int index) { assoc_item_list_assoc_items(this, index, result) } + /** * Gets the number of assoc items of this assoc item list. */ - int getNumberOfAssocItems() { - result = count(int i | assoc_item_list_assoc_items(this, i, _)) - } + int getNumberOfAssocItems() { result = count(int i | assoc_item_list_assoc_items(this, i, _)) } + /** * Gets the `index`th attr of this assoc item list (0-based). - * */ - AnyAttr getAttr(int index) { - assoc_item_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { assoc_item_list_attrs(this, index, result) } + /** * Gets the number of attrs of this assoc item list. */ - int getNumberOfAttrs() { - result = count(int i | assoc_item_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | assoc_item_list_attrs(this, i, _)) } } - private Element getImmediateChildOfAssocItemList(AssocItemList e, int index) { - - exists(int n, int nAssocItem, int nAttr | - n = 0 - and - nAssocItem = n + e.getNumberOfAssocItems() - and - nAttr = nAssocItem + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAssocItem(index - n) - or - result = e.getAttr(index - nAssocItem) - )) - } + exists(int n, int nAssocItem, int nAttr | + n = 0 and + nAssocItem = n + e.getNumberOfAssocItems() and + nAttr = nAssocItem + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAssocItem(index - n) + or + result = e.getAttr(index - nAssocItem) + ) + ) + } /** * INTERNAL: Do not use. * A callable. Either a `Function` or a `ClosureExpr`. */ class Callable extends @callable, AstNode { - - - /** * Gets the parameter list of this callable, if it exists. - * */ - ParamList getParamList() { - callable_param_lists(this, result) - } + ParamList getParamList() { callable_param_lists(this, result) } + /** * Gets the `index`th attr of this callable (0-based). - * */ - AnyAttr getAttr(int index) { - callable_attrs(this, index, result) - } + AnyAttr getAttr(int index) { callable_attrs(this, index, result) } + /** * Gets the number of attrs of this callable. */ - int getNumberOfAttrs() { - result = count(int i | callable_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | callable_attrs(this, i, _)) } } - - /** * INTERNAL: Do not use. */ - class CfgPredicate extends @cfg_predicate, AstNode { - - - - } - - + class CfgPredicate extends @cfg_predicate, AstNode { } /** * INTERNAL: Do not use. * The base class for expressions. */ - class Expr extends @expr, AstNode { - - - - } - - + class Expr extends @expr, AstNode { } /** * INTERNAL: Do not use. * A list of items inside an extern block. - * + * * For example: * ```rust * extern "C" { @@ -579,29 +415,23 @@ module Raw { * ``` */ class ExternItemList extends @extern_item_list, AstNode { - override string toString() { result = "ExternItemList" } /** * Gets the `index`th attr of this extern item list (0-based). - * */ - AnyAttr getAttr(int index) { - extern_item_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { extern_item_list_attrs(this, index, result) } + /** * Gets the number of attrs of this extern item list. */ - int getNumberOfAttrs() { - result = count(int i | extern_item_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | extern_item_list_attrs(this, i, _)) } + /** * Gets the `index`th extern item of this extern item list (0-based). - * */ - ExternItem getExternItem(int index) { - extern_item_list_extern_items(this, index, result) - } + ExternItem getExternItem(int index) { extern_item_list_extern_items(this, index, result) } + /** * Gets the number of extern items of this extern item list. */ @@ -610,28 +440,25 @@ module Raw { } } - private Element getImmediateChildOfExternItemList(ExternItemList e, int index) { - - exists(int n, int nAttr, int nExternItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExternItem = nAttr + e.getNumberOfExternItems() - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getExternItem(index - nAttr) - )) - } + exists(int n, int nAttr, int nExternItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExternItem = nAttr + e.getNumberOfExternItems() and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getExternItem(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. * A list of fields in a struct or enum variant. - * + * * For example: * ```rust * struct S {x: i32, y: i32} @@ -640,55 +467,43 @@ module Raw { * // ^^^^^^^^^^^^^ * ``` */ - class FieldList extends @field_list, AstNode { - - - - } - - + class FieldList extends @field_list, AstNode { } /** * INTERNAL: Do not use. * A for binder, specifying lifetime or type parameters for a closure or a type. - * + * * For example: * ```rust * let print_any = for |x: T| { * // ^^^^^^^^^^^^^^^^^^^^^^^ * println!("{:?}", x); * }; - * + * * print_any(42); * print_any("hello"); * ``` */ class ForBinder extends @for_binder, AstNode { - override string toString() { result = "ForBinder" } /** * Gets the generic parameter list of this for binder, if it exists. - * */ - GenericParamList getGenericParamList() { - for_binder_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { for_binder_generic_param_lists(this, result) } } - private Element getImmediateChildOfForBinder(ForBinder e, int index) { - - exists(int n, int nGenericParamList | - n = 0 - and - nGenericParamList = n + 1 - and ( - none() - or - index = n and result = e.getGenericParamList() - )) - } + exists(int n, int nGenericParamList | + n = 0 and + nGenericParamList = n + 1 and + ( + none() + or + index = n and result = e.getGenericParamList() + ) + ) + } /** * INTERNAL: Do not use. @@ -698,60 +513,45 @@ module Raw { * ``` */ class FormatArgsArg extends @format_args_arg, AstNode { - override string toString() { result = "FormatArgsArg" } /** * Gets the expression of this format arguments argument, if it exists. - * */ - Expr getExpr() { - format_args_arg_exprs(this, result) - } + Expr getExpr() { format_args_arg_exprs(this, result) } + /** * Gets the name of this format arguments argument, if it exists. - * */ - Name getName() { - format_args_arg_names(this, result) - } + Name getName() { format_args_arg_names(this, result) } } - private Element getImmediateChildOfFormatArgsArg(FormatArgsArg e, int index) { - - exists(int n, int nExpr, int nName | - n = 0 - and - nExpr = n + 1 - and - nName = nExpr + 1 - and ( - none() - or - index = n and result = e.getExpr() - or - index = nExpr and result = e.getName() - )) - } + exists(int n, int nExpr, int nName | + n = 0 and + nExpr = n + 1 and + nName = nExpr + 1 and + ( + none() + or + index = n and result = e.getExpr() + or + index = nExpr and result = e.getName() + ) + ) + } /** * INTERNAL: Do not use. * A generic argument in a generic argument list. - * + * * For example: * ```rust * Foo:: * // ^^^^^^^^^^^ * ``` */ - class GenericArg extends @generic_arg, AstNode { - - - - } - - + class GenericArg extends @generic_arg, AstNode { } /** * INTERNAL: Do not use. @@ -761,16 +561,13 @@ module Raw { * ``` */ class GenericArgList extends @generic_arg_list, AstNode { - override string toString() { result = "GenericArgList" } /** * Gets the `index`th generic argument of this generic argument list (0-based). - * */ - GenericArg getGenericArg(int index) { - generic_arg_list_generic_args(this, index, result) - } + GenericArg getGenericArg(int index) { generic_arg_list_generic_args(this, index, result) } + /** * Gets the number of generic arguments of this generic argument list. */ @@ -779,37 +576,29 @@ module Raw { } } - private Element getImmediateChildOfGenericArgList(GenericArgList e, int index) { - - exists(int n, int nGenericArg | - n = 0 - and - nGenericArg = n + e.getNumberOfGenericArgs() - and ( - none() - or - result = e.getGenericArg(index - n) - )) - } + exists(int n, int nGenericArg | + n = 0 and + nGenericArg = n + e.getNumberOfGenericArgs() and + ( + none() + or + result = e.getGenericArg(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A generic parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo(t: T, u: U) {} * // ^ ^ * ``` */ - class GenericParam extends @generic_param, AstNode { - - - - } - - + class GenericParam extends @generic_param, AstNode { } /** * INTERNAL: Do not use. @@ -822,16 +611,15 @@ module Raw { * ``` */ class GenericParamList extends @generic_param_list, AstNode { - override string toString() { result = "GenericParamList" } /** * Gets the `index`th generic parameter of this generic parameter list (0-based). - * */ GenericParam getGenericParam(int index) { generic_param_list_generic_params(this, index, result) } + /** * Gets the number of generic parameters of this generic parameter list. */ @@ -840,55 +628,47 @@ module Raw { } } - private Element getImmediateChildOfGenericParamList(GenericParamList e, int index) { - - exists(int n, int nGenericParam | - n = 0 - and - nGenericParam = n + e.getNumberOfGenericParams() - and ( - none() - or - result = e.getGenericParam(index - n) - )) - } + exists(int n, int nGenericParam | + n = 0 and + nGenericParam = n + e.getNumberOfGenericParams() and + ( + none() + or + result = e.getGenericParam(index - n) + ) + ) + } /** * INTERNAL: Do not use. * An implementation restriction, limiting where a trait can be implemented. For example the `impl(crate)` restriction (an unstable feature). */ class ImplRestriction extends @impl_restriction, AstNode { - override string toString() { result = "ImplRestriction" } /** * Gets the visibility inner of this impl restriction, if it exists. - * */ - VisibilityInner getVisibilityInner() { - impl_restriction_visibility_inners(this, result) - } + VisibilityInner getVisibilityInner() { impl_restriction_visibility_inners(this, result) } } - private Element getImmediateChildOfImplRestriction(ImplRestriction e, int index) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() - )) - } + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() + ) + ) + } /** * INTERNAL: Do not use. * A list of items in a module or block. - * + * * For example: * ```rust * mod m { @@ -898,54 +678,43 @@ module Raw { * ``` */ class ItemList extends @item_list, AstNode { - override string toString() { result = "ItemList" } /** * Gets the `index`th attr of this item list (0-based). - * */ - AnyAttr getAttr(int index) { - item_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { item_list_attrs(this, index, result) } + /** * Gets the number of attrs of this item list. */ - int getNumberOfAttrs() { - result = count(int i | item_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | item_list_attrs(this, i, _)) } + /** * Gets the `index`th item of this item list (0-based). - * */ - Item getItem(int index) { - item_list_items(this, index, result) - } + Item getItem(int index) { item_list_items(this, index, result) } + /** * Gets the number of items of this item list. */ - int getNumberOfItems() { - result = count(int i | item_list_items(this, i, _)) - } + int getNumberOfItems() { result = count(int i | item_list_items(this, i, _)) } } - private Element getImmediateChildOfItemList(ItemList e, int index) { - - exists(int n, int nAttr, int nItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nItem = nAttr + e.getNumberOfItems() - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getItem(index - nAttr) - )) - } + exists(int n, int nAttr, int nItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nItem = nAttr + e.getNumberOfItems() and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getItem(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. @@ -958,36 +727,30 @@ module Raw { * ``` */ class Label extends @label, AstNode { - override string toString() { result = "Label" } /** * Gets the lifetime of this label, if it exists. - * */ - Lifetime getLifetime() { - label_lifetimes(this, result) - } + Lifetime getLifetime() { label_lifetimes(this, result) } } - private Element getImmediateChildOfLabel(Label e, int index) { - - exists(int n, int nLifetime | - n = 0 - and - nLifetime = n + 1 - and ( - none() - or - index = n and result = e.getLifetime() - )) - } + exists(int n, int nLifetime | + n = 0 and + nLifetime = n + 1 and + ( + none() + or + index = n and result = e.getLifetime() + ) + ) + } /** * INTERNAL: Do not use. * An else block in a let-else statement. - * + * * For example: * ```rust * let Some(x) = opt else { @@ -997,31 +760,25 @@ module Raw { * ``` */ class LetElse extends @let_else, AstNode { - override string toString() { result = "LetElse" } /** * Gets the block expression of this let else, if it exists. - * */ - BlockExpr getBlockExpr() { - let_else_block_exprs(this, result) - } + BlockExpr getBlockExpr() { let_else_block_exprs(this, result) } } - private Element getImmediateChildOfLetElse(LetElse e, int index) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() - )) - } + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -1029,49 +786,42 @@ module Raw { * ```rust * mod foo{ * include!("common_definitions.rs"); - * + * * #[an_attribute_macro] * fn foo() { * println!("Hello, world!"); * } - * + * * #[derive(Debug)] * struct Bar; * } * ``` */ class MacroItems extends @macro_items, AstNode { - override string toString() { result = "MacroItems" } /** * Gets the `index`th item of this macro items (0-based). - * */ - Item getItem(int index) { - macro_items_items(this, index, result) - } + Item getItem(int index) { macro_items_items(this, index, result) } + /** * Gets the number of items of this macro items. */ - int getNumberOfItems() { - result = count(int i | macro_items_items(this, i, _)) - } + int getNumberOfItems() { result = count(int i | macro_items_items(this, i, _)) } } - private Element getImmediateChildOfMacroItems(MacroItems e, int index) { - - exists(int n, int nItem | - n = 0 - and - nItem = n + e.getNumberOfItems() - and ( - none() - or - result = e.getItem(index - n) - )) - } + exists(int n, int nItem | + n = 0 and + nItem = n + e.getNumberOfItems() and + ( + none() + or + result = e.getItem(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -1090,75 +840,59 @@ module Raw { * ``` */ class MatchArm extends @match_arm, AstNode { - override string toString() { result = "MatchArm" } /** * Gets the `index`th attr of this match arm (0-based). - * */ - AnyAttr getAttr(int index) { - match_arm_attrs(this, index, result) - } + AnyAttr getAttr(int index) { match_arm_attrs(this, index, result) } + /** * Gets the number of attrs of this match arm. */ - int getNumberOfAttrs() { - result = count(int i | match_arm_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | match_arm_attrs(this, i, _)) } + /** * Gets the expression of this match arm, if it exists. - * */ - Expr getExpr() { - match_arm_exprs(this, result) - } + Expr getExpr() { match_arm_exprs(this, result) } + /** * Gets the guard of this match arm, if it exists. - * */ - MatchGuard getGuard() { - match_arm_guards(this, result) - } + MatchGuard getGuard() { match_arm_guards(this, result) } + /** * Gets the pattern of this match arm, if it exists. - * */ - Pat getPat() { - match_arm_pats(this, result) - } + Pat getPat() { match_arm_pats(this, result) } } - private Element getImmediateChildOfMatchArm(MatchArm e, int index) { - - exists(int n, int nAttr, int nExpr, int nGuard, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nGuard = nExpr + 1 - and - nPat = nGuard + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getGuard() - or - index = nGuard and result = e.getPat() - )) - } + exists(int n, int nAttr, int nExpr, int nGuard, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nGuard = nExpr + 1 and + nPat = nGuard + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getGuard() + or + index = nGuard and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A list of arms in a match expression. - * + * * For example: * ```rust * match x { @@ -1170,59 +904,48 @@ module Raw { * ``` */ class MatchArmList extends @match_arm_list, AstNode { - override string toString() { result = "MatchArmList" } /** * Gets the `index`th arm of this match arm list (0-based). - * */ - MatchArm getArm(int index) { - match_arm_list_arms(this, index, result) - } + MatchArm getArm(int index) { match_arm_list_arms(this, index, result) } + /** * Gets the number of arms of this match arm list. */ - int getNumberOfArms() { - result = count(int i | match_arm_list_arms(this, i, _)) - } + int getNumberOfArms() { result = count(int i | match_arm_list_arms(this, i, _)) } + /** * Gets the `index`th attr of this match arm list (0-based). - * */ - AnyAttr getAttr(int index) { - match_arm_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { match_arm_list_attrs(this, index, result) } + /** * Gets the number of attrs of this match arm list. */ - int getNumberOfAttrs() { - result = count(int i | match_arm_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | match_arm_list_attrs(this, i, _)) } } - private Element getImmediateChildOfMatchArmList(MatchArmList e, int index) { - - exists(int n, int nArm, int nAttr | - n = 0 - and - nArm = n + e.getNumberOfArms() - and - nAttr = nArm + e.getNumberOfAttrs() - and ( - none() - or - result = e.getArm(index - n) - or - result = e.getAttr(index - nArm) - )) - } + exists(int n, int nArm, int nAttr | + n = 0 and + nArm = n + e.getNumberOfArms() and + nAttr = nArm + e.getNumberOfAttrs() and + ( + none() + or + result = e.getArm(index - n) + or + result = e.getAttr(index - nArm) + ) + ) + } /** * INTERNAL: Do not use. * A guard condition in a match arm. - * + * * For example: * ```rust * match x { @@ -1233,36 +956,30 @@ module Raw { * ``` */ class MatchGuard extends @match_guard, AstNode { - override string toString() { result = "MatchGuard" } /** * Gets the condition of this match guard, if it exists. - * */ - Expr getCondition() { - match_guard_conditions(this, result) - } + Expr getCondition() { match_guard_conditions(this, result) } } - private Element getImmediateChildOfMatchGuard(MatchGuard e, int index) { - - exists(int n, int nCondition | - n = 0 - and - nCondition = n + 1 - and ( - none() - or - index = n and result = e.getCondition() - )) - } + exists(int n, int nCondition | + n = 0 and + nCondition = n + 1 and + ( + none() + or + index = n and result = e.getCondition() + ) + ) + } /** * INTERNAL: Do not use. * A meta item in an attribute. - * + * * For example: * ```rust * #[unsafe(lint::name = "reason_for_bypass")] @@ -1274,56 +991,42 @@ module Raw { * } * ``` */ - class Meta extends @meta, AstNode { - - - - } - - + class Meta extends @meta, AstNode { } /** * INTERNAL: Do not use. * A mutability restriction, limiting where a field can be mutated. For example the `mut(crate)` restriction (an unstable feature). */ class MutRestriction extends @mut_restriction, AstNode { - override string toString() { result = "MutRestriction" } /** * Holds if this mut restriction is mut. - * */ - predicate isMut() { - mut_restriction_is_mut(this) - } + predicate isMut() { mut_restriction_is_mut(this) } + /** * Gets the visibility inner of this mut restriction, if it exists. - * */ - VisibilityInner getVisibilityInner() { - mut_restriction_visibility_inners(this, result) - } + VisibilityInner getVisibilityInner() { mut_restriction_visibility_inners(this, result) } } - private Element getImmediateChildOfMutRestriction(MutRestriction e, int index) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() - )) - } + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() + ) + ) + } /** * INTERNAL: Do not use. * An identifier name. - * + * * For example: * ```rust * let foo = 1; @@ -1331,59 +1034,41 @@ module Raw { * ``` */ class Name extends @name, AstNode { - override string toString() { result = "Name" } /** * Gets the text of this name, if it exists. - * */ - string getText() { - name_texts(this, result) - } + string getText() { name_texts(this, result) } } - - private Element getImmediateChildOfName(Name e, int index) { - none() - } + private Element getImmediateChildOfName(Name e, int index) { none() } /** * INTERNAL: Do not use. * A normal parameter, `Param`, or a self parameter `SelfParam`. */ class ParamBase extends @param_base, AstNode { - - - /** * Gets the `index`th attr of this parameter base (0-based). - * */ - AnyAttr getAttr(int index) { - param_base_attrs(this, index, result) - } + AnyAttr getAttr(int index) { param_base_attrs(this, index, result) } + /** * Gets the number of attrs of this parameter base. */ - int getNumberOfAttrs() { - result = count(int i | param_base_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | param_base_attrs(this, i, _)) } + /** * Gets the type representation of this parameter base, if it exists. - * */ - TypeRepr getTypeRepr() { - param_base_type_reprs(this, result) - } + TypeRepr getTypeRepr() { param_base_type_reprs(this, result) } } - - /** * INTERNAL: Do not use. * A list of parameters in a function, method, or closure declaration. - * + * * For example: * ```rust * fn foo(x: i32, y: i32) {} @@ -1391,53 +1076,43 @@ module Raw { * ``` */ class ParamList extends @param_list, AstNode { - override string toString() { result = "ParamList" } /** * Gets the `index`th parameter of this parameter list (0-based). - * */ - Param getParam(int index) { - param_list_params(this, index, result) - } + Param getParam(int index) { param_list_params(this, index, result) } + /** * Gets the number of parameters of this parameter list. */ - int getNumberOfParams() { - result = count(int i | param_list_params(this, i, _)) - } + int getNumberOfParams() { result = count(int i | param_list_params(this, i, _)) } + /** * Gets the self parameter of this parameter list, if it exists. - * */ - SelfParam getSelfParam() { - param_list_self_params(this, result) - } + SelfParam getSelfParam() { param_list_self_params(this, result) } } - private Element getImmediateChildOfParamList(ParamList e, int index) { - - exists(int n, int nParam, int nSelfParam | - n = 0 - and - nParam = n + e.getNumberOfParams() - and - nSelfParam = nParam + 1 - and ( - none() - or - result = e.getParam(index - n) - or - index = nParam and result = e.getSelfParam() - )) - } + exists(int n, int nParam, int nSelfParam | + n = 0 and + nParam = n + e.getNumberOfParams() and + nSelfParam = nParam + 1 and + ( + none() + or + result = e.getParam(index - n) + or + index = nParam and result = e.getSelfParam() + ) + ) + } /** * INTERNAL: Do not use. * A parenthesized argument list as used in function traits. - * + * * For example: * ```rust * fn call_with_42(f: F) -> i32 @@ -1450,16 +1125,13 @@ module Raw { * ``` */ class ParenthesizedArgList extends @parenthesized_arg_list, AstNode { - override string toString() { result = "ParenthesizedArgList" } /** * Gets the `index`th type argument of this parenthesized argument list (0-based). - * */ - TypeArg getTypeArg(int index) { - parenthesized_arg_list_type_args(this, index, result) - } + TypeArg getTypeArg(int index) { parenthesized_arg_list_type_args(this, index, result) } + /** * Gets the number of type arguments of this parenthesized argument list. */ @@ -1468,31 +1140,23 @@ module Raw { } } - private Element getImmediateChildOfParenthesizedArgList(ParenthesizedArgList e, int index) { - - exists(int n, int nTypeArg | - n = 0 - and - nTypeArg = n + e.getNumberOfTypeArgs() - and ( - none() - or - result = e.getTypeArg(index - n) - )) - } + exists(int n, int nTypeArg | + n = 0 and + nTypeArg = n + e.getNumberOfTypeArgs() and + ( + none() + or + result = e.getTypeArg(index - n) + ) + ) + } /** * INTERNAL: Do not use. * The base class for patterns. */ - class Pat extends @pat, AstNode { - - - - } - - + class Pat extends @pat, AstNode { } /** * INTERNAL: Do not use. @@ -1503,62 +1167,45 @@ module Raw { * ``` */ class Path extends @path, AstNode { - override string toString() { result = "Path" } /** * Gets the qualifier of this path, if it exists. - * */ - Path getQualifier() { - path_qualifiers(this, result) - } + Path getQualifier() { path_qualifiers(this, result) } + /** * Gets the last segment of this path, if it exists. - * */ - PathSegment getSegment() { - path_segments_(this, result) - } + PathSegment getSegment() { path_segments_(this, result) } } - private Element getImmediateChildOfPath(Path e, int index) { - - exists(int n, int nQualifier, int nSegment | - n = 0 - and - nQualifier = n + 1 - and - nSegment = nQualifier + 1 - and ( - none() - or - index = n and result = e.getQualifier() - or - index = nQualifier and result = e.getSegment() - )) - } + exists(int n, int nQualifier, int nSegment | + n = 0 and + nQualifier = n + 1 and + nSegment = nQualifier + 1 and + ( + none() + or + index = n and result = e.getQualifier() + or + index = nQualifier and result = e.getSegment() + ) + ) + } /** * INTERNAL: Do not use. * An AST element wrapping a path (`PathExpr`, `RecordExpr`, `PathPat`, `RecordPat`, `TupleStructPat`). */ class PathAstNode extends @path_ast_node, AstNode { - - - /** * Gets the path of this path ast node, if it exists. - * */ - Path getPath() { - path_ast_node_paths(this, result) - } + Path getPath() { path_ast_node_paths(this, result) } } - - /** * INTERNAL: Do not use. * A path segment, which is one part of a whole path. @@ -1570,102 +1217,83 @@ module Raw { * - `` */ class PathSegment extends @path_segment, AstNode { - override string toString() { result = "PathSegment" } /** * Gets the generic argument list of this path segment, if it exists. - * */ - GenericArgList getGenericArgList() { - path_segment_generic_arg_lists(this, result) - } + GenericArgList getGenericArgList() { path_segment_generic_arg_lists(this, result) } + /** * Gets the identifier of this path segment, if it exists. - * */ - NameRef getIdentifier() { - path_segment_identifiers(this, result) - } + NameRef getIdentifier() { path_segment_identifiers(this, result) } + /** * Gets the parenthesized argument list of this path segment, if it exists. - * */ ParenthesizedArgList getParenthesizedArgList() { path_segment_parenthesized_arg_lists(this, result) } + /** * Gets the ret type of this path segment, if it exists. - * */ - RetTypeRepr getRetType() { - path_segment_ret_types(this, result) - } + RetTypeRepr getRetType() { path_segment_ret_types(this, result) } + /** * Gets the return type syntax of this path segment, if it exists. - * */ - ReturnTypeSyntax getReturnTypeSyntax() { - path_segment_return_type_syntaxes(this, result) - } + ReturnTypeSyntax getReturnTypeSyntax() { path_segment_return_type_syntaxes(this, result) } + /** * Gets the type representation of this path segment, if it exists. - * */ - TypeRepr getTypeRepr() { - path_segment_type_reprs(this, result) - } + TypeRepr getTypeRepr() { path_segment_type_reprs(this, result) } + /** * Gets the trait type representation of this path segment, if it exists. - * */ - PathTypeRepr getTraitTypeRepr() { - path_segment_trait_type_reprs(this, result) - } + PathTypeRepr getTraitTypeRepr() { path_segment_trait_type_reprs(this, result) } } - private Element getImmediateChildOfPathSegment(PathSegment e, int index) { - - exists(int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr | - n = 0 - and - nGenericArgList = n + 1 - and - nIdentifier = nGenericArgList + 1 - and - nParenthesizedArgList = nIdentifier + 1 - and - nRetType = nParenthesizedArgList + 1 - and - nReturnTypeSyntax = nRetType + 1 - and - nTypeRepr = nReturnTypeSyntax + 1 - and - nTraitTypeRepr = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getParenthesizedArgList() - or - index = nParenthesizedArgList and result = e.getRetType() - or - index = nRetType and result = e.getReturnTypeSyntax() - or - index = nReturnTypeSyntax and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTraitTypeRepr() - )) - } + exists( + int n, int nGenericArgList, int nIdentifier, int nParenthesizedArgList, int nRetType, + int nReturnTypeSyntax, int nTypeRepr, int nTraitTypeRepr + | + n = 0 and + nGenericArgList = n + 1 and + nIdentifier = nGenericArgList + 1 and + nParenthesizedArgList = nIdentifier + 1 and + nRetType = nParenthesizedArgList + 1 and + nReturnTypeSyntax = nRetType + 1 and + nTypeRepr = nReturnTypeSyntax + 1 and + nTraitTypeRepr = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getParenthesizedArgList() + or + index = nParenthesizedArgList and result = e.getRetType() + or + index = nRetType and result = e.getReturnTypeSyntax() + or + index = nReturnTypeSyntax and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTraitTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A rename in a use declaration. - * + * * For example: * ```rust * use foo as bar; @@ -1673,36 +1301,30 @@ module Raw { * ``` */ class Rename extends @rename, AstNode { - override string toString() { result = "Rename" } /** * Gets the name of this rename, if it exists. - * */ - Name getName() { - rename_names(this, result) - } + Name getName() { rename_names(this, result) } } - private Element getImmediateChildOfRename(Rename e, int index) { - - exists(int n, int nName | - n = 0 - and - nName = n + 1 - and ( - none() - or - index = n and result = e.getName() - )) - } + exists(int n, int nName | + n = 0 and + nName = n + 1 and + ( + none() + or + index = n and result = e.getName() + ) + ) + } /** * INTERNAL: Do not use. * A return type in a function signature. - * + * * For example: * ```rust * fn foo() -> i32 { 0 } @@ -1710,42 +1332,36 @@ module Raw { * ``` */ class RetTypeRepr extends @ret_type_repr, AstNode { - override string toString() { result = "RetTypeRepr" } /** * Gets the type representation of this ret type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - ret_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { ret_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfRetTypeRepr(RetTypeRepr e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A return type notation `(..)` to reference or bound the type returned by a trait method - * + * * For example: * ```rust * struct ReverseWidgets> { * factory: F, * } - * + * * impl Factory for ReverseWidgets * where * F: Factory, @@ -1757,20 +1373,15 @@ module Raw { * ``` */ class ReturnTypeSyntax extends @return_type_syntax, AstNode { - override string toString() { result = "ReturnTypeSyntax" } - } - - private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index) { - none() - } + private Element getImmediateChildOfReturnTypeSyntax(ReturnTypeSyntax e, int index) { none() } /** * INTERNAL: Do not use. * A source file. - * + * * For example: * ```rust * // main.rs @@ -1778,72 +1389,55 @@ module Raw { * ``` */ class SourceFile extends @source_file, AstNode { - override string toString() { result = "SourceFile" } /** * Gets the `index`th attr of this source file (0-based). - * */ - AnyAttr getAttr(int index) { - source_file_attrs(this, index, result) - } + AnyAttr getAttr(int index) { source_file_attrs(this, index, result) } + /** * Gets the number of attrs of this source file. */ - int getNumberOfAttrs() { - result = count(int i | source_file_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | source_file_attrs(this, i, _)) } + /** * Gets the `index`th item of this source file (0-based). - * */ - Item getItem(int index) { - source_file_items(this, index, result) - } + Item getItem(int index) { source_file_items(this, index, result) } + /** * Gets the number of items of this source file. */ - int getNumberOfItems() { - result = count(int i | source_file_items(this, i, _)) - } + int getNumberOfItems() { result = count(int i | source_file_items(this, i, _)) } } - private Element getImmediateChildOfSourceFile(SourceFile e, int index) { - - exists(int n, int nAttr, int nItem | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nItem = nAttr + e.getNumberOfItems() - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getItem(index - nAttr) - )) - } + exists(int n, int nAttr, int nItem | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nItem = nAttr + e.getNumberOfItems() and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getItem(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. * The base class for statements. */ - class Stmt extends @stmt, AstNode { - - - - } - - + class Stmt extends @stmt, AstNode { } /** * INTERNAL: Do not use. * A list of statements in a block, with an optional tail expression at the * end that determines the block's value. - * + * * For example: * ```rust * { @@ -1855,69 +1449,57 @@ module Raw { * ``` */ class StmtList extends @stmt_list, AstNode { - override string toString() { result = "StmtList" } /** * Gets the `index`th attr of this statement list (0-based). - * */ - AnyAttr getAttr(int index) { - stmt_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { stmt_list_attrs(this, index, result) } + /** * Gets the number of attrs of this statement list. */ - int getNumberOfAttrs() { - result = count(int i | stmt_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | stmt_list_attrs(this, i, _)) } + /** * Gets the `index`th statement of this statement list (0-based). * * The statements of a `StmtList` do not include any tail expression, which * can be accessed with predicates such as `getTailExpr`. */ - Stmt getStatement(int index) { - stmt_list_statements(this, index, result) - } + Stmt getStatement(int index) { stmt_list_statements(this, index, result) } + /** * Gets the number of statements of this statement list. */ - int getNumberOfStatements() { - result = count(int i | stmt_list_statements(this, i, _)) - } + int getNumberOfStatements() { result = count(int i | stmt_list_statements(this, i, _)) } + /** * Gets the tail expression of this statement list, if it exists. * * The tail expression is the expression at the end of a block, that * determines the block's value. */ - Expr getTailExpr() { - stmt_list_tail_exprs(this, result) - } + Expr getTailExpr() { stmt_list_tail_exprs(this, result) } } - private Element getImmediateChildOfStmtList(StmtList e, int index) { - - exists(int n, int nAttr, int nStatement, int nTailExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nStatement = nAttr + e.getNumberOfStatements() - and - nTailExpr = nStatement + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getStatement(index - nAttr) - or - index = nStatement and result = e.getTailExpr() - )) - } + exists(int n, int nAttr, int nStatement, int nTailExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nStatement = nAttr + e.getNumberOfStatements() and + nTailExpr = nStatement + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getStatement(index - nAttr) + or + index = nStatement and result = e.getTailExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -1927,64 +1509,51 @@ module Raw { * ``` */ class StructExprField extends @struct_expr_field, AstNode { - override string toString() { result = "StructExprField" } /** * Gets the `index`th attr of this struct expression field (0-based). - * */ - AnyAttr getAttr(int index) { - struct_expr_field_attrs(this, index, result) - } + AnyAttr getAttr(int index) { struct_expr_field_attrs(this, index, result) } + /** * Gets the number of attrs of this struct expression field. */ - int getNumberOfAttrs() { - result = count(int i | struct_expr_field_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | struct_expr_field_attrs(this, i, _)) } + /** * Gets the expression of this struct expression field, if it exists. - * */ - Expr getExpr() { - struct_expr_field_exprs(this, result) - } + Expr getExpr() { struct_expr_field_exprs(this, result) } + /** * Gets the identifier of this struct expression field, if it exists. - * */ - NameRef getIdentifier() { - struct_expr_field_identifiers(this, result) - } + NameRef getIdentifier() { struct_expr_field_identifiers(this, result) } } - private Element getImmediateChildOfStructExprField(StructExprField e, int index) { - - exists(int n, int nAttr, int nExpr, int nIdentifier | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nIdentifier = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getIdentifier() - )) - } + exists(int n, int nAttr, int nExpr, int nIdentifier | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nIdentifier = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getIdentifier() + ) + ) + } /** * INTERNAL: Do not use. * A list of fields in a struct expression. - * + * * For example: * ```rust * Foo { a: 1, b: 2 } @@ -1992,70 +1561,56 @@ module Raw { * ``` */ class StructExprFieldList extends @struct_expr_field_list, AstNode { - override string toString() { result = "StructExprFieldList" } /** * Gets the `index`th attr of this struct expression field list (0-based). - * */ - AnyAttr getAttr(int index) { - struct_expr_field_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { struct_expr_field_list_attrs(this, index, result) } + /** * Gets the number of attrs of this struct expression field list. */ - int getNumberOfAttrs() { - result = count(int i | struct_expr_field_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | struct_expr_field_list_attrs(this, i, _)) } + /** * Gets the `index`th field of this struct expression field list (0-based). - * */ - StructExprField getField(int index) { - struct_expr_field_list_fields(this, index, result) - } + StructExprField getField(int index) { struct_expr_field_list_fields(this, index, result) } + /** * Gets the number of fields of this struct expression field list. */ - int getNumberOfFields() { - result = count(int i | struct_expr_field_list_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | struct_expr_field_list_fields(this, i, _)) } + /** * Gets the spread of this struct expression field list, if it exists. - * */ - Expr getSpread() { - struct_expr_field_list_spreads(this, result) - } + Expr getSpread() { struct_expr_field_list_spreads(this, result) } } - private Element getImmediateChildOfStructExprFieldList(StructExprFieldList e, int index) { - - exists(int n, int nAttr, int nField, int nSpread | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and - nSpread = nField + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - or - index = nField and result = e.getSpread() - )) - } + exists(int n, int nAttr, int nField, int nSpread | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + nSpread = nField + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + or + index = nField and result = e.getSpread() + ) + ) + } /** * INTERNAL: Do not use. * A field in a struct declaration. - * + * * For example: * ```rust * struct S { x: i32 } @@ -2063,99 +1618,78 @@ module Raw { * ``` */ class StructField extends @struct_field, AstNode { - override string toString() { result = "StructField" } /** * Gets the `index`th attr of this struct field (0-based). - * */ - AnyAttr getAttr(int index) { - struct_field_attrs(this, index, result) - } + AnyAttr getAttr(int index) { struct_field_attrs(this, index, result) } + /** * Gets the number of attrs of this struct field. */ - int getNumberOfAttrs() { - result = count(int i | struct_field_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | struct_field_attrs(this, i, _)) } + /** * Gets the default val of this struct field, if it exists. - * */ - ConstArg getDefaultVal() { - struct_field_default_vals(this, result) - } + ConstArg getDefaultVal() { struct_field_default_vals(this, result) } + /** * Holds if this struct field is unsafe. - * */ - predicate isUnsafe() { - struct_field_is_unsafe(this) - } + predicate isUnsafe() { struct_field_is_unsafe(this) } + /** * Gets the mut restriction of this struct field, if it exists. - * */ - MutRestriction getMutRestriction() { - struct_field_mut_restrictions(this, result) - } + MutRestriction getMutRestriction() { struct_field_mut_restrictions(this, result) } + /** * Gets the name of this struct field, if it exists. - * */ - Name getName() { - struct_field_names(this, result) - } + Name getName() { struct_field_names(this, result) } + /** * Gets the type representation of this struct field, if it exists. - * */ - TypeRepr getTypeRepr() { - struct_field_type_reprs(this, result) - } + TypeRepr getTypeRepr() { struct_field_type_reprs(this, result) } + /** * Gets the visibility of this struct field, if it exists. - * */ - Visibility getVisibility() { - struct_field_visibilities(this, result) - } + Visibility getVisibility() { struct_field_visibilities(this, result) } } - private Element getImmediateChildOfStructField(StructField e, int index) { - - exists(int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultVal = nAttr + 1 - and - nMutRestriction = nDefaultVal + 1 - and - nName = nMutRestriction + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultVal() - or - index = nDefaultVal and result = e.getMutRestriction() - or - index = nMutRestriction and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - )) - } + exists( + int n, int nAttr, int nDefaultVal, int nMutRestriction, int nName, int nTypeRepr, + int nVisibility + | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultVal = nAttr + 1 and + nMutRestriction = nDefaultVal + 1 and + nName = nMutRestriction + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultVal() + or + index = nDefaultVal and result = e.getMutRestriction() + or + index = nMutRestriction and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -2165,64 +1699,51 @@ module Raw { * ``` */ class StructPatField extends @struct_pat_field, AstNode { - override string toString() { result = "StructPatField" } /** * Gets the `index`th attr of this struct pattern field (0-based). - * */ - AnyAttr getAttr(int index) { - struct_pat_field_attrs(this, index, result) - } + AnyAttr getAttr(int index) { struct_pat_field_attrs(this, index, result) } + /** * Gets the number of attrs of this struct pattern field. */ - int getNumberOfAttrs() { - result = count(int i | struct_pat_field_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | struct_pat_field_attrs(this, i, _)) } + /** * Gets the identifier of this struct pattern field, if it exists. - * */ - NameRef getIdentifier() { - struct_pat_field_identifiers(this, result) - } + NameRef getIdentifier() { struct_pat_field_identifiers(this, result) } + /** * Gets the pattern of this struct pattern field, if it exists. - * */ - Pat getPat() { - struct_pat_field_pats(this, result) - } + Pat getPat() { struct_pat_field_pats(this, result) } } - private Element getImmediateChildOfStructPatField(StructPatField e, int index) { - - exists(int n, int nAttr, int nIdentifier, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nIdentifier = nAttr + 1 - and - nPat = nIdentifier + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getIdentifier() - or - index = nIdentifier and result = e.getPat() - )) - } + exists(int n, int nAttr, int nIdentifier, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nIdentifier = nAttr + 1 and + nPat = nIdentifier + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getIdentifier() + or + index = nIdentifier and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A list of fields in a struct pattern. - * + * * For example: * ```rust * let Foo { a, b } = foo; @@ -2230,65 +1751,49 @@ module Raw { * ``` */ class StructPatFieldList extends @struct_pat_field_list, AstNode { - override string toString() { result = "StructPatFieldList" } /** * Gets the `index`th field of this struct pattern field list (0-based). - * */ - StructPatField getField(int index) { - struct_pat_field_list_fields(this, index, result) - } + StructPatField getField(int index) { struct_pat_field_list_fields(this, index, result) } + /** * Gets the number of fields of this struct pattern field list. */ - int getNumberOfFields() { - result = count(int i | struct_pat_field_list_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | struct_pat_field_list_fields(this, i, _)) } + /** * Gets the rest pattern of this struct pattern field list, if it exists. - * */ - RestPat getRestPat() { - struct_pat_field_list_rest_pats(this, result) - } + RestPat getRestPat() { struct_pat_field_list_rest_pats(this, result) } } - private Element getImmediateChildOfStructPatFieldList(StructPatFieldList e, int index) { - - exists(int n, int nField, int nRestPat | - n = 0 - and - nField = n + e.getNumberOfFields() - and - nRestPat = nField + 1 - and ( - none() - or - result = e.getField(index - n) - or - index = nField and result = e.getRestPat() - )) - } + exists(int n, int nField, int nRestPat | + n = 0 and + nField = n + e.getNumberOfFields() and + nRestPat = nField + 1 and + ( + none() + or + result = e.getField(index - n) + or + index = nField and result = e.getRestPat() + ) + ) + } /** * INTERNAL: Do not use. * The base class for all tokens. */ - class Token extends @token, AstNode { - - - - } - - + class Token extends @token, AstNode { } /** * INTERNAL: Do not use. * A token tree in a macro definition or invocation. - * + * * For example: * ```rust * println!("{} {}!", "Hello", "world"); @@ -2300,57 +1805,44 @@ module Raw { * ``` */ class TokenTree extends @token_tree, AstNode { - override string toString() { result = "TokenTree" } - } - - private Element getImmediateChildOfTokenTree(TokenTree e, int index) { - none() - } + private Element getImmediateChildOfTokenTree(TokenTree e, int index) { none() } /** * INTERNAL: Do not use. */ class TryBlockModifier extends @try_block_modifier, AstNode { - override string toString() { result = "TryBlockModifier" } /** * Holds if this try block modifier is try. - * */ - predicate isTry() { - try_block_modifier_is_try(this) - } + predicate isTry() { try_block_modifier_is_try(this) } + /** * Gets the type representation of this try block modifier, if it exists. - * */ - TypeRepr getTypeRepr() { - try_block_modifier_type_reprs(this, result) - } + TypeRepr getTypeRepr() { try_block_modifier_type_reprs(this, result) } } - private Element getImmediateChildOfTryBlockModifier(TryBlockModifier e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A field in a tuple struct or tuple variant. - * + * * For example: * ```rust * struct S(i32, String); @@ -2358,75 +1850,59 @@ module Raw { * ``` */ class TupleField extends @tuple_field, AstNode { - override string toString() { result = "TupleField" } /** * Gets the `index`th attr of this tuple field (0-based). - * */ - AnyAttr getAttr(int index) { - tuple_field_attrs(this, index, result) - } + AnyAttr getAttr(int index) { tuple_field_attrs(this, index, result) } + /** * Gets the number of attrs of this tuple field. */ - int getNumberOfAttrs() { - result = count(int i | tuple_field_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | tuple_field_attrs(this, i, _)) } + /** * Gets the mut restriction of this tuple field, if it exists. - * */ - MutRestriction getMutRestriction() { - tuple_field_mut_restrictions(this, result) - } + MutRestriction getMutRestriction() { tuple_field_mut_restrictions(this, result) } + /** * Gets the type representation of this tuple field, if it exists. - * */ - TypeRepr getTypeRepr() { - tuple_field_type_reprs(this, result) - } + TypeRepr getTypeRepr() { tuple_field_type_reprs(this, result) } + /** * Gets the visibility of this tuple field, if it exists. - * */ - Visibility getVisibility() { - tuple_field_visibilities(this, result) - } + Visibility getVisibility() { tuple_field_visibilities(this, result) } } - private Element getImmediateChildOfTupleField(TupleField e, int index) { - - exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nMutRestriction = nAttr + 1 - and - nTypeRepr = nMutRestriction + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getMutRestriction() - or - index = nMutRestriction and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - )) - } + exists(int n, int nAttr, int nMutRestriction, int nTypeRepr, int nVisibility | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nMutRestriction = nAttr + 1 and + nTypeRepr = nMutRestriction + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getMutRestriction() + or + index = nMutRestriction and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. * A type bound in a trait or generic parameter. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -2436,83 +1912,64 @@ module Raw { * ``` */ class TypeBound extends @type_bound, AstNode { - override string toString() { result = "TypeBound" } /** * Gets the for binder of this type bound, if it exists. - * */ - ForBinder getForBinder() { - type_bound_for_binders(this, result) - } + ForBinder getForBinder() { type_bound_for_binders(this, result) } + /** * Holds if this type bound is async. - * */ - predicate isAsync() { - type_bound_is_async(this) - } + predicate isAsync() { type_bound_is_async(this) } + /** * Holds if this type bound is const. - * */ - predicate isConst() { - type_bound_is_const(this) - } + predicate isConst() { type_bound_is_const(this) } + /** * Gets the lifetime of this type bound, if it exists. - * */ - Lifetime getLifetime() { - type_bound_lifetimes(this, result) - } + Lifetime getLifetime() { type_bound_lifetimes(this, result) } + /** * Gets the type representation of this type bound, if it exists. - * */ - TypeRepr getTypeRepr() { - type_bound_type_reprs(this, result) - } + TypeRepr getTypeRepr() { type_bound_type_reprs(this, result) } + /** * Gets the use bound generic arguments of this type bound, if it exists. - * */ - UseBoundGenericArgs getUseBoundGenericArgs() { - type_bound_use_bound_generic_args(this, result) - } + UseBoundGenericArgs getUseBoundGenericArgs() { type_bound_use_bound_generic_args(this, result) } } - private Element getImmediateChildOfTypeBound(TypeBound e, int index) { - - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | - n = 0 - and - nForBinder = n + 1 - and - nLifetime = nForBinder + 1 - and - nTypeRepr = nLifetime + 1 - and - nUseBoundGenericArgs = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getUseBoundGenericArgs() - )) - } + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nUseBoundGenericArgs | + n = 0 and + nForBinder = n + 1 and + nLifetime = nForBinder + 1 and + nTypeRepr = nLifetime + 1 and + nUseBoundGenericArgs = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getUseBoundGenericArgs() + ) + ) + } /** * INTERNAL: Do not use. * A list of type bounds. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -2520,37 +1977,30 @@ module Raw { * ``` */ class TypeBoundList extends @type_bound_list, AstNode { - override string toString() { result = "TypeBoundList" } /** * Gets the `index`th bound of this type bound list (0-based). - * */ - TypeBound getBound(int index) { - type_bound_list_bounds(this, index, result) - } + TypeBound getBound(int index) { type_bound_list_bounds(this, index, result) } + /** * Gets the number of bounds of this type bound list. */ - int getNumberOfBounds() { - result = count(int i | type_bound_list_bounds(this, i, _)) - } + int getNumberOfBounds() { result = count(int i | type_bound_list_bounds(this, i, _)) } } - private Element getImmediateChildOfTypeBoundList(TypeBoundList e, int index) { - - exists(int n, int nBound | - n = 0 - and - nBound = n + e.getNumberOfBounds() - and ( - none() - or - result = e.getBound(index - n) - )) - } + exists(int n, int nBound | + n = 0 and + nBound = n + e.getNumberOfBounds() and + ( + none() + or + result = e.getBound(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -2561,29 +2011,17 @@ module Raw { * let z: Option; * ``` */ - class TypeRepr extends @type_repr, AstNode { - - - - } - - + class TypeRepr extends @type_repr, AstNode { } /** * INTERNAL: Do not use. */ - class UseBoundGenericArg extends @use_bound_generic_arg, AstNode { - - - - } - - + class UseBoundGenericArg extends @use_bound_generic_arg, AstNode { } /** * INTERNAL: Do not use. * A use<..> bound to control which generic parameters are captured by an impl Trait return type. - * + * * For example: * ```rust * pub fn hello<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> { 0 } @@ -2591,16 +2029,15 @@ module Raw { * ``` */ class UseBoundGenericArgs extends @use_bound_generic_args, AstNode { - override string toString() { result = "UseBoundGenericArgs" } /** * Gets the `index`th use bound generic argument of this use bound generic arguments (0-based). - * */ UseBoundGenericArg getUseBoundGenericArg(int index) { use_bound_generic_args_use_bound_generic_args(this, index, result) } + /** * Gets the number of use bound generic arguments of this use bound generic arguments. */ @@ -2609,19 +2046,17 @@ module Raw { } } - private Element getImmediateChildOfUseBoundGenericArgs(UseBoundGenericArgs e, int index) { - - exists(int n, int nUseBoundGenericArg | - n = 0 - and - nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() - and ( - none() - or - result = e.getUseBoundGenericArg(index - n) - )) - } + exists(int n, int nUseBoundGenericArg | + n = 0 and + nUseBoundGenericArg = n + e.getNumberOfUseBoundGenericArgs() and + ( + none() + or + result = e.getUseBoundGenericArg(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -2634,65 +2069,51 @@ module Raw { * ``` */ class UseTree extends @use_tree, AstNode { - override string toString() { result = "UseTree" } /** * Holds if this use tree is glob. - * */ - predicate isGlob() { - use_tree_is_glob(this) - } + predicate isGlob() { use_tree_is_glob(this) } + /** * Gets the path of this use tree, if it exists. - * */ - Path getPath() { - use_tree_paths(this, result) - } + Path getPath() { use_tree_paths(this, result) } + /** * Gets the rename of this use tree, if it exists. - * */ - Rename getRename() { - use_tree_renames(this, result) - } + Rename getRename() { use_tree_renames(this, result) } + /** * Gets the use tree list of this use tree, if it exists. - * */ - UseTreeList getUseTreeList() { - use_tree_use_tree_lists(this, result) - } + UseTreeList getUseTreeList() { use_tree_use_tree_lists(this, result) } } - private Element getImmediateChildOfUseTree(UseTree e, int index) { - - exists(int n, int nPath, int nRename, int nUseTreeList | - n = 0 - and - nPath = n + 1 - and - nRename = nPath + 1 - and - nUseTreeList = nRename + 1 - and ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getRename() - or - index = nRename and result = e.getUseTreeList() - )) - } + exists(int n, int nPath, int nRename, int nUseTreeList | + n = 0 and + nPath = n + 1 and + nRename = nPath + 1 and + nUseTreeList = nRename + 1 and + ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getRename() + or + index = nRename and result = e.getUseTreeList() + ) + ) + } /** * INTERNAL: Do not use. * A list of use trees in a use declaration. - * + * * For example: * ```rust * use std::{fs, io}; @@ -2700,42 +2121,35 @@ module Raw { * ``` */ class UseTreeList extends @use_tree_list, AstNode { - override string toString() { result = "UseTreeList" } /** * Gets the `index`th use tree of this use tree list (0-based). - * */ - UseTree getUseTree(int index) { - use_tree_list_use_trees(this, index, result) - } + UseTree getUseTree(int index) { use_tree_list_use_trees(this, index, result) } + /** * Gets the number of use trees of this use tree list. */ - int getNumberOfUseTrees() { - result = count(int i | use_tree_list_use_trees(this, i, _)) - } + int getNumberOfUseTrees() { result = count(int i | use_tree_list_use_trees(this, i, _)) } } - private Element getImmediateChildOfUseTreeList(UseTreeList e, int index) { - - exists(int n, int nUseTree | - n = 0 - and - nUseTree = n + e.getNumberOfUseTrees() - and ( - none() - or - result = e.getUseTree(index - n) - )) - } + exists(int n, int nUseTree | + n = 0 and + nUseTree = n + e.getNumberOfUseTrees() and + ( + none() + or + result = e.getUseTree(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A list of variants in an enum declaration. - * + * * For example: * ```rust * enum E { A, B, C } @@ -2743,42 +2157,35 @@ module Raw { * ``` */ class VariantList extends @variant_list, AstNode { - override string toString() { result = "VariantList" } /** * Gets the `index`th variant of this variant list (0-based). - * */ - Variant getVariant(int index) { - variant_list_variants(this, index, result) - } + Variant getVariant(int index) { variant_list_variants(this, index, result) } + /** * Gets the number of variants of this variant list. */ - int getNumberOfVariants() { - result = count(int i | variant_list_variants(this, i, _)) - } + int getNumberOfVariants() { result = count(int i | variant_list_variants(this, i, _)) } } - private Element getImmediateChildOfVariantList(VariantList e, int index) { - - exists(int n, int nVariant | - n = 0 - and - nVariant = n + e.getNumberOfVariants() - and ( - none() - or - result = e.getVariant(index - n) - )) - } + exists(int n, int nVariant | + n = 0 and + nVariant = n + e.getNumberOfVariants() and + ( + none() + or + result = e.getVariant(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A visibility modifier. - * + * * For example: * ```rust * pub struct S; @@ -2786,31 +2193,25 @@ module Raw { * ``` */ class Visibility extends @visibility, AstNode { - override string toString() { result = "Visibility" } /** * Gets the visibility inner of this visibility, if it exists. - * */ - VisibilityInner getVisibilityInner() { - visibility_visibility_inners(this, result) - } + VisibilityInner getVisibilityInner() { visibility_visibility_inners(this, result) } } - private Element getImmediateChildOfVisibility(Visibility e, int index) { - - exists(int n, int nVisibilityInner | - n = 0 - and - nVisibilityInner = n + 1 - and ( - none() - or - index = n and result = e.getVisibilityInner() - )) - } + exists(int n, int nVisibilityInner | + n = 0 and + nVisibilityInner = n + 1 and + ( + none() + or + index = n and result = e.getVisibilityInner() + ) + ) + } /** * INTERNAL: Do not use. @@ -2821,36 +2222,30 @@ module Raw { * ``` */ class VisibilityInner extends @visibility_inner, AstNode { - override string toString() { result = "VisibilityInner" } /** * Gets the path of this visibility inner, if it exists. - * */ - Path getPath() { - visibility_inner_paths(this, result) - } + Path getPath() { visibility_inner_paths(this, result) } } - private Element getImmediateChildOfVisibilityInner(VisibilityInner e, int index) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() - )) - } + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. * A where clause in a generic declaration. - * + * * For example: * ```rust * fn foo(t: T) where T: Debug {} @@ -2858,42 +2253,35 @@ module Raw { * ``` */ class WhereClause extends @where_clause, AstNode { - override string toString() { result = "WhereClause" } /** * Gets the `index`th predicate of this where clause (0-based). - * */ - WherePred getPredicate(int index) { - where_clause_predicates(this, index, result) - } + WherePred getPredicate(int index) { where_clause_predicates(this, index, result) } + /** * Gets the number of predicates of this where clause. */ - int getNumberOfPredicates() { - result = count(int i | where_clause_predicates(this, i, _)) - } + int getNumberOfPredicates() { result = count(int i | where_clause_predicates(this, i, _)) } } - private Element getImmediateChildOfWhereClause(WhereClause e, int index) { - - exists(int n, int nPredicate | - n = 0 - and - nPredicate = n + e.getNumberOfPredicates() - and ( - none() - or - result = e.getPredicate(index - n) - )) - } + exists(int n, int nPredicate | + n = 0 and + nPredicate = n + e.getNumberOfPredicates() and + ( + none() + or + result = e.getPredicate(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A predicate in a where clause. - * + * * For example: * ```rust * fn foo(t: T, u: U) where T: Debug, U: Clone {} @@ -2903,129 +2291,101 @@ module Raw { * ``` */ class WherePred extends @where_pred, AstNode { - override string toString() { result = "WherePred" } /** * Gets the for binder of this where pred, if it exists. - * */ - ForBinder getForBinder() { - where_pred_for_binders(this, result) - } + ForBinder getForBinder() { where_pred_for_binders(this, result) } + /** * Gets the lifetime of this where pred, if it exists. - * */ - Lifetime getLifetime() { - where_pred_lifetimes(this, result) - } + Lifetime getLifetime() { where_pred_lifetimes(this, result) } + /** * Gets the type representation of this where pred, if it exists. - * */ - TypeRepr getTypeRepr() { - where_pred_type_reprs(this, result) - } + TypeRepr getTypeRepr() { where_pred_type_reprs(this, result) } + /** * Gets the type bound list of this where pred, if it exists. - * */ - TypeBoundList getTypeBoundList() { - where_pred_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { where_pred_type_bound_lists(this, result) } } - private Element getImmediateChildOfWherePred(WherePred e, int index) { - - exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | - n = 0 - and - nForBinder = n + 1 - and - nLifetime = nForBinder + 1 - and - nTypeRepr = nLifetime + 1 - and - nTypeBoundList = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - )) - } + exists(int n, int nForBinder, int nLifetime, int nTypeRepr, int nTypeBoundList | + n = 0 and + nForBinder = n + 1 and + nLifetime = nForBinder + 1 and + nTypeRepr = nLifetime + 1 and + nTypeBoundList = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. */ class ArrayExprInternal extends @array_expr_internal, Expr { - override string toString() { result = "ArrayExprInternal" } /** * Gets the `index`th attr of this array expression internal (0-based). - * */ - AnyAttr getAttr(int index) { - array_expr_internal_attrs(this, index, result) - } + AnyAttr getAttr(int index) { array_expr_internal_attrs(this, index, result) } + /** * Gets the number of attrs of this array expression internal. */ - int getNumberOfAttrs() { - result = count(int i | array_expr_internal_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | array_expr_internal_attrs(this, i, _)) } + /** * Gets the `index`th expression of this array expression internal (0-based). - * */ - Expr getExpr(int index) { - array_expr_internal_exprs(this, index, result) - } + Expr getExpr(int index) { array_expr_internal_exprs(this, index, result) } + /** * Gets the number of expressions of this array expression internal. */ - int getNumberOfExprs() { - result = count(int i | array_expr_internal_exprs(this, i, _)) - } + int getNumberOfExprs() { result = count(int i | array_expr_internal_exprs(this, i, _)) } + /** * Holds if this array expression internal is semicolon. - * */ - predicate isSemicolon() { - array_expr_internal_is_semicolon(this) - } + predicate isSemicolon() { array_expr_internal_is_semicolon(this) } } - private Element getImmediateChildOfArrayExprInternal(ArrayExprInternal e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + e.getNumberOfExprs() - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getExpr(index - nAttr) - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + e.getNumberOfExprs() and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getExpr(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. * An array type representation. - * + * * For example: * ```rust * let arr: [i32; 4]; @@ -3033,47 +2393,38 @@ module Raw { * ``` */ class ArrayTypeRepr extends @array_type_repr, TypeRepr { - override string toString() { result = "ArrayTypeRepr" } /** * Gets the const argument of this array type representation, if it exists. - * */ - ConstArg getConstArg() { - array_type_repr_const_args(this, result) - } + ConstArg getConstArg() { array_type_repr_const_args(this, result) } + /** * Gets the element type representation of this array type representation, if it exists. - * */ - TypeRepr getElementTypeRepr() { - array_type_repr_element_type_reprs(this, result) - } + TypeRepr getElementTypeRepr() { array_type_repr_element_type_reprs(this, result) } } - private Element getImmediateChildOfArrayTypeRepr(ArrayTypeRepr e, int index) { - - exists(int n, int nConstArg, int nElementTypeRepr | - n = 0 - and - nConstArg = n + 1 - and - nElementTypeRepr = nConstArg + 1 - and ( - none() - or - index = n and result = e.getConstArg() - or - index = nConstArg and result = e.getElementTypeRepr() - )) - } + exists(int n, int nConstArg, int nElementTypeRepr | + n = 0 and + nConstArg = n + 1 and + nElementTypeRepr = nConstArg + 1 and + ( + none() + or + index = n and result = e.getConstArg() + or + index = nConstArg and result = e.getElementTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A clobbered ABI in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3082,42 +2433,35 @@ module Raw { * ``` */ class AsmClobberAbi extends @asm_clobber_abi, AsmPiece { - override string toString() { result = "AsmClobberAbi" } /** * Gets the `index`th attr of this asm clobber abi (0-based). - * */ - AnyAttr getAttr(int index) { - asm_clobber_abi_attrs(this, index, result) - } + AnyAttr getAttr(int index) { asm_clobber_abi_attrs(this, index, result) } + /** * Gets the number of attrs of this asm clobber abi. */ - int getNumberOfAttrs() { - result = count(int i | asm_clobber_abi_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | asm_clobber_abi_attrs(this, i, _)) } } - private Element getImmediateChildOfAsmClobberAbi(AsmClobberAbi e, int index) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) - )) - } + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A constant operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3126,43 +2470,35 @@ module Raw { * ``` */ class AsmConst extends @asm_const, AsmOperand { - override string toString() { result = "AsmConst" } /** * Gets the expression of this asm const, if it exists. - * */ - Expr getExpr() { - asm_const_exprs(this, result) - } + Expr getExpr() { asm_const_exprs(this, result) } + /** * Holds if this asm const is const. - * */ - predicate isConst() { - asm_const_is_const(this) - } + predicate isConst() { asm_const_is_const(this) } } - private Element getImmediateChildOfAsmConst(AsmConst e, int index) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() - )) - } + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. * A label in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3174,36 +2510,30 @@ module Raw { * ``` */ class AsmLabel extends @asm_label, AsmOperand { - override string toString() { result = "AsmLabel" } /** * Gets the block expression of this asm label, if it exists. - * */ - BlockExpr getBlockExpr() { - asm_label_block_exprs(this, result) - } + BlockExpr getBlockExpr() { asm_label_block_exprs(this, result) } } - private Element getImmediateChildOfAsmLabel(AsmLabel e, int index) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() - )) - } + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() + ) + ) + } /** * INTERNAL: Do not use. * A named operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3212,64 +2542,51 @@ module Raw { * ``` */ class AsmOperandNamed extends @asm_operand_named, AsmPiece { - override string toString() { result = "AsmOperandNamed" } /** * Gets the asm operand of this asm operand named, if it exists. - * */ - AsmOperand getAsmOperand() { - asm_operand_named_asm_operands(this, result) - } + AsmOperand getAsmOperand() { asm_operand_named_asm_operands(this, result) } + /** * Gets the `index`th attr of this asm operand named (0-based). - * */ - AnyAttr getAttr(int index) { - asm_operand_named_attrs(this, index, result) - } + AnyAttr getAttr(int index) { asm_operand_named_attrs(this, index, result) } + /** * Gets the number of attrs of this asm operand named. */ - int getNumberOfAttrs() { - result = count(int i | asm_operand_named_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | asm_operand_named_attrs(this, i, _)) } + /** * Gets the name of this asm operand named, if it exists. - * */ - Name getName() { - asm_operand_named_names(this, result) - } + Name getName() { asm_operand_named_names(this, result) } } - private Element getImmediateChildOfAsmOperandNamed(AsmOperandNamed e, int index) { - - exists(int n, int nAsmOperand, int nAttr, int nName | - n = 0 - and - nAsmOperand = n + 1 - and - nAttr = nAsmOperand + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and ( - none() - or - index = n and result = e.getAsmOperand() - or - result = e.getAttr(index - nAsmOperand) - or - index = nAttr and result = e.getName() - )) - } + exists(int n, int nAsmOperand, int nAttr, int nName | + n = 0 and + nAsmOperand = n + 1 and + nAttr = nAsmOperand + e.getNumberOfAttrs() and + nName = nAttr + 1 and + ( + none() + or + index = n and result = e.getAsmOperand() + or + result = e.getAttr(index - nAsmOperand) + or + index = nAttr and result = e.getName() + ) + ) + } /** * INTERNAL: Do not use. * A list of options in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3278,59 +2595,48 @@ module Raw { * ``` */ class AsmOptionsList extends @asm_options_list, AsmPiece { - override string toString() { result = "AsmOptionsList" } /** * Gets the `index`th asm option of this asm options list (0-based). - * */ - AsmOption getAsmOption(int index) { - asm_options_list_asm_options(this, index, result) - } + AsmOption getAsmOption(int index) { asm_options_list_asm_options(this, index, result) } + /** * Gets the number of asm options of this asm options list. */ - int getNumberOfAsmOptions() { - result = count(int i | asm_options_list_asm_options(this, i, _)) - } + int getNumberOfAsmOptions() { result = count(int i | asm_options_list_asm_options(this, i, _)) } + /** * Gets the `index`th attr of this asm options list (0-based). - * */ - AnyAttr getAttr(int index) { - asm_options_list_attrs(this, index, result) - } + AnyAttr getAttr(int index) { asm_options_list_attrs(this, index, result) } + /** * Gets the number of attrs of this asm options list. */ - int getNumberOfAttrs() { - result = count(int i | asm_options_list_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | asm_options_list_attrs(this, i, _)) } } - private Element getImmediateChildOfAsmOptionsList(AsmOptionsList e, int index) { - - exists(int n, int nAsmOption, int nAttr | - n = 0 - and - nAsmOption = n + e.getNumberOfAsmOptions() - and - nAttr = nAsmOption + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAsmOption(index - n) - or - result = e.getAttr(index - nAsmOption) - )) - } + exists(int n, int nAsmOption, int nAttr | + n = 0 and + nAsmOption = n + e.getNumberOfAsmOptions() and + nAttr = nAsmOption + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAsmOption(index - n) + or + result = e.getAttr(index - nAsmOption) + ) + ) + } /** * INTERNAL: Do not use. * A register operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3339,58 +2645,46 @@ module Raw { * ``` */ class AsmRegOperand extends @asm_reg_operand, AsmOperand { - override string toString() { result = "AsmRegOperand" } /** * Gets the asm dir spec of this asm reg operand, if it exists. - * */ - AsmDirSpec getAsmDirSpec() { - asm_reg_operand_asm_dir_specs(this, result) - } + AsmDirSpec getAsmDirSpec() { asm_reg_operand_asm_dir_specs(this, result) } + /** * Gets the asm operand expression of this asm reg operand, if it exists. - * */ - AsmOperandExpr getAsmOperandExpr() { - asm_reg_operand_asm_operand_exprs(this, result) - } + AsmOperandExpr getAsmOperandExpr() { asm_reg_operand_asm_operand_exprs(this, result) } + /** * Gets the asm reg spec of this asm reg operand, if it exists. - * */ - AsmRegSpec getAsmRegSpec() { - asm_reg_operand_asm_reg_specs(this, result) - } + AsmRegSpec getAsmRegSpec() { asm_reg_operand_asm_reg_specs(this, result) } } - private Element getImmediateChildOfAsmRegOperand(AsmRegOperand e, int index) { - - exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | - n = 0 - and - nAsmDirSpec = n + 1 - and - nAsmOperandExpr = nAsmDirSpec + 1 - and - nAsmRegSpec = nAsmOperandExpr + 1 - and ( - none() - or - index = n and result = e.getAsmDirSpec() - or - index = nAsmDirSpec and result = e.getAsmOperandExpr() - or - index = nAsmOperandExpr and result = e.getAsmRegSpec() - )) - } + exists(int n, int nAsmDirSpec, int nAsmOperandExpr, int nAsmRegSpec | + n = 0 and + nAsmDirSpec = n + 1 and + nAsmOperandExpr = nAsmDirSpec + 1 and + nAsmRegSpec = nAsmOperandExpr + 1 and + ( + none() + or + index = n and result = e.getAsmDirSpec() + or + index = nAsmDirSpec and result = e.getAsmOperandExpr() + or + index = nAsmOperandExpr and result = e.getAsmRegSpec() + ) + ) + } /** * INTERNAL: Do not use. * A symbol operand in an inline assembly block. - * + * * For example: * ```rust * use core::arch::asm; @@ -3399,36 +2693,30 @@ module Raw { * ``` */ class AsmSym extends @asm_sym, AsmOperand { - override string toString() { result = "AsmSym" } /** * Gets the path of this asm sym, if it exists. - * */ - Path getPath() { - asm_sym_paths(this, result) - } + Path getPath() { asm_sym_paths(this, result) } } - private Element getImmediateChildOfAsmSym(AsmSym e, int index) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() - )) - } + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. * An associated type argument in a path. - * + * * For example: * ```rust * fn process_cloneable(iter: T) @@ -3441,113 +2729,89 @@ module Raw { * ``` */ class AssocTypeArg extends @assoc_type_arg, GenericArg { - override string toString() { result = "AssocTypeArg" } /** * Gets the const argument of this assoc type argument, if it exists. - * */ - ConstArg getConstArg() { - assoc_type_arg_const_args(this, result) - } + ConstArg getConstArg() { assoc_type_arg_const_args(this, result) } + /** * Gets the generic argument list of this assoc type argument, if it exists. - * */ - GenericArgList getGenericArgList() { - assoc_type_arg_generic_arg_lists(this, result) - } + GenericArgList getGenericArgList() { assoc_type_arg_generic_arg_lists(this, result) } + /** * Gets the identifier of this assoc type argument, if it exists. - * */ - NameRef getIdentifier() { - assoc_type_arg_identifiers(this, result) - } + NameRef getIdentifier() { assoc_type_arg_identifiers(this, result) } + /** * Gets the parameter list of this assoc type argument, if it exists. - * */ - ParamList getParamList() { - assoc_type_arg_param_lists(this, result) - } + ParamList getParamList() { assoc_type_arg_param_lists(this, result) } + /** * Gets the ret type of this assoc type argument, if it exists. - * */ - RetTypeRepr getRetType() { - assoc_type_arg_ret_types(this, result) - } + RetTypeRepr getRetType() { assoc_type_arg_ret_types(this, result) } + /** * Gets the return type syntax of this assoc type argument, if it exists. - * */ - ReturnTypeSyntax getReturnTypeSyntax() { - assoc_type_arg_return_type_syntaxes(this, result) - } + ReturnTypeSyntax getReturnTypeSyntax() { assoc_type_arg_return_type_syntaxes(this, result) } + /** * Gets the type representation of this assoc type argument, if it exists. - * */ - TypeRepr getTypeRepr() { - assoc_type_arg_type_reprs(this, result) - } + TypeRepr getTypeRepr() { assoc_type_arg_type_reprs(this, result) } + /** * Gets the type bound list of this assoc type argument, if it exists. - * */ - TypeBoundList getTypeBoundList() { - assoc_type_arg_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { assoc_type_arg_type_bound_lists(this, result) } } - private Element getImmediateChildOfAssocTypeArg(AssocTypeArg e, int index) { - - exists(int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList | - n = 0 - and - nConstArg = n + 1 - and - nGenericArgList = nConstArg + 1 - and - nIdentifier = nGenericArgList + 1 - and - nParamList = nIdentifier + 1 - and - nRetType = nParamList + 1 - and - nReturnTypeSyntax = nRetType + 1 - and - nTypeRepr = nReturnTypeSyntax + 1 - and - nTypeBoundList = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getConstArg() - or - index = nConstArg and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getParamList() - or - index = nParamList and result = e.getRetType() - or - index = nRetType and result = e.getReturnTypeSyntax() - or - index = nReturnTypeSyntax and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - )) - } + exists( + int n, int nConstArg, int nGenericArgList, int nIdentifier, int nParamList, int nRetType, + int nReturnTypeSyntax, int nTypeRepr, int nTypeBoundList + | + n = 0 and + nConstArg = n + 1 and + nGenericArgList = nConstArg + 1 and + nIdentifier = nGenericArgList + 1 and + nParamList = nIdentifier + 1 and + nRetType = nParamList + 1 and + nReturnTypeSyntax = nRetType + 1 and + nTypeRepr = nReturnTypeSyntax + 1 and + nTypeBoundList = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getConstArg() + or + index = nConstArg and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getParamList() + or + index = nParamList and result = e.getRetType() + or + index = nRetType and result = e.getReturnTypeSyntax() + or + index = nReturnTypeSyntax and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. * An attribute applied to an item. - * + * * For example: * ```rust * #[derive(Debug)] @@ -3556,31 +2820,25 @@ module Raw { * ``` */ class Attr extends @attr, AnyAttr { - override string toString() { result = "Attr" } /** * Gets the meta of this attr, if it exists. - * */ - Meta getMeta() { - attr_meta(this, result) - } + Meta getMeta() { attr_meta(this, result) } } - private Element getImmediateChildOfAttr(Attr e, int index) { - - exists(int n, int nMeta | - n = 0 - and - nMeta = n + 1 - and ( - none() - or - index = n and result = e.getMeta() - )) - } + exists(int n, int nMeta | + n = 0 and + nMeta = n + 1 and + ( + none() + or + index = n and result = e.getMeta() + ) + ) + } /** * INTERNAL: Do not use. @@ -3593,48 +2851,38 @@ module Raw { * ``` */ class AwaitExpr extends @await_expr, Expr { - override string toString() { result = "AwaitExpr" } /** * Gets the `index`th attr of this await expression (0-based). - * */ - AnyAttr getAttr(int index) { - await_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { await_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this await expression. */ - int getNumberOfAttrs() { - result = count(int i | await_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | await_expr_attrs(this, i, _)) } + /** * Gets the expression of this await expression, if it exists. - * */ - Expr getExpr() { - await_expr_exprs(this, result) - } + Expr getExpr() { await_expr_exprs(this, result) } } - private Element getImmediateChildOfAwaitExpr(AwaitExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -3650,48 +2898,38 @@ module Raw { * ``` */ class BecomeExpr extends @become_expr, Expr { - override string toString() { result = "BecomeExpr" } /** * Gets the `index`th attr of this become expression (0-based). - * */ - AnyAttr getAttr(int index) { - become_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { become_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this become expression. */ - int getNumberOfAttrs() { - result = count(int i | become_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | become_expr_attrs(this, i, _)) } + /** * Gets the expression of this become expression, if it exists. - * */ - Expr getExpr() { - become_expr_exprs(this, result) - } + Expr getExpr() { become_expr_exprs(this, result) } } - private Element getImmediateChildOfBecomeExpr(BecomeExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -3705,66 +2943,51 @@ module Raw { * ``` */ class BinaryExpr extends @binary_expr, Expr { - override string toString() { result = "BinaryExpr" } /** * Gets the `index`th attr of this binary expression (0-based). - * */ - AnyAttr getAttr(int index) { - binary_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { binary_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this binary expression. */ - int getNumberOfAttrs() { - result = count(int i | binary_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | binary_expr_attrs(this, i, _)) } + /** * Gets the lhs of this binary expression, if it exists. - * */ - Expr getLhs() { - binary_expr_lhs(this, result) - } + Expr getLhs() { binary_expr_lhs(this, result) } + /** * Gets the operator name of this binary expression, if it exists. - * */ - string getOperatorName() { - binary_expr_operator_names(this, result) - } + string getOperatorName() { binary_expr_operator_names(this, result) } + /** * Gets the rhs of this binary expression, if it exists. - * */ - Expr getRhs() { - binary_expr_rhs(this, result) - } + Expr getRhs() { binary_expr_rhs(this, result) } } - private Element getImmediateChildOfBinaryExpr(BinaryExpr e, int index) { - - exists(int n, int nAttr, int nLhs, int nRhs | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLhs = nAttr + 1 - and - nRhs = nLhs + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLhs() - or - index = nLhs and result = e.getRhs() - )) - } + exists(int n, int nAttr, int nLhs, int nRhs | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLhs = nAttr + 1 and + nRhs = nLhs + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLhs() + or + index = nLhs and result = e.getRhs() + ) + ) + } /** * INTERNAL: Do not use. @@ -3777,31 +3000,25 @@ module Raw { * ``` */ class BoxPat extends @box_pat, Pat { - override string toString() { result = "BoxPat" } /** * Gets the pattern of this box pattern, if it exists. - * */ - Pat getPat() { - box_pat_pats(this, result) - } + Pat getPat() { box_pat_pats(this, result) } } - private Element getImmediateChildOfBoxPat(BoxPat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. @@ -3830,65 +3047,52 @@ module Raw { * ``` */ class BreakExpr extends @break_expr, Expr { - override string toString() { result = "BreakExpr" } /** * Gets the `index`th attr of this break expression (0-based). - * */ - AnyAttr getAttr(int index) { - break_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { break_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this break expression. */ - int getNumberOfAttrs() { - result = count(int i | break_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | break_expr_attrs(this, i, _)) } + /** * Gets the expression of this break expression, if it exists. - * */ - Expr getExpr() { - break_expr_exprs(this, result) - } + Expr getExpr() { break_expr_exprs(this, result) } + /** * Gets the lifetime of this break expression, if it exists. - * */ - Lifetime getLifetime() { - break_expr_lifetimes(this, result) - } + Lifetime getLifetime() { break_expr_lifetimes(this, result) } } - private Element getImmediateChildOfBreakExpr(BreakExpr e, int index) { - - exists(int n, int nAttr, int nExpr, int nLifetime | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nLifetime = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getLifetime() - )) - } + exists(int n, int nAttr, int nExpr, int nLifetime | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nLifetime = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getLifetime() + ) + ) + } /** * INTERNAL: Do not use. * NOTE: Consider using `Call` instead, as that excludes call expressions that are * instantiations of tuple structs and tuple variants. - * + * * A call expression. For example: * ```rust * foo(42); @@ -3898,59 +3102,46 @@ module Raw { * ``` */ class CallExpr extends @call_expr, Expr { - override string toString() { result = "CallExpr" } /** * Gets the argument list of this call expression, if it exists. - * */ - ArgList getArgList() { - call_expr_arg_lists(this, result) - } + ArgList getArgList() { call_expr_arg_lists(this, result) } + /** * Gets the `index`th attr of this call expression (0-based). - * */ - AnyAttr getAttr(int index) { - call_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { call_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this call expression. */ - int getNumberOfAttrs() { - result = count(int i | call_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | call_expr_attrs(this, i, _)) } + /** * Gets the function of this call expression, if it exists. - * */ - Expr getFunction() { - call_expr_functions(this, result) - } + Expr getFunction() { call_expr_functions(this, result) } } - private Element getImmediateChildOfCallExpr(CallExpr e, int index) { - - exists(int n, int nArgList, int nAttr, int nFunction | - n = 0 - and - nArgList = n + 1 - and - nAttr = nArgList + e.getNumberOfAttrs() - and - nFunction = nAttr + 1 - and ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getFunction() - )) - } + exists(int n, int nArgList, int nAttr, int nFunction | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nFunction = nAttr + 1 and + ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getFunction() + ) + ) + } /** * INTERNAL: Do not use. @@ -3960,135 +3151,104 @@ module Raw { * ``` */ class CastExpr extends @cast_expr, Expr { - override string toString() { result = "CastExpr" } /** * Gets the `index`th attr of this cast expression (0-based). - * */ - AnyAttr getAttr(int index) { - cast_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { cast_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this cast expression. */ - int getNumberOfAttrs() { - result = count(int i | cast_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | cast_expr_attrs(this, i, _)) } + /** * Gets the expression of this cast expression, if it exists. - * */ - Expr getExpr() { - cast_expr_exprs(this, result) - } + Expr getExpr() { cast_expr_exprs(this, result) } + /** * Gets the type representation of this cast expression, if it exists. - * */ - TypeRepr getTypeRepr() { - cast_expr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { cast_expr_type_reprs(this, result) } } - private Element getImmediateChildOfCastExpr(CastExpr e, int index) { - - exists(int n, int nAttr, int nExpr, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and - nTypeRepr = nExpr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - or - index = nExpr and result = e.getTypeRepr() - )) - } + exists(int n, int nAttr, int nExpr, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + nTypeRepr = nExpr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + or + index = nExpr and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. */ class CfgAtom extends @cfg_atom, CfgPredicate { - override string toString() { result = "CfgAtom" } - } - - private Element getImmediateChildOfCfgAtom(CfgAtom e, int index) { - none() - } + private Element getImmediateChildOfCfgAtom(CfgAtom e, int index) { none() } /** * INTERNAL: Do not use. */ class CfgAttrMeta extends @cfg_attr_meta, Meta { - override string toString() { result = "CfgAttrMeta" } /** * Gets the cfg predicate of this cfg attr meta, if it exists. - * */ - CfgPredicate getCfgPredicate() { - cfg_attr_meta_cfg_predicates(this, result) - } + CfgPredicate getCfgPredicate() { cfg_attr_meta_cfg_predicates(this, result) } + /** * Gets the `index`th meta of this cfg attr meta (0-based). - * */ - Meta getMeta(int index) { - cfg_attr_meta_metas(this, index, result) - } + Meta getMeta(int index) { cfg_attr_meta_metas(this, index, result) } + /** * Gets the number of metas of this cfg attr meta. */ - int getNumberOfMetas() { - result = count(int i | cfg_attr_meta_metas(this, i, _)) - } + int getNumberOfMetas() { result = count(int i | cfg_attr_meta_metas(this, i, _)) } } - private Element getImmediateChildOfCfgAttrMeta(CfgAttrMeta e, int index) { - - exists(int n, int nCfgPredicate, int nMeta | - n = 0 - and - nCfgPredicate = n + 1 - and - nMeta = nCfgPredicate + e.getNumberOfMetas() - and ( - none() - or - index = n and result = e.getCfgPredicate() - or - result = e.getMeta(index - nCfgPredicate) - )) - } + exists(int n, int nCfgPredicate, int nMeta | + n = 0 and + nCfgPredicate = n + 1 and + nMeta = nCfgPredicate + e.getNumberOfMetas() and + ( + none() + or + index = n and result = e.getCfgPredicate() + or + result = e.getMeta(index - nCfgPredicate) + ) + ) + } /** * INTERNAL: Do not use. */ class CfgComposite extends @cfg_composite, CfgPredicate { - override string toString() { result = "CfgComposite" } /** * Gets the `index`th cfg predicate of this cfg composite (0-based). - * */ - CfgPredicate getCfgPredicate(int index) { - cfg_composite_cfg_predicates(this, index, result) - } + CfgPredicate getCfgPredicate(int index) { cfg_composite_cfg_predicates(this, index, result) } + /** * Gets the number of cfg predicates of this cfg composite. */ @@ -4097,109 +3257,89 @@ module Raw { } } - private Element getImmediateChildOfCfgComposite(CfgComposite e, int index) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + e.getNumberOfCfgPredicates() - and ( - none() - or - result = e.getCfgPredicate(index - n) - )) - } + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + e.getNumberOfCfgPredicates() and + ( + none() + or + result = e.getCfgPredicate(index - n) + ) + ) + } /** * INTERNAL: Do not use. */ class CfgMeta extends @cfg_meta, Meta { - override string toString() { result = "CfgMeta" } /** * Gets the cfg predicate of this cfg meta, if it exists. - * */ - CfgPredicate getCfgPredicate() { - cfg_meta_cfg_predicates(this, result) - } + CfgPredicate getCfgPredicate() { cfg_meta_cfg_predicates(this, result) } } - private Element getImmediateChildOfCfgMeta(CfgMeta e, int index) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() - )) - } + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() + ) + ) + } /** * INTERNAL: Do not use. */ class CfgPredExpr extends @cfg_pred_expr, Expr { - override string toString() { result = "CfgPredExpr" } /** * Gets the cfg predicate of this cfg pred expression, if it exists. - * */ - CfgPredicate getCfgPredicate() { - cfg_pred_expr_cfg_predicates(this, result) - } + CfgPredicate getCfgPredicate() { cfg_pred_expr_cfg_predicates(this, result) } } - private Element getImmediateChildOfCfgPredExpr(CfgPredExpr e, int index) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() - )) - } + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() + ) + ) + } /** * INTERNAL: Do not use. */ class CfgPredPat extends @cfg_pred_pat, Pat { - override string toString() { result = "CfgPredPat" } /** * Gets the cfg predicate of this cfg pred pattern, if it exists. - * */ - CfgPredicate getCfgPredicate() { - cfg_pred_pat_cfg_predicates(this, result) - } + CfgPredicate getCfgPredicate() { cfg_pred_pat_cfg_predicates(this, result) } } - private Element getImmediateChildOfCfgPredPat(CfgPredPat e, int index) { - - exists(int n, int nCfgPredicate | - n = 0 - and - nCfgPredicate = n + 1 - and ( - none() - or - index = n and result = e.getCfgPredicate() - )) - } + exists(int n, int nCfgPredicate | + n = 0 and + nCfgPredicate = n + 1 and + ( + none() + or + index = n and result = e.getCfgPredicate() + ) + ) + } /** * INTERNAL: Do not use. @@ -4218,96 +3358,72 @@ module Raw { * ``` */ class ClosureExpr extends @closure_expr, Expr, Callable { - override string toString() { result = "ClosureExpr" } /** * Gets the closure body of this closure expression, if it exists. - * */ - Expr getClosureBody() { - closure_expr_closure_bodies(this, result) - } + Expr getClosureBody() { closure_expr_closure_bodies(this, result) } + /** * Gets the for binder of this closure expression, if it exists. - * */ - ForBinder getForBinder() { - closure_expr_for_binders(this, result) - } + ForBinder getForBinder() { closure_expr_for_binders(this, result) } + /** * Holds if this closure expression is async. - * */ - predicate isAsync() { - closure_expr_is_async(this) - } + predicate isAsync() { closure_expr_is_async(this) } + /** * Holds if this closure expression is const. - * */ - predicate isConst() { - closure_expr_is_const(this) - } + predicate isConst() { closure_expr_is_const(this) } + /** * Holds if this closure expression is gen. - * */ - predicate isGen() { - closure_expr_is_gen(this) - } + predicate isGen() { closure_expr_is_gen(this) } + /** * Holds if this closure expression is move. - * */ - predicate isMove() { - closure_expr_is_move(this) - } + predicate isMove() { closure_expr_is_move(this) } + /** * Holds if this closure expression is static. - * */ - predicate isStatic() { - closure_expr_is_static(this) - } + predicate isStatic() { closure_expr_is_static(this) } + /** * Gets the ret type of this closure expression, if it exists. - * */ - RetTypeRepr getRetType() { - closure_expr_ret_types(this, result) - } + RetTypeRepr getRetType() { closure_expr_ret_types(this, result) } } - private Element getImmediateChildOfClosureExpr(ClosureExpr e, int index) { - - exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | - n = 0 - and - nParamList = n + 1 - and - nAttr = nParamList + e.getNumberOfAttrs() - and - nClosureBody = nAttr + 1 - and - nForBinder = nClosureBody + 1 - and - nRetType = nForBinder + 1 - and ( - none() - or - index = n and result = e.getParamList() - or - result = e.getAttr(index - nParamList) - or - index = nAttr and result = e.getClosureBody() - or - index = nClosureBody and result = e.getForBinder() - or - index = nForBinder and result = e.getRetType() - )) - } + exists(int n, int nParamList, int nAttr, int nClosureBody, int nForBinder, int nRetType | + n = 0 and + nParamList = n + 1 and + nAttr = nParamList + e.getNumberOfAttrs() and + nClosureBody = nAttr + 1 and + nForBinder = nClosureBody + 1 and + nRetType = nForBinder + 1 and + ( + none() + or + index = n and result = e.getParamList() + or + result = e.getAttr(index - nParamList) + or + index = nAttr and result = e.getClosureBody() + or + index = nClosureBody and result = e.getForBinder() + or + index = nForBinder and result = e.getRetType() + ) + ) + } /** * INTERNAL: Do not use. @@ -4319,34 +3435,25 @@ module Raw { * ``` */ class Comment extends @comment, Token { - override string toString() { result = "Comment" } /** * Gets the parent of this comment. - * */ - AstNode getParent() { - comments(this, result, _) - } + AstNode getParent() { comments(this, result, _) } + /** * Gets the text of this comment. - * */ - string getText() { - comments(this, _, result) - } + string getText() { comments(this, _, result) } } - - private Element getImmediateChildOfComment(Comment e, int index) { - none() - } + private Element getImmediateChildOfComment(Comment e, int index) { none() } /** * INTERNAL: Do not use. * A constant argument in a generic argument list. - * + * * For example: * ```rust * Foo::<3> @@ -4354,31 +3461,25 @@ module Raw { * ``` */ class ConstArg extends @const_arg, GenericArg { - override string toString() { result = "ConstArg" } /** * Gets the expression of this const argument, if it exists. - * */ - Expr getExpr() { - const_arg_exprs(this, result) - } + Expr getExpr() { const_arg_exprs(this, result) } } - private Element getImmediateChildOfConstArg(ConstArg e, int index) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() - )) - } + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -4391,43 +3492,35 @@ module Raw { * ``` */ class ConstBlockPat extends @const_block_pat, Pat { - override string toString() { result = "ConstBlockPat" } /** * Gets the block expression of this const block pattern, if it exists. - * */ - BlockExpr getBlockExpr() { - const_block_pat_block_exprs(this, result) - } + BlockExpr getBlockExpr() { const_block_pat_block_exprs(this, result) } + /** * Holds if this const block pattern is const. - * */ - predicate isConst() { - const_block_pat_is_const(this) - } + predicate isConst() { const_block_pat_is_const(this) } } - private Element getImmediateChildOfConstBlockPat(ConstBlockPat e, int index) { - - exists(int n, int nBlockExpr | - n = 0 - and - nBlockExpr = n + 1 - and ( - none() - or - index = n and result = e.getBlockExpr() - )) - } + exists(int n, int nBlockExpr | + n = 0 and + nBlockExpr = n + 1 and + ( + none() + or + index = n and result = e.getBlockExpr() + ) + ) + } /** * INTERNAL: Do not use. * A constant parameter in a generic parameter list. - * + * * For example: * ```rust * struct Foo ; @@ -4435,77 +3528,59 @@ module Raw { * ``` */ class ConstParam extends @const_param, GenericParam { - override string toString() { result = "ConstParam" } /** * Gets the `index`th attr of this const parameter (0-based). - * */ - AnyAttr getAttr(int index) { - const_param_attrs(this, index, result) - } + AnyAttr getAttr(int index) { const_param_attrs(this, index, result) } + /** * Gets the number of attrs of this const parameter. */ - int getNumberOfAttrs() { - result = count(int i | const_param_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | const_param_attrs(this, i, _)) } + /** * Gets the default val of this const parameter, if it exists. - * */ - ConstArg getDefaultVal() { - const_param_default_vals(this, result) - } + ConstArg getDefaultVal() { const_param_default_vals(this, result) } + /** * Holds if this const parameter is const. - * */ - predicate isConst() { - const_param_is_const(this) - } + predicate isConst() { const_param_is_const(this) } + /** * Gets the name of this const parameter, if it exists. - * */ - Name getName() { - const_param_names(this, result) - } + Name getName() { const_param_names(this, result) } + /** * Gets the type representation of this const parameter, if it exists. - * */ - TypeRepr getTypeRepr() { - const_param_type_reprs(this, result) - } + TypeRepr getTypeRepr() { const_param_type_reprs(this, result) } } - private Element getImmediateChildOfConstParam(ConstParam e, int index) { - - exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultVal = nAttr + 1 - and - nName = nDefaultVal + 1 - and - nTypeRepr = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultVal() - or - index = nDefaultVal and result = e.getName() - or - index = nName and result = e.getTypeRepr() - )) - } + exists(int n, int nAttr, int nDefaultVal, int nName, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultVal = nAttr + 1 and + nName = nDefaultVal + 1 and + nTypeRepr = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultVal() + or + index = nDefaultVal and result = e.getName() + or + index = nName and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -4526,48 +3601,38 @@ module Raw { * ``` */ class ContinueExpr extends @continue_expr, Expr { - override string toString() { result = "ContinueExpr" } /** * Gets the `index`th attr of this continue expression (0-based). - * */ - AnyAttr getAttr(int index) { - continue_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { continue_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this continue expression. */ - int getNumberOfAttrs() { - result = count(int i | continue_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | continue_expr_attrs(this, i, _)) } + /** * Gets the lifetime of this continue expression, if it exists. - * */ - Lifetime getLifetime() { - continue_expr_lifetimes(this, result) - } + Lifetime getLifetime() { continue_expr_lifetimes(this, result) } } - private Element getImmediateChildOfContinueExpr(ContinueExpr e, int index) { - - exists(int n, int nAttr, int nLifetime | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLifetime = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLifetime() - )) - } + exists(int n, int nAttr, int nLifetime | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLifetime = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLifetime() + ) + ) + } /** * INTERNAL: Do not use. @@ -4582,36 +3647,30 @@ module Raw { * ``` */ class DerefPat extends @deref_pat, Pat { - override string toString() { result = "DerefPat" } /** * Gets the pattern of this deref pattern, if it exists. - * */ - Pat getPat() { - deref_pat_pats(this, result) - } + Pat getPat() { deref_pat_pats(this, result) } } - private Element getImmediateChildOfDerefPat(DerefPat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A documentation comment. - * + * * For example: * ```rust * /// Documents `documented`. @@ -4619,20 +3678,15 @@ module Raw { * ``` */ class DocComment extends @doc_comment, AnyAttr { - override string toString() { result = "DocComment" } - } - - private Element getImmediateChildOfDocComment(DocComment e, int index) { - none() - } + private Element getImmediateChildOfDocComment(DocComment e, int index) { none() } /** * INTERNAL: Do not use. * A dynamic trait object type. - * + * * For example: * ```rust * let x: &dyn Debug; @@ -4640,31 +3694,25 @@ module Raw { * ``` */ class DynTraitTypeRepr extends @dyn_trait_type_repr, TypeRepr { - override string toString() { result = "DynTraitTypeRepr" } /** * Gets the type bound list of this dyn trait type representation, if it exists. - * */ - TypeBoundList getTypeBoundList() { - dyn_trait_type_repr_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { dyn_trait_type_repr_type_bound_lists(this, result) } } - private Element getImmediateChildOfDynTraitTypeRepr(DynTraitTypeRepr e, int index) { - - exists(int n, int nTypeBoundList | - n = 0 - and - nTypeBoundList = n + 1 - and ( - none() - or - index = n and result = e.getTypeBoundList() - )) - } + exists(int n, int nTypeBoundList | + n = 0 and + nTypeBoundList = n + 1 and + ( + none() + or + index = n and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. @@ -4676,31 +3724,25 @@ module Raw { * ``` */ class ExprStmt extends @expr_stmt, Stmt { - override string toString() { result = "ExprStmt" } /** * Gets the expression of this expression statement, if it exists. - * */ - Expr getExpr() { - expr_stmt_exprs(this, result) - } + Expr getExpr() { expr_stmt_exprs(this, result) } } - private Element getImmediateChildOfExprStmt(ExprStmt e, int index) { - - exists(int n, int nExpr | - n = 0 - and - nExpr = n + 1 - and ( - none() - or - index = n and result = e.getExpr() - )) - } + exists(int n, int nExpr | + n = 0 and + nExpr = n + 1 and + ( + none() + or + index = n and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -4710,64 +3752,51 @@ module Raw { * ``` */ class FieldExpr extends @field_expr, Expr { - override string toString() { result = "FieldExpr" } /** * Gets the `index`th attr of this field expression (0-based). - * */ - AnyAttr getAttr(int index) { - field_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { field_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this field expression. */ - int getNumberOfAttrs() { - result = count(int i | field_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | field_expr_attrs(this, i, _)) } + /** * Gets the container of this field expression, if it exists. - * */ - Expr getContainer() { - field_expr_containers(this, result) - } + Expr getContainer() { field_expr_containers(this, result) } + /** * Gets the identifier of this field expression, if it exists. - * */ - NameRef getIdentifier() { - field_expr_identifiers(this, result) - } + NameRef getIdentifier() { field_expr_identifiers(this, result) } } - private Element getImmediateChildOfFieldExpr(FieldExpr e, int index) { - - exists(int n, int nAttr, int nContainer, int nIdentifier | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nContainer = nAttr + 1 - and - nIdentifier = nContainer + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getContainer() - or - index = nContainer and result = e.getIdentifier() - )) - } + exists(int n, int nAttr, int nContainer, int nIdentifier | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nContainer = nAttr + 1 and + nIdentifier = nContainer + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getContainer() + or + index = nContainer and result = e.getIdentifier() + ) + ) + } /** * INTERNAL: Do not use. * A function pointer type. - * + * * For example: * ```rust * let f: fn(i32) -> i32; @@ -4775,79 +3804,61 @@ module Raw { * ``` */ class FnPtrTypeRepr extends @fn_ptr_type_repr, TypeRepr { - override string toString() { result = "FnPtrTypeRepr" } /** * Gets the abi of this fn ptr type representation, if it exists. - * */ - Abi getAbi() { - fn_ptr_type_repr_abis(this, result) - } + Abi getAbi() { fn_ptr_type_repr_abis(this, result) } + /** * Holds if this fn ptr type representation is async. - * */ - predicate isAsync() { - fn_ptr_type_repr_is_async(this) - } + predicate isAsync() { fn_ptr_type_repr_is_async(this) } + /** * Holds if this fn ptr type representation is const. - * */ - predicate isConst() { - fn_ptr_type_repr_is_const(this) - } + predicate isConst() { fn_ptr_type_repr_is_const(this) } + /** * Holds if this fn ptr type representation is unsafe. - * */ - predicate isUnsafe() { - fn_ptr_type_repr_is_unsafe(this) - } + predicate isUnsafe() { fn_ptr_type_repr_is_unsafe(this) } + /** * Gets the parameter list of this fn ptr type representation, if it exists. - * */ - ParamList getParamList() { - fn_ptr_type_repr_param_lists(this, result) - } + ParamList getParamList() { fn_ptr_type_repr_param_lists(this, result) } + /** * Gets the ret type of this fn ptr type representation, if it exists. - * */ - RetTypeRepr getRetType() { - fn_ptr_type_repr_ret_types(this, result) - } + RetTypeRepr getRetType() { fn_ptr_type_repr_ret_types(this, result) } } - private Element getImmediateChildOfFnPtrTypeRepr(FnPtrTypeRepr e, int index) { - - exists(int n, int nAbi, int nParamList, int nRetType | - n = 0 - and - nAbi = n + 1 - and - nParamList = nAbi + 1 - and - nRetType = nParamList + 1 - and ( - none() - or - index = n and result = e.getAbi() - or - index = nAbi and result = e.getParamList() - or - index = nParamList and result = e.getRetType() - )) - } + exists(int n, int nAbi, int nParamList, int nRetType | + n = 0 and + nAbi = n + 1 and + nParamList = nAbi + 1 and + nRetType = nParamList + 1 and + ( + none() + or + index = n and result = e.getAbi() + or + index = nAbi and result = e.getParamList() + or + index = nParamList and result = e.getRetType() + ) + ) + } /** * INTERNAL: Do not use. * A function pointer type with a `for` modifier. - * + * * For example: * ```rust * type RefOp = for<'a> fn(&'a X) -> &'a X; @@ -4855,42 +3866,33 @@ module Raw { * ``` */ class ForTypeRepr extends @for_type_repr, TypeRepr { - override string toString() { result = "ForTypeRepr" } /** * Gets the for binder of this for type representation, if it exists. - * */ - ForBinder getForBinder() { - for_type_repr_for_binders(this, result) - } + ForBinder getForBinder() { for_type_repr_for_binders(this, result) } + /** * Gets the type representation of this for type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - for_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { for_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfForTypeRepr(ForTypeRepr e, int index) { - - exists(int n, int nForBinder, int nTypeRepr | - n = 0 - and - nForBinder = n + 1 - and - nTypeRepr = nForBinder + 1 - and ( - none() - or - index = n and result = e.getForBinder() - or - index = nForBinder and result = e.getTypeRepr() - )) - } + exists(int n, int nForBinder, int nTypeRepr | + n = 0 and + nForBinder = n + 1 and + nTypeRepr = nForBinder + 1 and + ( + none() + or + index = n and result = e.getForBinder() + or + index = nForBinder and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -4904,67 +3906,52 @@ module Raw { * ``` */ class FormatArgsExpr extends @format_args_expr, Expr { - override string toString() { result = "FormatArgsExpr" } /** * Gets the `index`th argument of this format arguments expression (0-based). - * */ - FormatArgsArg getArg(int index) { - format_args_expr_args(this, index, result) - } + FormatArgsArg getArg(int index) { format_args_expr_args(this, index, result) } + /** * Gets the number of arguments of this format arguments expression. */ - int getNumberOfArgs() { - result = count(int i | format_args_expr_args(this, i, _)) - } + int getNumberOfArgs() { result = count(int i | format_args_expr_args(this, i, _)) } + /** * Gets the `index`th attr of this format arguments expression (0-based). - * */ - AnyAttr getAttr(int index) { - format_args_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { format_args_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this format arguments expression. */ - int getNumberOfAttrs() { - result = count(int i | format_args_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | format_args_expr_attrs(this, i, _)) } + /** * Gets the template of this format arguments expression, if it exists. - * */ - Expr getTemplate() { - format_args_expr_templates(this, result) - } + Expr getTemplate() { format_args_expr_templates(this, result) } } - private Element getImmediateChildOfFormatArgsExpr(FormatArgsExpr e, int index) { - - exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | - n = 0 - and - nArg = n + e.getNumberOfArgs() - and - nAttr = nArg + e.getNumberOfAttrs() - and - nTemplate = nAttr + 1 - and - nFormat = nTemplate - and ( - none() - or - result = e.getArg(index - n) - or - result = e.getAttr(index - nArg) - or - index = nAttr and result = e.getTemplate() - )) - } + exists(int n, int nArg, int nAttr, int nTemplate, int nFormat | + n = 0 and + nArg = n + e.getNumberOfArgs() and + nAttr = nArg + e.getNumberOfAttrs() and + nTemplate = nAttr + 1 and + nFormat = nTemplate and + ( + none() + or + result = e.getArg(index - n) + or + result = e.getAttr(index - nArg) + or + index = nAttr and result = e.getTemplate() + ) + ) + } /** * INTERNAL: Do not use. @@ -4983,73 +3970,56 @@ module Raw { * ``` */ class IdentPat extends @ident_pat, Pat { - override string toString() { result = "IdentPat" } /** * Gets the `index`th attr of this ident pattern (0-based). - * */ - AnyAttr getAttr(int index) { - ident_pat_attrs(this, index, result) - } + AnyAttr getAttr(int index) { ident_pat_attrs(this, index, result) } + /** * Gets the number of attrs of this ident pattern. */ - int getNumberOfAttrs() { - result = count(int i | ident_pat_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | ident_pat_attrs(this, i, _)) } + /** * Holds if this ident pattern is mut. - * */ - predicate isMut() { - ident_pat_is_mut(this) - } + predicate isMut() { ident_pat_is_mut(this) } + /** * Holds if this ident pattern is reference. - * */ - predicate isRef() { - ident_pat_is_ref(this) - } + predicate isRef() { ident_pat_is_ref(this) } + /** * Gets the name of this ident pattern, if it exists. - * */ - Name getName() { - ident_pat_names(this, result) - } + Name getName() { ident_pat_names(this, result) } + /** * Gets the pattern of this ident pattern, if it exists. - * */ - Pat getPat() { - ident_pat_pats(this, result) - } + Pat getPat() { ident_pat_pats(this, result) } } - private Element getImmediateChildOfIdentPat(IdentPat e, int index) { - - exists(int n, int nAttr, int nName, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and - nPat = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getName() - or - index = nName and result = e.getPat() - )) - } + exists(int n, int nAttr, int nName, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nName = nAttr + 1 and + nPat = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getName() + or + index = nName and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. @@ -5068,75 +4038,59 @@ module Raw { * ``` */ class IfExpr extends @if_expr, Expr { - override string toString() { result = "IfExpr" } /** * Gets the `index`th attr of this if expression (0-based). - * */ - AnyAttr getAttr(int index) { - if_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { if_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this if expression. */ - int getNumberOfAttrs() { - result = count(int i | if_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | if_expr_attrs(this, i, _)) } + /** * Gets the condition of this if expression, if it exists. - * */ - Expr getCondition() { - if_expr_conditions(this, result) - } + Expr getCondition() { if_expr_conditions(this, result) } + /** * Gets the else of this if expression, if it exists. - * */ - Expr getElse() { - if_expr_elses(this, result) - } + Expr getElse() { if_expr_elses(this, result) } + /** * Gets the then of this if expression, if it exists. - * */ - BlockExpr getThen() { - if_expr_thens(this, result) - } + BlockExpr getThen() { if_expr_thens(this, result) } } - private Element getImmediateChildOfIfExpr(IfExpr e, int index) { - - exists(int n, int nAttr, int nCondition, int nElse, int nThen | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nCondition = nAttr + 1 - and - nElse = nCondition + 1 - and - nThen = nElse + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getCondition() - or - index = nCondition and result = e.getElse() - or - index = nElse and result = e.getThen() - )) - } + exists(int n, int nAttr, int nCondition, int nElse, int nThen | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nCondition = nAttr + 1 and + nElse = nCondition + 1 and + nThen = nElse + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getCondition() + or + index = nCondition and result = e.getElse() + or + index = nElse and result = e.getThen() + ) + ) + } /** * INTERNAL: Do not use. * An `impl Trait` type. - * + * * For example: * ```rust * fn foo() -> impl Iterator { 0..10 } @@ -5144,31 +4098,25 @@ module Raw { * ``` */ class ImplTraitTypeRepr extends @impl_trait_type_repr, TypeRepr { - override string toString() { result = "ImplTraitTypeRepr" } /** * Gets the type bound list of this impl trait type representation, if it exists. - * */ - TypeBoundList getTypeBoundList() { - impl_trait_type_repr_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { impl_trait_type_repr_type_bound_lists(this, result) } } - private Element getImmediateChildOfImplTraitTypeRepr(ImplTraitTypeRepr e, int index) { - - exists(int n, int nTypeBoundList | - n = 0 - and - nTypeBoundList = n + 1 - and ( - none() - or - index = n and result = e.getTypeBoundList() - )) - } + exists(int n, int nTypeBoundList | + n = 0 and + nTypeBoundList = n + 1 and + ( + none() + or + index = n and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. @@ -5178,15 +4126,10 @@ module Raw { * ``` */ class IncludeBytesExpr extends @include_bytes_expr, Expr { - override string toString() { result = "IncludeBytesExpr" } - } - - private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index) { - none() - } + private Element getImmediateChildOfIncludeBytesExpr(IncludeBytesExpr e, int index) { none() } /** * INTERNAL: Do not use. @@ -5197,64 +4140,51 @@ module Raw { * ``` */ class IndexExpr extends @index_expr, Expr { - override string toString() { result = "IndexExpr" } /** * Gets the `index`th attr of this index expression (0-based). - * */ - AnyAttr getAttr(int index) { - index_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { index_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this index expression. */ - int getNumberOfAttrs() { - result = count(int i | index_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | index_expr_attrs(this, i, _)) } + /** * Gets the base of this index expression, if it exists. - * */ - Expr getBase() { - index_expr_bases(this, result) - } + Expr getBase() { index_expr_bases(this, result) } + /** * Gets the index of this index expression, if it exists. - * */ - Expr getIndex() { - index_expr_indices(this, result) - } + Expr getIndex() { index_expr_indices(this, result) } } - private Element getImmediateChildOfIndexExpr(IndexExpr e, int index) { - - exists(int n, int nAttr, int nBase, int nIndex | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nBase = nAttr + 1 - and - nIndex = nBase + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getBase() - or - index = nBase and result = e.getIndex() - )) - } + exists(int n, int nAttr, int nBase, int nIndex | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nBase = nAttr + 1 and + nIndex = nBase + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getBase() + or + index = nBase and result = e.getIndex() + ) + ) + } /** * INTERNAL: Do not use. * An inferred type (`_`). - * + * * For example: * ```rust * let x: _ = 42; @@ -5262,20 +4192,15 @@ module Raw { * ``` */ class InferTypeRepr extends @infer_type_repr, TypeRepr { - override string toString() { result = "InferTypeRepr" } - } - - private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index) { - none() - } + private Element getImmediateChildOfInferTypeRepr(InferTypeRepr e, int index) { none() } /** * INTERNAL: Do not use. * An item such as a function, struct, enum, etc. - * + * * For example: * ```rust * fn foo() {} @@ -5284,80 +4209,55 @@ module Raw { * ``` */ class Item extends @item, Stmt, Addressable { - - - /** * Gets the attribute macro expansion of this item, if it exists. - * */ - MacroItems getAttributeMacroExpansion() { - item_attribute_macro_expansions(this, result) - } + MacroItems getAttributeMacroExpansion() { item_attribute_macro_expansions(this, result) } } - - /** * INTERNAL: Do not use. */ class KeyValueMeta extends @key_value_meta, Meta { - override string toString() { result = "KeyValueMeta" } /** * Gets the expression of this key value meta, if it exists. - * */ - Expr getExpr() { - key_value_meta_exprs(this, result) - } + Expr getExpr() { key_value_meta_exprs(this, result) } + /** * Gets the path of this key value meta, if it exists. - * */ - Path getPath() { - key_value_meta_paths(this, result) - } + Path getPath() { key_value_meta_paths(this, result) } } - private Element getImmediateChildOfKeyValueMeta(KeyValueMeta e, int index) { - - exists(int n, int nExpr, int nPath | - n = 0 - and - nExpr = n + 1 - and - nPath = nExpr + 1 - and ( - none() - or - index = n and result = e.getExpr() - or - index = nExpr and result = e.getPath() - )) - } + exists(int n, int nExpr, int nPath | + n = 0 and + nExpr = n + 1 and + nPath = nExpr + 1 and + ( + none() + or + index = n and result = e.getExpr() + or + index = nExpr and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). */ class LabelableExpr extends @labelable_expr, Expr { - - - /** * Gets the label of this labelable expression, if it exists. - * */ - Label getLabel() { - labelable_expr_labels(this, result) - } + Label getLabel() { labelable_expr_labels(this, result) } } - - /** * INTERNAL: Do not use. * A `let` expression. For example: @@ -5368,59 +4268,46 @@ module Raw { * ``` */ class LetExpr extends @let_expr, Expr { - override string toString() { result = "LetExpr" } /** * Gets the `index`th attr of this let expression (0-based). - * */ - AnyAttr getAttr(int index) { - let_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { let_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this let expression. */ - int getNumberOfAttrs() { - result = count(int i | let_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | let_expr_attrs(this, i, _)) } + /** * Gets the scrutinee of this let expression, if it exists. - * */ - Expr getScrutinee() { - let_expr_scrutinees(this, result) - } + Expr getScrutinee() { let_expr_scrutinees(this, result) } + /** * Gets the pattern of this let expression, if it exists. - * */ - Pat getPat() { - let_expr_pats(this, result) - } + Pat getPat() { let_expr_pats(this, result) } } - private Element getImmediateChildOfLetExpr(LetExpr e, int index) { - - exists(int n, int nAttr, int nScrutinee, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nScrutinee = nAttr + 1 - and - nPat = nScrutinee + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getScrutinee() - or - index = nScrutinee and result = e.getPat() - )) - } + exists(int n, int nAttr, int nScrutinee, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nScrutinee = nAttr + 1 and + nPat = nScrutinee + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getScrutinee() + or + index = nScrutinee and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. @@ -5437,86 +4324,67 @@ module Raw { * ``` */ class LetStmt extends @let_stmt, Stmt { - override string toString() { result = "LetStmt" } /** * Gets the `index`th attr of this let statement (0-based). - * */ - AnyAttr getAttr(int index) { - let_stmt_attrs(this, index, result) - } + AnyAttr getAttr(int index) { let_stmt_attrs(this, index, result) } + /** * Gets the number of attrs of this let statement. */ - int getNumberOfAttrs() { - result = count(int i | let_stmt_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | let_stmt_attrs(this, i, _)) } + /** * Gets the initializer of this let statement, if it exists. - * */ - Expr getInitializer() { - let_stmt_initializers(this, result) - } + Expr getInitializer() { let_stmt_initializers(this, result) } + /** * Gets the let else of this let statement, if it exists. - * */ - LetElse getLetElse() { - let_stmt_let_elses(this, result) - } + LetElse getLetElse() { let_stmt_let_elses(this, result) } + /** * Gets the pattern of this let statement, if it exists. - * */ - Pat getPat() { - let_stmt_pats(this, result) - } + Pat getPat() { let_stmt_pats(this, result) } + /** * Gets the type representation of this let statement, if it exists. - * */ - TypeRepr getTypeRepr() { - let_stmt_type_reprs(this, result) - } + TypeRepr getTypeRepr() { let_stmt_type_reprs(this, result) } } - private Element getImmediateChildOfLetStmt(LetStmt e, int index) { - - exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nInitializer = nAttr + 1 - and - nLetElse = nInitializer + 1 - and - nPat = nLetElse + 1 - and - nTypeRepr = nPat + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getInitializer() - or - index = nInitializer and result = e.getLetElse() - or - index = nLetElse and result = e.getPat() - or - index = nPat and result = e.getTypeRepr() - )) - } + exists(int n, int nAttr, int nInitializer, int nLetElse, int nPat, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nInitializer = nAttr + 1 and + nLetElse = nInitializer + 1 and + nPat = nLetElse + 1 and + nTypeRepr = nPat + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getInitializer() + or + index = nInitializer and result = e.getLetElse() + or + index = nLetElse and result = e.getPat() + or + index = nPat and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A lifetime annotation. - * + * * For example: * ```rust * fn foo<'a>(x: &'a str) {} @@ -5524,27 +4392,20 @@ module Raw { * ``` */ class Lifetime extends @lifetime, UseBoundGenericArg { - override string toString() { result = "Lifetime" } /** * Gets the text of this lifetime, if it exists. - * */ - string getText() { - lifetime_texts(this, result) - } + string getText() { lifetime_texts(this, result) } } - - private Element getImmediateChildOfLifetime(Lifetime e, int index) { - none() - } + private Element getImmediateChildOfLifetime(Lifetime e, int index) { none() } /** * INTERNAL: Do not use. * A lifetime argument in a generic argument list. - * + * * For example: * ```rust * let text: Text<'a>; @@ -5552,36 +4413,30 @@ module Raw { * ``` */ class LifetimeArg extends @lifetime_arg, GenericArg { - override string toString() { result = "LifetimeArg" } /** * Gets the lifetime of this lifetime argument, if it exists. - * */ - Lifetime getLifetime() { - lifetime_arg_lifetimes(this, result) - } + Lifetime getLifetime() { lifetime_arg_lifetimes(this, result) } } - private Element getImmediateChildOfLifetimeArg(LifetimeArg e, int index) { - - exists(int n, int nLifetime | - n = 0 - and - nLifetime = n + 1 - and ( - none() - or - index = n and result = e.getLifetime() - )) - } + exists(int n, int nLifetime | + n = 0 and + nLifetime = n + 1 and + ( + none() + or + index = n and result = e.getLifetime() + ) + ) + } /** * INTERNAL: Do not use. * A lifetime parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo<'a>(x: &'a str) {} @@ -5589,59 +4444,46 @@ module Raw { * ``` */ class LifetimeParam extends @lifetime_param, GenericParam { - override string toString() { result = "LifetimeParam" } /** * Gets the `index`th attr of this lifetime parameter (0-based). - * */ - AnyAttr getAttr(int index) { - lifetime_param_attrs(this, index, result) - } + AnyAttr getAttr(int index) { lifetime_param_attrs(this, index, result) } + /** * Gets the number of attrs of this lifetime parameter. */ - int getNumberOfAttrs() { - result = count(int i | lifetime_param_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | lifetime_param_attrs(this, i, _)) } + /** * Gets the lifetime of this lifetime parameter, if it exists. - * */ - Lifetime getLifetime() { - lifetime_param_lifetimes(this, result) - } + Lifetime getLifetime() { lifetime_param_lifetimes(this, result) } + /** * Gets the type bound list of this lifetime parameter, if it exists. - * */ - TypeBoundList getTypeBoundList() { - lifetime_param_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { lifetime_param_type_bound_lists(this, result) } } - private Element getImmediateChildOfLifetimeParam(LifetimeParam e, int index) { - - exists(int n, int nAttr, int nLifetime, int nTypeBoundList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nLifetime = nAttr + 1 - and - nTypeBoundList = nLifetime + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeBoundList() - )) - } + exists(int n, int nAttr, int nLifetime, int nTypeBoundList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nLifetime = nAttr + 1 and + nTypeBoundList = nLifetime + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. @@ -5658,44 +4500,35 @@ module Raw { * ``` */ class LiteralExpr extends @literal_expr, Expr { - override string toString() { result = "LiteralExpr" } /** * Gets the `index`th attr of this literal expression (0-based). - * */ - AnyAttr getAttr(int index) { - literal_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { literal_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this literal expression. */ - int getNumberOfAttrs() { - result = count(int i | literal_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | literal_expr_attrs(this, i, _)) } + /** * Gets the text value of this literal expression, if it exists. - * */ - string getTextValue() { - literal_expr_text_values(this, result) - } + string getTextValue() { literal_expr_text_values(this, result) } } - private Element getImmediateChildOfLiteralExpr(LiteralExpr e, int index) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) - )) - } + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -5708,72 +4541,60 @@ module Raw { * ``` */ class LiteralPat extends @literal_pat, Pat { - override string toString() { result = "LiteralPat" } /** * Gets the literal of this literal pattern, if it exists. - * */ - LiteralExpr getLiteral() { - literal_pat_literals(this, result) - } + LiteralExpr getLiteral() { literal_pat_literals(this, result) } } - private Element getImmediateChildOfLiteralPat(LiteralPat e, int index) { - - exists(int n, int nLiteral | - n = 0 - and - nLiteral = n + 1 - and ( - none() - or - index = n and result = e.getLiteral() - )) - } + exists(int n, int nLiteral | + n = 0 and + nLiteral = n + 1 and + ( + none() + or + index = n and result = e.getLiteral() + ) + ) + } /** * INTERNAL: Do not use. * A macro expression, representing the invocation of a macro that produces an expression. - * + * * For example: * ```rust * let y = vec![1, 2, 3]; * ``` */ class MacroExpr extends @macro_expr, Expr { - override string toString() { result = "MacroExpr" } /** * Gets the macro call of this macro expression, if it exists. - * */ - MacroCall getMacroCall() { - macro_expr_macro_calls(this, result) - } + MacroCall getMacroCall() { macro_expr_macro_calls(this, result) } } - private Element getImmediateChildOfMacroExpr(MacroExpr e, int index) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() - )) - } + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() + ) + ) + } /** * INTERNAL: Do not use. * A macro pattern, representing the invocation of a macro that produces a pattern. - * + * * For example: * ```rust * macro_rules! my_macro { @@ -5789,36 +4610,30 @@ module Raw { * ``` */ class MacroPat extends @macro_pat, Pat { - override string toString() { result = "MacroPat" } /** * Gets the macro call of this macro pattern, if it exists. - * */ - MacroCall getMacroCall() { - macro_pat_macro_calls(this, result) - } + MacroCall getMacroCall() { macro_pat_macro_calls(this, result) } } - private Element getImmediateChildOfMacroPat(MacroPat e, int index) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() - )) - } + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() + ) + ) + } /** * INTERNAL: Do not use. * A type produced by a macro. - * + * * For example: * ```rust * macro_rules! macro_type { @@ -5829,31 +4644,25 @@ module Raw { * ``` */ class MacroTypeRepr extends @macro_type_repr, TypeRepr { - override string toString() { result = "MacroTypeRepr" } /** * Gets the macro call of this macro type representation, if it exists. - * */ - MacroCall getMacroCall() { - macro_type_repr_macro_calls(this, result) - } + MacroCall getMacroCall() { macro_type_repr_macro_calls(this, result) } } - private Element getImmediateChildOfMacroTypeRepr(MacroTypeRepr e, int index) { - - exists(int n, int nMacroCall | - n = 0 - and - nMacroCall = n + 1 - and ( - none() - or - index = n and result = e.getMacroCall() - )) - } + exists(int n, int nMacroCall | + n = 0 and + nMacroCall = n + 1 and + ( + none() + or + index = n and result = e.getMacroCall() + ) + ) + } /** * INTERNAL: Do not use. @@ -5872,66 +4681,53 @@ module Raw { * ``` */ class MatchExpr extends @match_expr, Expr { - override string toString() { result = "MatchExpr" } /** * Gets the `index`th attr of this match expression (0-based). - * */ - AnyAttr getAttr(int index) { - match_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { match_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this match expression. */ - int getNumberOfAttrs() { - result = count(int i | match_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | match_expr_attrs(this, i, _)) } + /** * Gets the scrutinee (the expression being matched) of this match expression, if it exists. - * */ - Expr getScrutinee() { - match_expr_scrutinees(this, result) - } + Expr getScrutinee() { match_expr_scrutinees(this, result) } + /** * Gets the match arm list of this match expression, if it exists. - * */ - MatchArmList getMatchArmList() { - match_expr_match_arm_lists(this, result) - } + MatchArmList getMatchArmList() { match_expr_match_arm_lists(this, result) } } - private Element getImmediateChildOfMatchExpr(MatchExpr e, int index) { - - exists(int n, int nAttr, int nScrutinee, int nMatchArmList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nScrutinee = nAttr + 1 - and - nMatchArmList = nScrutinee + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getScrutinee() - or - index = nScrutinee and result = e.getMatchArmList() - )) - } + exists(int n, int nAttr, int nScrutinee, int nMatchArmList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nScrutinee = nAttr + 1 and + nMatchArmList = nScrutinee + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getScrutinee() + or + index = nScrutinee and result = e.getMatchArmList() + ) + ) + } /** * INTERNAL: Do not use. * NOTE: Consider using `MethodCall` instead, as that also includes calls to methods using * call syntax (such as `Foo::method(x)`), operation syntax (such as `x + y`), and * indexing syntax (such as `x[y]`). - * + * * A method call expression. For example: * ```rust * x.foo(42); @@ -5939,86 +4735,67 @@ module Raw { * ``` */ class MethodCallExpr extends @method_call_expr, Expr { - override string toString() { result = "MethodCallExpr" } /** * Gets the argument list of this method call expression, if it exists. - * */ - ArgList getArgList() { - method_call_expr_arg_lists(this, result) - } + ArgList getArgList() { method_call_expr_arg_lists(this, result) } + /** * Gets the `index`th attr of this method call expression (0-based). - * */ - AnyAttr getAttr(int index) { - method_call_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { method_call_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this method call expression. */ - int getNumberOfAttrs() { - result = count(int i | method_call_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | method_call_expr_attrs(this, i, _)) } + /** * Gets the generic argument list of this method call expression, if it exists. - * */ - GenericArgList getGenericArgList() { - method_call_expr_generic_arg_lists(this, result) - } + GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) } + /** * Gets the identifier of this method call expression, if it exists. - * */ - NameRef getIdentifier() { - method_call_expr_identifiers(this, result) - } + NameRef getIdentifier() { method_call_expr_identifiers(this, result) } + /** * Gets the receiver of this method call expression, if it exists. - * */ - Expr getReceiver() { - method_call_expr_receivers(this, result) - } + Expr getReceiver() { method_call_expr_receivers(this, result) } } - private Element getImmediateChildOfMethodCallExpr(MethodCallExpr e, int index) { - - exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | - n = 0 - and - nArgList = n + 1 - and - nAttr = nArgList + e.getNumberOfAttrs() - and - nGenericArgList = nAttr + 1 - and - nIdentifier = nGenericArgList + 1 - and - nReceiver = nIdentifier + 1 - and ( - none() - or - index = n and result = e.getArgList() - or - result = e.getAttr(index - nArgList) - or - index = nAttr and result = e.getGenericArgList() - or - index = nGenericArgList and result = e.getIdentifier() - or - index = nIdentifier and result = e.getReceiver() - )) - } + exists(int n, int nArgList, int nAttr, int nGenericArgList, int nIdentifier, int nReceiver | + n = 0 and + nArgList = n + 1 and + nAttr = nArgList + e.getNumberOfAttrs() and + nGenericArgList = nAttr + 1 and + nIdentifier = nGenericArgList + 1 and + nReceiver = nIdentifier + 1 and + ( + none() + or + index = n and result = e.getArgList() + or + result = e.getAttr(index - nArgList) + or + index = nAttr and result = e.getGenericArgList() + or + index = nGenericArgList and result = e.getIdentifier() + or + index = nIdentifier and result = e.getReceiver() + ) + ) + } /** * INTERNAL: Do not use. * A reference to a name. - * + * * For example: * ```rust * foo(); @@ -6026,27 +4803,20 @@ module Raw { * ``` */ class NameRef extends @name_ref, UseBoundGenericArg { - override string toString() { result = "NameRef" } /** * Gets the text of this name reference, if it exists. - * */ - string getText() { - name_ref_texts(this, result) - } + string getText() { name_ref_texts(this, result) } } - - private Element getImmediateChildOfNameRef(NameRef e, int index) { - none() - } + private Element getImmediateChildOfNameRef(NameRef e, int index) { none() } /** * INTERNAL: Do not use. * The never type `!`. - * + * * For example: * ```rust * fn foo() -> ! { panic!() } @@ -6054,15 +4824,10 @@ module Raw { * ``` */ class NeverTypeRepr extends @never_type_repr, TypeRepr { - override string toString() { result = "NeverTypeRepr" } - } - - private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index) { - none() - } + private Element getImmediateChildOfNeverTypeRepr(NeverTypeRepr e, int index) { none() } /** * INTERNAL: Do not use. @@ -6075,15 +4840,10 @@ module Raw { * ``` */ class NotNull extends @not_null, Pat { - override string toString() { result = "NotNull" } - } - - private Element getImmediateChildOfNotNull(NotNull e, int index) { - none() - } + private Element getImmediateChildOfNotNull(NotNull e, int index) { none() } /** * INTERNAL: Do not use. @@ -6093,65 +4853,51 @@ module Raw { * ``` */ class OffsetOfExpr extends @offset_of_expr, Expr { - override string toString() { result = "OffsetOfExpr" } /** * Gets the `index`th attr of this offset of expression (0-based). - * */ - AnyAttr getAttr(int index) { - offset_of_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { offset_of_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this offset of expression. */ - int getNumberOfAttrs() { - result = count(int i | offset_of_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | offset_of_expr_attrs(this, i, _)) } + /** * Gets the `index`th field of this offset of expression (0-based). - * */ - NameRef getField(int index) { - offset_of_expr_fields(this, index, result) - } + NameRef getField(int index) { offset_of_expr_fields(this, index, result) } + /** * Gets the number of fields of this offset of expression. */ - int getNumberOfFields() { - result = count(int i | offset_of_expr_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | offset_of_expr_fields(this, i, _)) } + /** * Gets the type representation of this offset of expression, if it exists. - * */ - TypeRepr getTypeRepr() { - offset_of_expr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { offset_of_expr_type_reprs(this, result) } } - private Element getImmediateChildOfOffsetOfExpr(OffsetOfExpr e, int index) { - - exists(int n, int nAttr, int nField, int nTypeRepr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and - nTypeRepr = nField + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - or - index = nField and result = e.getTypeRepr() - )) - } + exists(int n, int nAttr, int nField, int nTypeRepr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + nTypeRepr = nField + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + or + index = nField and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -6163,37 +4909,30 @@ module Raw { * ``` */ class OrPat extends @or_pat, Pat { - override string toString() { result = "OrPat" } /** * Gets the `index`th pattern of this or pattern (0-based). - * */ - Pat getPat(int index) { - or_pat_pats(this, index, result) - } + Pat getPat(int index) { or_pat_pats(this, index, result) } + /** * Gets the number of patterns of this or pattern. */ - int getNumberOfPats() { - result = count(int i | or_pat_pats(this, i, _)) - } + int getNumberOfPats() { result = count(int i | or_pat_pats(this, i, _)) } } - private Element getImmediateChildOfOrPat(OrPat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + e.getNumberOfPats() - and ( - none() - or - result = e.getPat(index - n) - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + e.getNumberOfPats() and + ( + none() + or + result = e.getPat(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -6205,97 +4944,79 @@ module Raw { * ``` */ class Param extends @param, ParamBase { - override string toString() { result = "Param" } /** * Gets the pattern of this parameter, if it exists. - * */ - Pat getPat() { - param_pats(this, result) - } + Pat getPat() { param_pats(this, result) } } - private Element getImmediateChildOfParam(Param e, int index) { - - exists(int n, int nAttr, int nTypeRepr, int nPat | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nTypeRepr = nAttr + 1 - and - nPat = nTypeRepr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getPat() - )) - } + exists(int n, int nAttr, int nTypeRepr, int nPat | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nTypeRepr = nAttr + 1 and + nPat = nTypeRepr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A parenthesized expression. - * + * * For example: * ```rust * (x + y) * ``` */ class ParenExpr extends @paren_expr, Expr { - override string toString() { result = "ParenExpr" } /** * Gets the `index`th attr of this paren expression (0-based). - * */ - AnyAttr getAttr(int index) { - paren_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { paren_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this paren expression. */ - int getNumberOfAttrs() { - result = count(int i | paren_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | paren_expr_attrs(this, i, _)) } + /** * Gets the expression of this paren expression, if it exists. - * */ - Expr getExpr() { - paren_expr_exprs(this, result) - } + Expr getExpr() { paren_expr_exprs(this, result) } } - private Element getImmediateChildOfParenExpr(ParenExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. * A parenthesized pattern. - * + * * For example: * ```rust * let (x) = 1; @@ -6303,36 +5024,30 @@ module Raw { * ``` */ class ParenPat extends @paren_pat, Pat { - override string toString() { result = "ParenPat" } /** * Gets the pattern of this paren pattern, if it exists. - * */ - Pat getPat() { - paren_pat_pats(this, result) - } + Pat getPat() { paren_pat_pats(this, result) } } - private Element getImmediateChildOfParenPat(ParenPat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A parenthesized type. - * + * * For example: * ```rust * let x: (i32); @@ -6340,73 +5055,55 @@ module Raw { * ``` */ class ParenTypeRepr extends @paren_type_repr, TypeRepr { - override string toString() { result = "ParenTypeRepr" } /** * Gets the type representation of this paren type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - paren_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { paren_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfParenTypeRepr(ParenTypeRepr e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A path expression or a variable access in a formatting template. See `PathExpr` and `FormatTemplateVariableAccess` for further details. */ - class PathExprBase extends @path_expr_base, Expr { - - - - } - - + class PathExprBase extends @path_expr_base, Expr { } /** * INTERNAL: Do not use. */ class PathMeta extends @path_meta, Meta { - override string toString() { result = "PathMeta" } /** * Gets the path of this path meta, if it exists. - * */ - Path getPath() { - path_meta_paths(this, result) - } + Path getPath() { path_meta_paths(this, result) } } - private Element getImmediateChildOfPathMeta(PathMeta e, int index) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() - )) - } + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. @@ -6419,24 +5116,20 @@ module Raw { * ``` */ class PathPat extends @path_pat, Pat, PathAstNode { - override string toString() { result = "PathPat" } - } - private Element getImmediateChildOfPathPat(PathPat e, int index) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() - )) - } + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. @@ -6447,31 +5140,25 @@ module Raw { * ``` */ class PathTypeRepr extends @path_type_repr, TypeRepr { - override string toString() { result = "PathTypeRepr" } /** * Gets the path of this path type representation, if it exists. - * */ - Path getPath() { - path_type_repr_paths(this, result) - } + Path getPath() { path_type_repr_paths(this, result) } } - private Element getImmediateChildOfPathTypeRepr(PathTypeRepr e, int index) { - - exists(int n, int nPath | - n = 0 - and - nPath = n + 1 - and ( - none() - or - index = n and result = e.getPath() - )) - } + exists(int n, int nPath | + n = 0 and + nPath = n + 1 and + ( + none() + or + index = n and result = e.getPath() + ) + ) + } /** * INTERNAL: Do not use. @@ -6483,42 +5170,33 @@ module Raw { * ``` */ class PatternTypeRepr extends @pattern_type_repr, TypeRepr { - override string toString() { result = "PatternTypeRepr" } /** * Gets the pattern of this pattern type representation, if it exists. - * */ - Pat getPat() { - pattern_type_repr_pats(this, result) - } + Pat getPat() { pattern_type_repr_pats(this, result) } + /** * Gets the type representation of this pattern type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - pattern_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { pattern_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfPatternTypeRepr(PatternTypeRepr e, int index) { - - exists(int n, int nPat, int nTypeRepr | - n = 0 - and - nPat = n + 1 - and - nTypeRepr = nPat + 1 - and ( - none() - or - index = n and result = e.getPat() - or - index = nPat and result = e.getTypeRepr() - )) - } + exists(int n, int nPat, int nTypeRepr | + n = 0 and + nPat = n + 1 and + nTypeRepr = nPat + 1 and + ( + none() + or + index = n and result = e.getPat() + or + index = nPat and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -6530,60 +5208,48 @@ module Raw { * ``` */ class PrefixExpr extends @prefix_expr, Expr { - override string toString() { result = "PrefixExpr" } /** * Gets the `index`th attr of this prefix expression (0-based). - * */ - AnyAttr getAttr(int index) { - prefix_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { prefix_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this prefix expression. */ - int getNumberOfAttrs() { - result = count(int i | prefix_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | prefix_expr_attrs(this, i, _)) } + /** * Gets the expression of this prefix expression, if it exists. - * */ - Expr getExpr() { - prefix_expr_exprs(this, result) - } + Expr getExpr() { prefix_expr_exprs(this, result) } + /** * Gets the operator name of this prefix expression, if it exists. - * */ - string getOperatorName() { - prefix_expr_operator_names(this, result) - } + string getOperatorName() { prefix_expr_operator_names(this, result) } } - private Element getImmediateChildOfPrefixExpr(PrefixExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. * A pointer type. - * + * * For example: * ```rust * let p: *const i32; @@ -6592,45 +5258,35 @@ module Raw { * ``` */ class PtrTypeRepr extends @ptr_type_repr, TypeRepr { - override string toString() { result = "PtrTypeRepr" } /** * Holds if this ptr type representation is const. - * */ - predicate isConst() { - ptr_type_repr_is_const(this) - } + predicate isConst() { ptr_type_repr_is_const(this) } + /** * Holds if this ptr type representation is mut. - * */ - predicate isMut() { - ptr_type_repr_is_mut(this) - } + predicate isMut() { ptr_type_repr_is_mut(this) } + /** * Gets the type representation of this ptr type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - ptr_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { ptr_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfPtrTypeRepr(PtrTypeRepr e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -6645,66 +5301,51 @@ module Raw { * ``` */ class RangeExpr extends @range_expr, Expr { - override string toString() { result = "RangeExpr" } /** * Gets the `index`th attr of this range expression (0-based). - * */ - AnyAttr getAttr(int index) { - range_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { range_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this range expression. */ - int getNumberOfAttrs() { - result = count(int i | range_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | range_expr_attrs(this, i, _)) } + /** * Gets the end of this range expression, if it exists. - * */ - Expr getEnd() { - range_expr_ends(this, result) - } + Expr getEnd() { range_expr_ends(this, result) } + /** * Gets the operator name of this range expression, if it exists. - * */ - string getOperatorName() { - range_expr_operator_names(this, result) - } + string getOperatorName() { range_expr_operator_names(this, result) } + /** * Gets the start of this range expression, if it exists. - * */ - Expr getStart() { - range_expr_starts(this, result) - } + Expr getStart() { range_expr_starts(this, result) } } - private Element getImmediateChildOfRangeExpr(RangeExpr e, int index) { - - exists(int n, int nAttr, int nEnd, int nStart | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nEnd = nAttr + 1 - and - nStart = nEnd + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getEnd() - or - index = nEnd and result = e.getStart() - )) - } + exists(int n, int nAttr, int nEnd, int nStart | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nEnd = nAttr + 1 and + nStart = nEnd + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getEnd() + or + index = nEnd and result = e.getStart() + ) + ) + } /** * INTERNAL: Do not use. @@ -6718,49 +5359,38 @@ module Raw { * ``` */ class RangePat extends @range_pat, Pat { - override string toString() { result = "RangePat" } /** * Gets the end of this range pattern, if it exists. - * */ - Pat getEnd() { - range_pat_ends(this, result) - } + Pat getEnd() { range_pat_ends(this, result) } + /** * Gets the operator name of this range pattern, if it exists. - * */ - string getOperatorName() { - range_pat_operator_names(this, result) - } + string getOperatorName() { range_pat_operator_names(this, result) } + /** * Gets the start of this range pattern, if it exists. - * */ - Pat getStart() { - range_pat_starts(this, result) - } + Pat getStart() { range_pat_starts(this, result) } } - private Element getImmediateChildOfRangePat(RangePat e, int index) { - - exists(int n, int nEnd, int nStart | - n = 0 - and - nEnd = n + 1 - and - nStart = nEnd + 1 - and ( - none() - or - index = n and result = e.getEnd() - or - index = nEnd and result = e.getStart() - )) - } + exists(int n, int nEnd, int nStart | + n = 0 and + nEnd = n + 1 and + nStart = nEnd + 1 and + ( + none() + or + index = n and result = e.getEnd() + or + index = nEnd and result = e.getStart() + ) + ) + } /** * INTERNAL: Do not use. @@ -6773,69 +5403,53 @@ module Raw { * ``` */ class RefExpr extends @ref_expr, Expr { - override string toString() { result = "RefExpr" } /** * Gets the `index`th attr of this reference expression (0-based). - * */ - AnyAttr getAttr(int index) { - ref_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { ref_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this reference expression. */ - int getNumberOfAttrs() { - result = count(int i | ref_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | ref_expr_attrs(this, i, _)) } + /** * Gets the expression of this reference expression, if it exists. - * */ - Expr getExpr() { - ref_expr_exprs(this, result) - } + Expr getExpr() { ref_expr_exprs(this, result) } + /** * Holds if this reference expression is const. - * */ - predicate isConst() { - ref_expr_is_const(this) - } + predicate isConst() { ref_expr_is_const(this) } + /** * Holds if this reference expression is mut. - * */ - predicate isMut() { - ref_expr_is_mut(this) - } + predicate isMut() { ref_expr_is_mut(this) } + /** * Holds if this reference expression is raw. - * */ - predicate isRaw() { - ref_expr_is_raw(this) - } + predicate isRaw() { ref_expr_is_raw(this) } } - private Element getImmediateChildOfRefExpr(RefExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -6848,43 +5462,35 @@ module Raw { * ``` */ class RefPat extends @ref_pat, Pat { - override string toString() { result = "RefPat" } /** * Holds if this reference pattern is mut. - * */ - predicate isMut() { - ref_pat_is_mut(this) - } + predicate isMut() { ref_pat_is_mut(this) } + /** * Gets the pattern of this reference pattern, if it exists. - * */ - Pat getPat() { - ref_pat_pats(this, result) - } + Pat getPat() { ref_pat_pats(this, result) } } - private Element getImmediateChildOfRefPat(RefPat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + 1 - and ( - none() - or - index = n and result = e.getPat() - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + 1 and + ( + none() + or + index = n and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. * A reference type. - * + * * For example: * ```rust * let r: &i32; @@ -6893,54 +5499,43 @@ module Raw { * ``` */ class RefTypeRepr extends @ref_type_repr, TypeRepr { - override string toString() { result = "RefTypeRepr" } /** * Holds if this reference type representation is mut. - * */ - predicate isMut() { - ref_type_repr_is_mut(this) - } + predicate isMut() { ref_type_repr_is_mut(this) } + /** * Gets the lifetime of this reference type representation, if it exists. - * */ - Lifetime getLifetime() { - ref_type_repr_lifetimes(this, result) - } + Lifetime getLifetime() { ref_type_repr_lifetimes(this, result) } + /** * Gets the type representation of this reference type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - ref_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { ref_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfRefTypeRepr(RefTypeRepr e, int index) { - - exists(int n, int nLifetime, int nTypeRepr | - n = 0 - and - nLifetime = n + 1 - and - nTypeRepr = nLifetime + 1 - and ( - none() - or - index = n and result = e.getLifetime() - or - index = nLifetime and result = e.getTypeRepr() - )) - } + exists(int n, int nLifetime, int nTypeRepr | + n = 0 and + nLifetime = n + 1 and + nTypeRepr = nLifetime + 1 and + ( + none() + or + index = n and result = e.getLifetime() + or + index = nLifetime and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A rest pattern (`..`) in a tuple, slice, or struct pattern. - * + * * For example: * ```rust * let (a, .., z) = (1, 2, 3); @@ -6948,37 +5543,30 @@ module Raw { * ``` */ class RestPat extends @rest_pat, Pat { - override string toString() { result = "RestPat" } /** * Gets the `index`th attr of this rest pattern (0-based). - * */ - AnyAttr getAttr(int index) { - rest_pat_attrs(this, index, result) - } + AnyAttr getAttr(int index) { rest_pat_attrs(this, index, result) } + /** * Gets the number of attrs of this rest pattern. */ - int getNumberOfAttrs() { - result = count(int i | rest_pat_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | rest_pat_attrs(this, i, _)) } } - private Element getImmediateChildOfRestPat(RestPat e, int index) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) - )) - } + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -6995,48 +5583,38 @@ module Raw { * ``` */ class ReturnExpr extends @return_expr, Expr { - override string toString() { result = "ReturnExpr" } /** * Gets the `index`th attr of this return expression (0-based). - * */ - AnyAttr getAttr(int index) { - return_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { return_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this return expression. */ - int getNumberOfAttrs() { - result = count(int i | return_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | return_expr_attrs(this, i, _)) } + /** * Gets the expression of this return expression, if it exists. - * */ - Expr getExpr() { - return_expr_exprs(this, result) - } + Expr getExpr() { return_expr_exprs(this, result) } } - private Element getImmediateChildOfReturnExpr(ReturnExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -7053,64 +5631,49 @@ module Raw { * ``` */ class SelfParam extends @self_param, ParamBase { - override string toString() { result = "SelfParam" } /** * Holds if this self parameter is reference. - * */ - predicate isRef() { - self_param_is_ref(this) - } + predicate isRef() { self_param_is_ref(this) } + /** * Holds if this self parameter is mut. - * */ - predicate isMut() { - self_param_is_mut(this) - } + predicate isMut() { self_param_is_mut(this) } + /** * Gets the lifetime of this self parameter, if it exists. - * */ - Lifetime getLifetime() { - self_param_lifetimes(this, result) - } + Lifetime getLifetime() { self_param_lifetimes(this, result) } + /** * Gets the name of this self parameter, if it exists. - * */ - Name getName() { - self_param_names(this, result) - } + Name getName() { self_param_names(this, result) } } - private Element getImmediateChildOfSelfParam(SelfParam e, int index) { - - exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nTypeRepr = nAttr + 1 - and - nLifetime = nTypeRepr + 1 - and - nName = nLifetime + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getLifetime() - or - index = nLifetime and result = e.getName() - )) - } + exists(int n, int nAttr, int nTypeRepr, int nLifetime, int nName | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nTypeRepr = nAttr + 1 and + nLifetime = nTypeRepr + 1 and + nName = nLifetime + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getLifetime() + or + index = nLifetime and result = e.getName() + ) + ) + } /** * INTERNAL: Do not use. @@ -7124,42 +5687,35 @@ module Raw { * ``` */ class SlicePat extends @slice_pat, Pat { - override string toString() { result = "SlicePat" } /** * Gets the `index`th pattern of this slice pattern (0-based). - * */ - Pat getPat(int index) { - slice_pat_pats(this, index, result) - } + Pat getPat(int index) { slice_pat_pats(this, index, result) } + /** * Gets the number of patterns of this slice pattern. */ - int getNumberOfPats() { - result = count(int i | slice_pat_pats(this, i, _)) - } + int getNumberOfPats() { result = count(int i | slice_pat_pats(this, i, _)) } } - private Element getImmediateChildOfSlicePat(SlicePat e, int index) { - - exists(int n, int nPat | - n = 0 - and - nPat = n + e.getNumberOfPats() - and ( - none() - or - result = e.getPat(index - n) - )) - } + exists(int n, int nPat | + n = 0 and + nPat = n + e.getNumberOfPats() and + ( + none() + or + result = e.getPat(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A slice type. - * + * * For example: * ```rust * let s: &[i32]; @@ -7167,31 +5723,25 @@ module Raw { * ``` */ class SliceTypeRepr extends @slice_type_repr, TypeRepr { - override string toString() { result = "SliceTypeRepr" } /** * Gets the type representation of this slice type representation, if it exists. - * */ - TypeRepr getTypeRepr() { - slice_type_repr_type_reprs(this, result) - } + TypeRepr getTypeRepr() { slice_type_repr_type_reprs(this, result) } } - private Element getImmediateChildOfSliceTypeRepr(SliceTypeRepr e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. @@ -7204,40 +5754,35 @@ module Raw { * ``` */ class StructExpr extends @struct_expr, Expr, PathAstNode { - override string toString() { result = "StructExpr" } /** * Gets the struct expression field list of this struct expression, if it exists. - * */ StructExprFieldList getStructExprFieldList() { struct_expr_struct_expr_field_lists(this, result) } } - private Element getImmediateChildOfStructExpr(StructExpr e, int index) { - - exists(int n, int nPath, int nStructExprFieldList | - n = 0 - and - nPath = n + 1 - and - nStructExprFieldList = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getStructExprFieldList() - )) - } + exists(int n, int nPath, int nStructExprFieldList | + n = 0 and + nPath = n + 1 and + nStructExprFieldList = nPath + 1 and + ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getStructExprFieldList() + ) + ) + } /** * INTERNAL: Do not use. * A list of fields in a struct declaration. - * + * * For example: * ```rust * struct S { x: i32, y: i32 } @@ -7245,37 +5790,30 @@ module Raw { * ``` */ class StructFieldList extends @struct_field_list, FieldList { - override string toString() { result = "StructFieldList" } /** * Gets the `index`th field of this struct field list (0-based). - * */ - StructField getField(int index) { - struct_field_list_fields(this, index, result) - } + StructField getField(int index) { struct_field_list_fields(this, index, result) } + /** * Gets the number of fields of this struct field list. */ - int getNumberOfFields() { - result = count(int i | struct_field_list_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | struct_field_list_fields(this, i, _)) } } - private Element getImmediateChildOfStructFieldList(StructFieldList e, int index) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) - )) - } + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() + or + result = e.getField(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -7288,81 +5826,65 @@ module Raw { * ``` */ class StructPat extends @struct_pat, Pat, PathAstNode { - override string toString() { result = "StructPat" } /** * Gets the struct pattern field list of this struct pattern, if it exists. - * */ - StructPatFieldList getStructPatFieldList() { - struct_pat_struct_pat_field_lists(this, result) - } + StructPatFieldList getStructPatFieldList() { struct_pat_struct_pat_field_lists(this, result) } } - private Element getImmediateChildOfStructPat(StructPat e, int index) { - - exists(int n, int nPath, int nStructPatFieldList | - n = 0 - and - nPath = n + 1 - and - nStructPatFieldList = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getStructPatFieldList() - )) - } + exists(int n, int nPath, int nStructPatFieldList | + n = 0 and + nPath = n + 1 and + nStructPatFieldList = nPath + 1 and + ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getStructPatFieldList() + ) + ) + } /** * INTERNAL: Do not use. */ class TokenTreeMeta extends @token_tree_meta, Meta { - override string toString() { result = "TokenTreeMeta" } /** * Gets the path of this token tree meta, if it exists. - * */ - Path getPath() { - token_tree_meta_paths(this, result) - } + Path getPath() { token_tree_meta_paths(this, result) } + /** * Gets the token tree of this token tree meta, if it exists. - * */ - TokenTree getTokenTree() { - token_tree_meta_token_trees(this, result) - } + TokenTree getTokenTree() { token_tree_meta_token_trees(this, result) } } - private Element getImmediateChildOfTokenTreeMeta(TokenTreeMeta e, int index) { - - exists(int n, int nPath, int nTokenTree | - n = 0 - and - nPath = n + 1 - and - nTokenTree = nPath + 1 - and ( - none() - or - index = n and result = e.getPath() - or - index = nPath and result = e.getTokenTree() - )) - } + exists(int n, int nPath, int nTokenTree | + n = 0 and + nPath = n + 1 and + nTokenTree = nPath + 1 and + ( + none() + or + index = n and result = e.getPath() + or + index = nPath and result = e.getTokenTree() + ) + ) + } /** * INTERNAL: Do not use. * A try expression using the `?` operator. - * + * * For example: * ```rust * let x = foo()?; @@ -7370,48 +5892,38 @@ module Raw { * ``` */ class TryExpr extends @try_expr, Expr { - override string toString() { result = "TryExpr" } /** * Gets the `index`th attr of this try expression (0-based). - * */ - AnyAttr getAttr(int index) { - try_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { try_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this try expression. */ - int getNumberOfAttrs() { - result = count(int i | try_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | try_expr_attrs(this, i, _)) } + /** * Gets the expression of this try expression, if it exists. - * */ - Expr getExpr() { - try_expr_exprs(this, result) - } + Expr getExpr() { try_expr_exprs(this, result) } } - private Element getImmediateChildOfTryExpr(TryExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -7423,59 +5935,48 @@ module Raw { * ``` */ class TupleExpr extends @tuple_expr, Expr { - override string toString() { result = "TupleExpr" } /** * Gets the `index`th attr of this tuple expression (0-based). - * */ - AnyAttr getAttr(int index) { - tuple_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { tuple_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this tuple expression. */ - int getNumberOfAttrs() { - result = count(int i | tuple_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | tuple_expr_attrs(this, i, _)) } + /** * Gets the `index`th field of this tuple expression (0-based). - * */ - Expr getField(int index) { - tuple_expr_fields(this, index, result) - } + Expr getField(int index) { tuple_expr_fields(this, index, result) } + /** * Gets the number of fields of this tuple expression. */ - int getNumberOfFields() { - result = count(int i | tuple_expr_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | tuple_expr_fields(this, i, _)) } } - private Element getImmediateChildOfTupleExpr(TupleExpr e, int index) { - - exists(int n, int nAttr, int nField | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nField = nAttr + e.getNumberOfFields() - and ( - none() - or - result = e.getAttr(index - n) - or - result = e.getField(index - nAttr) - )) - } + exists(int n, int nAttr, int nField | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nField = nAttr + e.getNumberOfFields() and + ( + none() + or + result = e.getAttr(index - n) + or + result = e.getField(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. * A list of fields in a tuple struct or tuple variant. - * + * * For example: * ```rust * struct S(i32, String); @@ -7483,37 +5984,30 @@ module Raw { * ``` */ class TupleFieldList extends @tuple_field_list, FieldList { - override string toString() { result = "TupleFieldList" } /** * Gets the `index`th field of this tuple field list (0-based). - * */ - TupleField getField(int index) { - tuple_field_list_fields(this, index, result) - } + TupleField getField(int index) { tuple_field_list_fields(this, index, result) } + /** * Gets the number of fields of this tuple field list. */ - int getNumberOfFields() { - result = count(int i | tuple_field_list_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | tuple_field_list_fields(this, i, _)) } } - private Element getImmediateChildOfTupleFieldList(TupleFieldList e, int index) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) - )) - } + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() + or + result = e.getField(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -7524,37 +6018,30 @@ module Raw { * ``` */ class TuplePat extends @tuple_pat, Pat { - override string toString() { result = "TuplePat" } /** * Gets the `index`th field of this tuple pattern (0-based). - * */ - Pat getField(int index) { - tuple_pat_fields(this, index, result) - } + Pat getField(int index) { tuple_pat_fields(this, index, result) } + /** * Gets the number of fields of this tuple pattern. */ - int getNumberOfFields() { - result = count(int i | tuple_pat_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | tuple_pat_fields(this, i, _)) } } - private Element getImmediateChildOfTuplePat(TuplePat e, int index) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) - )) - } + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() + or + result = e.getField(index - n) + ) + ) + } /** * INTERNAL: Do not use. @@ -7568,46 +6055,38 @@ module Raw { * ``` */ class TupleStructPat extends @tuple_struct_pat, Pat, PathAstNode { - override string toString() { result = "TupleStructPat" } /** * Gets the `index`th field of this tuple struct pattern (0-based). - * */ - Pat getField(int index) { - tuple_struct_pat_fields(this, index, result) - } + Pat getField(int index) { tuple_struct_pat_fields(this, index, result) } + /** * Gets the number of fields of this tuple struct pattern. */ - int getNumberOfFields() { - result = count(int i | tuple_struct_pat_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | tuple_struct_pat_fields(this, i, _)) } } - private Element getImmediateChildOfTupleStructPat(TupleStructPat e, int index) { - - exists(int n, int nPath, int nField | - n = 0 - and - nPath = n + 1 - and - nField = nPath + e.getNumberOfFields() - and ( - none() - or - index = n and result = e.getPath() - or - result = e.getField(index - nPath) - )) - } + exists(int n, int nPath, int nField | + n = 0 and + nPath = n + 1 and + nField = nPath + e.getNumberOfFields() and + ( + none() + or + index = n and result = e.getPath() + or + result = e.getField(index - nPath) + ) + ) + } /** * INTERNAL: Do not use. * A tuple type. - * + * * For example: * ```rust * let t: (i32, String); @@ -7615,42 +6094,35 @@ module Raw { * ``` */ class TupleTypeRepr extends @tuple_type_repr, TypeRepr { - override string toString() { result = "TupleTypeRepr" } /** * Gets the `index`th field of this tuple type representation (0-based). - * */ - TypeRepr getField(int index) { - tuple_type_repr_fields(this, index, result) - } + TypeRepr getField(int index) { tuple_type_repr_fields(this, index, result) } + /** * Gets the number of fields of this tuple type representation. */ - int getNumberOfFields() { - result = count(int i | tuple_type_repr_fields(this, i, _)) - } + int getNumberOfFields() { result = count(int i | tuple_type_repr_fields(this, i, _)) } } - private Element getImmediateChildOfTupleTypeRepr(TupleTypeRepr e, int index) { - - exists(int n, int nField | - n = 0 - and - nField = n + e.getNumberOfFields() - and ( - none() - or - result = e.getField(index - n) - )) - } + exists(int n, int nField | + n = 0 and + nField = n + e.getNumberOfFields() and + ( + none() + or + result = e.getField(index - n) + ) + ) + } /** * INTERNAL: Do not use. * A type argument in a generic argument list. - * + * * For example: * ```rust * Foo:: @@ -7658,36 +6130,30 @@ module Raw { * ``` */ class TypeArg extends @type_arg, GenericArg { - override string toString() { result = "TypeArg" } /** * Gets the type representation of this type argument, if it exists. - * */ - TypeRepr getTypeRepr() { - type_arg_type_reprs(this, result) - } + TypeRepr getTypeRepr() { type_arg_type_reprs(this, result) } } - private Element getImmediateChildOfTypeArg(TypeArg e, int index) { - - exists(int n, int nTypeRepr | - n = 0 - and - nTypeRepr = n + 1 - and ( - none() - or - index = n and result = e.getTypeRepr() - )) - } + exists(int n, int nTypeRepr | + n = 0 and + nTypeRepr = n + 1 and + ( + none() + or + index = n and result = e.getTypeRepr() + ) + ) + } /** * INTERNAL: Do not use. * A type parameter in a generic parameter list. - * + * * For example: * ```rust * fn foo(t: T) {} @@ -7695,70 +6161,54 @@ module Raw { * ``` */ class TypeParam extends @type_param, GenericParam { - override string toString() { result = "TypeParam" } /** * Gets the `index`th attr of this type parameter (0-based). - * */ - AnyAttr getAttr(int index) { - type_param_attrs(this, index, result) - } + AnyAttr getAttr(int index) { type_param_attrs(this, index, result) } + /** * Gets the number of attrs of this type parameter. */ - int getNumberOfAttrs() { - result = count(int i | type_param_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | type_param_attrs(this, i, _)) } + /** * Gets the default type of this type parameter, if it exists. - * */ - TypeRepr getDefaultType() { - type_param_default_types(this, result) - } + TypeRepr getDefaultType() { type_param_default_types(this, result) } + /** * Gets the name of this type parameter, if it exists. - * */ - Name getName() { - type_param_names(this, result) - } + Name getName() { type_param_names(this, result) } + /** * Gets the type bound list of this type parameter, if it exists. - * */ - TypeBoundList getTypeBoundList() { - type_param_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { type_param_type_bound_lists(this, result) } } - private Element getImmediateChildOfTypeParam(TypeParam e, int index) { - - exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nDefaultType = nAttr + 1 - and - nName = nDefaultType + 1 - and - nTypeBoundList = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getDefaultType() - or - index = nDefaultType and result = e.getName() - or - index = nName and result = e.getTypeBoundList() - )) - } + exists(int n, int nAttr, int nDefaultType, int nName, int nTypeBoundList | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nDefaultType = nAttr + 1 and + nName = nDefaultType + 1 and + nTypeBoundList = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getDefaultType() + or + index = nDefaultType and result = e.getName() + or + index = nName and result = e.getTypeBoundList() + ) + ) + } /** * INTERNAL: Do not use. @@ -7768,79 +6218,64 @@ module Raw { * ``` */ class UnderscoreExpr extends @underscore_expr, Expr { - override string toString() { result = "UnderscoreExpr" } /** * Gets the `index`th attr of this underscore expression (0-based). - * */ - AnyAttr getAttr(int index) { - underscore_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { underscore_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this underscore expression. */ - int getNumberOfAttrs() { - result = count(int i | underscore_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | underscore_expr_attrs(this, i, _)) } } - private Element getImmediateChildOfUnderscoreExpr(UnderscoreExpr e, int index) { - - exists(int n, int nAttr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and ( - none() - or - result = e.getAttr(index - n) - )) - } + exists(int n, int nAttr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + ( + none() + or + result = e.getAttr(index - n) + ) + ) + } /** * INTERNAL: Do not use. */ class UnsafeMeta extends @unsafe_meta, Meta { - override string toString() { result = "UnsafeMeta" } /** * Holds if this unsafe meta is unsafe. - * */ - predicate isUnsafe() { - unsafe_meta_is_unsafe(this) - } + predicate isUnsafe() { unsafe_meta_is_unsafe(this) } + /** * Gets the meta of this unsafe meta, if it exists. - * */ - Meta getMeta() { - unsafe_meta_meta(this, result) - } + Meta getMeta() { unsafe_meta_meta(this, result) } } - private Element getImmediateChildOfUnsafeMeta(UnsafeMeta e, int index) { - - exists(int n, int nMeta | - n = 0 - and - nMeta = n + 1 - and ( - none() - or - index = n and result = e.getMeta() - )) - } + exists(int n, int nMeta | + n = 0 and + nMeta = n + 1 and + ( + none() + or + index = n and result = e.getMeta() + ) + ) + } /** * INTERNAL: Do not use. * A variant in an enum declaration. - * + * * For example: * ```rust * enum E { A, B(i32), C { x: i32 } } @@ -7848,81 +6283,62 @@ module Raw { * ``` */ class Variant extends @variant, Addressable { - override string toString() { result = "Variant" } /** * Gets the `index`th attr of this variant (0-based). - * */ - AnyAttr getAttr(int index) { - variant_attrs(this, index, result) - } + AnyAttr getAttr(int index) { variant_attrs(this, index, result) } + /** * Gets the number of attrs of this variant. */ - int getNumberOfAttrs() { - result = count(int i | variant_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | variant_attrs(this, i, _)) } + /** * Gets the const argument of this variant, if it exists. - * */ - ConstArg getConstArg() { - variant_const_args(this, result) - } + ConstArg getConstArg() { variant_const_args(this, result) } + /** * Gets the field list of this variant, if it exists. - * */ - FieldList getFieldList() { - variant_field_lists(this, result) - } + FieldList getFieldList() { variant_field_lists(this, result) } + /** * Gets the name of this variant, if it exists. - * */ - Name getName() { - variant_names(this, result) - } + Name getName() { variant_names(this, result) } + /** * Gets the visibility of this variant, if it exists. - * */ - Visibility getVisibility() { - variant_visibilities(this, result) - } + Visibility getVisibility() { variant_visibilities(this, result) } } - private Element getImmediateChildOfVariant(Variant e, int index) { - - exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nConstArg = nAttr + 1 - and - nFieldList = nConstArg + 1 - and - nName = nFieldList + 1 - and - nVisibility = nName + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getConstArg() - or - index = nConstArg and result = e.getFieldList() - or - index = nFieldList and result = e.getName() - or - index = nName and result = e.getVisibility() - )) - } + exists(int n, int nAttr, int nConstArg, int nFieldList, int nName, int nVisibility | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nConstArg = nAttr + 1 and + nFieldList = nConstArg + 1 and + nName = nFieldList + 1 and + nVisibility = nName + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getConstArg() + or + index = nConstArg and result = e.getFieldList() + or + index = nFieldList and result = e.getName() + or + index = nName and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -7932,15 +6348,10 @@ module Raw { * ``` */ class WildcardPat extends @wildcard_pat, Pat { - override string toString() { result = "WildcardPat" } - } - - private Element getImmediateChildOfWildcardPat(WildcardPat e, int index) { - none() - } + private Element getImmediateChildOfWildcardPat(WildcardPat e, int index) { none() } /** * INTERNAL: Do not use. @@ -7952,48 +6363,38 @@ module Raw { * ``` */ class YeetExpr extends @yeet_expr, Expr { - override string toString() { result = "YeetExpr" } /** * Gets the `index`th attr of this yeet expression (0-based). - * */ - AnyAttr getAttr(int index) { - yeet_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { yeet_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this yeet expression. */ - int getNumberOfAttrs() { - result = count(int i | yeet_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | yeet_expr_attrs(this, i, _)) } + /** * Gets the expression of this yeet expression, if it exists. - * */ - Expr getExpr() { - yeet_expr_exprs(this, result) - } + Expr getExpr() { yeet_expr_exprs(this, result) } } - private Element getImmediateChildOfYeetExpr(YeetExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -8006,48 +6407,38 @@ module Raw { * ``` */ class YieldExpr extends @yield_expr, Expr { - override string toString() { result = "YieldExpr" } /** * Gets the `index`th attr of this yield expression (0-based). - * */ - AnyAttr getAttr(int index) { - yield_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { yield_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this yield expression. */ - int getNumberOfAttrs() { - result = count(int i | yield_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | yield_expr_attrs(this, i, _)) } + /** * Gets the expression of this yield expression, if it exists. - * */ - Expr getExpr() { - yield_expr_exprs(this, result) - } + Expr getExpr() { yield_expr_exprs(this, result) } } - private Element getImmediateChildOfYieldExpr(YieldExpr e, int index) { - - exists(int n, int nAttr, int nExpr | - n = 0 - and - nAttr = n + e.getNumberOfAttrs() - and - nExpr = nAttr + 1 - and ( - none() - or - result = e.getAttr(index - n) - or - index = nAttr and result = e.getExpr() - )) - } + exists(int n, int nAttr, int nExpr | + n = 0 and + nAttr = n + e.getNumberOfAttrs() and + nExpr = nAttr + 1 and + ( + none() + or + result = e.getAttr(index - n) + or + index = nAttr and result = e.getExpr() + ) + ) + } /** * INTERNAL: Do not use. @@ -8060,93 +6451,71 @@ module Raw { * ``` */ class AsmExpr extends @asm_expr, Expr, Item { - override string toString() { result = "AsmExpr" } /** * Gets the `index`th asm piece of this asm expression (0-based). - * */ - AsmPiece getAsmPiece(int index) { - asm_expr_asm_pieces(this, index, result) - } + AsmPiece getAsmPiece(int index) { asm_expr_asm_pieces(this, index, result) } + /** * Gets the number of asm pieces of this asm expression. */ - int getNumberOfAsmPieces() { - result = count(int i | asm_expr_asm_pieces(this, i, _)) - } + int getNumberOfAsmPieces() { result = count(int i | asm_expr_asm_pieces(this, i, _)) } + /** * Gets the `index`th attr of this asm expression (0-based). - * */ - AnyAttr getAttr(int index) { - asm_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { asm_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this asm expression. */ - int getNumberOfAttrs() { - result = count(int i | asm_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | asm_expr_attrs(this, i, _)) } + /** * Gets the `index`th template of this asm expression (0-based). - * */ - Expr getTemplate(int index) { - asm_expr_templates(this, index, result) - } + Expr getTemplate(int index) { asm_expr_templates(this, index, result) } + /** * Gets the number of templates of this asm expression. */ - int getNumberOfTemplates() { - result = count(int i | asm_expr_templates(this, i, _)) - } + int getNumberOfTemplates() { result = count(int i | asm_expr_templates(this, i, _)) } } - private Element getImmediateChildOfAsmExpr(AsmExpr e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() - and - nAttr = nAsmPiece + e.getNumberOfAttrs() - and - nTemplate = nAttr + e.getNumberOfTemplates() - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAsmPiece(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nAsmPiece) - or - result = e.getTemplate(index - nAttr) - )) - } + exists(int n, int nAttributeMacroExpansion, int nAsmPiece, int nAttr, int nTemplate | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAsmPiece = nAttributeMacroExpansion + e.getNumberOfAsmPieces() and + nAttr = nAsmPiece + e.getNumberOfAttrs() and + nTemplate = nAttr + e.getNumberOfTemplates() and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAsmPiece(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nAsmPiece) + or + result = e.getTemplate(index - nAttr) + ) + ) + } /** * INTERNAL: Do not use. * An associated item in a `Trait` or `Impl`. - * + * * For example: * ```rust * trait T {fn foo(&self);} * // ^^^^^^^^^^^^^ * ``` */ - class AssocItem extends @assoc_item, Item { - - - - } - - + class AssocItem extends @assoc_item, Item { } /** * INTERNAL: Do not use. @@ -8164,103 +6533,79 @@ module Raw { * ``` */ class BlockExpr extends @block_expr, LabelableExpr { - override string toString() { result = "BlockExpr" } /** * Gets the `index`th attr of this block expression (0-based). - * */ - AnyAttr getAttr(int index) { - block_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { block_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this block expression. */ - int getNumberOfAttrs() { - result = count(int i | block_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | block_expr_attrs(this, i, _)) } + /** * Holds if this block expression is async. - * */ - predicate isAsync() { - block_expr_is_async(this) - } + predicate isAsync() { block_expr_is_async(this) } + /** * Holds if this block expression is const. - * */ - predicate isConst() { - block_expr_is_const(this) - } + predicate isConst() { block_expr_is_const(this) } + /** * Holds if this block expression is gen. - * */ - predicate isGen() { - block_expr_is_gen(this) - } + predicate isGen() { block_expr_is_gen(this) } + /** * Holds if this block expression is move. - * */ - predicate isMove() { - block_expr_is_move(this) - } + predicate isMove() { block_expr_is_move(this) } + /** * Holds if this block expression is unsafe. - * */ - predicate isUnsafe() { - block_expr_is_unsafe(this) - } + predicate isUnsafe() { block_expr_is_unsafe(this) } + /** * Gets the statement list of this block expression, if it exists. - * */ - StmtList getStmtList() { - block_expr_stmt_lists(this, result) - } + StmtList getStmtList() { block_expr_stmt_lists(this, result) } + /** * Gets the try block modifier of this block expression, if it exists. - * */ - TryBlockModifier getTryBlockModifier() { - block_expr_try_block_modifiers(this, result) - } + TryBlockModifier getTryBlockModifier() { block_expr_try_block_modifiers(this, result) } } - private Element getImmediateChildOfBlockExpr(BlockExpr e, int index) { - - exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | - n = 0 - and - nLabel = n + 1 - and - nAttr = nLabel + e.getNumberOfAttrs() - and - nStmtList = nAttr + 1 - and - nTryBlockModifier = nStmtList + 1 - and ( - none() - or - index = n and result = e.getLabel() - or - result = e.getAttr(index - nLabel) - or - index = nAttr and result = e.getStmtList() - or - index = nStmtList and result = e.getTryBlockModifier() - )) - } + exists(int n, int nLabel, int nAttr, int nStmtList, int nTryBlockModifier | + n = 0 and + nLabel = n + 1 and + nAttr = nLabel + e.getNumberOfAttrs() and + nStmtList = nAttr + 1 and + nTryBlockModifier = nStmtList + 1 and + ( + none() + or + index = n and result = e.getLabel() + or + result = e.getAttr(index - nLabel) + or + index = nAttr and result = e.getStmtList() + or + index = nStmtList and result = e.getTryBlockModifier() + ) + ) + } /** * INTERNAL: Do not use. * An extern block containing foreign function declarations. - * + * * For example: * ```rust * extern "C" { @@ -8269,154 +6614,123 @@ module Raw { * ``` */ class ExternBlock extends @extern_block, Item { - override string toString() { result = "ExternBlock" } /** * Gets the abi of this extern block, if it exists. - * */ - Abi getAbi() { - extern_block_abis(this, result) - } + Abi getAbi() { extern_block_abis(this, result) } + /** * Gets the `index`th attr of this extern block (0-based). - * */ - AnyAttr getAttr(int index) { - extern_block_attrs(this, index, result) - } + AnyAttr getAttr(int index) { extern_block_attrs(this, index, result) } + /** * Gets the number of attrs of this extern block. */ - int getNumberOfAttrs() { - result = count(int i | extern_block_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | extern_block_attrs(this, i, _)) } + /** * Gets the extern item list of this extern block, if it exists. - * */ - ExternItemList getExternItemList() { - extern_block_extern_item_lists(this, result) - } + ExternItemList getExternItemList() { extern_block_extern_item_lists(this, result) } + /** * Holds if this extern block is unsafe. - * */ - predicate isUnsafe() { - extern_block_is_unsafe(this) - } + predicate isUnsafe() { extern_block_is_unsafe(this) } } - private Element getImmediateChildOfExternBlock(ExternBlock e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAbi = nAttributeMacroExpansion + 1 - and - nAttr = nAbi + e.getNumberOfAttrs() - and - nExternItemList = nAttr + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAbi() - or - result = e.getAttr(index - nAbi) - or - index = nAttr and result = e.getExternItemList() - )) - } + exists(int n, int nAttributeMacroExpansion, int nAbi, int nAttr, int nExternItemList | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAbi = nAttributeMacroExpansion + 1 and + nAttr = nAbi + e.getNumberOfAttrs() and + nExternItemList = nAttr + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAbi() + or + result = e.getAttr(index - nAbi) + or + index = nAttr and result = e.getExternItemList() + ) + ) + } /** * INTERNAL: Do not use. * An extern crate declaration. - * + * * For example: * ```rust * extern crate serde; * ``` */ class ExternCrate extends @extern_crate, Item { - override string toString() { result = "ExternCrate" } /** * Gets the `index`th attr of this extern crate (0-based). - * */ - AnyAttr getAttr(int index) { - extern_crate_attrs(this, index, result) - } + AnyAttr getAttr(int index) { extern_crate_attrs(this, index, result) } + /** * Gets the number of attrs of this extern crate. */ - int getNumberOfAttrs() { - result = count(int i | extern_crate_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | extern_crate_attrs(this, i, _)) } + /** * Gets the identifier of this extern crate, if it exists. - * */ - NameRef getIdentifier() { - extern_crate_identifiers(this, result) - } + NameRef getIdentifier() { extern_crate_identifiers(this, result) } + /** * Gets the rename of this extern crate, if it exists. - * */ - Rename getRename() { - extern_crate_renames(this, result) - } + Rename getRename() { extern_crate_renames(this, result) } + /** * Gets the visibility of this extern crate, if it exists. - * */ - Visibility getVisibility() { - extern_crate_visibilities(this, result) - } + Visibility getVisibility() { extern_crate_visibilities(this, result) } } - private Element getImmediateChildOfExternCrate(ExternCrate e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nIdentifier = nAttr + 1 - and - nRename = nIdentifier + 1 - and - nVisibility = nRename + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getIdentifier() - or - index = nIdentifier and result = e.getRename() - or - index = nRename and result = e.getVisibility() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nIdentifier, int nRename, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nIdentifier = nAttr + 1 and + nRename = nIdentifier + 1 and + nVisibility = nRename + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getIdentifier() + or + index = nIdentifier and result = e.getRename() + or + index = nRename and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. * An item inside an extern block. - * + * * For example: * ```rust * extern "C" { @@ -8425,18 +6739,12 @@ module Raw { * } * ``` */ - class ExternItem extends @extern_item, Item { - - - - } - - + class ExternItem extends @extern_item, Item { } /** * INTERNAL: Do not use. * An `impl` block. - * + * * For example: * ```rust * impl MyTrait for MyType { @@ -8445,152 +6753,115 @@ module Raw { * ``` */ class Impl extends @impl, Item { - override string toString() { result = "Impl" } /** * Gets the assoc item list of this impl, if it exists. - * */ - AssocItemList getAssocItemList() { - impl_assoc_item_lists(this, result) - } + AssocItemList getAssocItemList() { impl_assoc_item_lists(this, result) } + /** * Gets the `index`th attr of this impl (0-based). - * */ - AnyAttr getAttr(int index) { - impl_attrs(this, index, result) - } + AnyAttr getAttr(int index) { impl_attrs(this, index, result) } + /** * Gets the number of attrs of this impl. */ - int getNumberOfAttrs() { - result = count(int i | impl_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | impl_attrs(this, i, _)) } + /** * Gets the generic parameter list of this impl, if it exists. - * */ - GenericParamList getGenericParamList() { - impl_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { impl_generic_param_lists(this, result) } + /** * Holds if this impl is const. - * */ - predicate isConst() { - impl_is_const(this) - } + predicate isConst() { impl_is_const(this) } + /** * Holds if this impl is default. - * */ - predicate isDefault() { - impl_is_default(this) - } + predicate isDefault() { impl_is_default(this) } + /** * Holds if this impl is unsafe. - * */ - predicate isUnsafe() { - impl_is_unsafe(this) - } + predicate isUnsafe() { impl_is_unsafe(this) } + /** * Gets the self ty of this impl, if it exists. - * */ - TypeRepr getSelfTy() { - impl_self_ties(this, result) - } + TypeRepr getSelfTy() { impl_self_ties(this, result) } + /** * Gets the trait ty of this impl, if it exists. - * */ - TypeRepr getTraitTy() { - impl_trait_ties(this, result) - } + TypeRepr getTraitTy() { impl_trait_ties(this, result) } + /** * Gets the visibility of this impl, if it exists. - * */ - Visibility getVisibility() { - impl_visibilities(this, result) - } + Visibility getVisibility() { impl_visibilities(this, result) } + /** * Gets the where clause of this impl, if it exists. - * */ - WhereClause getWhereClause() { - impl_where_clauses(this, result) - } + WhereClause getWhereClause() { impl_where_clauses(this, result) } } - private Element getImmediateChildOfImpl(Impl e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAssocItemList = nAttributeMacroExpansion + 1 - and - nAttr = nAssocItemList + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nSelfTy = nGenericParamList + 1 - and - nTraitTy = nSelfTy + 1 - and - nVisibility = nTraitTy + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() - or - result = e.getAttr(index - nAssocItemList) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getSelfTy() - or - index = nSelfTy and result = e.getTraitTy() - or - index = nTraitTy and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, + int nSelfTy, int nTraitTy, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAssocItemList = nAttributeMacroExpansion + 1 and + nAttr = nAssocItemList + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nSelfTy = nGenericParamList + 1 and + nTraitTy = nSelfTy + 1 and + nVisibility = nTraitTy + 1 and + nWhereClause = nVisibility + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() + or + result = e.getAttr(index - nAssocItemList) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getSelfTy() + or + index = nSelfTy and result = e.getTraitTy() + or + index = nTraitTy and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + ) + ) + } /** * INTERNAL: Do not use. * The base class for expressions that loop (`LoopExpr`, `ForExpr` or `WhileExpr`). */ class LoopingExpr extends @looping_expr, LabelableExpr { - - - /** * Gets the loop body of this looping expression, if it exists. - * */ - BlockExpr getLoopBody() { - looping_expr_loop_bodies(this, result) - } + BlockExpr getLoopBody() { looping_expr_loop_bodies(this, result) } } - - /** * INTERNAL: Do not use. * A Rust 2.0 style declarative macro definition. - * + * * For example: * ```rust * pub macro vec_of_two($element:expr) { @@ -8599,85 +6870,68 @@ module Raw { * ``` */ class MacroDef extends @macro_def, Item { - override string toString() { result = "MacroDef" } /** * Gets the arguments of this macro def, if it exists. - * */ - TokenTree getArgs() { - macro_def_args(this, result) - } + TokenTree getArgs() { macro_def_args(this, result) } + /** * Gets the `index`th attr of this macro def (0-based). - * */ - AnyAttr getAttr(int index) { - macro_def_attrs(this, index, result) - } + AnyAttr getAttr(int index) { macro_def_attrs(this, index, result) } + /** * Gets the number of attrs of this macro def. */ - int getNumberOfAttrs() { - result = count(int i | macro_def_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | macro_def_attrs(this, i, _)) } + /** * Gets the body of this macro def, if it exists. - * */ - TokenTree getBody() { - macro_def_bodies(this, result) - } + TokenTree getBody() { macro_def_bodies(this, result) } + /** * Gets the name of this macro def, if it exists. - * */ - Name getName() { - macro_def_names(this, result) - } + Name getName() { macro_def_names(this, result) } + /** * Gets the visibility of this macro def, if it exists. - * */ - Visibility getVisibility() { - macro_def_visibilities(this, result) - } + Visibility getVisibility() { macro_def_visibilities(this, result) } } - private Element getImmediateChildOfMacroDef(MacroDef e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nArgs = nAttributeMacroExpansion + 1 - and - nAttr = nArgs + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nName = nBody + 1 - and - nVisibility = nName + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getArgs() - or - result = e.getAttr(index - nArgs) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getName() - or - index = nName and result = e.getVisibility() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nArgs, int nAttr, int nBody, int nName, + int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nArgs = nAttributeMacroExpansion + 1 and + nAttr = nArgs + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nName = nBody + 1 and + nVisibility = nName + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getArgs() + or + result = e.getAttr(index - nArgs) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getName() + or + index = nName and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -8691,74 +6945,59 @@ module Raw { * ``` */ class MacroRules extends @macro_rules, Item { - override string toString() { result = "MacroRules" } /** * Gets the `index`th attr of this macro rules (0-based). - * */ - AnyAttr getAttr(int index) { - macro_rules_attrs(this, index, result) - } + AnyAttr getAttr(int index) { macro_rules_attrs(this, index, result) } + /** * Gets the number of attrs of this macro rules. */ - int getNumberOfAttrs() { - result = count(int i | macro_rules_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | macro_rules_attrs(this, i, _)) } + /** * Gets the name of this macro rules, if it exists. - * */ - Name getName() { - macro_rules_names(this, result) - } + Name getName() { macro_rules_names(this, result) } + /** * Gets the token tree of this macro rules, if it exists. - * */ - TokenTree getTokenTree() { - macro_rules_token_trees(this, result) - } + TokenTree getTokenTree() { macro_rules_token_trees(this, result) } + /** * Gets the visibility of this macro rules, if it exists. - * */ - Visibility getVisibility() { - macro_rules_visibilities(this, result) - } + Visibility getVisibility() { macro_rules_visibilities(this, result) } } - private Element getImmediateChildOfMacroRules(MacroRules e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nName = nAttr + 1 - and - nTokenTree = nName + 1 - and - nVisibility = nTokenTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getName() - or - index = nName and result = e.getTokenTree() - or - index = nTokenTree and result = e.getVisibility() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nName, int nTokenTree, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nName = nAttr + 1 and + nTokenTree = nName + 1 and + nVisibility = nTokenTree + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getName() + or + index = nName and result = e.getTokenTree() + or + index = nTokenTree and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -8773,74 +7012,59 @@ module Raw { * ``` */ class Module extends @module, Item { - override string toString() { result = "Module" } /** * Gets the `index`th attr of this module (0-based). - * */ - AnyAttr getAttr(int index) { - module_attrs(this, index, result) - } + AnyAttr getAttr(int index) { module_attrs(this, index, result) } + /** * Gets the number of attrs of this module. */ - int getNumberOfAttrs() { - result = count(int i | module_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | module_attrs(this, i, _)) } + /** * Gets the item list of this module, if it exists. - * */ - ItemList getItemList() { - module_item_lists(this, result) - } + ItemList getItemList() { module_item_lists(this, result) } + /** * Gets the name of this module, if it exists. - * */ - Name getName() { - module_names(this, result) - } + Name getName() { module_names(this, result) } + /** * Gets the visibility of this module, if it exists. - * */ - Visibility getVisibility() { - module_visibilities(this, result) - } + Visibility getVisibility() { module_visibilities(this, result) } } - private Element getImmediateChildOfModule(Module e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nItemList = nAttr + 1 - and - nName = nItemList + 1 - and - nVisibility = nName + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getItemList() - or - index = nItemList and result = e.getName() - or - index = nName and result = e.getVisibility() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nItemList, int nName, int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nItemList = nAttr + 1 and + nName = nItemList + 1 and + nVisibility = nName + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getItemList() + or + index = nItemList and result = e.getName() + or + index = nName and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -8853,41 +7077,33 @@ module Raw { * ``` */ class PathExpr extends @path_expr, PathExprBase, PathAstNode { - override string toString() { result = "PathExpr" } /** * Gets the `index`th attr of this path expression (0-based). - * */ - AnyAttr getAttr(int index) { - path_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { path_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this path expression. */ - int getNumberOfAttrs() { - result = count(int i | path_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | path_expr_attrs(this, i, _)) } } - private Element getImmediateChildOfPathExpr(PathExpr e, int index) { - - exists(int n, int nPath, int nAttr | - n = 0 - and - nPath = n + 1 - and - nAttr = nPath + e.getNumberOfAttrs() - and ( - none() - or - index = n and result = e.getPath() - or - result = e.getAttr(index - nPath) - )) - } + exists(int n, int nPath, int nAttr | + n = 0 and + nPath = n + 1 and + nAttr = nPath + e.getNumberOfAttrs() and + ( + none() + or + index = n and result = e.getPath() + or + result = e.getAttr(index - nPath) + ) + ) + } /** * INTERNAL: Do not use. @@ -8898,204 +7114,158 @@ module Raw { * type Result: Copy; * fn frobinize_with(&mut self, frobinator: &Self::Frobinator) -> Result; * } - * + * * pub trait Foo where T::Frobinator: Eq {} * ``` */ class Trait extends @trait, Item { - override string toString() { result = "Trait" } /** * Gets the assoc item list of this trait, if it exists. - * */ - AssocItemList getAssocItemList() { - trait_assoc_item_lists(this, result) - } + AssocItemList getAssocItemList() { trait_assoc_item_lists(this, result) } + /** * Gets the `index`th attr of this trait (0-based). - * */ - AnyAttr getAttr(int index) { - trait_attrs(this, index, result) - } + AnyAttr getAttr(int index) { trait_attrs(this, index, result) } + /** * Gets the number of attrs of this trait. */ - int getNumberOfAttrs() { - result = count(int i | trait_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | trait_attrs(this, i, _)) } + /** * Gets the generic parameter list of this trait, if it exists. - * */ - GenericParamList getGenericParamList() { - trait_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { trait_generic_param_lists(this, result) } + /** * Gets the impl restriction of this trait, if it exists. - * */ - ImplRestriction getImplRestriction() { - trait_impl_restrictions(this, result) - } + ImplRestriction getImplRestriction() { trait_impl_restrictions(this, result) } + /** * Holds if this trait is auto. - * */ - predicate isAuto() { - trait_is_auto(this) - } + predicate isAuto() { trait_is_auto(this) } + /** * Holds if this trait is unsafe. - * */ - predicate isUnsafe() { - trait_is_unsafe(this) - } + predicate isUnsafe() { trait_is_unsafe(this) } + /** * Gets the name of this trait, if it exists. - * */ - Name getName() { - trait_names(this, result) - } + Name getName() { trait_names(this, result) } + /** * Gets the type bound list of this trait, if it exists. - * */ - TypeBoundList getTypeBoundList() { - trait_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { trait_type_bound_lists(this, result) } + /** * Gets the visibility of this trait, if it exists. - * */ - Visibility getVisibility() { - trait_visibilities(this, result) - } + Visibility getVisibility() { trait_visibilities(this, result) } + /** * Gets the where clause of this trait, if it exists. - * */ - WhereClause getWhereClause() { - trait_where_clauses(this, result) - } + WhereClause getWhereClause() { trait_where_clauses(this, result) } } - private Element getImmediateChildOfTrait(Trait e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAssocItemList = nAttributeMacroExpansion + 1 - and - nAttr = nAssocItemList + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nImplRestriction = nGenericParamList + 1 - and - nName = nImplRestriction + 1 - and - nTypeBoundList = nName + 1 - and - nVisibility = nTypeBoundList + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getAssocItemList() - or - result = e.getAttr(index - nAssocItemList) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getImplRestriction() - or - index = nImplRestriction and result = e.getName() - or - index = nName and result = e.getTypeBoundList() - or - index = nTypeBoundList and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAssocItemList, int nAttr, int nGenericParamList, + int nImplRestriction, int nName, int nTypeBoundList, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAssocItemList = nAttributeMacroExpansion + 1 and + nAttr = nAssocItemList + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nImplRestriction = nGenericParamList + 1 and + nName = nImplRestriction + 1 and + nTypeBoundList = nName + 1 and + nVisibility = nTypeBoundList + 1 and + nWhereClause = nVisibility + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getAssocItemList() + or + result = e.getAttr(index - nAssocItemList) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getImplRestriction() + or + index = nImplRestriction and result = e.getName() + or + index = nName and result = e.getTypeBoundList() + or + index = nTypeBoundList and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + ) + ) + } /** * INTERNAL: Do not use. * An item that defines a type. Either a `Struct`, `Enum`, or `Union`. */ class TypeItem extends @type_item, Item { - - - /** * Gets the `index`th derive macro expansion of this type item (0-based). - * */ MacroItems getDeriveMacroExpansion(int index) { type_item_derive_macro_expansions(this, index, result) } + /** * Gets the number of derive macro expansions of this type item. */ int getNumberOfDeriveMacroExpansions() { result = count(int i | type_item_derive_macro_expansions(this, i, _)) } + /** * Gets the `index`th attr of this type item (0-based). - * */ - AnyAttr getAttr(int index) { - type_item_attrs(this, index, result) - } + AnyAttr getAttr(int index) { type_item_attrs(this, index, result) } + /** * Gets the number of attrs of this type item. */ - int getNumberOfAttrs() { - result = count(int i | type_item_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | type_item_attrs(this, i, _)) } + /** * Gets the generic parameter list of this type item, if it exists. - * */ - GenericParamList getGenericParamList() { - type_item_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { type_item_generic_param_lists(this, result) } + /** * Gets the name of this type item, if it exists. - * */ - Name getName() { - type_item_names(this, result) - } + Name getName() { type_item_names(this, result) } + /** * Gets the visibility of this type item, if it exists. - * */ - Visibility getVisibility() { - type_item_visibilities(this, result) - } + Visibility getVisibility() { type_item_visibilities(this, result) } + /** * Gets the where clause of this type item, if it exists. - * */ - WhereClause getWhereClause() { - type_item_where_clauses(this, result) - } + WhereClause getWhereClause() { type_item_where_clauses(this, result) } } - - /** * INTERNAL: Do not use. * A `use` statement. For example: @@ -9104,267 +7274,215 @@ module Raw { * ``` */ class Use extends @use, Item { - override string toString() { result = "Use" } /** * Gets the `index`th attr of this use (0-based). - * */ - AnyAttr getAttr(int index) { - use_attrs(this, index, result) - } + AnyAttr getAttr(int index) { use_attrs(this, index, result) } + /** * Gets the number of attrs of this use. */ - int getNumberOfAttrs() { - result = count(int i | use_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | use_attrs(this, i, _)) } + /** * Gets the use tree of this use, if it exists. - * */ - UseTree getUseTree() { - use_use_trees(this, result) - } + UseTree getUseTree() { use_use_trees(this, result) } + /** * Gets the visibility of this use, if it exists. - * */ - Visibility getVisibility() { - use_visibilities(this, result) - } + Visibility getVisibility() { use_visibilities(this, result) } } - private Element getImmediateChildOfUse(Use e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nUseTree = nAttr + 1 - and - nVisibility = nUseTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getUseTree() - or - index = nUseTree and result = e.getVisibility() - )) - } + exists(int n, int nAttributeMacroExpansion, int nAttr, int nUseTree, int nVisibility | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nUseTree = nAttr + 1 and + nVisibility = nUseTree + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getUseTree() + or + index = nUseTree and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. * A constant item declaration. - * + * * For example: * ```rust * const X: i32 = 42; * ``` */ class Const extends @const, AssocItem { - override string toString() { result = "Const" } /** * Gets the `index`th attr of this const (0-based). - * */ - AnyAttr getAttr(int index) { - const_attrs(this, index, result) - } + AnyAttr getAttr(int index) { const_attrs(this, index, result) } + /** * Gets the number of attrs of this const. */ - int getNumberOfAttrs() { - result = count(int i | const_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | const_attrs(this, i, _)) } + /** * Gets the body of this const, if it exists. - * */ - Expr getBody() { - const_bodies(this, result) - } + Expr getBody() { const_bodies(this, result) } + /** * Gets the generic parameter list of this const, if it exists. - * */ - GenericParamList getGenericParamList() { - const_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { const_generic_param_lists(this, result) } + /** * Holds if this const is const. - * */ - predicate isConst() { - const_is_const(this) - } + predicate isConst() { const_is_const(this) } + /** * Holds if this const is default. - * */ - predicate isDefault() { - const_is_default(this) - } + predicate isDefault() { const_is_default(this) } + /** * Gets the name of this const, if it exists. - * */ - Name getName() { - const_names(this, result) - } + Name getName() { const_names(this, result) } + /** * Gets the type representation of this const, if it exists. - * */ - TypeRepr getTypeRepr() { - const_type_reprs(this, result) - } + TypeRepr getTypeRepr() { const_type_reprs(this, result) } + /** * Gets the visibility of this const, if it exists. - * */ - Visibility getVisibility() { - const_visibilities(this, result) - } + Visibility getVisibility() { const_visibilities(this, result) } + /** * Gets the where clause of this const, if it exists. - * */ - WhereClause getWhereClause() { - const_where_clauses(this, result) - } + WhereClause getWhereClause() { const_where_clauses(this, result) } + /** * Holds if this constant has an implementation. * * This is the same as `hasBody` for source code, but for library code (for which we always skip * the body), this will hold when the body was present in the original code. */ - predicate hasImplementation() { - const_has_implementation(this) - } + predicate hasImplementation() { const_has_implementation(this) } } - private Element getImmediateChildOfConst(Const e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, int nTypeRepr, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nGenericParamList = nBody + 1 - and - nName = nGenericParamList + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nGenericParamList, int nName, + int nTypeRepr, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nGenericParamList = nBody + 1 and + nName = nGenericParamList + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + nWhereClause = nVisibility + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + ) + ) + } /** * INTERNAL: Do not use. * An enum declaration. - * + * * For example: * ```rust * enum E {A, B(i32), C {x: i32}} * ``` */ class Enum extends @enum, TypeItem { - override string toString() { result = "Enum" } /** * Gets the variant list of this enum, if it exists. - * */ - VariantList getVariantList() { - enum_variant_lists(this, result) - } + VariantList getVariantList() { enum_variant_lists(this, result) } } - private Element getImmediateChildOfEnum(Enum e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nVariantList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getVariantList() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nVariantList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nVariantList = nWhereClause + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getVariantList() + ) + ) + } /** * INTERNAL: Do not use. * A for loop expression. - * + * * For example: * ```rust * for x in 0..10 { @@ -9373,67 +7491,52 @@ module Raw { * ``` */ class ForExpr extends @for_expr, LoopingExpr { - override string toString() { result = "ForExpr" } /** * Gets the `index`th attr of this for expression (0-based). - * */ - AnyAttr getAttr(int index) { - for_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { for_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this for expression. */ - int getNumberOfAttrs() { - result = count(int i | for_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | for_expr_attrs(this, i, _)) } + /** * Gets the iterable of this for expression, if it exists. - * */ - Expr getIterable() { - for_expr_iterables(this, result) - } + Expr getIterable() { for_expr_iterables(this, result) } + /** * Gets the pattern of this for expression, if it exists. - * */ - Pat getPat() { - for_expr_pats(this, result) - } + Pat getPat() { for_expr_pats(this, result) } } - private Element getImmediateChildOfForExpr(ForExpr e, int index) { - - exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and - nIterable = nAttr + 1 - and - nPat = nIterable + 1 - and ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - or - index = nAttr and result = e.getIterable() - or - index = nIterable and result = e.getPat() - )) - } + exists(int n, int nLabel, int nLoopBody, int nAttr, int nIterable, int nPat | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + nIterable = nAttr + 1 and + nPat = nIterable + 1 and + ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + or + index = nAttr and result = e.getIterable() + or + index = nIterable and result = e.getPat() + ) + ) + } /** * INTERNAL: Do not use. @@ -9449,153 +7552,118 @@ module Raw { * ``` */ class Function extends @function, AssocItem, ExternItem, Callable { - override string toString() { result = "Function" } /** * Gets the abi of this function, if it exists. - * */ - Abi getAbi() { - function_abis(this, result) - } + Abi getAbi() { function_abis(this, result) } + /** * Gets the function body of this function, if it exists. - * */ - BlockExpr getFunctionBody() { - function_function_bodies(this, result) - } + BlockExpr getFunctionBody() { function_function_bodies(this, result) } + /** * Gets the generic parameter list of this function, if it exists. - * */ - GenericParamList getGenericParamList() { - function_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { function_generic_param_lists(this, result) } + /** * Holds if this function is async. - * */ - predicate isAsync() { - function_is_async(this) - } + predicate isAsync() { function_is_async(this) } + /** * Holds if this function is const. - * */ - predicate isConst() { - function_is_const(this) - } + predicate isConst() { function_is_const(this) } + /** * Holds if this function is default. - * */ - predicate isDefault() { - function_is_default(this) - } + predicate isDefault() { function_is_default(this) } + /** * Holds if this function is gen. - * */ - predicate isGen() { - function_is_gen(this) - } + predicate isGen() { function_is_gen(this) } + /** * Holds if this function is unsafe. - * */ - predicate isUnsafe() { - function_is_unsafe(this) - } + predicate isUnsafe() { function_is_unsafe(this) } + /** * Gets the name of this function, if it exists. - * */ - Name getName() { - function_names(this, result) - } + Name getName() { function_names(this, result) } + /** * Gets the ret type of this function, if it exists. - * */ - RetTypeRepr getRetType() { - function_ret_types(this, result) - } + RetTypeRepr getRetType() { function_ret_types(this, result) } + /** * Gets the visibility of this function, if it exists. - * */ - Visibility getVisibility() { - function_visibilities(this, result) - } + Visibility getVisibility() { function_visibilities(this, result) } + /** * Gets the where clause of this function, if it exists. - * */ - WhereClause getWhereClause() { - function_where_clauses(this, result) - } + WhereClause getWhereClause() { function_where_clauses(this, result) } + /** * Holds if this function has an implementation. * * This is the same as `hasBody` for source code, but for library code (for which we always skip * the body), this will hold when the body was present in the original code. */ - predicate hasImplementation() { - function_has_implementation(this) - } + predicate hasImplementation() { function_has_implementation(this) } } - private Element getImmediateChildOfFunction(Function e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nParamList = nAttributeMacroExpansion + 1 - and - nAttr = nParamList + e.getNumberOfAttrs() - and - nAbi = nAttr + 1 - and - nFunctionBody = nAbi + 1 - and - nGenericParamList = nFunctionBody + 1 - and - nName = nGenericParamList + 1 - and - nRetType = nName + 1 - and - nVisibility = nRetType + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - index = nAttributeMacroExpansion and result = e.getParamList() - or - result = e.getAttr(index - nParamList) - or - index = nAttr and result = e.getAbi() - or - index = nAbi and result = e.getFunctionBody() - or - index = nFunctionBody and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getRetType() - or - index = nRetType and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nParamList, int nAttr, int nAbi, int nFunctionBody, + int nGenericParamList, int nName, int nRetType, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nParamList = nAttributeMacroExpansion + 1 and + nAttr = nParamList + e.getNumberOfAttrs() and + nAbi = nAttr + 1 and + nFunctionBody = nAbi + 1 and + nGenericParamList = nFunctionBody + 1 and + nName = nGenericParamList + 1 and + nRetType = nName + 1 and + nVisibility = nRetType + 1 and + nWhereClause = nVisibility + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + index = nAttributeMacroExpansion and result = e.getParamList() + or + result = e.getAttr(index - nParamList) + or + index = nAttr and result = e.getAbi() + or + index = nAbi and result = e.getFunctionBody() + or + index = nFunctionBody and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getRetType() + or + index = nRetType and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + ) + ) + } /** * INTERNAL: Do not use. @@ -9623,235 +7691,189 @@ module Raw { * ``` */ class LoopExpr extends @loop_expr, LoopingExpr { - override string toString() { result = "LoopExpr" } /** * Gets the `index`th attr of this loop expression (0-based). - * */ - AnyAttr getAttr(int index) { - loop_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { loop_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this loop expression. */ - int getNumberOfAttrs() { - result = count(int i | loop_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | loop_expr_attrs(this, i, _)) } } - private Element getImmediateChildOfLoopExpr(LoopExpr e, int index) { - - exists(int n, int nLabel, int nLoopBody, int nAttr | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - )) - } + exists(int n, int nLabel, int nLoopBody, int nAttr | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + ) + ) + } /** * INTERNAL: Do not use. * A macro invocation. - * + * * For example: * ```rust * println!("Hello, world!"); * ``` */ class MacroCall extends @macro_call, AssocItem, ExternItem { - override string toString() { result = "MacroCall" } /** * Gets the `index`th attr of this macro call (0-based). - * */ - AnyAttr getAttr(int index) { - macro_call_attrs(this, index, result) - } + AnyAttr getAttr(int index) { macro_call_attrs(this, index, result) } + /** * Gets the number of attrs of this macro call. */ - int getNumberOfAttrs() { - result = count(int i | macro_call_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | macro_call_attrs(this, i, _)) } + /** * Gets the path of this macro call, if it exists. - * */ - Path getPath() { - macro_call_paths(this, result) - } + Path getPath() { macro_call_paths(this, result) } + /** * Gets the token tree of this macro call, if it exists. - * */ - TokenTree getTokenTree() { - macro_call_token_trees(this, result) - } + TokenTree getTokenTree() { macro_call_token_trees(this, result) } + /** * Gets the macro call expansion of this macro call, if it exists. - * */ - AstNode getMacroCallExpansion() { - macro_call_macro_call_expansions(this, result) - } + AstNode getMacroCallExpansion() { macro_call_macro_call_expansions(this, result) } } - private Element getImmediateChildOfMacroCall(MacroCall e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, int nMacroCallExpansion | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nPath = nAttr + 1 - and - nTokenTree = nPath + 1 - and - nMacroCallExpansion = nTokenTree + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getPath() - or - index = nPath and result = e.getTokenTree() - or - index = nTokenTree and result = e.getMacroCallExpansion() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nPath, int nTokenTree, + int nMacroCallExpansion + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nPath = nAttr + 1 and + nTokenTree = nPath + 1 and + nMacroCallExpansion = nTokenTree + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getPath() + or + index = nPath and result = e.getTokenTree() + or + index = nTokenTree and result = e.getMacroCallExpansion() + ) + ) + } /** * INTERNAL: Do not use. * A static item declaration. - * + * * For example: * ```rust * static X: i32 = 42; * ``` */ class Static extends @static, ExternItem { - override string toString() { result = "Static" } /** * Gets the `index`th attr of this static (0-based). - * */ - AnyAttr getAttr(int index) { - static_attrs(this, index, result) - } + AnyAttr getAttr(int index) { static_attrs(this, index, result) } + /** * Gets the number of attrs of this static. */ - int getNumberOfAttrs() { - result = count(int i | static_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | static_attrs(this, i, _)) } + /** * Gets the body of this static, if it exists. - * */ - Expr getBody() { - static_bodies(this, result) - } + Expr getBody() { static_bodies(this, result) } + /** * Holds if this static is mut. - * */ - predicate isMut() { - static_is_mut(this) - } + predicate isMut() { static_is_mut(this) } + /** * Holds if this static is static. - * */ - predicate isStatic() { - static_is_static(this) - } + predicate isStatic() { static_is_static(this) } + /** * Holds if this static is unsafe. - * */ - predicate isUnsafe() { - static_is_unsafe(this) - } + predicate isUnsafe() { static_is_unsafe(this) } + /** * Gets the name of this static, if it exists. - * */ - Name getName() { - static_names(this, result) - } + Name getName() { static_names(this, result) } + /** * Gets the type representation of this static, if it exists. - * */ - TypeRepr getTypeRepr() { - static_type_reprs(this, result) - } + TypeRepr getTypeRepr() { static_type_reprs(this, result) } + /** * Gets the visibility of this static, if it exists. - * */ - Visibility getVisibility() { - static_visibilities(this, result) - } + Visibility getVisibility() { static_visibilities(this, result) } } - private Element getImmediateChildOfStatic(Static e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, int nVisibility | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nBody = nAttr + 1 - and - nName = nBody + 1 - and - nTypeRepr = nName + 1 - and - nVisibility = nTypeRepr + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getBody() - or - index = nBody and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getVisibility() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nBody, int nName, int nTypeRepr, + int nVisibility + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nBody = nAttr + 1 and + nName = nBody + 1 and + nTypeRepr = nName + 1 and + nVisibility = nTypeRepr + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getBody() + or + index = nBody and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getVisibility() + ) + ) + } /** * INTERNAL: Do not use. @@ -9864,66 +7886,56 @@ module Raw { * ``` */ class Struct extends @struct, TypeItem { - override string toString() { result = "Struct" } /** * Gets the field list of this struct, if it exists. - * */ - FieldList getFieldList() { - struct_field_lists_(this, result) - } + FieldList getFieldList() { struct_field_lists_(this, result) } } - private Element getImmediateChildOfStruct(Struct e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nFieldList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getFieldList() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nFieldList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nFieldList = nWhereClause + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getFieldList() + ) + ) + } /** * INTERNAL: Do not use. * A type alias. For example: * ```rust * type Point = (u8, u8); - * + * * trait Trait { * type Output; * // ^^^^^^^^^^^ @@ -9931,183 +7943,148 @@ module Raw { * ``` */ class TypeAlias extends @type_alias, AssocItem, ExternItem { - override string toString() { result = "TypeAlias" } /** * Gets the `index`th attr of this type alias (0-based). - * */ - AnyAttr getAttr(int index) { - type_alias_attrs(this, index, result) - } + AnyAttr getAttr(int index) { type_alias_attrs(this, index, result) } + /** * Gets the number of attrs of this type alias. */ - int getNumberOfAttrs() { - result = count(int i | type_alias_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | type_alias_attrs(this, i, _)) } + /** * Gets the generic parameter list of this type alias, if it exists. - * */ - GenericParamList getGenericParamList() { - type_alias_generic_param_lists(this, result) - } + GenericParamList getGenericParamList() { type_alias_generic_param_lists(this, result) } + /** * Holds if this type alias is default. - * */ - predicate isDefault() { - type_alias_is_default(this) - } + predicate isDefault() { type_alias_is_default(this) } + /** * Gets the name of this type alias, if it exists. - * */ - Name getName() { - type_alias_names(this, result) - } + Name getName() { type_alias_names(this, result) } + /** * Gets the type representation of this type alias, if it exists. - * */ - TypeRepr getTypeRepr() { - type_alias_type_reprs(this, result) - } + TypeRepr getTypeRepr() { type_alias_type_reprs(this, result) } + /** * Gets the type bound list of this type alias, if it exists. - * */ - TypeBoundList getTypeBoundList() { - type_alias_type_bound_lists(this, result) - } + TypeBoundList getTypeBoundList() { type_alias_type_bound_lists(this, result) } + /** * Gets the visibility of this type alias, if it exists. - * */ - Visibility getVisibility() { - type_alias_visibilities(this, result) - } + Visibility getVisibility() { type_alias_visibilities(this, result) } + /** * Gets the where clause of this type alias, if it exists. - * */ - WhereClause getWhereClause() { - type_alias_where_clauses(this, result) - } + WhereClause getWhereClause() { type_alias_where_clauses(this, result) } } - private Element getImmediateChildOfTypeAlias(TypeAlias e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nTypeRepr = nName + 1 - and - nTypeBoundList = nTypeRepr + 1 - and - nVisibility = nTypeBoundList + 1 - and - nWhereClause = nVisibility + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getAttr(index - nAttributeMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getTypeRepr() - or - index = nTypeRepr and result = e.getTypeBoundList() - or - index = nTypeBoundList and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nAttr, int nGenericParamList, int nName, + int nTypeRepr, int nTypeBoundList, int nVisibility, int nWhereClause + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nAttr = nAttributeMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nTypeRepr = nName + 1 and + nTypeBoundList = nTypeRepr + 1 and + nVisibility = nTypeBoundList + 1 and + nWhereClause = nVisibility + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getAttr(index - nAttributeMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getTypeRepr() + or + index = nTypeRepr and result = e.getTypeBoundList() + or + index = nTypeBoundList and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + ) + ) + } /** * INTERNAL: Do not use. * A union declaration. - * + * * For example: * ```rust * union U { f1: u32, f2: f32 } * ``` */ class Union extends @union, TypeItem { - override string toString() { result = "Union" } /** * Gets the struct field list of this union, if it exists. - * */ - StructFieldList getStructFieldList() { - union_struct_field_lists(this, result) - } + StructFieldList getStructFieldList() { union_struct_field_lists(this, result) } } - private Element getImmediateChildOfUnion(Union e, int index) { - - exists(int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList | - n = 0 - and - nAttributeMacroExpansion = n + 1 - and - nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() - and - nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() - and - nGenericParamList = nAttr + 1 - and - nName = nGenericParamList + 1 - and - nVisibility = nName + 1 - and - nWhereClause = nVisibility + 1 - and - nStructFieldList = nWhereClause + 1 - and ( - none() - or - index = n and result = e.getAttributeMacroExpansion() - or - result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) - or - result = e.getAttr(index - nDeriveMacroExpansion) - or - index = nAttr and result = e.getGenericParamList() - or - index = nGenericParamList and result = e.getName() - or - index = nName and result = e.getVisibility() - or - index = nVisibility and result = e.getWhereClause() - or - index = nWhereClause and result = e.getStructFieldList() - )) - } + exists( + int n, int nAttributeMacroExpansion, int nDeriveMacroExpansion, int nAttr, + int nGenericParamList, int nName, int nVisibility, int nWhereClause, int nStructFieldList + | + n = 0 and + nAttributeMacroExpansion = n + 1 and + nDeriveMacroExpansion = nAttributeMacroExpansion + e.getNumberOfDeriveMacroExpansions() and + nAttr = nDeriveMacroExpansion + e.getNumberOfAttrs() and + nGenericParamList = nAttr + 1 and + nName = nGenericParamList + 1 and + nVisibility = nName + 1 and + nWhereClause = nVisibility + 1 and + nStructFieldList = nWhereClause + 1 and + ( + none() + or + index = n and result = e.getAttributeMacroExpansion() + or + result = e.getDeriveMacroExpansion(index - nAttributeMacroExpansion) + or + result = e.getAttr(index - nDeriveMacroExpansion) + or + index = nAttr and result = e.getGenericParamList() + or + index = nGenericParamList and result = e.getName() + or + index = nName and result = e.getVisibility() + or + index = nVisibility and result = e.getWhereClause() + or + index = nWhereClause and result = e.getStructFieldList() + ) + ) + } /** * INTERNAL: Do not use. * A while loop expression. - * + * * For example: * ```rust * while x < 10 { @@ -10116,417 +8093,404 @@ module Raw { * ``` */ class WhileExpr extends @while_expr, LoopingExpr { - override string toString() { result = "WhileExpr" } /** * Gets the `index`th attr of this while expression (0-based). - * */ - AnyAttr getAttr(int index) { - while_expr_attrs(this, index, result) - } + AnyAttr getAttr(int index) { while_expr_attrs(this, index, result) } + /** * Gets the number of attrs of this while expression. */ - int getNumberOfAttrs() { - result = count(int i | while_expr_attrs(this, i, _)) - } + int getNumberOfAttrs() { result = count(int i | while_expr_attrs(this, i, _)) } + /** * Gets the condition of this while expression, if it exists. - * */ - Expr getCondition() { - while_expr_conditions(this, result) - } + Expr getCondition() { while_expr_conditions(this, result) } } - private Element getImmediateChildOfWhileExpr(WhileExpr e, int index) { - - exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | - n = 0 - and - nLabel = n + 1 - and - nLoopBody = nLabel + 1 - and - nAttr = nLoopBody + e.getNumberOfAttrs() - and - nCondition = nAttr + 1 - and ( - none() - or - index = n and result = e.getLabel() - or - index = nLabel and result = e.getLoopBody() - or - result = e.getAttr(index - nLoopBody) - or - index = nAttr and result = e.getCondition() - )) - } - + exists(int n, int nLabel, int nLoopBody, int nAttr, int nCondition | + n = 0 and + nLabel = n + 1 and + nLoopBody = nLabel + 1 and + nAttr = nLoopBody + e.getNumberOfAttrs() and + nCondition = nAttr + 1 and + ( + none() + or + index = n and result = e.getLabel() + or + index = nLabel and result = e.getLoopBody() + or + result = e.getAttr(index - nLoopBody) + or + index = nAttr and result = e.getCondition() + ) + ) + } /** * Gets the immediate child indexed at `index`. Indexes are not guaranteed to be contiguous, but are guaranteed to be distinct. */ pragma[nomagic] Element getImmediateChild(Element e, int index) { - // why does this look more complicated than it should? - // * none() simplifies generation, as we can append `or ...` without a special case for the first item - none() - or - result = getImmediateChildOfExtractorStep(e, index) - or - result = getImmediateChildOfNamedCrate(e, index) - or - result = getImmediateChildOfCrate(e, index) - or - result = getImmediateChildOfMissing(e, index) - or - result = getImmediateChildOfUnimplemented(e, index) - or - result = getImmediateChildOfAbi(e, index) - or - result = getImmediateChildOfArgList(e, index) - or - result = getImmediateChildOfAsmDirSpec(e, index) - or - result = getImmediateChildOfAsmOperandExpr(e, index) - or - result = getImmediateChildOfAsmOption(e, index) - or - result = getImmediateChildOfAsmRegSpec(e, index) - or - result = getImmediateChildOfAssocItemList(e, index) - or - result = getImmediateChildOfExternItemList(e, index) - or - result = getImmediateChildOfForBinder(e, index) - or - result = getImmediateChildOfFormatArgsArg(e, index) - or - result = getImmediateChildOfGenericArgList(e, index) - or - result = getImmediateChildOfGenericParamList(e, index) - or - result = getImmediateChildOfImplRestriction(e, index) - or - result = getImmediateChildOfItemList(e, index) - or - result = getImmediateChildOfLabel(e, index) - or - result = getImmediateChildOfLetElse(e, index) - or - result = getImmediateChildOfMacroItems(e, index) - or - result = getImmediateChildOfMatchArm(e, index) - or - result = getImmediateChildOfMatchArmList(e, index) - or - result = getImmediateChildOfMatchGuard(e, index) - or - result = getImmediateChildOfMutRestriction(e, index) - or - result = getImmediateChildOfName(e, index) - or - result = getImmediateChildOfParamList(e, index) - or - result = getImmediateChildOfParenthesizedArgList(e, index) - or - result = getImmediateChildOfPath(e, index) - or - result = getImmediateChildOfPathSegment(e, index) - or - result = getImmediateChildOfRename(e, index) - or - result = getImmediateChildOfRetTypeRepr(e, index) - or - result = getImmediateChildOfReturnTypeSyntax(e, index) - or - result = getImmediateChildOfSourceFile(e, index) - or - result = getImmediateChildOfStmtList(e, index) - or - result = getImmediateChildOfStructExprField(e, index) - or - result = getImmediateChildOfStructExprFieldList(e, index) - or - result = getImmediateChildOfStructField(e, index) - or - result = getImmediateChildOfStructPatField(e, index) - or - result = getImmediateChildOfStructPatFieldList(e, index) - or - result = getImmediateChildOfTokenTree(e, index) - or - result = getImmediateChildOfTryBlockModifier(e, index) - or - result = getImmediateChildOfTupleField(e, index) - or - result = getImmediateChildOfTypeBound(e, index) - or - result = getImmediateChildOfTypeBoundList(e, index) - or - result = getImmediateChildOfUseBoundGenericArgs(e, index) - or - result = getImmediateChildOfUseTree(e, index) - or - result = getImmediateChildOfUseTreeList(e, index) - or - result = getImmediateChildOfVariantList(e, index) - or - result = getImmediateChildOfVisibility(e, index) - or - result = getImmediateChildOfVisibilityInner(e, index) - or - result = getImmediateChildOfWhereClause(e, index) - or - result = getImmediateChildOfWherePred(e, index) - or - result = getImmediateChildOfArrayExprInternal(e, index) - or - result = getImmediateChildOfArrayTypeRepr(e, index) - or - result = getImmediateChildOfAsmClobberAbi(e, index) - or - result = getImmediateChildOfAsmConst(e, index) - or - result = getImmediateChildOfAsmLabel(e, index) - or - result = getImmediateChildOfAsmOperandNamed(e, index) - or - result = getImmediateChildOfAsmOptionsList(e, index) - or - result = getImmediateChildOfAsmRegOperand(e, index) - or - result = getImmediateChildOfAsmSym(e, index) - or - result = getImmediateChildOfAssocTypeArg(e, index) - or - result = getImmediateChildOfAttr(e, index) - or - result = getImmediateChildOfAwaitExpr(e, index) - or - result = getImmediateChildOfBecomeExpr(e, index) - or - result = getImmediateChildOfBinaryExpr(e, index) - or - result = getImmediateChildOfBoxPat(e, index) - or - result = getImmediateChildOfBreakExpr(e, index) - or - result = getImmediateChildOfCallExpr(e, index) - or - result = getImmediateChildOfCastExpr(e, index) - or - result = getImmediateChildOfCfgAtom(e, index) - or - result = getImmediateChildOfCfgAttrMeta(e, index) - or - result = getImmediateChildOfCfgComposite(e, index) - or - result = getImmediateChildOfCfgMeta(e, index) - or - result = getImmediateChildOfCfgPredExpr(e, index) - or - result = getImmediateChildOfCfgPredPat(e, index) - or - result = getImmediateChildOfClosureExpr(e, index) - or - result = getImmediateChildOfComment(e, index) - or - result = getImmediateChildOfConstArg(e, index) - or - result = getImmediateChildOfConstBlockPat(e, index) - or - result = getImmediateChildOfConstParam(e, index) - or - result = getImmediateChildOfContinueExpr(e, index) - or - result = getImmediateChildOfDerefPat(e, index) - or - result = getImmediateChildOfDocComment(e, index) - or - result = getImmediateChildOfDynTraitTypeRepr(e, index) - or - result = getImmediateChildOfExprStmt(e, index) - or - result = getImmediateChildOfFieldExpr(e, index) - or - result = getImmediateChildOfFnPtrTypeRepr(e, index) - or - result = getImmediateChildOfForTypeRepr(e, index) - or - result = getImmediateChildOfFormatArgsExpr(e, index) - or - result = getImmediateChildOfIdentPat(e, index) - or - result = getImmediateChildOfIfExpr(e, index) - or - result = getImmediateChildOfImplTraitTypeRepr(e, index) - or - result = getImmediateChildOfIncludeBytesExpr(e, index) - or - result = getImmediateChildOfIndexExpr(e, index) - or - result = getImmediateChildOfInferTypeRepr(e, index) - or - result = getImmediateChildOfKeyValueMeta(e, index) - or - result = getImmediateChildOfLetExpr(e, index) - or - result = getImmediateChildOfLetStmt(e, index) - or - result = getImmediateChildOfLifetime(e, index) - or - result = getImmediateChildOfLifetimeArg(e, index) - or - result = getImmediateChildOfLifetimeParam(e, index) - or - result = getImmediateChildOfLiteralExpr(e, index) - or - result = getImmediateChildOfLiteralPat(e, index) - or - result = getImmediateChildOfMacroExpr(e, index) - or - result = getImmediateChildOfMacroPat(e, index) - or - result = getImmediateChildOfMacroTypeRepr(e, index) - or - result = getImmediateChildOfMatchExpr(e, index) - or - result = getImmediateChildOfMethodCallExpr(e, index) - or - result = getImmediateChildOfNameRef(e, index) - or - result = getImmediateChildOfNeverTypeRepr(e, index) - or - result = getImmediateChildOfNotNull(e, index) - or - result = getImmediateChildOfOffsetOfExpr(e, index) - or - result = getImmediateChildOfOrPat(e, index) - or - result = getImmediateChildOfParam(e, index) - or - result = getImmediateChildOfParenExpr(e, index) - or - result = getImmediateChildOfParenPat(e, index) - or - result = getImmediateChildOfParenTypeRepr(e, index) - or - result = getImmediateChildOfPathMeta(e, index) - or - result = getImmediateChildOfPathPat(e, index) - or - result = getImmediateChildOfPathTypeRepr(e, index) - or - result = getImmediateChildOfPatternTypeRepr(e, index) - or - result = getImmediateChildOfPrefixExpr(e, index) - or - result = getImmediateChildOfPtrTypeRepr(e, index) - or - result = getImmediateChildOfRangeExpr(e, index) - or - result = getImmediateChildOfRangePat(e, index) - or - result = getImmediateChildOfRefExpr(e, index) - or - result = getImmediateChildOfRefPat(e, index) - or - result = getImmediateChildOfRefTypeRepr(e, index) - or - result = getImmediateChildOfRestPat(e, index) - or - result = getImmediateChildOfReturnExpr(e, index) - or - result = getImmediateChildOfSelfParam(e, index) - or - result = getImmediateChildOfSlicePat(e, index) - or - result = getImmediateChildOfSliceTypeRepr(e, index) - or - result = getImmediateChildOfStructExpr(e, index) - or - result = getImmediateChildOfStructFieldList(e, index) - or - result = getImmediateChildOfStructPat(e, index) - or - result = getImmediateChildOfTokenTreeMeta(e, index) - or - result = getImmediateChildOfTryExpr(e, index) - or - result = getImmediateChildOfTupleExpr(e, index) - or - result = getImmediateChildOfTupleFieldList(e, index) - or - result = getImmediateChildOfTuplePat(e, index) - or - result = getImmediateChildOfTupleStructPat(e, index) - or - result = getImmediateChildOfTupleTypeRepr(e, index) - or - result = getImmediateChildOfTypeArg(e, index) - or - result = getImmediateChildOfTypeParam(e, index) - or - result = getImmediateChildOfUnderscoreExpr(e, index) - or - result = getImmediateChildOfUnsafeMeta(e, index) - or - result = getImmediateChildOfVariant(e, index) - or - result = getImmediateChildOfWildcardPat(e, index) - or - result = getImmediateChildOfYeetExpr(e, index) - or - result = getImmediateChildOfYieldExpr(e, index) - or - result = getImmediateChildOfAsmExpr(e, index) - or - result = getImmediateChildOfBlockExpr(e, index) - or - result = getImmediateChildOfExternBlock(e, index) - or - result = getImmediateChildOfExternCrate(e, index) - or - result = getImmediateChildOfImpl(e, index) - or - result = getImmediateChildOfMacroDef(e, index) - or - result = getImmediateChildOfMacroRules(e, index) - or - result = getImmediateChildOfModule(e, index) - or - result = getImmediateChildOfPathExpr(e, index) - or - result = getImmediateChildOfTrait(e, index) - or - result = getImmediateChildOfUse(e, index) - or - result = getImmediateChildOfConst(e, index) - or - result = getImmediateChildOfEnum(e, index) - or - result = getImmediateChildOfForExpr(e, index) - or - result = getImmediateChildOfFunction(e, index) - or - result = getImmediateChildOfLoopExpr(e, index) - or - result = getImmediateChildOfMacroCall(e, index) - or - result = getImmediateChildOfStatic(e, index) - or - result = getImmediateChildOfStruct(e, index) - or - result = getImmediateChildOfTypeAlias(e, index) - or - result = getImmediateChildOfUnion(e, index) - or - result = getImmediateChildOfWhileExpr(e, index) + // why does this look more complicated than it should? + // * none() simplifies generation, as we can append `or ...` without a special case for the first item + none() + or + result = getImmediateChildOfExtractorStep(e, index) + or + result = getImmediateChildOfNamedCrate(e, index) + or + result = getImmediateChildOfCrate(e, index) + or + result = getImmediateChildOfMissing(e, index) + or + result = getImmediateChildOfUnimplemented(e, index) + or + result = getImmediateChildOfAbi(e, index) + or + result = getImmediateChildOfArgList(e, index) + or + result = getImmediateChildOfAsmDirSpec(e, index) + or + result = getImmediateChildOfAsmOperandExpr(e, index) + or + result = getImmediateChildOfAsmOption(e, index) + or + result = getImmediateChildOfAsmRegSpec(e, index) + or + result = getImmediateChildOfAssocItemList(e, index) + or + result = getImmediateChildOfExternItemList(e, index) + or + result = getImmediateChildOfForBinder(e, index) + or + result = getImmediateChildOfFormatArgsArg(e, index) + or + result = getImmediateChildOfGenericArgList(e, index) + or + result = getImmediateChildOfGenericParamList(e, index) + or + result = getImmediateChildOfImplRestriction(e, index) + or + result = getImmediateChildOfItemList(e, index) + or + result = getImmediateChildOfLabel(e, index) + or + result = getImmediateChildOfLetElse(e, index) + or + result = getImmediateChildOfMacroItems(e, index) + or + result = getImmediateChildOfMatchArm(e, index) + or + result = getImmediateChildOfMatchArmList(e, index) + or + result = getImmediateChildOfMatchGuard(e, index) + or + result = getImmediateChildOfMutRestriction(e, index) + or + result = getImmediateChildOfName(e, index) + or + result = getImmediateChildOfParamList(e, index) + or + result = getImmediateChildOfParenthesizedArgList(e, index) + or + result = getImmediateChildOfPath(e, index) + or + result = getImmediateChildOfPathSegment(e, index) + or + result = getImmediateChildOfRename(e, index) + or + result = getImmediateChildOfRetTypeRepr(e, index) + or + result = getImmediateChildOfReturnTypeSyntax(e, index) + or + result = getImmediateChildOfSourceFile(e, index) + or + result = getImmediateChildOfStmtList(e, index) + or + result = getImmediateChildOfStructExprField(e, index) + or + result = getImmediateChildOfStructExprFieldList(e, index) + or + result = getImmediateChildOfStructField(e, index) + or + result = getImmediateChildOfStructPatField(e, index) + or + result = getImmediateChildOfStructPatFieldList(e, index) + or + result = getImmediateChildOfTokenTree(e, index) + or + result = getImmediateChildOfTryBlockModifier(e, index) + or + result = getImmediateChildOfTupleField(e, index) + or + result = getImmediateChildOfTypeBound(e, index) + or + result = getImmediateChildOfTypeBoundList(e, index) + or + result = getImmediateChildOfUseBoundGenericArgs(e, index) + or + result = getImmediateChildOfUseTree(e, index) + or + result = getImmediateChildOfUseTreeList(e, index) + or + result = getImmediateChildOfVariantList(e, index) + or + result = getImmediateChildOfVisibility(e, index) + or + result = getImmediateChildOfVisibilityInner(e, index) + or + result = getImmediateChildOfWhereClause(e, index) + or + result = getImmediateChildOfWherePred(e, index) + or + result = getImmediateChildOfArrayExprInternal(e, index) + or + result = getImmediateChildOfArrayTypeRepr(e, index) + or + result = getImmediateChildOfAsmClobberAbi(e, index) + or + result = getImmediateChildOfAsmConst(e, index) + or + result = getImmediateChildOfAsmLabel(e, index) + or + result = getImmediateChildOfAsmOperandNamed(e, index) + or + result = getImmediateChildOfAsmOptionsList(e, index) + or + result = getImmediateChildOfAsmRegOperand(e, index) + or + result = getImmediateChildOfAsmSym(e, index) + or + result = getImmediateChildOfAssocTypeArg(e, index) + or + result = getImmediateChildOfAttr(e, index) + or + result = getImmediateChildOfAwaitExpr(e, index) + or + result = getImmediateChildOfBecomeExpr(e, index) + or + result = getImmediateChildOfBinaryExpr(e, index) + or + result = getImmediateChildOfBoxPat(e, index) + or + result = getImmediateChildOfBreakExpr(e, index) + or + result = getImmediateChildOfCallExpr(e, index) + or + result = getImmediateChildOfCastExpr(e, index) + or + result = getImmediateChildOfCfgAtom(e, index) + or + result = getImmediateChildOfCfgAttrMeta(e, index) + or + result = getImmediateChildOfCfgComposite(e, index) + or + result = getImmediateChildOfCfgMeta(e, index) + or + result = getImmediateChildOfCfgPredExpr(e, index) + or + result = getImmediateChildOfCfgPredPat(e, index) + or + result = getImmediateChildOfClosureExpr(e, index) + or + result = getImmediateChildOfComment(e, index) + or + result = getImmediateChildOfConstArg(e, index) + or + result = getImmediateChildOfConstBlockPat(e, index) + or + result = getImmediateChildOfConstParam(e, index) + or + result = getImmediateChildOfContinueExpr(e, index) + or + result = getImmediateChildOfDerefPat(e, index) + or + result = getImmediateChildOfDocComment(e, index) + or + result = getImmediateChildOfDynTraitTypeRepr(e, index) + or + result = getImmediateChildOfExprStmt(e, index) + or + result = getImmediateChildOfFieldExpr(e, index) + or + result = getImmediateChildOfFnPtrTypeRepr(e, index) + or + result = getImmediateChildOfForTypeRepr(e, index) + or + result = getImmediateChildOfFormatArgsExpr(e, index) + or + result = getImmediateChildOfIdentPat(e, index) + or + result = getImmediateChildOfIfExpr(e, index) + or + result = getImmediateChildOfImplTraitTypeRepr(e, index) + or + result = getImmediateChildOfIncludeBytesExpr(e, index) + or + result = getImmediateChildOfIndexExpr(e, index) + or + result = getImmediateChildOfInferTypeRepr(e, index) + or + result = getImmediateChildOfKeyValueMeta(e, index) + or + result = getImmediateChildOfLetExpr(e, index) + or + result = getImmediateChildOfLetStmt(e, index) + or + result = getImmediateChildOfLifetime(e, index) + or + result = getImmediateChildOfLifetimeArg(e, index) + or + result = getImmediateChildOfLifetimeParam(e, index) + or + result = getImmediateChildOfLiteralExpr(e, index) + or + result = getImmediateChildOfLiteralPat(e, index) + or + result = getImmediateChildOfMacroExpr(e, index) + or + result = getImmediateChildOfMacroPat(e, index) + or + result = getImmediateChildOfMacroTypeRepr(e, index) + or + result = getImmediateChildOfMatchExpr(e, index) + or + result = getImmediateChildOfMethodCallExpr(e, index) + or + result = getImmediateChildOfNameRef(e, index) + or + result = getImmediateChildOfNeverTypeRepr(e, index) + or + result = getImmediateChildOfNotNull(e, index) + or + result = getImmediateChildOfOffsetOfExpr(e, index) + or + result = getImmediateChildOfOrPat(e, index) + or + result = getImmediateChildOfParam(e, index) + or + result = getImmediateChildOfParenExpr(e, index) + or + result = getImmediateChildOfParenPat(e, index) + or + result = getImmediateChildOfParenTypeRepr(e, index) + or + result = getImmediateChildOfPathMeta(e, index) + or + result = getImmediateChildOfPathPat(e, index) + or + result = getImmediateChildOfPathTypeRepr(e, index) + or + result = getImmediateChildOfPatternTypeRepr(e, index) + or + result = getImmediateChildOfPrefixExpr(e, index) + or + result = getImmediateChildOfPtrTypeRepr(e, index) + or + result = getImmediateChildOfRangeExpr(e, index) + or + result = getImmediateChildOfRangePat(e, index) + or + result = getImmediateChildOfRefExpr(e, index) + or + result = getImmediateChildOfRefPat(e, index) + or + result = getImmediateChildOfRefTypeRepr(e, index) + or + result = getImmediateChildOfRestPat(e, index) + or + result = getImmediateChildOfReturnExpr(e, index) + or + result = getImmediateChildOfSelfParam(e, index) + or + result = getImmediateChildOfSlicePat(e, index) + or + result = getImmediateChildOfSliceTypeRepr(e, index) + or + result = getImmediateChildOfStructExpr(e, index) + or + result = getImmediateChildOfStructFieldList(e, index) + or + result = getImmediateChildOfStructPat(e, index) + or + result = getImmediateChildOfTokenTreeMeta(e, index) + or + result = getImmediateChildOfTryExpr(e, index) + or + result = getImmediateChildOfTupleExpr(e, index) + or + result = getImmediateChildOfTupleFieldList(e, index) + or + result = getImmediateChildOfTuplePat(e, index) + or + result = getImmediateChildOfTupleStructPat(e, index) + or + result = getImmediateChildOfTupleTypeRepr(e, index) + or + result = getImmediateChildOfTypeArg(e, index) + or + result = getImmediateChildOfTypeParam(e, index) + or + result = getImmediateChildOfUnderscoreExpr(e, index) + or + result = getImmediateChildOfUnsafeMeta(e, index) + or + result = getImmediateChildOfVariant(e, index) + or + result = getImmediateChildOfWildcardPat(e, index) + or + result = getImmediateChildOfYeetExpr(e, index) + or + result = getImmediateChildOfYieldExpr(e, index) + or + result = getImmediateChildOfAsmExpr(e, index) + or + result = getImmediateChildOfBlockExpr(e, index) + or + result = getImmediateChildOfExternBlock(e, index) + or + result = getImmediateChildOfExternCrate(e, index) + or + result = getImmediateChildOfImpl(e, index) + or + result = getImmediateChildOfMacroDef(e, index) + or + result = getImmediateChildOfMacroRules(e, index) + or + result = getImmediateChildOfModule(e, index) + or + result = getImmediateChildOfPathExpr(e, index) + or + result = getImmediateChildOfTrait(e, index) + or + result = getImmediateChildOfUse(e, index) + or + result = getImmediateChildOfConst(e, index) + or + result = getImmediateChildOfEnum(e, index) + or + result = getImmediateChildOfForExpr(e, index) + or + result = getImmediateChildOfFunction(e, index) + or + result = getImmediateChildOfLoopExpr(e, index) + or + result = getImmediateChildOfMacroCall(e, index) + or + result = getImmediateChildOfStatic(e, index) + or + result = getImmediateChildOfStruct(e, index) + or + result = getImmediateChildOfTypeAlias(e, index) + or + result = getImmediateChildOfUnion(e, index) + or + result = getImmediateChildOfWhileExpr(e, index) } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll index 5919f0ef7d60..f498377b7d1c 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Synth.qll @@ -12,907 +12,736 @@ module Synth { * INTERNAL: Do not use. * The synthesized type of all elements. */ - cached newtype TElement = + cached + newtype TElement = /** * INTERNAL: Do not use. */ - TAbi(Raw::Abi id) { constructAbi(id) } - or + TAbi(Raw::Abi id) { constructAbi(id) } or /** * INTERNAL: Do not use. */ - TArgList(Raw::ArgList id) { constructArgList(id) } - or + TArgList(Raw::ArgList id) { constructArgList(id) } or /** * INTERNAL: Do not use. */ - TArrayExprInternal(Raw::ArrayExprInternal id) { constructArrayExprInternal(id) } - or + TArrayExprInternal(Raw::ArrayExprInternal id) { constructArrayExprInternal(id) } or /** * INTERNAL: Do not use. */ - TArrayListExpr(Raw::ArrayExprInternal id) { constructArrayListExpr(id) } - or + TArrayListExpr(Raw::ArrayExprInternal id) { constructArrayListExpr(id) } or /** * INTERNAL: Do not use. */ - TArrayRepeatExpr(Raw::ArrayExprInternal id) { constructArrayRepeatExpr(id) } - or + TArrayRepeatExpr(Raw::ArrayExprInternal id) { constructArrayRepeatExpr(id) } or /** * INTERNAL: Do not use. */ - TArrayTypeRepr(Raw::ArrayTypeRepr id) { constructArrayTypeRepr(id) } - or + TArrayTypeRepr(Raw::ArrayTypeRepr id) { constructArrayTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TAsmClobberAbi(Raw::AsmClobberAbi id) { constructAsmClobberAbi(id) } - or + TAsmClobberAbi(Raw::AsmClobberAbi id) { constructAsmClobberAbi(id) } or /** * INTERNAL: Do not use. */ - TAsmConst(Raw::AsmConst id) { constructAsmConst(id) } - or + TAsmConst(Raw::AsmConst id) { constructAsmConst(id) } or /** * INTERNAL: Do not use. */ - TAsmDirSpec(Raw::AsmDirSpec id) { constructAsmDirSpec(id) } - or + TAsmDirSpec(Raw::AsmDirSpec id) { constructAsmDirSpec(id) } or /** * INTERNAL: Do not use. */ - TAsmExpr(Raw::AsmExpr id) { constructAsmExpr(id) } - or + TAsmExpr(Raw::AsmExpr id) { constructAsmExpr(id) } or /** * INTERNAL: Do not use. */ - TAsmLabel(Raw::AsmLabel id) { constructAsmLabel(id) } - or + TAsmLabel(Raw::AsmLabel id) { constructAsmLabel(id) } or /** * INTERNAL: Do not use. */ - TAsmOperandExpr(Raw::AsmOperandExpr id) { constructAsmOperandExpr(id) } - or + TAsmOperandExpr(Raw::AsmOperandExpr id) { constructAsmOperandExpr(id) } or /** * INTERNAL: Do not use. */ - TAsmOperandNamed(Raw::AsmOperandNamed id) { constructAsmOperandNamed(id) } - or + TAsmOperandNamed(Raw::AsmOperandNamed id) { constructAsmOperandNamed(id) } or /** * INTERNAL: Do not use. */ - TAsmOption(Raw::AsmOption id) { constructAsmOption(id) } - or + TAsmOption(Raw::AsmOption id) { constructAsmOption(id) } or /** * INTERNAL: Do not use. */ - TAsmOptionsList(Raw::AsmOptionsList id) { constructAsmOptionsList(id) } - or + TAsmOptionsList(Raw::AsmOptionsList id) { constructAsmOptionsList(id) } or /** * INTERNAL: Do not use. */ - TAsmRegOperand(Raw::AsmRegOperand id) { constructAsmRegOperand(id) } - or + TAsmRegOperand(Raw::AsmRegOperand id) { constructAsmRegOperand(id) } or /** * INTERNAL: Do not use. */ - TAsmRegSpec(Raw::AsmRegSpec id) { constructAsmRegSpec(id) } - or + TAsmRegSpec(Raw::AsmRegSpec id) { constructAsmRegSpec(id) } or /** * INTERNAL: Do not use. */ - TAsmSym(Raw::AsmSym id) { constructAsmSym(id) } - or + TAsmSym(Raw::AsmSym id) { constructAsmSym(id) } or /** * INTERNAL: Do not use. */ - TAssocItemList(Raw::AssocItemList id) { constructAssocItemList(id) } - or + TAssocItemList(Raw::AssocItemList id) { constructAssocItemList(id) } or /** * INTERNAL: Do not use. */ - TAssocTypeArg(Raw::AssocTypeArg id) { constructAssocTypeArg(id) } - or + TAssocTypeArg(Raw::AssocTypeArg id) { constructAssocTypeArg(id) } or /** * INTERNAL: Do not use. */ - TAttr(Raw::Attr id) { constructAttr(id) } - or + TAttr(Raw::Attr id) { constructAttr(id) } or /** * INTERNAL: Do not use. */ - TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } - or + TAwaitExpr(Raw::AwaitExpr id) { constructAwaitExpr(id) } or /** * INTERNAL: Do not use. */ - TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } - or + TBecomeExpr(Raw::BecomeExpr id) { constructBecomeExpr(id) } or /** * INTERNAL: Do not use. */ - TBinaryExpr(Raw::BinaryExpr id) { constructBinaryExpr(id) } - or + TBinaryExpr(Raw::BinaryExpr id) { constructBinaryExpr(id) } or /** * INTERNAL: Do not use. */ - TBlockExpr(Raw::BlockExpr id) { constructBlockExpr(id) } - or + TBlockExpr(Raw::BlockExpr id) { constructBlockExpr(id) } or /** * INTERNAL: Do not use. */ - TBoxPat(Raw::BoxPat id) { constructBoxPat(id) } - or + TBoxPat(Raw::BoxPat id) { constructBoxPat(id) } or /** * INTERNAL: Do not use. */ - TBreakExpr(Raw::BreakExpr id) { constructBreakExpr(id) } - or + TBreakExpr(Raw::BreakExpr id) { constructBreakExpr(id) } or /** * INTERNAL: Do not use. */ - TCallExpr(Raw::CallExpr id) { constructCallExpr(id) } - or + TCallExpr(Raw::CallExpr id) { constructCallExpr(id) } or /** * INTERNAL: Do not use. */ - TCastExpr(Raw::CastExpr id) { constructCastExpr(id) } - or + TCastExpr(Raw::CastExpr id) { constructCastExpr(id) } or /** * INTERNAL: Do not use. */ - TCfgAtom(Raw::CfgAtom id) { constructCfgAtom(id) } - or + TCfgAtom(Raw::CfgAtom id) { constructCfgAtom(id) } or /** * INTERNAL: Do not use. */ - TCfgAttrMeta(Raw::CfgAttrMeta id) { constructCfgAttrMeta(id) } - or + TCfgAttrMeta(Raw::CfgAttrMeta id) { constructCfgAttrMeta(id) } or /** * INTERNAL: Do not use. */ - TCfgComposite(Raw::CfgComposite id) { constructCfgComposite(id) } - or + TCfgComposite(Raw::CfgComposite id) { constructCfgComposite(id) } or /** * INTERNAL: Do not use. */ - TCfgMeta(Raw::CfgMeta id) { constructCfgMeta(id) } - or + TCfgMeta(Raw::CfgMeta id) { constructCfgMeta(id) } or /** * INTERNAL: Do not use. */ - TCfgPredExpr(Raw::CfgPredExpr id) { constructCfgPredExpr(id) } - or + TCfgPredExpr(Raw::CfgPredExpr id) { constructCfgPredExpr(id) } or /** * INTERNAL: Do not use. */ - TCfgPredPat(Raw::CfgPredPat id) { constructCfgPredPat(id) } - or + TCfgPredPat(Raw::CfgPredPat id) { constructCfgPredPat(id) } or /** * INTERNAL: Do not use. */ - TClosureExpr(Raw::ClosureExpr id) { constructClosureExpr(id) } - or + TClosureExpr(Raw::ClosureExpr id) { constructClosureExpr(id) } or /** * INTERNAL: Do not use. */ - TComment(Raw::Comment id) { constructComment(id) } - or + TComment(Raw::Comment id) { constructComment(id) } or /** * INTERNAL: Do not use. */ - TConst(Raw::Const id) { constructConst(id) } - or + TConst(Raw::Const id) { constructConst(id) } or /** * INTERNAL: Do not use. */ - TConstArg(Raw::ConstArg id) { constructConstArg(id) } - or + TConstArg(Raw::ConstArg id) { constructConstArg(id) } or /** * INTERNAL: Do not use. */ - TConstBlockPat(Raw::ConstBlockPat id) { constructConstBlockPat(id) } - or + TConstBlockPat(Raw::ConstBlockPat id) { constructConstBlockPat(id) } or /** * INTERNAL: Do not use. */ - TConstParam(Raw::ConstParam id) { constructConstParam(id) } - or + TConstParam(Raw::ConstParam id) { constructConstParam(id) } or /** * INTERNAL: Do not use. */ - TContinueExpr(Raw::ContinueExpr id) { constructContinueExpr(id) } - or + TContinueExpr(Raw::ContinueExpr id) { constructContinueExpr(id) } or /** * INTERNAL: Do not use. */ - TCrate(Raw::Crate id) { constructCrate(id) } - or + TCrate(Raw::Crate id) { constructCrate(id) } or /** * INTERNAL: Do not use. */ - TDerefPat(Raw::DerefPat id) { constructDerefPat(id) } - or + TDerefPat(Raw::DerefPat id) { constructDerefPat(id) } or /** * INTERNAL: Do not use. */ - TDocComment(Raw::DocComment id) { constructDocComment(id) } - or + TDocComment(Raw::DocComment id) { constructDocComment(id) } or /** * INTERNAL: Do not use. */ - TDynTraitTypeRepr(Raw::DynTraitTypeRepr id) { constructDynTraitTypeRepr(id) } - or + TDynTraitTypeRepr(Raw::DynTraitTypeRepr id) { constructDynTraitTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TEnum(Raw::Enum id) { constructEnum(id) } - or + TEnum(Raw::Enum id) { constructEnum(id) } or /** * INTERNAL: Do not use. */ - TExprStmt(Raw::ExprStmt id) { constructExprStmt(id) } - or + TExprStmt(Raw::ExprStmt id) { constructExprStmt(id) } or /** * INTERNAL: Do not use. */ - TExternBlock(Raw::ExternBlock id) { constructExternBlock(id) } - or + TExternBlock(Raw::ExternBlock id) { constructExternBlock(id) } or /** * INTERNAL: Do not use. */ - TExternCrate(Raw::ExternCrate id) { constructExternCrate(id) } - or + TExternCrate(Raw::ExternCrate id) { constructExternCrate(id) } or /** * INTERNAL: Do not use. */ - TExternItemList(Raw::ExternItemList id) { constructExternItemList(id) } - or + TExternItemList(Raw::ExternItemList id) { constructExternItemList(id) } or /** * INTERNAL: Do not use. */ - TExtractorStep(Raw::ExtractorStep id) { constructExtractorStep(id) } - or + TExtractorStep(Raw::ExtractorStep id) { constructExtractorStep(id) } or /** * INTERNAL: Do not use. */ - TFieldExpr(Raw::FieldExpr id) { constructFieldExpr(id) } - or + TFieldExpr(Raw::FieldExpr id) { constructFieldExpr(id) } or /** * INTERNAL: Do not use. */ - TFnPtrTypeRepr(Raw::FnPtrTypeRepr id) { constructFnPtrTypeRepr(id) } - or + TFnPtrTypeRepr(Raw::FnPtrTypeRepr id) { constructFnPtrTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TForBinder(Raw::ForBinder id) { constructForBinder(id) } - or + TForBinder(Raw::ForBinder id) { constructForBinder(id) } or /** * INTERNAL: Do not use. */ - TForExpr(Raw::ForExpr id) { constructForExpr(id) } - or + TForExpr(Raw::ForExpr id) { constructForExpr(id) } or /** * INTERNAL: Do not use. */ - TForTypeRepr(Raw::ForTypeRepr id) { constructForTypeRepr(id) } - or + TForTypeRepr(Raw::ForTypeRepr id) { constructForTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TFormat(Raw::FormatArgsExpr parent, int index, string text, int offset) { constructFormat(parent, index, text, offset) } - or + TFormat(Raw::FormatArgsExpr parent, int index, string text, int offset) { + constructFormat(parent, index, text, offset) + } or /** * INTERNAL: Do not use. */ - TFormatArgsArg(Raw::FormatArgsArg id) { constructFormatArgsArg(id) } - or + TFormatArgsArg(Raw::FormatArgsArg id) { constructFormatArgsArg(id) } or /** * INTERNAL: Do not use. */ - TFormatArgsExpr(Raw::FormatArgsExpr id) { constructFormatArgsExpr(id) } - or + TFormatArgsExpr(Raw::FormatArgsExpr id) { constructFormatArgsExpr(id) } or /** * INTERNAL: Do not use. */ - TFormatArgument(Raw::FormatArgsExpr parent, int index, int kind, string name, boolean positional, int offset) { constructFormatArgument(parent, index, kind, name, positional, offset) } - or + TFormatArgument( + Raw::FormatArgsExpr parent, int index, int kind, string name, boolean positional, int offset + ) { + constructFormatArgument(parent, index, kind, name, positional, offset) + } or /** * INTERNAL: Do not use. */ - TFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) { constructFormatTemplateVariableAccess(parent, index, kind) } - or + TFormatTemplateVariableAccess(Raw::FormatArgsExpr parent, int index, int kind) { + constructFormatTemplateVariableAccess(parent, index, kind) + } or /** * INTERNAL: Do not use. */ - TFunction(Raw::Function id) { constructFunction(id) } - or + TFunction(Raw::Function id) { constructFunction(id) } or /** * INTERNAL: Do not use. */ - TGenericArgList(Raw::GenericArgList id) { constructGenericArgList(id) } - or + TGenericArgList(Raw::GenericArgList id) { constructGenericArgList(id) } or /** * INTERNAL: Do not use. */ - TGenericParamList(Raw::GenericParamList id) { constructGenericParamList(id) } - or + TGenericParamList(Raw::GenericParamList id) { constructGenericParamList(id) } or /** * INTERNAL: Do not use. */ - TIdentPat(Raw::IdentPat id) { constructIdentPat(id) } - or + TIdentPat(Raw::IdentPat id) { constructIdentPat(id) } or /** * INTERNAL: Do not use. */ - TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } - or + TIfExpr(Raw::IfExpr id) { constructIfExpr(id) } or /** * INTERNAL: Do not use. */ - TImpl(Raw::Impl id) { constructImpl(id) } - or + TImpl(Raw::Impl id) { constructImpl(id) } or /** * INTERNAL: Do not use. */ - TImplRestriction(Raw::ImplRestriction id) { constructImplRestriction(id) } - or + TImplRestriction(Raw::ImplRestriction id) { constructImplRestriction(id) } or /** * INTERNAL: Do not use. */ - TImplTraitTypeRepr(Raw::ImplTraitTypeRepr id) { constructImplTraitTypeRepr(id) } - or + TImplTraitTypeRepr(Raw::ImplTraitTypeRepr id) { constructImplTraitTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TIncludeBytesExpr(Raw::IncludeBytesExpr id) { constructIncludeBytesExpr(id) } - or + TIncludeBytesExpr(Raw::IncludeBytesExpr id) { constructIncludeBytesExpr(id) } or /** * INTERNAL: Do not use. */ - TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } - or + TIndexExpr(Raw::IndexExpr id) { constructIndexExpr(id) } or /** * INTERNAL: Do not use. */ - TInferTypeRepr(Raw::InferTypeRepr id) { constructInferTypeRepr(id) } - or + TInferTypeRepr(Raw::InferTypeRepr id) { constructInferTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TItemList(Raw::ItemList id) { constructItemList(id) } - or + TItemList(Raw::ItemList id) { constructItemList(id) } or /** * INTERNAL: Do not use. */ - TKeyValueMeta(Raw::KeyValueMeta id) { constructKeyValueMeta(id) } - or + TKeyValueMeta(Raw::KeyValueMeta id) { constructKeyValueMeta(id) } or /** * INTERNAL: Do not use. */ - TLabel(Raw::Label id) { constructLabel(id) } - or + TLabel(Raw::Label id) { constructLabel(id) } or /** * INTERNAL: Do not use. */ - TLetElse(Raw::LetElse id) { constructLetElse(id) } - or + TLetElse(Raw::LetElse id) { constructLetElse(id) } or /** * INTERNAL: Do not use. */ - TLetExpr(Raw::LetExpr id) { constructLetExpr(id) } - or + TLetExpr(Raw::LetExpr id) { constructLetExpr(id) } or /** * INTERNAL: Do not use. */ - TLetStmt(Raw::LetStmt id) { constructLetStmt(id) } - or + TLetStmt(Raw::LetStmt id) { constructLetStmt(id) } or /** * INTERNAL: Do not use. */ - TLifetime(Raw::Lifetime id) { constructLifetime(id) } - or + TLifetime(Raw::Lifetime id) { constructLifetime(id) } or /** * INTERNAL: Do not use. */ - TLifetimeArg(Raw::LifetimeArg id) { constructLifetimeArg(id) } - or + TLifetimeArg(Raw::LifetimeArg id) { constructLifetimeArg(id) } or /** * INTERNAL: Do not use. */ - TLifetimeParam(Raw::LifetimeParam id) { constructLifetimeParam(id) } - or + TLifetimeParam(Raw::LifetimeParam id) { constructLifetimeParam(id) } or /** * INTERNAL: Do not use. */ - TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } - or + TLiteralExpr(Raw::LiteralExpr id) { constructLiteralExpr(id) } or /** * INTERNAL: Do not use. */ - TLiteralPat(Raw::LiteralPat id) { constructLiteralPat(id) } - or + TLiteralPat(Raw::LiteralPat id) { constructLiteralPat(id) } or /** * INTERNAL: Do not use. */ - TLoopExpr(Raw::LoopExpr id) { constructLoopExpr(id) } - or + TLoopExpr(Raw::LoopExpr id) { constructLoopExpr(id) } or /** * INTERNAL: Do not use. */ - TMacroCall(Raw::MacroCall id) { constructMacroCall(id) } - or + TMacroCall(Raw::MacroCall id) { constructMacroCall(id) } or /** * INTERNAL: Do not use. */ - TMacroDef(Raw::MacroDef id) { constructMacroDef(id) } - or + TMacroDef(Raw::MacroDef id) { constructMacroDef(id) } or /** * INTERNAL: Do not use. */ - TMacroExpr(Raw::MacroExpr id) { constructMacroExpr(id) } - or + TMacroExpr(Raw::MacroExpr id) { constructMacroExpr(id) } or /** * INTERNAL: Do not use. */ - TMacroItems(Raw::MacroItems id) { constructMacroItems(id) } - or + TMacroItems(Raw::MacroItems id) { constructMacroItems(id) } or /** * INTERNAL: Do not use. */ - TMacroPat(Raw::MacroPat id) { constructMacroPat(id) } - or + TMacroPat(Raw::MacroPat id) { constructMacroPat(id) } or /** * INTERNAL: Do not use. */ - TMacroRules(Raw::MacroRules id) { constructMacroRules(id) } - or + TMacroRules(Raw::MacroRules id) { constructMacroRules(id) } or /** * INTERNAL: Do not use. */ - TMacroTypeRepr(Raw::MacroTypeRepr id) { constructMacroTypeRepr(id) } - or + TMacroTypeRepr(Raw::MacroTypeRepr id) { constructMacroTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TMatchArm(Raw::MatchArm id) { constructMatchArm(id) } - or + TMatchArm(Raw::MatchArm id) { constructMatchArm(id) } or /** * INTERNAL: Do not use. */ - TMatchArmList(Raw::MatchArmList id) { constructMatchArmList(id) } - or + TMatchArmList(Raw::MatchArmList id) { constructMatchArmList(id) } or /** * INTERNAL: Do not use. */ - TMatchExpr(Raw::MatchExpr id) { constructMatchExpr(id) } - or + TMatchExpr(Raw::MatchExpr id) { constructMatchExpr(id) } or /** * INTERNAL: Do not use. */ - TMatchGuard(Raw::MatchGuard id) { constructMatchGuard(id) } - or + TMatchGuard(Raw::MatchGuard id) { constructMatchGuard(id) } or /** * INTERNAL: Do not use. */ - TMethodCallExpr(Raw::MethodCallExpr id) { constructMethodCallExpr(id) } - or + TMethodCallExpr(Raw::MethodCallExpr id) { constructMethodCallExpr(id) } or /** * INTERNAL: Do not use. */ - TMissing(Raw::Missing id) { constructMissing(id) } - or + TMissing(Raw::Missing id) { constructMissing(id) } or /** * INTERNAL: Do not use. */ - TModule(Raw::Module id) { constructModule(id) } - or + TModule(Raw::Module id) { constructModule(id) } or /** * INTERNAL: Do not use. */ - TMutRestriction(Raw::MutRestriction id) { constructMutRestriction(id) } - or + TMutRestriction(Raw::MutRestriction id) { constructMutRestriction(id) } or /** * INTERNAL: Do not use. */ - TName(Raw::Name id) { constructName(id) } - or + TName(Raw::Name id) { constructName(id) } or /** * INTERNAL: Do not use. */ - TNameRef(Raw::NameRef id) { constructNameRef(id) } - or + TNameRef(Raw::NameRef id) { constructNameRef(id) } or /** * INTERNAL: Do not use. */ - TNamedCrate(Raw::NamedCrate id) { constructNamedCrate(id) } - or + TNamedCrate(Raw::NamedCrate id) { constructNamedCrate(id) } or /** * INTERNAL: Do not use. */ - TNeverTypeRepr(Raw::NeverTypeRepr id) { constructNeverTypeRepr(id) } - or + TNeverTypeRepr(Raw::NeverTypeRepr id) { constructNeverTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TNotNull(Raw::NotNull id) { constructNotNull(id) } - or + TNotNull(Raw::NotNull id) { constructNotNull(id) } or /** * INTERNAL: Do not use. */ - TOffsetOfExpr(Raw::OffsetOfExpr id) { constructOffsetOfExpr(id) } - or + TOffsetOfExpr(Raw::OffsetOfExpr id) { constructOffsetOfExpr(id) } or /** * INTERNAL: Do not use. */ - TOrPat(Raw::OrPat id) { constructOrPat(id) } - or + TOrPat(Raw::OrPat id) { constructOrPat(id) } or /** * INTERNAL: Do not use. */ - TParam(Raw::Param id) { constructParam(id) } - or + TParam(Raw::Param id) { constructParam(id) } or /** * INTERNAL: Do not use. */ - TParamList(Raw::ParamList id) { constructParamList(id) } - or + TParamList(Raw::ParamList id) { constructParamList(id) } or /** * INTERNAL: Do not use. */ - TParenExpr(Raw::ParenExpr id) { constructParenExpr(id) } - or + TParenExpr(Raw::ParenExpr id) { constructParenExpr(id) } or /** * INTERNAL: Do not use. */ - TParenPat(Raw::ParenPat id) { constructParenPat(id) } - or + TParenPat(Raw::ParenPat id) { constructParenPat(id) } or /** * INTERNAL: Do not use. */ - TParenTypeRepr(Raw::ParenTypeRepr id) { constructParenTypeRepr(id) } - or + TParenTypeRepr(Raw::ParenTypeRepr id) { constructParenTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TParenthesizedArgList(Raw::ParenthesizedArgList id) { constructParenthesizedArgList(id) } - or + TParenthesizedArgList(Raw::ParenthesizedArgList id) { constructParenthesizedArgList(id) } or /** * INTERNAL: Do not use. */ - TPath(Raw::Path id) { constructPath(id) } - or + TPath(Raw::Path id) { constructPath(id) } or /** * INTERNAL: Do not use. */ - TPathExpr(Raw::PathExpr id) { constructPathExpr(id) } - or + TPathExpr(Raw::PathExpr id) { constructPathExpr(id) } or /** * INTERNAL: Do not use. */ - TPathMeta(Raw::PathMeta id) { constructPathMeta(id) } - or + TPathMeta(Raw::PathMeta id) { constructPathMeta(id) } or /** * INTERNAL: Do not use. */ - TPathPat(Raw::PathPat id) { constructPathPat(id) } - or + TPathPat(Raw::PathPat id) { constructPathPat(id) } or /** * INTERNAL: Do not use. */ - TPathSegment(Raw::PathSegment id) { constructPathSegment(id) } - or + TPathSegment(Raw::PathSegment id) { constructPathSegment(id) } or /** * INTERNAL: Do not use. */ - TPathTypeRepr(Raw::PathTypeRepr id) { constructPathTypeRepr(id) } - or + TPathTypeRepr(Raw::PathTypeRepr id) { constructPathTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TPatternTypeRepr(Raw::PatternTypeRepr id) { constructPatternTypeRepr(id) } - or + TPatternTypeRepr(Raw::PatternTypeRepr id) { constructPatternTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TPrefixExpr(Raw::PrefixExpr id) { constructPrefixExpr(id) } - or + TPrefixExpr(Raw::PrefixExpr id) { constructPrefixExpr(id) } or /** * INTERNAL: Do not use. */ - TPtrTypeRepr(Raw::PtrTypeRepr id) { constructPtrTypeRepr(id) } - or + TPtrTypeRepr(Raw::PtrTypeRepr id) { constructPtrTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TRangeExpr(Raw::RangeExpr id) { constructRangeExpr(id) } - or + TRangeExpr(Raw::RangeExpr id) { constructRangeExpr(id) } or /** * INTERNAL: Do not use. */ - TRangePat(Raw::RangePat id) { constructRangePat(id) } - or + TRangePat(Raw::RangePat id) { constructRangePat(id) } or /** * INTERNAL: Do not use. */ - TRefExpr(Raw::RefExpr id) { constructRefExpr(id) } - or + TRefExpr(Raw::RefExpr id) { constructRefExpr(id) } or /** * INTERNAL: Do not use. */ - TRefPat(Raw::RefPat id) { constructRefPat(id) } - or + TRefPat(Raw::RefPat id) { constructRefPat(id) } or /** * INTERNAL: Do not use. */ - TRefTypeRepr(Raw::RefTypeRepr id) { constructRefTypeRepr(id) } - or + TRefTypeRepr(Raw::RefTypeRepr id) { constructRefTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TRename(Raw::Rename id) { constructRename(id) } - or + TRename(Raw::Rename id) { constructRename(id) } or /** * INTERNAL: Do not use. */ - TRestPat(Raw::RestPat id) { constructRestPat(id) } - or + TRestPat(Raw::RestPat id) { constructRestPat(id) } or /** * INTERNAL: Do not use. */ - TRetTypeRepr(Raw::RetTypeRepr id) { constructRetTypeRepr(id) } - or + TRetTypeRepr(Raw::RetTypeRepr id) { constructRetTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TReturnExpr(Raw::ReturnExpr id) { constructReturnExpr(id) } - or + TReturnExpr(Raw::ReturnExpr id) { constructReturnExpr(id) } or /** * INTERNAL: Do not use. */ - TReturnTypeSyntax(Raw::ReturnTypeSyntax id) { constructReturnTypeSyntax(id) } - or + TReturnTypeSyntax(Raw::ReturnTypeSyntax id) { constructReturnTypeSyntax(id) } or /** * INTERNAL: Do not use. */ - TSelfParam(Raw::SelfParam id) { constructSelfParam(id) } - or + TSelfParam(Raw::SelfParam id) { constructSelfParam(id) } or /** * INTERNAL: Do not use. */ - TSlicePat(Raw::SlicePat id) { constructSlicePat(id) } - or + TSlicePat(Raw::SlicePat id) { constructSlicePat(id) } or /** * INTERNAL: Do not use. */ - TSliceTypeRepr(Raw::SliceTypeRepr id) { constructSliceTypeRepr(id) } - or + TSliceTypeRepr(Raw::SliceTypeRepr id) { constructSliceTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TSourceFile(Raw::SourceFile id) { constructSourceFile(id) } - or + TSourceFile(Raw::SourceFile id) { constructSourceFile(id) } or /** * INTERNAL: Do not use. */ - TStatic(Raw::Static id) { constructStatic(id) } - or + TStatic(Raw::Static id) { constructStatic(id) } or /** * INTERNAL: Do not use. */ - TStmtList(Raw::StmtList id) { constructStmtList(id) } - or + TStmtList(Raw::StmtList id) { constructStmtList(id) } or /** * INTERNAL: Do not use. */ - TStruct(Raw::Struct id) { constructStruct(id) } - or + TStruct(Raw::Struct id) { constructStruct(id) } or /** * INTERNAL: Do not use. */ - TStructExpr(Raw::StructExpr id) { constructStructExpr(id) } - or + TStructExpr(Raw::StructExpr id) { constructStructExpr(id) } or /** * INTERNAL: Do not use. */ - TStructExprField(Raw::StructExprField id) { constructStructExprField(id) } - or + TStructExprField(Raw::StructExprField id) { constructStructExprField(id) } or /** * INTERNAL: Do not use. */ - TStructExprFieldList(Raw::StructExprFieldList id) { constructStructExprFieldList(id) } - or + TStructExprFieldList(Raw::StructExprFieldList id) { constructStructExprFieldList(id) } or /** * INTERNAL: Do not use. */ - TStructField(Raw::StructField id) { constructStructField(id) } - or + TStructField(Raw::StructField id) { constructStructField(id) } or /** * INTERNAL: Do not use. */ - TStructFieldList(Raw::StructFieldList id) { constructStructFieldList(id) } - or + TStructFieldList(Raw::StructFieldList id) { constructStructFieldList(id) } or /** * INTERNAL: Do not use. */ - TStructPat(Raw::StructPat id) { constructStructPat(id) } - or + TStructPat(Raw::StructPat id) { constructStructPat(id) } or /** * INTERNAL: Do not use. */ - TStructPatField(Raw::StructPatField id) { constructStructPatField(id) } - or + TStructPatField(Raw::StructPatField id) { constructStructPatField(id) } or /** * INTERNAL: Do not use. */ - TStructPatFieldList(Raw::StructPatFieldList id) { constructStructPatFieldList(id) } - or + TStructPatFieldList(Raw::StructPatFieldList id) { constructStructPatFieldList(id) } or /** * INTERNAL: Do not use. */ - TTokenTree(Raw::TokenTree id) { constructTokenTree(id) } - or + TTokenTree(Raw::TokenTree id) { constructTokenTree(id) } or /** * INTERNAL: Do not use. */ - TTokenTreeMeta(Raw::TokenTreeMeta id) { constructTokenTreeMeta(id) } - or + TTokenTreeMeta(Raw::TokenTreeMeta id) { constructTokenTreeMeta(id) } or /** * INTERNAL: Do not use. */ - TTrait(Raw::Trait id) { constructTrait(id) } - or + TTrait(Raw::Trait id) { constructTrait(id) } or /** * INTERNAL: Do not use. */ - TTryBlockModifier(Raw::TryBlockModifier id) { constructTryBlockModifier(id) } - or + TTryBlockModifier(Raw::TryBlockModifier id) { constructTryBlockModifier(id) } or /** * INTERNAL: Do not use. */ - TTryExpr(Raw::TryExpr id) { constructTryExpr(id) } - or + TTryExpr(Raw::TryExpr id) { constructTryExpr(id) } or /** * INTERNAL: Do not use. */ - TTupleExpr(Raw::TupleExpr id) { constructTupleExpr(id) } - or + TTupleExpr(Raw::TupleExpr id) { constructTupleExpr(id) } or /** * INTERNAL: Do not use. */ - TTupleField(Raw::TupleField id) { constructTupleField(id) } - or + TTupleField(Raw::TupleField id) { constructTupleField(id) } or /** * INTERNAL: Do not use. */ - TTupleFieldList(Raw::TupleFieldList id) { constructTupleFieldList(id) } - or + TTupleFieldList(Raw::TupleFieldList id) { constructTupleFieldList(id) } or /** * INTERNAL: Do not use. */ - TTuplePat(Raw::TuplePat id) { constructTuplePat(id) } - or + TTuplePat(Raw::TuplePat id) { constructTuplePat(id) } or /** * INTERNAL: Do not use. */ - TTupleStructPat(Raw::TupleStructPat id) { constructTupleStructPat(id) } - or + TTupleStructPat(Raw::TupleStructPat id) { constructTupleStructPat(id) } or /** * INTERNAL: Do not use. */ - TTupleTypeRepr(Raw::TupleTypeRepr id) { constructTupleTypeRepr(id) } - or + TTupleTypeRepr(Raw::TupleTypeRepr id) { constructTupleTypeRepr(id) } or /** * INTERNAL: Do not use. */ - TTypeAlias(Raw::TypeAlias id) { constructTypeAlias(id) } - or + TTypeAlias(Raw::TypeAlias id) { constructTypeAlias(id) } or /** * INTERNAL: Do not use. */ - TTypeArg(Raw::TypeArg id) { constructTypeArg(id) } - or + TTypeArg(Raw::TypeArg id) { constructTypeArg(id) } or /** * INTERNAL: Do not use. */ - TTypeBound(Raw::TypeBound id) { constructTypeBound(id) } - or + TTypeBound(Raw::TypeBound id) { constructTypeBound(id) } or /** * INTERNAL: Do not use. */ - TTypeBoundList(Raw::TypeBoundList id) { constructTypeBoundList(id) } - or + TTypeBoundList(Raw::TypeBoundList id) { constructTypeBoundList(id) } or /** * INTERNAL: Do not use. */ - TTypeParam(Raw::TypeParam id) { constructTypeParam(id) } - or + TTypeParam(Raw::TypeParam id) { constructTypeParam(id) } or /** * INTERNAL: Do not use. */ - TUnderscoreExpr(Raw::UnderscoreExpr id) { constructUnderscoreExpr(id) } - or + TUnderscoreExpr(Raw::UnderscoreExpr id) { constructUnderscoreExpr(id) } or /** * INTERNAL: Do not use. */ - TUnimplemented(Raw::Unimplemented id) { constructUnimplemented(id) } - or + TUnimplemented(Raw::Unimplemented id) { constructUnimplemented(id) } or /** * INTERNAL: Do not use. */ - TUnion(Raw::Union id) { constructUnion(id) } - or + TUnion(Raw::Union id) { constructUnion(id) } or /** * INTERNAL: Do not use. */ - TUnsafeMeta(Raw::UnsafeMeta id) { constructUnsafeMeta(id) } - or + TUnsafeMeta(Raw::UnsafeMeta id) { constructUnsafeMeta(id) } or /** * INTERNAL: Do not use. */ - TUse(Raw::Use id) { constructUse(id) } - or + TUse(Raw::Use id) { constructUse(id) } or /** * INTERNAL: Do not use. */ - TUseBoundGenericArgs(Raw::UseBoundGenericArgs id) { constructUseBoundGenericArgs(id) } - or + TUseBoundGenericArgs(Raw::UseBoundGenericArgs id) { constructUseBoundGenericArgs(id) } or /** * INTERNAL: Do not use. */ - TUseTree(Raw::UseTree id) { constructUseTree(id) } - or + TUseTree(Raw::UseTree id) { constructUseTree(id) } or /** * INTERNAL: Do not use. */ - TUseTreeList(Raw::UseTreeList id) { constructUseTreeList(id) } - or + TUseTreeList(Raw::UseTreeList id) { constructUseTreeList(id) } or /** * INTERNAL: Do not use. */ - TVariant(Raw::Variant id) { constructVariant(id) } - or + TVariant(Raw::Variant id) { constructVariant(id) } or /** * INTERNAL: Do not use. */ - TVariantList(Raw::VariantList id) { constructVariantList(id) } - or + TVariantList(Raw::VariantList id) { constructVariantList(id) } or /** * INTERNAL: Do not use. */ - TVisibility(Raw::Visibility id) { constructVisibility(id) } - or + TVisibility(Raw::Visibility id) { constructVisibility(id) } or /** * INTERNAL: Do not use. */ - TVisibilityInner(Raw::VisibilityInner id) { constructVisibilityInner(id) } - or + TVisibilityInner(Raw::VisibilityInner id) { constructVisibilityInner(id) } or /** * INTERNAL: Do not use. */ - TWhereClause(Raw::WhereClause id) { constructWhereClause(id) } - or + TWhereClause(Raw::WhereClause id) { constructWhereClause(id) } or /** * INTERNAL: Do not use. */ - TWherePred(Raw::WherePred id) { constructWherePred(id) } - or + TWherePred(Raw::WherePred id) { constructWherePred(id) } or /** * INTERNAL: Do not use. */ - TWhileExpr(Raw::WhileExpr id) { constructWhileExpr(id) } - or + TWhileExpr(Raw::WhileExpr id) { constructWhileExpr(id) } or /** * INTERNAL: Do not use. */ - TWildcardPat(Raw::WildcardPat id) { constructWildcardPat(id) } - or + TWildcardPat(Raw::WildcardPat id) { constructWildcardPat(id) } or /** * INTERNAL: Do not use. */ - TYeetExpr(Raw::YeetExpr id) { constructYeetExpr(id) } - or + TYeetExpr(Raw::YeetExpr id) { constructYeetExpr(id) } or /** * INTERNAL: Do not use. */ @@ -922,114 +751,170 @@ module Synth { * INTERNAL: Do not use. */ class TAddressable = TItem or TVariant; + /** * INTERNAL: Do not use. */ class TAnyAttr = TAttr or TDocComment; + /** * INTERNAL: Do not use. */ class TArrayExpr = TArrayListExpr or TArrayRepeatExpr; + /** * INTERNAL: Do not use. */ class TAsmOperand = TAsmConst or TAsmLabel or TAsmRegOperand or TAsmSym; + /** * INTERNAL: Do not use. */ class TAsmPiece = TAsmClobberAbi or TAsmOperandNamed or TAsmOptionsList; + /** * INTERNAL: Do not use. */ class TAssocItem = TConst or TFunction or TMacroCall or TTypeAlias; + /** * INTERNAL: Do not use. */ - class TAstNode = TAbi or TAddressable or TAnyAttr or TArgList or TAsmDirSpec or TAsmOperand or TAsmOperandExpr or TAsmOption or TAsmPiece or TAsmRegSpec or TAssocItemList or TCallable or TCfgPredicate or TExpr or TExternItemList or TFieldList or TForBinder or TFormatArgsArg or TGenericArg or TGenericArgList or TGenericParam or TGenericParamList or TImplRestriction or TItemList or TLabel or TLetElse or TMacroItems or TMatchArm or TMatchArmList or TMatchGuard or TMeta or TMutRestriction or TName or TParamBase or TParamList or TParenthesizedArgList or TPat or TPath or TPathAstNode or TPathSegment or TRename or TRetTypeRepr or TReturnTypeSyntax or TSourceFile or TStmt or TStmtList or TStructExprField or TStructExprFieldList or TStructField or TStructPatField or TStructPatFieldList or TToken or TTokenTree or TTryBlockModifier or TTupleField or TTypeBound or TTypeBoundList or TTypeRepr or TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or TVisibility or TVisibilityInner or TWhereClause or TWherePred; + class TAstNode = + TAbi or TAddressable or TAnyAttr or TArgList or TAsmDirSpec or TAsmOperand or TAsmOperandExpr or + TAsmOption or TAsmPiece or TAsmRegSpec or TAssocItemList or TCallable or TCfgPredicate or + TExpr or TExternItemList or TFieldList or TForBinder or TFormatArgsArg or TGenericArg or + TGenericArgList or TGenericParam or TGenericParamList or TImplRestriction or TItemList or + TLabel or TLetElse or TMacroItems or TMatchArm or TMatchArmList or TMatchGuard or TMeta or + TMutRestriction or TName or TParamBase or TParamList or TParenthesizedArgList or TPat or + TPath or TPathAstNode or TPathSegment or TRename or TRetTypeRepr or TReturnTypeSyntax or + TSourceFile or TStmt or TStmtList or TStructExprField or TStructExprFieldList or + TStructField or TStructPatField or TStructPatFieldList or TToken or TTokenTree or + TTryBlockModifier or TTupleField or TTypeBound or TTypeBoundList or TTypeRepr or + TUseBoundGenericArg or TUseBoundGenericArgs or TUseTree or TUseTreeList or TVariantList or + TVisibility or TVisibilityInner or TWhereClause or TWherePred; + /** * INTERNAL: Do not use. */ class TCallable = TClosureExpr or TFunction; + /** * INTERNAL: Do not use. */ class TCfgPredicate = TCfgAtom or TCfgComposite; + /** * INTERNAL: Do not use. */ - class TExpr = TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or TBreakExpr or TCallExpr or TCastExpr or TCfgPredExpr or TClosureExpr or TContinueExpr or TFieldExpr or TFormatArgsExpr or TIfExpr or TIncludeBytesExpr or TIndexExpr or TLabelableExpr or TLetExpr or TLiteralExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or TOffsetOfExpr or TParenExpr or TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or TReturnExpr or TStructExpr or TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or TYieldExpr; + class TExpr = + TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or + TBreakExpr or TCallExpr or TCastExpr or TCfgPredExpr or TClosureExpr or TContinueExpr or + TFieldExpr or TFormatArgsExpr or TIfExpr or TIncludeBytesExpr or TIndexExpr or + TLabelableExpr or TLetExpr or TLiteralExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or + TOffsetOfExpr or TParenExpr or TPathExprBase or TPrefixExpr or TRangeExpr or TRefExpr or + TReturnExpr or TStructExpr or TTryExpr or TTupleExpr or TUnderscoreExpr or TYeetExpr or + TYieldExpr; + /** * INTERNAL: Do not use. */ class TExternItem = TFunction or TMacroCall or TStatic or TTypeAlias; + /** * INTERNAL: Do not use. */ class TFieldList = TStructFieldList or TTupleFieldList; + /** * INTERNAL: Do not use. */ class TGenericArg = TAssocTypeArg or TConstArg or TLifetimeArg or TTypeArg; + /** * INTERNAL: Do not use. */ class TGenericParam = TConstParam or TLifetimeParam or TTypeParam; + /** * INTERNAL: Do not use. */ - class TItem = TAsmExpr or TAssocItem or TExternBlock or TExternCrate or TExternItem or TImpl or TMacroDef or TMacroRules or TModule or TTrait or TTypeItem or TUse; + class TItem = + TAsmExpr or TAssocItem or TExternBlock or TExternCrate or TExternItem or TImpl or TMacroDef or + TMacroRules or TModule or TTrait or TTypeItem or TUse; + /** * INTERNAL: Do not use. */ class TLabelableExpr = TBlockExpr or TLoopingExpr; + /** * INTERNAL: Do not use. */ class TLocatable = TAstNode or TCrate or TFormat or TFormatArgument; + /** * INTERNAL: Do not use. */ class TLoopingExpr = TForExpr or TLoopExpr or TWhileExpr; + /** * INTERNAL: Do not use. */ - class TMeta = TCfgAttrMeta or TCfgMeta or TKeyValueMeta or TPathMeta or TTokenTreeMeta or TUnsafeMeta; + class TMeta = + TCfgAttrMeta or TCfgMeta or TKeyValueMeta or TPathMeta or TTokenTreeMeta or TUnsafeMeta; + /** * INTERNAL: Do not use. */ class TParamBase = TParam or TSelfParam; + /** * INTERNAL: Do not use. */ - class TPat = TBoxPat or TCfgPredPat or TConstBlockPat or TDerefPat or TIdentPat or TLiteralPat or TMacroPat or TNotNull or TOrPat or TParenPat or TPathPat or TRangePat or TRefPat or TRestPat or TSlicePat or TStructPat or TTuplePat or TTupleStructPat or TWildcardPat; + class TPat = + TBoxPat or TCfgPredPat or TConstBlockPat or TDerefPat or TIdentPat or TLiteralPat or + TMacroPat or TNotNull or TOrPat or TParenPat or TPathPat or TRangePat or TRefPat or + TRestPat or TSlicePat or TStructPat or TTuplePat or TTupleStructPat or TWildcardPat; + /** * INTERNAL: Do not use. */ class TPathAstNode = TPathExpr or TPathPat or TStructExpr or TStructPat or TTupleStructPat; + /** * INTERNAL: Do not use. */ class TPathExprBase = TFormatTemplateVariableAccess or TPathExpr; + /** * INTERNAL: Do not use. */ class TStmt = TExprStmt or TItem or TLetStmt; + /** * INTERNAL: Do not use. */ class TToken = TComment; + /** * INTERNAL: Do not use. */ class TTypeItem = TEnum or TStruct or TUnion; + /** * INTERNAL: Do not use. */ - class TTypeRepr = TArrayTypeRepr or TDynTraitTypeRepr or TFnPtrTypeRepr or TForTypeRepr or TImplTraitTypeRepr or TInferTypeRepr or TMacroTypeRepr or TNeverTypeRepr or TParenTypeRepr or TPathTypeRepr or TPatternTypeRepr or TPtrTypeRepr or TRefTypeRepr or TSliceTypeRepr or TTupleTypeRepr; + class TTypeRepr = + TArrayTypeRepr or TDynTraitTypeRepr or TFnPtrTypeRepr or TForTypeRepr or TImplTraitTypeRepr or + TInferTypeRepr or TMacroTypeRepr or TNeverTypeRepr or TParenTypeRepr or TPathTypeRepr or + TPatternTypeRepr or TPtrTypeRepr or TRefTypeRepr or TSliceTypeRepr or TTupleTypeRepr; + /** * INTERNAL: Do not use. */ class TUnextracted = TMissing or TUnimplemented; + /** * INTERNAL: Do not use. */ @@ -1050,23 +935,20 @@ module Synth { e = TFormatTemplateVariableAccess(result, _, _) } - /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAbi`, if possible. */ - TAbi convertAbiFromRaw(Raw::Element e) { - result = TAbi(e) - } + TAbi convertAbiFromRaw(Raw::Element e) { result = TAbi(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArgList`, if possible. */ - TArgList convertArgListFromRaw(Raw::Element e) { - result = TArgList(e) - } + TArgList convertArgListFromRaw(Raw::Element e) { result = TArgList(e) } + /** * INTERNAL: Do not use. * @@ -1075,470 +957,413 @@ module Synth { TArrayExprInternal convertArrayExprInternalFromRaw(Raw::Element e) { result = TArrayExprInternal(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayListExpr`, if possible. */ - TArrayListExpr convertArrayListExprFromRaw(Raw::Element e) { - result = TArrayListExpr(e) - } + TArrayListExpr convertArrayListExprFromRaw(Raw::Element e) { result = TArrayListExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayRepeatExpr`, if possible. */ - TArrayRepeatExpr convertArrayRepeatExprFromRaw(Raw::Element e) { - result = TArrayRepeatExpr(e) - } + TArrayRepeatExpr convertArrayRepeatExprFromRaw(Raw::Element e) { result = TArrayRepeatExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TArrayTypeRepr`, if possible. */ - TArrayTypeRepr convertArrayTypeReprFromRaw(Raw::Element e) { - result = TArrayTypeRepr(e) - } + TArrayTypeRepr convertArrayTypeReprFromRaw(Raw::Element e) { result = TArrayTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmClobberAbi`, if possible. */ - TAsmClobberAbi convertAsmClobberAbiFromRaw(Raw::Element e) { - result = TAsmClobberAbi(e) - } + TAsmClobberAbi convertAsmClobberAbiFromRaw(Raw::Element e) { result = TAsmClobberAbi(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmConst`, if possible. */ - TAsmConst convertAsmConstFromRaw(Raw::Element e) { - result = TAsmConst(e) - } + TAsmConst convertAsmConstFromRaw(Raw::Element e) { result = TAsmConst(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmDirSpec`, if possible. */ - TAsmDirSpec convertAsmDirSpecFromRaw(Raw::Element e) { - result = TAsmDirSpec(e) - } + TAsmDirSpec convertAsmDirSpecFromRaw(Raw::Element e) { result = TAsmDirSpec(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmExpr`, if possible. */ - TAsmExpr convertAsmExprFromRaw(Raw::Element e) { - result = TAsmExpr(e) - } + TAsmExpr convertAsmExprFromRaw(Raw::Element e) { result = TAsmExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmLabel`, if possible. */ - TAsmLabel convertAsmLabelFromRaw(Raw::Element e) { - result = TAsmLabel(e) - } + TAsmLabel convertAsmLabelFromRaw(Raw::Element e) { result = TAsmLabel(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOperandExpr`, if possible. */ - TAsmOperandExpr convertAsmOperandExprFromRaw(Raw::Element e) { - result = TAsmOperandExpr(e) - } + TAsmOperandExpr convertAsmOperandExprFromRaw(Raw::Element e) { result = TAsmOperandExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOperandNamed`, if possible. */ - TAsmOperandNamed convertAsmOperandNamedFromRaw(Raw::Element e) { - result = TAsmOperandNamed(e) - } + TAsmOperandNamed convertAsmOperandNamedFromRaw(Raw::Element e) { result = TAsmOperandNamed(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOption`, if possible. */ - TAsmOption convertAsmOptionFromRaw(Raw::Element e) { - result = TAsmOption(e) - } + TAsmOption convertAsmOptionFromRaw(Raw::Element e) { result = TAsmOption(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmOptionsList`, if possible. */ - TAsmOptionsList convertAsmOptionsListFromRaw(Raw::Element e) { - result = TAsmOptionsList(e) - } + TAsmOptionsList convertAsmOptionsListFromRaw(Raw::Element e) { result = TAsmOptionsList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmRegOperand`, if possible. */ - TAsmRegOperand convertAsmRegOperandFromRaw(Raw::Element e) { - result = TAsmRegOperand(e) - } + TAsmRegOperand convertAsmRegOperandFromRaw(Raw::Element e) { result = TAsmRegOperand(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmRegSpec`, if possible. */ - TAsmRegSpec convertAsmRegSpecFromRaw(Raw::Element e) { - result = TAsmRegSpec(e) - } + TAsmRegSpec convertAsmRegSpecFromRaw(Raw::Element e) { result = TAsmRegSpec(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAsmSym`, if possible. */ - TAsmSym convertAsmSymFromRaw(Raw::Element e) { - result = TAsmSym(e) - } + TAsmSym convertAsmSymFromRaw(Raw::Element e) { result = TAsmSym(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAssocItemList`, if possible. */ - TAssocItemList convertAssocItemListFromRaw(Raw::Element e) { - result = TAssocItemList(e) - } + TAssocItemList convertAssocItemListFromRaw(Raw::Element e) { result = TAssocItemList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAssocTypeArg`, if possible. */ - TAssocTypeArg convertAssocTypeArgFromRaw(Raw::Element e) { - result = TAssocTypeArg(e) - } + TAssocTypeArg convertAssocTypeArgFromRaw(Raw::Element e) { result = TAssocTypeArg(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAttr`, if possible. */ - TAttr convertAttrFromRaw(Raw::Element e) { - result = TAttr(e) - } + TAttr convertAttrFromRaw(Raw::Element e) { result = TAttr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TAwaitExpr`, if possible. */ - TAwaitExpr convertAwaitExprFromRaw(Raw::Element e) { - result = TAwaitExpr(e) - } + TAwaitExpr convertAwaitExprFromRaw(Raw::Element e) { result = TAwaitExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBecomeExpr`, if possible. */ - TBecomeExpr convertBecomeExprFromRaw(Raw::Element e) { - result = TBecomeExpr(e) - } + TBecomeExpr convertBecomeExprFromRaw(Raw::Element e) { result = TBecomeExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBinaryExpr`, if possible. */ - TBinaryExpr convertBinaryExprFromRaw(Raw::Element e) { - result = TBinaryExpr(e) - } + TBinaryExpr convertBinaryExprFromRaw(Raw::Element e) { result = TBinaryExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBlockExpr`, if possible. */ - TBlockExpr convertBlockExprFromRaw(Raw::Element e) { - result = TBlockExpr(e) - } + TBlockExpr convertBlockExprFromRaw(Raw::Element e) { result = TBlockExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBoxPat`, if possible. */ - TBoxPat convertBoxPatFromRaw(Raw::Element e) { - result = TBoxPat(e) - } + TBoxPat convertBoxPatFromRaw(Raw::Element e) { result = TBoxPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TBreakExpr`, if possible. */ - TBreakExpr convertBreakExprFromRaw(Raw::Element e) { - result = TBreakExpr(e) - } + TBreakExpr convertBreakExprFromRaw(Raw::Element e) { result = TBreakExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCallExpr`, if possible. */ - TCallExpr convertCallExprFromRaw(Raw::Element e) { - result = TCallExpr(e) - } + TCallExpr convertCallExprFromRaw(Raw::Element e) { result = TCallExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCastExpr`, if possible. */ - TCastExpr convertCastExprFromRaw(Raw::Element e) { - result = TCastExpr(e) - } + TCastExpr convertCastExprFromRaw(Raw::Element e) { result = TCastExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgAtom`, if possible. */ - TCfgAtom convertCfgAtomFromRaw(Raw::Element e) { - result = TCfgAtom(e) - } + TCfgAtom convertCfgAtomFromRaw(Raw::Element e) { result = TCfgAtom(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgAttrMeta`, if possible. */ - TCfgAttrMeta convertCfgAttrMetaFromRaw(Raw::Element e) { - result = TCfgAttrMeta(e) - } + TCfgAttrMeta convertCfgAttrMetaFromRaw(Raw::Element e) { result = TCfgAttrMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgComposite`, if possible. */ - TCfgComposite convertCfgCompositeFromRaw(Raw::Element e) { - result = TCfgComposite(e) - } + TCfgComposite convertCfgCompositeFromRaw(Raw::Element e) { result = TCfgComposite(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgMeta`, if possible. */ - TCfgMeta convertCfgMetaFromRaw(Raw::Element e) { - result = TCfgMeta(e) - } + TCfgMeta convertCfgMetaFromRaw(Raw::Element e) { result = TCfgMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgPredExpr`, if possible. */ - TCfgPredExpr convertCfgPredExprFromRaw(Raw::Element e) { - result = TCfgPredExpr(e) - } + TCfgPredExpr convertCfgPredExprFromRaw(Raw::Element e) { result = TCfgPredExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCfgPredPat`, if possible. */ - TCfgPredPat convertCfgPredPatFromRaw(Raw::Element e) { - result = TCfgPredPat(e) - } + TCfgPredPat convertCfgPredPatFromRaw(Raw::Element e) { result = TCfgPredPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TClosureExpr`, if possible. */ - TClosureExpr convertClosureExprFromRaw(Raw::Element e) { - result = TClosureExpr(e) - } + TClosureExpr convertClosureExprFromRaw(Raw::Element e) { result = TClosureExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TComment`, if possible. */ - TComment convertCommentFromRaw(Raw::Element e) { - result = TComment(e) - } + TComment convertCommentFromRaw(Raw::Element e) { result = TComment(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConst`, if possible. */ - TConst convertConstFromRaw(Raw::Element e) { - result = TConst(e) - } + TConst convertConstFromRaw(Raw::Element e) { result = TConst(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstArg`, if possible. */ - TConstArg convertConstArgFromRaw(Raw::Element e) { - result = TConstArg(e) - } + TConstArg convertConstArgFromRaw(Raw::Element e) { result = TConstArg(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstBlockPat`, if possible. */ - TConstBlockPat convertConstBlockPatFromRaw(Raw::Element e) { - result = TConstBlockPat(e) - } + TConstBlockPat convertConstBlockPatFromRaw(Raw::Element e) { result = TConstBlockPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TConstParam`, if possible. */ - TConstParam convertConstParamFromRaw(Raw::Element e) { - result = TConstParam(e) - } + TConstParam convertConstParamFromRaw(Raw::Element e) { result = TConstParam(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TContinueExpr`, if possible. */ - TContinueExpr convertContinueExprFromRaw(Raw::Element e) { - result = TContinueExpr(e) - } + TContinueExpr convertContinueExprFromRaw(Raw::Element e) { result = TContinueExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TCrate`, if possible. */ - TCrate convertCrateFromRaw(Raw::Element e) { - result = TCrate(e) - } + TCrate convertCrateFromRaw(Raw::Element e) { result = TCrate(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDerefPat`, if possible. */ - TDerefPat convertDerefPatFromRaw(Raw::Element e) { - result = TDerefPat(e) - } + TDerefPat convertDerefPatFromRaw(Raw::Element e) { result = TDerefPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDocComment`, if possible. */ - TDocComment convertDocCommentFromRaw(Raw::Element e) { - result = TDocComment(e) - } + TDocComment convertDocCommentFromRaw(Raw::Element e) { result = TDocComment(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TDynTraitTypeRepr`, if possible. */ - TDynTraitTypeRepr convertDynTraitTypeReprFromRaw(Raw::Element e) { - result = TDynTraitTypeRepr(e) - } + TDynTraitTypeRepr convertDynTraitTypeReprFromRaw(Raw::Element e) { result = TDynTraitTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TEnum`, if possible. */ - TEnum convertEnumFromRaw(Raw::Element e) { - result = TEnum(e) - } + TEnum convertEnumFromRaw(Raw::Element e) { result = TEnum(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExprStmt`, if possible. */ - TExprStmt convertExprStmtFromRaw(Raw::Element e) { - result = TExprStmt(e) - } + TExprStmt convertExprStmtFromRaw(Raw::Element e) { result = TExprStmt(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternBlock`, if possible. */ - TExternBlock convertExternBlockFromRaw(Raw::Element e) { - result = TExternBlock(e) - } + TExternBlock convertExternBlockFromRaw(Raw::Element e) { result = TExternBlock(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternCrate`, if possible. */ - TExternCrate convertExternCrateFromRaw(Raw::Element e) { - result = TExternCrate(e) - } + TExternCrate convertExternCrateFromRaw(Raw::Element e) { result = TExternCrate(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExternItemList`, if possible. */ - TExternItemList convertExternItemListFromRaw(Raw::Element e) { - result = TExternItemList(e) - } + TExternItemList convertExternItemListFromRaw(Raw::Element e) { result = TExternItemList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TExtractorStep`, if possible. */ - TExtractorStep convertExtractorStepFromRaw(Raw::Element e) { - result = TExtractorStep(e) - } + TExtractorStep convertExtractorStepFromRaw(Raw::Element e) { result = TExtractorStep(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFieldExpr`, if possible. */ - TFieldExpr convertFieldExprFromRaw(Raw::Element e) { - result = TFieldExpr(e) - } + TFieldExpr convertFieldExprFromRaw(Raw::Element e) { result = TFieldExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFnPtrTypeRepr`, if possible. */ - TFnPtrTypeRepr convertFnPtrTypeReprFromRaw(Raw::Element e) { - result = TFnPtrTypeRepr(e) - } + TFnPtrTypeRepr convertFnPtrTypeReprFromRaw(Raw::Element e) { result = TFnPtrTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForBinder`, if possible. */ - TForBinder convertForBinderFromRaw(Raw::Element e) { - result = TForBinder(e) - } + TForBinder convertForBinderFromRaw(Raw::Element e) { result = TForBinder(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForExpr`, if possible. */ - TForExpr convertForExprFromRaw(Raw::Element e) { - result = TForExpr(e) - } + TForExpr convertForExprFromRaw(Raw::Element e) { result = TForExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TForTypeRepr`, if possible. */ - TForTypeRepr convertForTypeReprFromRaw(Raw::Element e) { - result = TForTypeRepr(e) - } + TForTypeRepr convertForTypeReprFromRaw(Raw::Element e) { result = TForTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormat`, if possible. */ - TFormat convertFormatFromRaw(Raw::Element e) { - none() - } + TFormat convertFormatFromRaw(Raw::Element e) { none() } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgsArg`, if possible. */ - TFormatArgsArg convertFormatArgsArgFromRaw(Raw::Element e) { - result = TFormatArgsArg(e) - } + TFormatArgsArg convertFormatArgsArgFromRaw(Raw::Element e) { result = TFormatArgsArg(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgsExpr`, if possible. */ - TFormatArgsExpr convertFormatArgsExprFromRaw(Raw::Element e) { - result = TFormatArgsExpr(e) - } + TFormatArgsExpr convertFormatArgsExprFromRaw(Raw::Element e) { result = TFormatArgsExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFormatArgument`, if possible. */ - TFormatArgument convertFormatArgumentFromRaw(Raw::Element e) { - none() - } + TFormatArgument convertFormatArgumentFromRaw(Raw::Element e) { none() } + /** * INTERNAL: Do not use. * @@ -1547,62 +1372,56 @@ module Synth { TFormatTemplateVariableAccess convertFormatTemplateVariableAccessFromRaw(Raw::Element e) { none() } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TFunction`, if possible. */ - TFunction convertFunctionFromRaw(Raw::Element e) { - result = TFunction(e) - } + TFunction convertFunctionFromRaw(Raw::Element e) { result = TFunction(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TGenericArgList`, if possible. */ - TGenericArgList convertGenericArgListFromRaw(Raw::Element e) { - result = TGenericArgList(e) - } + TGenericArgList convertGenericArgListFromRaw(Raw::Element e) { result = TGenericArgList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TGenericParamList`, if possible. */ - TGenericParamList convertGenericParamListFromRaw(Raw::Element e) { - result = TGenericParamList(e) - } + TGenericParamList convertGenericParamListFromRaw(Raw::Element e) { result = TGenericParamList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIdentPat`, if possible. */ - TIdentPat convertIdentPatFromRaw(Raw::Element e) { - result = TIdentPat(e) - } + TIdentPat convertIdentPatFromRaw(Raw::Element e) { result = TIdentPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIfExpr`, if possible. */ - TIfExpr convertIfExprFromRaw(Raw::Element e) { - result = TIfExpr(e) - } + TIfExpr convertIfExprFromRaw(Raw::Element e) { result = TIfExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TImpl`, if possible. */ - TImpl convertImplFromRaw(Raw::Element e) { - result = TImpl(e) - } + TImpl convertImplFromRaw(Raw::Element e) { result = TImpl(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TImplRestriction`, if possible. */ - TImplRestriction convertImplRestrictionFromRaw(Raw::Element e) { - result = TImplRestriction(e) - } + TImplRestriction convertImplRestrictionFromRaw(Raw::Element e) { result = TImplRestriction(e) } + /** * INTERNAL: Do not use. * @@ -1611,342 +1430,301 @@ module Synth { TImplTraitTypeRepr convertImplTraitTypeReprFromRaw(Raw::Element e) { result = TImplTraitTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIncludeBytesExpr`, if possible. */ - TIncludeBytesExpr convertIncludeBytesExprFromRaw(Raw::Element e) { - result = TIncludeBytesExpr(e) - } + TIncludeBytesExpr convertIncludeBytesExprFromRaw(Raw::Element e) { result = TIncludeBytesExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TIndexExpr`, if possible. */ - TIndexExpr convertIndexExprFromRaw(Raw::Element e) { - result = TIndexExpr(e) - } + TIndexExpr convertIndexExprFromRaw(Raw::Element e) { result = TIndexExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TInferTypeRepr`, if possible. */ - TInferTypeRepr convertInferTypeReprFromRaw(Raw::Element e) { - result = TInferTypeRepr(e) - } + TInferTypeRepr convertInferTypeReprFromRaw(Raw::Element e) { result = TInferTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TItemList`, if possible. */ - TItemList convertItemListFromRaw(Raw::Element e) { - result = TItemList(e) - } + TItemList convertItemListFromRaw(Raw::Element e) { result = TItemList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TKeyValueMeta`, if possible. */ - TKeyValueMeta convertKeyValueMetaFromRaw(Raw::Element e) { - result = TKeyValueMeta(e) - } + TKeyValueMeta convertKeyValueMetaFromRaw(Raw::Element e) { result = TKeyValueMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLabel`, if possible. */ - TLabel convertLabelFromRaw(Raw::Element e) { - result = TLabel(e) - } + TLabel convertLabelFromRaw(Raw::Element e) { result = TLabel(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetElse`, if possible. */ - TLetElse convertLetElseFromRaw(Raw::Element e) { - result = TLetElse(e) - } + TLetElse convertLetElseFromRaw(Raw::Element e) { result = TLetElse(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetExpr`, if possible. */ - TLetExpr convertLetExprFromRaw(Raw::Element e) { - result = TLetExpr(e) - } + TLetExpr convertLetExprFromRaw(Raw::Element e) { result = TLetExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLetStmt`, if possible. */ - TLetStmt convertLetStmtFromRaw(Raw::Element e) { - result = TLetStmt(e) - } + TLetStmt convertLetStmtFromRaw(Raw::Element e) { result = TLetStmt(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetime`, if possible. */ - TLifetime convertLifetimeFromRaw(Raw::Element e) { - result = TLifetime(e) - } + TLifetime convertLifetimeFromRaw(Raw::Element e) { result = TLifetime(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetimeArg`, if possible. */ - TLifetimeArg convertLifetimeArgFromRaw(Raw::Element e) { - result = TLifetimeArg(e) - } + TLifetimeArg convertLifetimeArgFromRaw(Raw::Element e) { result = TLifetimeArg(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLifetimeParam`, if possible. */ - TLifetimeParam convertLifetimeParamFromRaw(Raw::Element e) { - result = TLifetimeParam(e) - } + TLifetimeParam convertLifetimeParamFromRaw(Raw::Element e) { result = TLifetimeParam(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLiteralExpr`, if possible. */ - TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { - result = TLiteralExpr(e) - } + TLiteralExpr convertLiteralExprFromRaw(Raw::Element e) { result = TLiteralExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLiteralPat`, if possible. */ - TLiteralPat convertLiteralPatFromRaw(Raw::Element e) { - result = TLiteralPat(e) - } + TLiteralPat convertLiteralPatFromRaw(Raw::Element e) { result = TLiteralPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TLoopExpr`, if possible. */ - TLoopExpr convertLoopExprFromRaw(Raw::Element e) { - result = TLoopExpr(e) - } + TLoopExpr convertLoopExprFromRaw(Raw::Element e) { result = TLoopExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroCall`, if possible. */ - TMacroCall convertMacroCallFromRaw(Raw::Element e) { - result = TMacroCall(e) - } + TMacroCall convertMacroCallFromRaw(Raw::Element e) { result = TMacroCall(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroDef`, if possible. */ - TMacroDef convertMacroDefFromRaw(Raw::Element e) { - result = TMacroDef(e) - } + TMacroDef convertMacroDefFromRaw(Raw::Element e) { result = TMacroDef(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroExpr`, if possible. */ - TMacroExpr convertMacroExprFromRaw(Raw::Element e) { - result = TMacroExpr(e) - } + TMacroExpr convertMacroExprFromRaw(Raw::Element e) { result = TMacroExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroItems`, if possible. */ - TMacroItems convertMacroItemsFromRaw(Raw::Element e) { - result = TMacroItems(e) - } + TMacroItems convertMacroItemsFromRaw(Raw::Element e) { result = TMacroItems(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroPat`, if possible. */ - TMacroPat convertMacroPatFromRaw(Raw::Element e) { - result = TMacroPat(e) - } + TMacroPat convertMacroPatFromRaw(Raw::Element e) { result = TMacroPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroRules`, if possible. */ - TMacroRules convertMacroRulesFromRaw(Raw::Element e) { - result = TMacroRules(e) - } + TMacroRules convertMacroRulesFromRaw(Raw::Element e) { result = TMacroRules(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMacroTypeRepr`, if possible. */ - TMacroTypeRepr convertMacroTypeReprFromRaw(Raw::Element e) { - result = TMacroTypeRepr(e) - } + TMacroTypeRepr convertMacroTypeReprFromRaw(Raw::Element e) { result = TMacroTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchArm`, if possible. */ - TMatchArm convertMatchArmFromRaw(Raw::Element e) { - result = TMatchArm(e) - } + TMatchArm convertMatchArmFromRaw(Raw::Element e) { result = TMatchArm(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchArmList`, if possible. */ - TMatchArmList convertMatchArmListFromRaw(Raw::Element e) { - result = TMatchArmList(e) - } + TMatchArmList convertMatchArmListFromRaw(Raw::Element e) { result = TMatchArmList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchExpr`, if possible. */ - TMatchExpr convertMatchExprFromRaw(Raw::Element e) { - result = TMatchExpr(e) - } + TMatchExpr convertMatchExprFromRaw(Raw::Element e) { result = TMatchExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMatchGuard`, if possible. */ - TMatchGuard convertMatchGuardFromRaw(Raw::Element e) { - result = TMatchGuard(e) - } + TMatchGuard convertMatchGuardFromRaw(Raw::Element e) { result = TMatchGuard(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMethodCallExpr`, if possible. */ - TMethodCallExpr convertMethodCallExprFromRaw(Raw::Element e) { - result = TMethodCallExpr(e) - } + TMethodCallExpr convertMethodCallExprFromRaw(Raw::Element e) { result = TMethodCallExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMissing`, if possible. */ - TMissing convertMissingFromRaw(Raw::Element e) { - result = TMissing(e) - } + TMissing convertMissingFromRaw(Raw::Element e) { result = TMissing(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TModule`, if possible. */ - TModule convertModuleFromRaw(Raw::Element e) { - result = TModule(e) - } + TModule convertModuleFromRaw(Raw::Element e) { result = TModule(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TMutRestriction`, if possible. */ - TMutRestriction convertMutRestrictionFromRaw(Raw::Element e) { - result = TMutRestriction(e) - } + TMutRestriction convertMutRestrictionFromRaw(Raw::Element e) { result = TMutRestriction(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TName`, if possible. */ - TName convertNameFromRaw(Raw::Element e) { - result = TName(e) - } + TName convertNameFromRaw(Raw::Element e) { result = TName(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNameRef`, if possible. */ - TNameRef convertNameRefFromRaw(Raw::Element e) { - result = TNameRef(e) - } + TNameRef convertNameRefFromRaw(Raw::Element e) { result = TNameRef(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNamedCrate`, if possible. */ - TNamedCrate convertNamedCrateFromRaw(Raw::Element e) { - result = TNamedCrate(e) - } + TNamedCrate convertNamedCrateFromRaw(Raw::Element e) { result = TNamedCrate(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNeverTypeRepr`, if possible. */ - TNeverTypeRepr convertNeverTypeReprFromRaw(Raw::Element e) { - result = TNeverTypeRepr(e) - } + TNeverTypeRepr convertNeverTypeReprFromRaw(Raw::Element e) { result = TNeverTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TNotNull`, if possible. */ - TNotNull convertNotNullFromRaw(Raw::Element e) { - result = TNotNull(e) - } + TNotNull convertNotNullFromRaw(Raw::Element e) { result = TNotNull(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TOffsetOfExpr`, if possible. */ - TOffsetOfExpr convertOffsetOfExprFromRaw(Raw::Element e) { - result = TOffsetOfExpr(e) - } + TOffsetOfExpr convertOffsetOfExprFromRaw(Raw::Element e) { result = TOffsetOfExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TOrPat`, if possible. */ - TOrPat convertOrPatFromRaw(Raw::Element e) { - result = TOrPat(e) - } + TOrPat convertOrPatFromRaw(Raw::Element e) { result = TOrPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParam`, if possible. */ - TParam convertParamFromRaw(Raw::Element e) { - result = TParam(e) - } + TParam convertParamFromRaw(Raw::Element e) { result = TParam(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParamList`, if possible. */ - TParamList convertParamListFromRaw(Raw::Element e) { - result = TParamList(e) - } + TParamList convertParamListFromRaw(Raw::Element e) { result = TParamList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenExpr`, if possible. */ - TParenExpr convertParenExprFromRaw(Raw::Element e) { - result = TParenExpr(e) - } + TParenExpr convertParenExprFromRaw(Raw::Element e) { result = TParenExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenPat`, if possible. */ - TParenPat convertParenPatFromRaw(Raw::Element e) { - result = TParenPat(e) - } + TParenPat convertParenPatFromRaw(Raw::Element e) { result = TParenPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TParenTypeRepr`, if possible. */ - TParenTypeRepr convertParenTypeReprFromRaw(Raw::Element e) { - result = TParenTypeRepr(e) - } + TParenTypeRepr convertParenTypeReprFromRaw(Raw::Element e) { result = TParenTypeRepr(e) } + /** * INTERNAL: Do not use. * @@ -1955,230 +1733,203 @@ module Synth { TParenthesizedArgList convertParenthesizedArgListFromRaw(Raw::Element e) { result = TParenthesizedArgList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPath`, if possible. */ - TPath convertPathFromRaw(Raw::Element e) { - result = TPath(e) - } + TPath convertPathFromRaw(Raw::Element e) { result = TPath(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathExpr`, if possible. */ - TPathExpr convertPathExprFromRaw(Raw::Element e) { - result = TPathExpr(e) - } + TPathExpr convertPathExprFromRaw(Raw::Element e) { result = TPathExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathMeta`, if possible. */ - TPathMeta convertPathMetaFromRaw(Raw::Element e) { - result = TPathMeta(e) - } + TPathMeta convertPathMetaFromRaw(Raw::Element e) { result = TPathMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathPat`, if possible. */ - TPathPat convertPathPatFromRaw(Raw::Element e) { - result = TPathPat(e) - } + TPathPat convertPathPatFromRaw(Raw::Element e) { result = TPathPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathSegment`, if possible. */ - TPathSegment convertPathSegmentFromRaw(Raw::Element e) { - result = TPathSegment(e) - } + TPathSegment convertPathSegmentFromRaw(Raw::Element e) { result = TPathSegment(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPathTypeRepr`, if possible. */ - TPathTypeRepr convertPathTypeReprFromRaw(Raw::Element e) { - result = TPathTypeRepr(e) - } + TPathTypeRepr convertPathTypeReprFromRaw(Raw::Element e) { result = TPathTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPatternTypeRepr`, if possible. */ - TPatternTypeRepr convertPatternTypeReprFromRaw(Raw::Element e) { - result = TPatternTypeRepr(e) - } + TPatternTypeRepr convertPatternTypeReprFromRaw(Raw::Element e) { result = TPatternTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPrefixExpr`, if possible. */ - TPrefixExpr convertPrefixExprFromRaw(Raw::Element e) { - result = TPrefixExpr(e) - } + TPrefixExpr convertPrefixExprFromRaw(Raw::Element e) { result = TPrefixExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TPtrTypeRepr`, if possible. */ - TPtrTypeRepr convertPtrTypeReprFromRaw(Raw::Element e) { - result = TPtrTypeRepr(e) - } + TPtrTypeRepr convertPtrTypeReprFromRaw(Raw::Element e) { result = TPtrTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRangeExpr`, if possible. */ - TRangeExpr convertRangeExprFromRaw(Raw::Element e) { - result = TRangeExpr(e) - } + TRangeExpr convertRangeExprFromRaw(Raw::Element e) { result = TRangeExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRangePat`, if possible. */ - TRangePat convertRangePatFromRaw(Raw::Element e) { - result = TRangePat(e) - } + TRangePat convertRangePatFromRaw(Raw::Element e) { result = TRangePat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefExpr`, if possible. */ - TRefExpr convertRefExprFromRaw(Raw::Element e) { - result = TRefExpr(e) - } + TRefExpr convertRefExprFromRaw(Raw::Element e) { result = TRefExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefPat`, if possible. */ - TRefPat convertRefPatFromRaw(Raw::Element e) { - result = TRefPat(e) - } + TRefPat convertRefPatFromRaw(Raw::Element e) { result = TRefPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRefTypeRepr`, if possible. */ - TRefTypeRepr convertRefTypeReprFromRaw(Raw::Element e) { - result = TRefTypeRepr(e) - } + TRefTypeRepr convertRefTypeReprFromRaw(Raw::Element e) { result = TRefTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRename`, if possible. */ - TRename convertRenameFromRaw(Raw::Element e) { - result = TRename(e) - } + TRename convertRenameFromRaw(Raw::Element e) { result = TRename(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRestPat`, if possible. */ - TRestPat convertRestPatFromRaw(Raw::Element e) { - result = TRestPat(e) - } + TRestPat convertRestPatFromRaw(Raw::Element e) { result = TRestPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TRetTypeRepr`, if possible. */ - TRetTypeRepr convertRetTypeReprFromRaw(Raw::Element e) { - result = TRetTypeRepr(e) - } + TRetTypeRepr convertRetTypeReprFromRaw(Raw::Element e) { result = TRetTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TReturnExpr`, if possible. */ - TReturnExpr convertReturnExprFromRaw(Raw::Element e) { - result = TReturnExpr(e) - } + TReturnExpr convertReturnExprFromRaw(Raw::Element e) { result = TReturnExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TReturnTypeSyntax`, if possible. */ - TReturnTypeSyntax convertReturnTypeSyntaxFromRaw(Raw::Element e) { - result = TReturnTypeSyntax(e) - } + TReturnTypeSyntax convertReturnTypeSyntaxFromRaw(Raw::Element e) { result = TReturnTypeSyntax(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSelfParam`, if possible. */ - TSelfParam convertSelfParamFromRaw(Raw::Element e) { - result = TSelfParam(e) - } + TSelfParam convertSelfParamFromRaw(Raw::Element e) { result = TSelfParam(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSlicePat`, if possible. */ - TSlicePat convertSlicePatFromRaw(Raw::Element e) { - result = TSlicePat(e) - } + TSlicePat convertSlicePatFromRaw(Raw::Element e) { result = TSlicePat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSliceTypeRepr`, if possible. */ - TSliceTypeRepr convertSliceTypeReprFromRaw(Raw::Element e) { - result = TSliceTypeRepr(e) - } + TSliceTypeRepr convertSliceTypeReprFromRaw(Raw::Element e) { result = TSliceTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TSourceFile`, if possible. */ - TSourceFile convertSourceFileFromRaw(Raw::Element e) { - result = TSourceFile(e) - } + TSourceFile convertSourceFileFromRaw(Raw::Element e) { result = TSourceFile(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStatic`, if possible. */ - TStatic convertStaticFromRaw(Raw::Element e) { - result = TStatic(e) - } + TStatic convertStaticFromRaw(Raw::Element e) { result = TStatic(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStmtList`, if possible. */ - TStmtList convertStmtListFromRaw(Raw::Element e) { - result = TStmtList(e) - } + TStmtList convertStmtListFromRaw(Raw::Element e) { result = TStmtList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStruct`, if possible. */ - TStruct convertStructFromRaw(Raw::Element e) { - result = TStruct(e) - } + TStruct convertStructFromRaw(Raw::Element e) { result = TStruct(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructExpr`, if possible. */ - TStructExpr convertStructExprFromRaw(Raw::Element e) { - result = TStructExpr(e) - } + TStructExpr convertStructExprFromRaw(Raw::Element e) { result = TStructExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructExprField`, if possible. */ - TStructExprField convertStructExprFieldFromRaw(Raw::Element e) { - result = TStructExprField(e) - } + TStructExprField convertStructExprFieldFromRaw(Raw::Element e) { result = TStructExprField(e) } + /** * INTERNAL: Do not use. * @@ -2187,38 +1938,35 @@ module Synth { TStructExprFieldList convertStructExprFieldListFromRaw(Raw::Element e) { result = TStructExprFieldList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructField`, if possible. */ - TStructField convertStructFieldFromRaw(Raw::Element e) { - result = TStructField(e) - } + TStructField convertStructFieldFromRaw(Raw::Element e) { result = TStructField(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructFieldList`, if possible. */ - TStructFieldList convertStructFieldListFromRaw(Raw::Element e) { - result = TStructFieldList(e) - } + TStructFieldList convertStructFieldListFromRaw(Raw::Element e) { result = TStructFieldList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructPat`, if possible. */ - TStructPat convertStructPatFromRaw(Raw::Element e) { - result = TStructPat(e) - } + TStructPat convertStructPatFromRaw(Raw::Element e) { result = TStructPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TStructPatField`, if possible. */ - TStructPatField convertStructPatFieldFromRaw(Raw::Element e) { - result = TStructPatField(e) - } + TStructPatField convertStructPatFieldFromRaw(Raw::Element e) { result = TStructPatField(e) } + /** * INTERNAL: Do not use. * @@ -2227,174 +1975,154 @@ module Synth { TStructPatFieldList convertStructPatFieldListFromRaw(Raw::Element e) { result = TStructPatFieldList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTokenTree`, if possible. */ - TTokenTree convertTokenTreeFromRaw(Raw::Element e) { - result = TTokenTree(e) - } + TTokenTree convertTokenTreeFromRaw(Raw::Element e) { result = TTokenTree(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTokenTreeMeta`, if possible. */ - TTokenTreeMeta convertTokenTreeMetaFromRaw(Raw::Element e) { - result = TTokenTreeMeta(e) - } + TTokenTreeMeta convertTokenTreeMetaFromRaw(Raw::Element e) { result = TTokenTreeMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTrait`, if possible. */ - TTrait convertTraitFromRaw(Raw::Element e) { - result = TTrait(e) - } + TTrait convertTraitFromRaw(Raw::Element e) { result = TTrait(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTryBlockModifier`, if possible. */ - TTryBlockModifier convertTryBlockModifierFromRaw(Raw::Element e) { - result = TTryBlockModifier(e) - } + TTryBlockModifier convertTryBlockModifierFromRaw(Raw::Element e) { result = TTryBlockModifier(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTryExpr`, if possible. */ - TTryExpr convertTryExprFromRaw(Raw::Element e) { - result = TTryExpr(e) - } + TTryExpr convertTryExprFromRaw(Raw::Element e) { result = TTryExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleExpr`, if possible. */ - TTupleExpr convertTupleExprFromRaw(Raw::Element e) { - result = TTupleExpr(e) - } + TTupleExpr convertTupleExprFromRaw(Raw::Element e) { result = TTupleExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleField`, if possible. */ - TTupleField convertTupleFieldFromRaw(Raw::Element e) { - result = TTupleField(e) - } + TTupleField convertTupleFieldFromRaw(Raw::Element e) { result = TTupleField(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleFieldList`, if possible. */ - TTupleFieldList convertTupleFieldListFromRaw(Raw::Element e) { - result = TTupleFieldList(e) - } + TTupleFieldList convertTupleFieldListFromRaw(Raw::Element e) { result = TTupleFieldList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTuplePat`, if possible. */ - TTuplePat convertTuplePatFromRaw(Raw::Element e) { - result = TTuplePat(e) - } + TTuplePat convertTuplePatFromRaw(Raw::Element e) { result = TTuplePat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleStructPat`, if possible. */ - TTupleStructPat convertTupleStructPatFromRaw(Raw::Element e) { - result = TTupleStructPat(e) - } + TTupleStructPat convertTupleStructPatFromRaw(Raw::Element e) { result = TTupleStructPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTupleTypeRepr`, if possible. */ - TTupleTypeRepr convertTupleTypeReprFromRaw(Raw::Element e) { - result = TTupleTypeRepr(e) - } + TTupleTypeRepr convertTupleTypeReprFromRaw(Raw::Element e) { result = TTupleTypeRepr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeAlias`, if possible. */ - TTypeAlias convertTypeAliasFromRaw(Raw::Element e) { - result = TTypeAlias(e) - } + TTypeAlias convertTypeAliasFromRaw(Raw::Element e) { result = TTypeAlias(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeArg`, if possible. */ - TTypeArg convertTypeArgFromRaw(Raw::Element e) { - result = TTypeArg(e) - } + TTypeArg convertTypeArgFromRaw(Raw::Element e) { result = TTypeArg(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeBound`, if possible. */ - TTypeBound convertTypeBoundFromRaw(Raw::Element e) { - result = TTypeBound(e) - } + TTypeBound convertTypeBoundFromRaw(Raw::Element e) { result = TTypeBound(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeBoundList`, if possible. */ - TTypeBoundList convertTypeBoundListFromRaw(Raw::Element e) { - result = TTypeBoundList(e) - } + TTypeBoundList convertTypeBoundListFromRaw(Raw::Element e) { result = TTypeBoundList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TTypeParam`, if possible. */ - TTypeParam convertTypeParamFromRaw(Raw::Element e) { - result = TTypeParam(e) - } + TTypeParam convertTypeParamFromRaw(Raw::Element e) { result = TTypeParam(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnderscoreExpr`, if possible. */ - TUnderscoreExpr convertUnderscoreExprFromRaw(Raw::Element e) { - result = TUnderscoreExpr(e) - } + TUnderscoreExpr convertUnderscoreExprFromRaw(Raw::Element e) { result = TUnderscoreExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnimplemented`, if possible. */ - TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { - result = TUnimplemented(e) - } + TUnimplemented convertUnimplementedFromRaw(Raw::Element e) { result = TUnimplemented(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnion`, if possible. */ - TUnion convertUnionFromRaw(Raw::Element e) { - result = TUnion(e) - } + TUnion convertUnionFromRaw(Raw::Element e) { result = TUnion(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUnsafeMeta`, if possible. */ - TUnsafeMeta convertUnsafeMetaFromRaw(Raw::Element e) { - result = TUnsafeMeta(e) - } + TUnsafeMeta convertUnsafeMetaFromRaw(Raw::Element e) { result = TUnsafeMeta(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUse`, if possible. */ - TUse convertUseFromRaw(Raw::Element e) { - result = TUse(e) - } + TUse convertUseFromRaw(Raw::Element e) { result = TUse(e) } + /** * INTERNAL: Do not use. * @@ -2403,102 +2131,90 @@ module Synth { TUseBoundGenericArgs convertUseBoundGenericArgsFromRaw(Raw::Element e) { result = TUseBoundGenericArgs(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUseTree`, if possible. */ - TUseTree convertUseTreeFromRaw(Raw::Element e) { - result = TUseTree(e) - } + TUseTree convertUseTreeFromRaw(Raw::Element e) { result = TUseTree(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TUseTreeList`, if possible. */ - TUseTreeList convertUseTreeListFromRaw(Raw::Element e) { - result = TUseTreeList(e) - } + TUseTreeList convertUseTreeListFromRaw(Raw::Element e) { result = TUseTreeList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVariant`, if possible. */ - TVariant convertVariantFromRaw(Raw::Element e) { - result = TVariant(e) - } + TVariant convertVariantFromRaw(Raw::Element e) { result = TVariant(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVariantList`, if possible. */ - TVariantList convertVariantListFromRaw(Raw::Element e) { - result = TVariantList(e) - } + TVariantList convertVariantListFromRaw(Raw::Element e) { result = TVariantList(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVisibility`, if possible. */ - TVisibility convertVisibilityFromRaw(Raw::Element e) { - result = TVisibility(e) - } + TVisibility convertVisibilityFromRaw(Raw::Element e) { result = TVisibility(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TVisibilityInner`, if possible. */ - TVisibilityInner convertVisibilityInnerFromRaw(Raw::Element e) { - result = TVisibilityInner(e) - } + TVisibilityInner convertVisibilityInnerFromRaw(Raw::Element e) { result = TVisibilityInner(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWhereClause`, if possible. */ - TWhereClause convertWhereClauseFromRaw(Raw::Element e) { - result = TWhereClause(e) - } + TWhereClause convertWhereClauseFromRaw(Raw::Element e) { result = TWhereClause(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWherePred`, if possible. */ - TWherePred convertWherePredFromRaw(Raw::Element e) { - result = TWherePred(e) - } + TWherePred convertWherePredFromRaw(Raw::Element e) { result = TWherePred(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWhileExpr`, if possible. */ - TWhileExpr convertWhileExprFromRaw(Raw::Element e) { - result = TWhileExpr(e) - } + TWhileExpr convertWhileExprFromRaw(Raw::Element e) { result = TWhileExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TWildcardPat`, if possible. */ - TWildcardPat convertWildcardPatFromRaw(Raw::Element e) { - result = TWildcardPat(e) - } + TWildcardPat convertWildcardPatFromRaw(Raw::Element e) { result = TWildcardPat(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TYeetExpr`, if possible. */ - TYeetExpr convertYeetExprFromRaw(Raw::Element e) { - result = TYeetExpr(e) - } + TYeetExpr convertYeetExprFromRaw(Raw::Element e) { result = TYeetExpr(e) } + /** * INTERNAL: Do not use. * * Converts a raw element to a synthesized `TYieldExpr`, if possible. */ - TYieldExpr convertYieldExprFromRaw(Raw::Element e) { - result = TYieldExpr(e) - } + TYieldExpr convertYieldExprFromRaw(Raw::Element e) { result = TYieldExpr(e) } /** * INTERNAL: Do not use. @@ -2509,6 +2225,7 @@ module Synth { or result = convertVariantFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAnyAttr`, if possible. @@ -2518,6 +2235,7 @@ module Synth { or result = convertDocCommentFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TArrayExpr`, if possible. @@ -2527,6 +2245,7 @@ module Synth { or result = convertArrayRepeatExprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAsmOperand`, if possible. @@ -2540,6 +2259,7 @@ module Synth { or result = convertAsmSymFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAsmPiece`, if possible. @@ -2551,6 +2271,7 @@ module Synth { or result = convertAsmOptionsListFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAssocItem`, if possible. @@ -2564,6 +2285,7 @@ module Synth { or result = convertTypeAliasFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TAstNode`, if possible. @@ -2703,6 +2425,7 @@ module Synth { or result = convertWherePredFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TCallable`, if possible. @@ -2712,6 +2435,7 @@ module Synth { or result = convertFunctionFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TCfgPredicate`, if possible. @@ -2721,6 +2445,7 @@ module Synth { or result = convertCfgCompositeFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TElement`, if possible. @@ -2734,6 +2459,7 @@ module Synth { or result = convertUnextractedFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TExpr`, if possible. @@ -2811,6 +2537,7 @@ module Synth { or result = convertYieldExprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TExternItem`, if possible. @@ -2824,6 +2551,7 @@ module Synth { or result = convertTypeAliasFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TFieldList`, if possible. @@ -2833,6 +2561,7 @@ module Synth { or result = convertTupleFieldListFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TGenericArg`, if possible. @@ -2846,6 +2575,7 @@ module Synth { or result = convertTypeArgFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TGenericParam`, if possible. @@ -2857,6 +2587,7 @@ module Synth { or result = convertTypeParamFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TItem`, if possible. @@ -2886,6 +2617,7 @@ module Synth { or result = convertUseFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLabelableExpr`, if possible. @@ -2895,6 +2627,7 @@ module Synth { or result = convertLoopingExprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLocatable`, if possible. @@ -2908,6 +2641,7 @@ module Synth { or result = convertFormatArgumentFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TLoopingExpr`, if possible. @@ -2919,6 +2653,7 @@ module Synth { or result = convertWhileExprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TMeta`, if possible. @@ -2936,6 +2671,7 @@ module Synth { or result = convertUnsafeMetaFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TParamBase`, if possible. @@ -2945,6 +2681,7 @@ module Synth { or result = convertSelfParamFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPat`, if possible. @@ -2988,6 +2725,7 @@ module Synth { or result = convertWildcardPatFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPathAstNode`, if possible. @@ -3003,6 +2741,7 @@ module Synth { or result = convertTupleStructPatFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TPathExprBase`, if possible. @@ -3012,6 +2751,7 @@ module Synth { or result = convertPathExprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TStmt`, if possible. @@ -3023,13 +2763,13 @@ module Synth { or result = convertLetStmtFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TToken`, if possible. */ - TToken convertTokenFromRaw(Raw::Element e) { - result = convertCommentFromRaw(e) - } + TToken convertTokenFromRaw(Raw::Element e) { result = convertCommentFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TTypeItem`, if possible. @@ -3041,6 +2781,7 @@ module Synth { or result = convertUnionFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TTypeRepr`, if possible. @@ -3076,6 +2817,7 @@ module Synth { or result = convertTupleTypeReprFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TUnextracted`, if possible. @@ -3085,6 +2827,7 @@ module Synth { or result = convertUnimplementedFromRaw(e) } + /** * INTERNAL: Do not use. * Converts a raw DB element to a synthesized `TUseBoundGenericArg`, if possible. @@ -3099,16 +2842,14 @@ module Synth { * INTERNAL: Do not use. * Converts a synthesized `TAbi` to a raw DB element, if possible. */ - Raw::Element convertAbiToRaw(TAbi e) { - e = TAbi(result) - } + Raw::Element convertAbiToRaw(TAbi e) { e = TAbi(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArgList` to a raw DB element, if possible. */ - Raw::Element convertArgListToRaw(TArgList e) { - e = TArgList(result) - } + Raw::Element convertArgListToRaw(TArgList e) { e = TArgList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArrayExprInternal` to a raw DB element, if possible. @@ -3116,468 +2857,403 @@ module Synth { Raw::Element convertArrayExprInternalToRaw(TArrayExprInternal e) { e = TArrayExprInternal(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArrayListExpr` to a raw DB element, if possible. */ - Raw::Element convertArrayListExprToRaw(TArrayListExpr e) { - e = TArrayListExpr(result) - } + Raw::Element convertArrayListExprToRaw(TArrayListExpr e) { e = TArrayListExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArrayRepeatExpr` to a raw DB element, if possible. */ - Raw::Element convertArrayRepeatExprToRaw(TArrayRepeatExpr e) { - e = TArrayRepeatExpr(result) - } + Raw::Element convertArrayRepeatExprToRaw(TArrayRepeatExpr e) { e = TArrayRepeatExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArrayTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertArrayTypeReprToRaw(TArrayTypeRepr e) { - e = TArrayTypeRepr(result) - } + Raw::Element convertArrayTypeReprToRaw(TArrayTypeRepr e) { e = TArrayTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmClobberAbi` to a raw DB element, if possible. */ - Raw::Element convertAsmClobberAbiToRaw(TAsmClobberAbi e) { - e = TAsmClobberAbi(result) - } + Raw::Element convertAsmClobberAbiToRaw(TAsmClobberAbi e) { e = TAsmClobberAbi(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmConst` to a raw DB element, if possible. */ - Raw::Element convertAsmConstToRaw(TAsmConst e) { - e = TAsmConst(result) - } + Raw::Element convertAsmConstToRaw(TAsmConst e) { e = TAsmConst(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmDirSpec` to a raw DB element, if possible. */ - Raw::Element convertAsmDirSpecToRaw(TAsmDirSpec e) { - e = TAsmDirSpec(result) - } + Raw::Element convertAsmDirSpecToRaw(TAsmDirSpec e) { e = TAsmDirSpec(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmExpr` to a raw DB element, if possible. */ - Raw::Element convertAsmExprToRaw(TAsmExpr e) { - e = TAsmExpr(result) - } + Raw::Element convertAsmExprToRaw(TAsmExpr e) { e = TAsmExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmLabel` to a raw DB element, if possible. */ - Raw::Element convertAsmLabelToRaw(TAsmLabel e) { - e = TAsmLabel(result) - } + Raw::Element convertAsmLabelToRaw(TAsmLabel e) { e = TAsmLabel(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperandExpr` to a raw DB element, if possible. */ - Raw::Element convertAsmOperandExprToRaw(TAsmOperandExpr e) { - e = TAsmOperandExpr(result) - } + Raw::Element convertAsmOperandExprToRaw(TAsmOperandExpr e) { e = TAsmOperandExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperandNamed` to a raw DB element, if possible. */ - Raw::Element convertAsmOperandNamedToRaw(TAsmOperandNamed e) { - e = TAsmOperandNamed(result) - } + Raw::Element convertAsmOperandNamedToRaw(TAsmOperandNamed e) { e = TAsmOperandNamed(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOption` to a raw DB element, if possible. */ - Raw::Element convertAsmOptionToRaw(TAsmOption e) { - e = TAsmOption(result) - } + Raw::Element convertAsmOptionToRaw(TAsmOption e) { e = TAsmOption(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOptionsList` to a raw DB element, if possible. */ - Raw::Element convertAsmOptionsListToRaw(TAsmOptionsList e) { - e = TAsmOptionsList(result) - } + Raw::Element convertAsmOptionsListToRaw(TAsmOptionsList e) { e = TAsmOptionsList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmRegOperand` to a raw DB element, if possible. */ - Raw::Element convertAsmRegOperandToRaw(TAsmRegOperand e) { - e = TAsmRegOperand(result) - } + Raw::Element convertAsmRegOperandToRaw(TAsmRegOperand e) { e = TAsmRegOperand(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmRegSpec` to a raw DB element, if possible. */ - Raw::Element convertAsmRegSpecToRaw(TAsmRegSpec e) { - e = TAsmRegSpec(result) - } + Raw::Element convertAsmRegSpecToRaw(TAsmRegSpec e) { e = TAsmRegSpec(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmSym` to a raw DB element, if possible. */ - Raw::Element convertAsmSymToRaw(TAsmSym e) { - e = TAsmSym(result) - } + Raw::Element convertAsmSymToRaw(TAsmSym e) { e = TAsmSym(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAssocItemList` to a raw DB element, if possible. */ - Raw::Element convertAssocItemListToRaw(TAssocItemList e) { - e = TAssocItemList(result) - } + Raw::Element convertAssocItemListToRaw(TAssocItemList e) { e = TAssocItemList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAssocTypeArg` to a raw DB element, if possible. */ - Raw::Element convertAssocTypeArgToRaw(TAssocTypeArg e) { - e = TAssocTypeArg(result) - } + Raw::Element convertAssocTypeArgToRaw(TAssocTypeArg e) { e = TAssocTypeArg(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAttr` to a raw DB element, if possible. */ - Raw::Element convertAttrToRaw(TAttr e) { - e = TAttr(result) - } + Raw::Element convertAttrToRaw(TAttr e) { e = TAttr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAwaitExpr` to a raw DB element, if possible. */ - Raw::Element convertAwaitExprToRaw(TAwaitExpr e) { - e = TAwaitExpr(result) - } + Raw::Element convertAwaitExprToRaw(TAwaitExpr e) { e = TAwaitExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TBecomeExpr` to a raw DB element, if possible. */ - Raw::Element convertBecomeExprToRaw(TBecomeExpr e) { - e = TBecomeExpr(result) - } + Raw::Element convertBecomeExprToRaw(TBecomeExpr e) { e = TBecomeExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TBinaryExpr` to a raw DB element, if possible. */ - Raw::Element convertBinaryExprToRaw(TBinaryExpr e) { - e = TBinaryExpr(result) - } + Raw::Element convertBinaryExprToRaw(TBinaryExpr e) { e = TBinaryExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TBlockExpr` to a raw DB element, if possible. */ - Raw::Element convertBlockExprToRaw(TBlockExpr e) { - e = TBlockExpr(result) - } + Raw::Element convertBlockExprToRaw(TBlockExpr e) { e = TBlockExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TBoxPat` to a raw DB element, if possible. */ - Raw::Element convertBoxPatToRaw(TBoxPat e) { - e = TBoxPat(result) - } + Raw::Element convertBoxPatToRaw(TBoxPat e) { e = TBoxPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TBreakExpr` to a raw DB element, if possible. */ - Raw::Element convertBreakExprToRaw(TBreakExpr e) { - e = TBreakExpr(result) - } + Raw::Element convertBreakExprToRaw(TBreakExpr e) { e = TBreakExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCallExpr` to a raw DB element, if possible. */ - Raw::Element convertCallExprToRaw(TCallExpr e) { - e = TCallExpr(result) - } + Raw::Element convertCallExprToRaw(TCallExpr e) { e = TCallExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCastExpr` to a raw DB element, if possible. */ - Raw::Element convertCastExprToRaw(TCastExpr e) { - e = TCastExpr(result) - } + Raw::Element convertCastExprToRaw(TCastExpr e) { e = TCastExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgAtom` to a raw DB element, if possible. */ - Raw::Element convertCfgAtomToRaw(TCfgAtom e) { - e = TCfgAtom(result) - } + Raw::Element convertCfgAtomToRaw(TCfgAtom e) { e = TCfgAtom(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgAttrMeta` to a raw DB element, if possible. */ - Raw::Element convertCfgAttrMetaToRaw(TCfgAttrMeta e) { - e = TCfgAttrMeta(result) - } + Raw::Element convertCfgAttrMetaToRaw(TCfgAttrMeta e) { e = TCfgAttrMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgComposite` to a raw DB element, if possible. */ - Raw::Element convertCfgCompositeToRaw(TCfgComposite e) { - e = TCfgComposite(result) - } + Raw::Element convertCfgCompositeToRaw(TCfgComposite e) { e = TCfgComposite(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgMeta` to a raw DB element, if possible. */ - Raw::Element convertCfgMetaToRaw(TCfgMeta e) { - e = TCfgMeta(result) - } + Raw::Element convertCfgMetaToRaw(TCfgMeta e) { e = TCfgMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgPredExpr` to a raw DB element, if possible. */ - Raw::Element convertCfgPredExprToRaw(TCfgPredExpr e) { - e = TCfgPredExpr(result) - } + Raw::Element convertCfgPredExprToRaw(TCfgPredExpr e) { e = TCfgPredExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgPredPat` to a raw DB element, if possible. */ - Raw::Element convertCfgPredPatToRaw(TCfgPredPat e) { - e = TCfgPredPat(result) - } + Raw::Element convertCfgPredPatToRaw(TCfgPredPat e) { e = TCfgPredPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TClosureExpr` to a raw DB element, if possible. */ - Raw::Element convertClosureExprToRaw(TClosureExpr e) { - e = TClosureExpr(result) - } + Raw::Element convertClosureExprToRaw(TClosureExpr e) { e = TClosureExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TComment` to a raw DB element, if possible. */ - Raw::Element convertCommentToRaw(TComment e) { - e = TComment(result) - } + Raw::Element convertCommentToRaw(TComment e) { e = TComment(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TConst` to a raw DB element, if possible. */ - Raw::Element convertConstToRaw(TConst e) { - e = TConst(result) - } + Raw::Element convertConstToRaw(TConst e) { e = TConst(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TConstArg` to a raw DB element, if possible. */ - Raw::Element convertConstArgToRaw(TConstArg e) { - e = TConstArg(result) - } + Raw::Element convertConstArgToRaw(TConstArg e) { e = TConstArg(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TConstBlockPat` to a raw DB element, if possible. */ - Raw::Element convertConstBlockPatToRaw(TConstBlockPat e) { - e = TConstBlockPat(result) - } + Raw::Element convertConstBlockPatToRaw(TConstBlockPat e) { e = TConstBlockPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TConstParam` to a raw DB element, if possible. */ - Raw::Element convertConstParamToRaw(TConstParam e) { - e = TConstParam(result) - } + Raw::Element convertConstParamToRaw(TConstParam e) { e = TConstParam(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TContinueExpr` to a raw DB element, if possible. */ - Raw::Element convertContinueExprToRaw(TContinueExpr e) { - e = TContinueExpr(result) - } + Raw::Element convertContinueExprToRaw(TContinueExpr e) { e = TContinueExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCrate` to a raw DB element, if possible. */ - Raw::Element convertCrateToRaw(TCrate e) { - e = TCrate(result) - } + Raw::Element convertCrateToRaw(TCrate e) { e = TCrate(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TDerefPat` to a raw DB element, if possible. */ - Raw::Element convertDerefPatToRaw(TDerefPat e) { - e = TDerefPat(result) - } + Raw::Element convertDerefPatToRaw(TDerefPat e) { e = TDerefPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TDocComment` to a raw DB element, if possible. */ - Raw::Element convertDocCommentToRaw(TDocComment e) { - e = TDocComment(result) - } + Raw::Element convertDocCommentToRaw(TDocComment e) { e = TDocComment(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TDynTraitTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertDynTraitTypeReprToRaw(TDynTraitTypeRepr e) { - e = TDynTraitTypeRepr(result) - } + Raw::Element convertDynTraitTypeReprToRaw(TDynTraitTypeRepr e) { e = TDynTraitTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TEnum` to a raw DB element, if possible. */ - Raw::Element convertEnumToRaw(TEnum e) { - e = TEnum(result) - } + Raw::Element convertEnumToRaw(TEnum e) { e = TEnum(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExprStmt` to a raw DB element, if possible. */ - Raw::Element convertExprStmtToRaw(TExprStmt e) { - e = TExprStmt(result) - } + Raw::Element convertExprStmtToRaw(TExprStmt e) { e = TExprStmt(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExternBlock` to a raw DB element, if possible. */ - Raw::Element convertExternBlockToRaw(TExternBlock e) { - e = TExternBlock(result) - } + Raw::Element convertExternBlockToRaw(TExternBlock e) { e = TExternBlock(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExternCrate` to a raw DB element, if possible. */ - Raw::Element convertExternCrateToRaw(TExternCrate e) { - e = TExternCrate(result) - } + Raw::Element convertExternCrateToRaw(TExternCrate e) { e = TExternCrate(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExternItemList` to a raw DB element, if possible. */ - Raw::Element convertExternItemListToRaw(TExternItemList e) { - e = TExternItemList(result) - } + Raw::Element convertExternItemListToRaw(TExternItemList e) { e = TExternItemList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExtractorStep` to a raw DB element, if possible. */ - Raw::Element convertExtractorStepToRaw(TExtractorStep e) { - e = TExtractorStep(result) - } + Raw::Element convertExtractorStepToRaw(TExtractorStep e) { e = TExtractorStep(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFieldExpr` to a raw DB element, if possible. */ - Raw::Element convertFieldExprToRaw(TFieldExpr e) { - e = TFieldExpr(result) - } + Raw::Element convertFieldExprToRaw(TFieldExpr e) { e = TFieldExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFnPtrTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertFnPtrTypeReprToRaw(TFnPtrTypeRepr e) { - e = TFnPtrTypeRepr(result) - } + Raw::Element convertFnPtrTypeReprToRaw(TFnPtrTypeRepr e) { e = TFnPtrTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TForBinder` to a raw DB element, if possible. */ - Raw::Element convertForBinderToRaw(TForBinder e) { - e = TForBinder(result) - } + Raw::Element convertForBinderToRaw(TForBinder e) { e = TForBinder(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TForExpr` to a raw DB element, if possible. */ - Raw::Element convertForExprToRaw(TForExpr e) { - e = TForExpr(result) - } + Raw::Element convertForExprToRaw(TForExpr e) { e = TForExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TForTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertForTypeReprToRaw(TForTypeRepr e) { - e = TForTypeRepr(result) - } + Raw::Element convertForTypeReprToRaw(TForTypeRepr e) { e = TForTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFormat` to a raw DB element, if possible. */ - Raw::Element convertFormatToRaw(TFormat e) { - none() - } + Raw::Element convertFormatToRaw(TFormat e) { none() } + /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgsArg` to a raw DB element, if possible. */ - Raw::Element convertFormatArgsArgToRaw(TFormatArgsArg e) { - e = TFormatArgsArg(result) - } + Raw::Element convertFormatArgsArgToRaw(TFormatArgsArg e) { e = TFormatArgsArg(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgsExpr` to a raw DB element, if possible. */ - Raw::Element convertFormatArgsExprToRaw(TFormatArgsExpr e) { - e = TFormatArgsExpr(result) - } + Raw::Element convertFormatArgsExprToRaw(TFormatArgsExpr e) { e = TFormatArgsExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFormatArgument` to a raw DB element, if possible. */ - Raw::Element convertFormatArgumentToRaw(TFormatArgument e) { - none() - } + Raw::Element convertFormatArgumentToRaw(TFormatArgument e) { none() } + /** * INTERNAL: Do not use. * Converts a synthesized `TFormatTemplateVariableAccess` to a raw DB element, if possible. */ - Raw::Element convertFormatTemplateVariableAccessToRaw(TFormatTemplateVariableAccess e) { - none() - } + Raw::Element convertFormatTemplateVariableAccessToRaw(TFormatTemplateVariableAccess e) { none() } + /** * INTERNAL: Do not use. * Converts a synthesized `TFunction` to a raw DB element, if possible. */ - Raw::Element convertFunctionToRaw(TFunction e) { - e = TFunction(result) - } + Raw::Element convertFunctionToRaw(TFunction e) { e = TFunction(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TGenericArgList` to a raw DB element, if possible. */ - Raw::Element convertGenericArgListToRaw(TGenericArgList e) { - e = TGenericArgList(result) - } + Raw::Element convertGenericArgListToRaw(TGenericArgList e) { e = TGenericArgList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TGenericParamList` to a raw DB element, if possible. */ - Raw::Element convertGenericParamListToRaw(TGenericParamList e) { - e = TGenericParamList(result) - } + Raw::Element convertGenericParamListToRaw(TGenericParamList e) { e = TGenericParamList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TIdentPat` to a raw DB element, if possible. */ - Raw::Element convertIdentPatToRaw(TIdentPat e) { - e = TIdentPat(result) - } + Raw::Element convertIdentPatToRaw(TIdentPat e) { e = TIdentPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TIfExpr` to a raw DB element, if possible. */ - Raw::Element convertIfExprToRaw(TIfExpr e) { - e = TIfExpr(result) - } + Raw::Element convertIfExprToRaw(TIfExpr e) { e = TIfExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TImpl` to a raw DB element, if possible. */ - Raw::Element convertImplToRaw(TImpl e) { - e = TImpl(result) - } + Raw::Element convertImplToRaw(TImpl e) { e = TImpl(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TImplRestriction` to a raw DB element, if possible. */ - Raw::Element convertImplRestrictionToRaw(TImplRestriction e) { - e = TImplRestriction(result) - } + Raw::Element convertImplRestrictionToRaw(TImplRestriction e) { e = TImplRestriction(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TImplTraitTypeRepr` to a raw DB element, if possible. @@ -3585,300 +3261,259 @@ module Synth { Raw::Element convertImplTraitTypeReprToRaw(TImplTraitTypeRepr e) { e = TImplTraitTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TIncludeBytesExpr` to a raw DB element, if possible. */ - Raw::Element convertIncludeBytesExprToRaw(TIncludeBytesExpr e) { - e = TIncludeBytesExpr(result) - } + Raw::Element convertIncludeBytesExprToRaw(TIncludeBytesExpr e) { e = TIncludeBytesExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TIndexExpr` to a raw DB element, if possible. */ - Raw::Element convertIndexExprToRaw(TIndexExpr e) { - e = TIndexExpr(result) - } + Raw::Element convertIndexExprToRaw(TIndexExpr e) { e = TIndexExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TInferTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertInferTypeReprToRaw(TInferTypeRepr e) { - e = TInferTypeRepr(result) - } + Raw::Element convertInferTypeReprToRaw(TInferTypeRepr e) { e = TInferTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TItemList` to a raw DB element, if possible. */ - Raw::Element convertItemListToRaw(TItemList e) { - e = TItemList(result) - } + Raw::Element convertItemListToRaw(TItemList e) { e = TItemList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TKeyValueMeta` to a raw DB element, if possible. */ - Raw::Element convertKeyValueMetaToRaw(TKeyValueMeta e) { - e = TKeyValueMeta(result) - } + Raw::Element convertKeyValueMetaToRaw(TKeyValueMeta e) { e = TKeyValueMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLabel` to a raw DB element, if possible. */ - Raw::Element convertLabelToRaw(TLabel e) { - e = TLabel(result) - } + Raw::Element convertLabelToRaw(TLabel e) { e = TLabel(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLetElse` to a raw DB element, if possible. */ - Raw::Element convertLetElseToRaw(TLetElse e) { - e = TLetElse(result) - } + Raw::Element convertLetElseToRaw(TLetElse e) { e = TLetElse(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLetExpr` to a raw DB element, if possible. */ - Raw::Element convertLetExprToRaw(TLetExpr e) { - e = TLetExpr(result) - } + Raw::Element convertLetExprToRaw(TLetExpr e) { e = TLetExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLetStmt` to a raw DB element, if possible. */ - Raw::Element convertLetStmtToRaw(TLetStmt e) { - e = TLetStmt(result) - } + Raw::Element convertLetStmtToRaw(TLetStmt e) { e = TLetStmt(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLifetime` to a raw DB element, if possible. */ - Raw::Element convertLifetimeToRaw(TLifetime e) { - e = TLifetime(result) - } + Raw::Element convertLifetimeToRaw(TLifetime e) { e = TLifetime(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLifetimeArg` to a raw DB element, if possible. */ - Raw::Element convertLifetimeArgToRaw(TLifetimeArg e) { - e = TLifetimeArg(result) - } + Raw::Element convertLifetimeArgToRaw(TLifetimeArg e) { e = TLifetimeArg(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLifetimeParam` to a raw DB element, if possible. */ - Raw::Element convertLifetimeParamToRaw(TLifetimeParam e) { - e = TLifetimeParam(result) - } + Raw::Element convertLifetimeParamToRaw(TLifetimeParam e) { e = TLifetimeParam(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLiteralExpr` to a raw DB element, if possible. */ - Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { - e = TLiteralExpr(result) - } + Raw::Element convertLiteralExprToRaw(TLiteralExpr e) { e = TLiteralExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLiteralPat` to a raw DB element, if possible. */ - Raw::Element convertLiteralPatToRaw(TLiteralPat e) { - e = TLiteralPat(result) - } + Raw::Element convertLiteralPatToRaw(TLiteralPat e) { e = TLiteralPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLoopExpr` to a raw DB element, if possible. */ - Raw::Element convertLoopExprToRaw(TLoopExpr e) { - e = TLoopExpr(result) - } + Raw::Element convertLoopExprToRaw(TLoopExpr e) { e = TLoopExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroCall` to a raw DB element, if possible. */ - Raw::Element convertMacroCallToRaw(TMacroCall e) { - e = TMacroCall(result) - } + Raw::Element convertMacroCallToRaw(TMacroCall e) { e = TMacroCall(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroDef` to a raw DB element, if possible. */ - Raw::Element convertMacroDefToRaw(TMacroDef e) { - e = TMacroDef(result) - } + Raw::Element convertMacroDefToRaw(TMacroDef e) { e = TMacroDef(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroExpr` to a raw DB element, if possible. */ - Raw::Element convertMacroExprToRaw(TMacroExpr e) { - e = TMacroExpr(result) - } + Raw::Element convertMacroExprToRaw(TMacroExpr e) { e = TMacroExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroItems` to a raw DB element, if possible. */ - Raw::Element convertMacroItemsToRaw(TMacroItems e) { - e = TMacroItems(result) - } + Raw::Element convertMacroItemsToRaw(TMacroItems e) { e = TMacroItems(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroPat` to a raw DB element, if possible. */ - Raw::Element convertMacroPatToRaw(TMacroPat e) { - e = TMacroPat(result) - } + Raw::Element convertMacroPatToRaw(TMacroPat e) { e = TMacroPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroRules` to a raw DB element, if possible. */ - Raw::Element convertMacroRulesToRaw(TMacroRules e) { - e = TMacroRules(result) - } + Raw::Element convertMacroRulesToRaw(TMacroRules e) { e = TMacroRules(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMacroTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertMacroTypeReprToRaw(TMacroTypeRepr e) { - e = TMacroTypeRepr(result) - } + Raw::Element convertMacroTypeReprToRaw(TMacroTypeRepr e) { e = TMacroTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMatchArm` to a raw DB element, if possible. */ - Raw::Element convertMatchArmToRaw(TMatchArm e) { - e = TMatchArm(result) - } + Raw::Element convertMatchArmToRaw(TMatchArm e) { e = TMatchArm(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMatchArmList` to a raw DB element, if possible. */ - Raw::Element convertMatchArmListToRaw(TMatchArmList e) { - e = TMatchArmList(result) - } + Raw::Element convertMatchArmListToRaw(TMatchArmList e) { e = TMatchArmList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMatchExpr` to a raw DB element, if possible. */ - Raw::Element convertMatchExprToRaw(TMatchExpr e) { - e = TMatchExpr(result) - } + Raw::Element convertMatchExprToRaw(TMatchExpr e) { e = TMatchExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMatchGuard` to a raw DB element, if possible. */ - Raw::Element convertMatchGuardToRaw(TMatchGuard e) { - e = TMatchGuard(result) - } + Raw::Element convertMatchGuardToRaw(TMatchGuard e) { e = TMatchGuard(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMethodCallExpr` to a raw DB element, if possible. */ - Raw::Element convertMethodCallExprToRaw(TMethodCallExpr e) { - e = TMethodCallExpr(result) - } + Raw::Element convertMethodCallExprToRaw(TMethodCallExpr e) { e = TMethodCallExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMissing` to a raw DB element, if possible. */ - Raw::Element convertMissingToRaw(TMissing e) { - e = TMissing(result) - } + Raw::Element convertMissingToRaw(TMissing e) { e = TMissing(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TModule` to a raw DB element, if possible. */ - Raw::Element convertModuleToRaw(TModule e) { - e = TModule(result) - } + Raw::Element convertModuleToRaw(TModule e) { e = TModule(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMutRestriction` to a raw DB element, if possible. */ - Raw::Element convertMutRestrictionToRaw(TMutRestriction e) { - e = TMutRestriction(result) - } + Raw::Element convertMutRestrictionToRaw(TMutRestriction e) { e = TMutRestriction(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TName` to a raw DB element, if possible. */ - Raw::Element convertNameToRaw(TName e) { - e = TName(result) - } + Raw::Element convertNameToRaw(TName e) { e = TName(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TNameRef` to a raw DB element, if possible. */ - Raw::Element convertNameRefToRaw(TNameRef e) { - e = TNameRef(result) - } + Raw::Element convertNameRefToRaw(TNameRef e) { e = TNameRef(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TNamedCrate` to a raw DB element, if possible. */ - Raw::Element convertNamedCrateToRaw(TNamedCrate e) { - e = TNamedCrate(result) - } + Raw::Element convertNamedCrateToRaw(TNamedCrate e) { e = TNamedCrate(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TNeverTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertNeverTypeReprToRaw(TNeverTypeRepr e) { - e = TNeverTypeRepr(result) - } + Raw::Element convertNeverTypeReprToRaw(TNeverTypeRepr e) { e = TNeverTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TNotNull` to a raw DB element, if possible. */ - Raw::Element convertNotNullToRaw(TNotNull e) { - e = TNotNull(result) - } + Raw::Element convertNotNullToRaw(TNotNull e) { e = TNotNull(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TOffsetOfExpr` to a raw DB element, if possible. */ - Raw::Element convertOffsetOfExprToRaw(TOffsetOfExpr e) { - e = TOffsetOfExpr(result) - } + Raw::Element convertOffsetOfExprToRaw(TOffsetOfExpr e) { e = TOffsetOfExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TOrPat` to a raw DB element, if possible. */ - Raw::Element convertOrPatToRaw(TOrPat e) { - e = TOrPat(result) - } + Raw::Element convertOrPatToRaw(TOrPat e) { e = TOrPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParam` to a raw DB element, if possible. */ - Raw::Element convertParamToRaw(TParam e) { - e = TParam(result) - } + Raw::Element convertParamToRaw(TParam e) { e = TParam(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParamList` to a raw DB element, if possible. */ - Raw::Element convertParamListToRaw(TParamList e) { - e = TParamList(result) - } + Raw::Element convertParamListToRaw(TParamList e) { e = TParamList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParenExpr` to a raw DB element, if possible. */ - Raw::Element convertParenExprToRaw(TParenExpr e) { - e = TParenExpr(result) - } + Raw::Element convertParenExprToRaw(TParenExpr e) { e = TParenExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParenPat` to a raw DB element, if possible. */ - Raw::Element convertParenPatToRaw(TParenPat e) { - e = TParenPat(result) - } + Raw::Element convertParenPatToRaw(TParenPat e) { e = TParenPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParenTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertParenTypeReprToRaw(TParenTypeRepr e) { - e = TParenTypeRepr(result) - } + Raw::Element convertParenTypeReprToRaw(TParenTypeRepr e) { e = TParenTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParenthesizedArgList` to a raw DB element, if possible. @@ -3886,202 +3521,175 @@ module Synth { Raw::Element convertParenthesizedArgListToRaw(TParenthesizedArgList e) { e = TParenthesizedArgList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPath` to a raw DB element, if possible. */ - Raw::Element convertPathToRaw(TPath e) { - e = TPath(result) - } + Raw::Element convertPathToRaw(TPath e) { e = TPath(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathExpr` to a raw DB element, if possible. */ - Raw::Element convertPathExprToRaw(TPathExpr e) { - e = TPathExpr(result) - } + Raw::Element convertPathExprToRaw(TPathExpr e) { e = TPathExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathMeta` to a raw DB element, if possible. */ - Raw::Element convertPathMetaToRaw(TPathMeta e) { - e = TPathMeta(result) - } + Raw::Element convertPathMetaToRaw(TPathMeta e) { e = TPathMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathPat` to a raw DB element, if possible. */ - Raw::Element convertPathPatToRaw(TPathPat e) { - e = TPathPat(result) - } + Raw::Element convertPathPatToRaw(TPathPat e) { e = TPathPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathSegment` to a raw DB element, if possible. */ - Raw::Element convertPathSegmentToRaw(TPathSegment e) { - e = TPathSegment(result) - } + Raw::Element convertPathSegmentToRaw(TPathSegment e) { e = TPathSegment(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPathTypeReprToRaw(TPathTypeRepr e) { - e = TPathTypeRepr(result) - } + Raw::Element convertPathTypeReprToRaw(TPathTypeRepr e) { e = TPathTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPatternTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPatternTypeReprToRaw(TPatternTypeRepr e) { - e = TPatternTypeRepr(result) - } + Raw::Element convertPatternTypeReprToRaw(TPatternTypeRepr e) { e = TPatternTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPrefixExpr` to a raw DB element, if possible. */ - Raw::Element convertPrefixExprToRaw(TPrefixExpr e) { - e = TPrefixExpr(result) - } + Raw::Element convertPrefixExprToRaw(TPrefixExpr e) { e = TPrefixExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPtrTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertPtrTypeReprToRaw(TPtrTypeRepr e) { - e = TPtrTypeRepr(result) - } + Raw::Element convertPtrTypeReprToRaw(TPtrTypeRepr e) { e = TPtrTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRangeExpr` to a raw DB element, if possible. */ - Raw::Element convertRangeExprToRaw(TRangeExpr e) { - e = TRangeExpr(result) - } + Raw::Element convertRangeExprToRaw(TRangeExpr e) { e = TRangeExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRangePat` to a raw DB element, if possible. */ - Raw::Element convertRangePatToRaw(TRangePat e) { - e = TRangePat(result) - } + Raw::Element convertRangePatToRaw(TRangePat e) { e = TRangePat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRefExpr` to a raw DB element, if possible. */ - Raw::Element convertRefExprToRaw(TRefExpr e) { - e = TRefExpr(result) - } + Raw::Element convertRefExprToRaw(TRefExpr e) { e = TRefExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRefPat` to a raw DB element, if possible. */ - Raw::Element convertRefPatToRaw(TRefPat e) { - e = TRefPat(result) - } + Raw::Element convertRefPatToRaw(TRefPat e) { e = TRefPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRefTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertRefTypeReprToRaw(TRefTypeRepr e) { - e = TRefTypeRepr(result) - } + Raw::Element convertRefTypeReprToRaw(TRefTypeRepr e) { e = TRefTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRename` to a raw DB element, if possible. */ - Raw::Element convertRenameToRaw(TRename e) { - e = TRename(result) - } + Raw::Element convertRenameToRaw(TRename e) { e = TRename(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRestPat` to a raw DB element, if possible. */ - Raw::Element convertRestPatToRaw(TRestPat e) { - e = TRestPat(result) - } + Raw::Element convertRestPatToRaw(TRestPat e) { e = TRestPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TRetTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertRetTypeReprToRaw(TRetTypeRepr e) { - e = TRetTypeRepr(result) - } + Raw::Element convertRetTypeReprToRaw(TRetTypeRepr e) { e = TRetTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TReturnExpr` to a raw DB element, if possible. */ - Raw::Element convertReturnExprToRaw(TReturnExpr e) { - e = TReturnExpr(result) - } + Raw::Element convertReturnExprToRaw(TReturnExpr e) { e = TReturnExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TReturnTypeSyntax` to a raw DB element, if possible. */ - Raw::Element convertReturnTypeSyntaxToRaw(TReturnTypeSyntax e) { - e = TReturnTypeSyntax(result) - } + Raw::Element convertReturnTypeSyntaxToRaw(TReturnTypeSyntax e) { e = TReturnTypeSyntax(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TSelfParam` to a raw DB element, if possible. */ - Raw::Element convertSelfParamToRaw(TSelfParam e) { - e = TSelfParam(result) - } + Raw::Element convertSelfParamToRaw(TSelfParam e) { e = TSelfParam(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TSlicePat` to a raw DB element, if possible. */ - Raw::Element convertSlicePatToRaw(TSlicePat e) { - e = TSlicePat(result) - } + Raw::Element convertSlicePatToRaw(TSlicePat e) { e = TSlicePat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TSliceTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertSliceTypeReprToRaw(TSliceTypeRepr e) { - e = TSliceTypeRepr(result) - } + Raw::Element convertSliceTypeReprToRaw(TSliceTypeRepr e) { e = TSliceTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TSourceFile` to a raw DB element, if possible. */ - Raw::Element convertSourceFileToRaw(TSourceFile e) { - e = TSourceFile(result) - } + Raw::Element convertSourceFileToRaw(TSourceFile e) { e = TSourceFile(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStatic` to a raw DB element, if possible. */ - Raw::Element convertStaticToRaw(TStatic e) { - e = TStatic(result) - } + Raw::Element convertStaticToRaw(TStatic e) { e = TStatic(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStmtList` to a raw DB element, if possible. */ - Raw::Element convertStmtListToRaw(TStmtList e) { - e = TStmtList(result) - } + Raw::Element convertStmtListToRaw(TStmtList e) { e = TStmtList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStruct` to a raw DB element, if possible. */ - Raw::Element convertStructToRaw(TStruct e) { - e = TStruct(result) - } + Raw::Element convertStructToRaw(TStruct e) { e = TStruct(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructExpr` to a raw DB element, if possible. */ - Raw::Element convertStructExprToRaw(TStructExpr e) { - e = TStructExpr(result) - } + Raw::Element convertStructExprToRaw(TStructExpr e) { e = TStructExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructExprField` to a raw DB element, if possible. */ - Raw::Element convertStructExprFieldToRaw(TStructExprField e) { - e = TStructExprField(result) - } + Raw::Element convertStructExprFieldToRaw(TStructExprField e) { e = TStructExprField(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructExprFieldList` to a raw DB element, if possible. @@ -4089,34 +3697,31 @@ module Synth { Raw::Element convertStructExprFieldListToRaw(TStructExprFieldList e) { e = TStructExprFieldList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructField` to a raw DB element, if possible. */ - Raw::Element convertStructFieldToRaw(TStructField e) { - e = TStructField(result) - } + Raw::Element convertStructFieldToRaw(TStructField e) { e = TStructField(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructFieldList` to a raw DB element, if possible. */ - Raw::Element convertStructFieldListToRaw(TStructFieldList e) { - e = TStructFieldList(result) - } + Raw::Element convertStructFieldListToRaw(TStructFieldList e) { e = TStructFieldList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructPat` to a raw DB element, if possible. */ - Raw::Element convertStructPatToRaw(TStructPat e) { - e = TStructPat(result) - } + Raw::Element convertStructPatToRaw(TStructPat e) { e = TStructPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructPatField` to a raw DB element, if possible. */ - Raw::Element convertStructPatFieldToRaw(TStructPatField e) { - e = TStructPatField(result) - } + Raw::Element convertStructPatFieldToRaw(TStructPatField e) { e = TStructPatField(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStructPatFieldList` to a raw DB element, if possible. @@ -4124,153 +3729,133 @@ module Synth { Raw::Element convertStructPatFieldListToRaw(TStructPatFieldList e) { e = TStructPatFieldList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTokenTree` to a raw DB element, if possible. */ - Raw::Element convertTokenTreeToRaw(TTokenTree e) { - e = TTokenTree(result) - } + Raw::Element convertTokenTreeToRaw(TTokenTree e) { e = TTokenTree(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTokenTreeMeta` to a raw DB element, if possible. */ - Raw::Element convertTokenTreeMetaToRaw(TTokenTreeMeta e) { - e = TTokenTreeMeta(result) - } + Raw::Element convertTokenTreeMetaToRaw(TTokenTreeMeta e) { e = TTokenTreeMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTrait` to a raw DB element, if possible. */ - Raw::Element convertTraitToRaw(TTrait e) { - e = TTrait(result) - } + Raw::Element convertTraitToRaw(TTrait e) { e = TTrait(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTryBlockModifier` to a raw DB element, if possible. */ - Raw::Element convertTryBlockModifierToRaw(TTryBlockModifier e) { - e = TTryBlockModifier(result) - } + Raw::Element convertTryBlockModifierToRaw(TTryBlockModifier e) { e = TTryBlockModifier(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTryExpr` to a raw DB element, if possible. */ - Raw::Element convertTryExprToRaw(TTryExpr e) { - e = TTryExpr(result) - } + Raw::Element convertTryExprToRaw(TTryExpr e) { e = TTryExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTupleExpr` to a raw DB element, if possible. */ - Raw::Element convertTupleExprToRaw(TTupleExpr e) { - e = TTupleExpr(result) - } + Raw::Element convertTupleExprToRaw(TTupleExpr e) { e = TTupleExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTupleField` to a raw DB element, if possible. */ - Raw::Element convertTupleFieldToRaw(TTupleField e) { - e = TTupleField(result) - } + Raw::Element convertTupleFieldToRaw(TTupleField e) { e = TTupleField(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTupleFieldList` to a raw DB element, if possible. */ - Raw::Element convertTupleFieldListToRaw(TTupleFieldList e) { - e = TTupleFieldList(result) - } + Raw::Element convertTupleFieldListToRaw(TTupleFieldList e) { e = TTupleFieldList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTuplePat` to a raw DB element, if possible. */ - Raw::Element convertTuplePatToRaw(TTuplePat e) { - e = TTuplePat(result) - } + Raw::Element convertTuplePatToRaw(TTuplePat e) { e = TTuplePat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTupleStructPat` to a raw DB element, if possible. */ - Raw::Element convertTupleStructPatToRaw(TTupleStructPat e) { - e = TTupleStructPat(result) - } + Raw::Element convertTupleStructPatToRaw(TTupleStructPat e) { e = TTupleStructPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTupleTypeRepr` to a raw DB element, if possible. */ - Raw::Element convertTupleTypeReprToRaw(TTupleTypeRepr e) { - e = TTupleTypeRepr(result) - } + Raw::Element convertTupleTypeReprToRaw(TTupleTypeRepr e) { e = TTupleTypeRepr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeAlias` to a raw DB element, if possible. */ - Raw::Element convertTypeAliasToRaw(TTypeAlias e) { - e = TTypeAlias(result) - } + Raw::Element convertTypeAliasToRaw(TTypeAlias e) { e = TTypeAlias(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeArg` to a raw DB element, if possible. */ - Raw::Element convertTypeArgToRaw(TTypeArg e) { - e = TTypeArg(result) - } + Raw::Element convertTypeArgToRaw(TTypeArg e) { e = TTypeArg(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeBound` to a raw DB element, if possible. */ - Raw::Element convertTypeBoundToRaw(TTypeBound e) { - e = TTypeBound(result) - } + Raw::Element convertTypeBoundToRaw(TTypeBound e) { e = TTypeBound(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeBoundList` to a raw DB element, if possible. */ - Raw::Element convertTypeBoundListToRaw(TTypeBoundList e) { - e = TTypeBoundList(result) - } + Raw::Element convertTypeBoundListToRaw(TTypeBoundList e) { e = TTypeBoundList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeParam` to a raw DB element, if possible. */ - Raw::Element convertTypeParamToRaw(TTypeParam e) { - e = TTypeParam(result) - } + Raw::Element convertTypeParamToRaw(TTypeParam e) { e = TTypeParam(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUnderscoreExpr` to a raw DB element, if possible. */ - Raw::Element convertUnderscoreExprToRaw(TUnderscoreExpr e) { - e = TUnderscoreExpr(result) - } + Raw::Element convertUnderscoreExprToRaw(TUnderscoreExpr e) { e = TUnderscoreExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUnimplemented` to a raw DB element, if possible. */ - Raw::Element convertUnimplementedToRaw(TUnimplemented e) { - e = TUnimplemented(result) - } + Raw::Element convertUnimplementedToRaw(TUnimplemented e) { e = TUnimplemented(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUnion` to a raw DB element, if possible. */ - Raw::Element convertUnionToRaw(TUnion e) { - e = TUnion(result) - } + Raw::Element convertUnionToRaw(TUnion e) { e = TUnion(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUnsafeMeta` to a raw DB element, if possible. */ - Raw::Element convertUnsafeMetaToRaw(TUnsafeMeta e) { - e = TUnsafeMeta(result) - } + Raw::Element convertUnsafeMetaToRaw(TUnsafeMeta e) { e = TUnsafeMeta(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUse` to a raw DB element, if possible. */ - Raw::Element convertUseToRaw(TUse e) { - e = TUse(result) - } + Raw::Element convertUseToRaw(TUse e) { e = TUse(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUseBoundGenericArgs` to a raw DB element, if possible. @@ -4278,90 +3863,78 @@ module Synth { Raw::Element convertUseBoundGenericArgsToRaw(TUseBoundGenericArgs e) { e = TUseBoundGenericArgs(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUseTree` to a raw DB element, if possible. */ - Raw::Element convertUseTreeToRaw(TUseTree e) { - e = TUseTree(result) - } + Raw::Element convertUseTreeToRaw(TUseTree e) { e = TUseTree(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUseTreeList` to a raw DB element, if possible. */ - Raw::Element convertUseTreeListToRaw(TUseTreeList e) { - e = TUseTreeList(result) - } + Raw::Element convertUseTreeListToRaw(TUseTreeList e) { e = TUseTreeList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TVariant` to a raw DB element, if possible. */ - Raw::Element convertVariantToRaw(TVariant e) { - e = TVariant(result) - } + Raw::Element convertVariantToRaw(TVariant e) { e = TVariant(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TVariantList` to a raw DB element, if possible. */ - Raw::Element convertVariantListToRaw(TVariantList e) { - e = TVariantList(result) - } + Raw::Element convertVariantListToRaw(TVariantList e) { e = TVariantList(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TVisibility` to a raw DB element, if possible. */ - Raw::Element convertVisibilityToRaw(TVisibility e) { - e = TVisibility(result) - } + Raw::Element convertVisibilityToRaw(TVisibility e) { e = TVisibility(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TVisibilityInner` to a raw DB element, if possible. */ - Raw::Element convertVisibilityInnerToRaw(TVisibilityInner e) { - e = TVisibilityInner(result) - } + Raw::Element convertVisibilityInnerToRaw(TVisibilityInner e) { e = TVisibilityInner(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TWhereClause` to a raw DB element, if possible. */ - Raw::Element convertWhereClauseToRaw(TWhereClause e) { - e = TWhereClause(result) - } + Raw::Element convertWhereClauseToRaw(TWhereClause e) { e = TWhereClause(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TWherePred` to a raw DB element, if possible. */ - Raw::Element convertWherePredToRaw(TWherePred e) { - e = TWherePred(result) - } + Raw::Element convertWherePredToRaw(TWherePred e) { e = TWherePred(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TWhileExpr` to a raw DB element, if possible. */ - Raw::Element convertWhileExprToRaw(TWhileExpr e) { - e = TWhileExpr(result) - } + Raw::Element convertWhileExprToRaw(TWhileExpr e) { e = TWhileExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TWildcardPat` to a raw DB element, if possible. */ - Raw::Element convertWildcardPatToRaw(TWildcardPat e) { - e = TWildcardPat(result) - } + Raw::Element convertWildcardPatToRaw(TWildcardPat e) { e = TWildcardPat(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TYeetExpr` to a raw DB element, if possible. */ - Raw::Element convertYeetExprToRaw(TYeetExpr e) { - e = TYeetExpr(result) - } + Raw::Element convertYeetExprToRaw(TYeetExpr e) { e = TYeetExpr(result) } + /** * INTERNAL: Do not use. * Converts a synthesized `TYieldExpr` to a raw DB element, if possible. */ - Raw::Element convertYieldExprToRaw(TYieldExpr e) { - e = TYieldExpr(result) - } + Raw::Element convertYieldExprToRaw(TYieldExpr e) { e = TYieldExpr(result) } /** * INTERNAL: Do not use. @@ -4372,6 +3945,7 @@ module Synth { or result = convertVariantToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAnyAttr` to a raw DB element, if possible. @@ -4381,6 +3955,7 @@ module Synth { or result = convertDocCommentToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TArrayExpr` to a raw DB element, if possible. @@ -4390,6 +3965,7 @@ module Synth { or result = convertArrayRepeatExprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmOperand` to a raw DB element, if possible. @@ -4403,6 +3979,7 @@ module Synth { or result = convertAsmSymToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAsmPiece` to a raw DB element, if possible. @@ -4414,6 +3991,7 @@ module Synth { or result = convertAsmOptionsListToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAssocItem` to a raw DB element, if possible. @@ -4427,6 +4005,7 @@ module Synth { or result = convertTypeAliasToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TAstNode` to a raw DB element, if possible. @@ -4566,6 +4145,7 @@ module Synth { or result = convertWherePredToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCallable` to a raw DB element, if possible. @@ -4575,6 +4155,7 @@ module Synth { or result = convertFunctionToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TCfgPredicate` to a raw DB element, if possible. @@ -4584,6 +4165,7 @@ module Synth { or result = convertCfgCompositeToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TElement` to a raw DB element, if possible. @@ -4597,6 +4179,7 @@ module Synth { or result = convertUnextractedToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExpr` to a raw DB element, if possible. @@ -4674,6 +4257,7 @@ module Synth { or result = convertYieldExprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TExternItem` to a raw DB element, if possible. @@ -4687,6 +4271,7 @@ module Synth { or result = convertTypeAliasToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TFieldList` to a raw DB element, if possible. @@ -4696,6 +4281,7 @@ module Synth { or result = convertTupleFieldListToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TGenericArg` to a raw DB element, if possible. @@ -4709,6 +4295,7 @@ module Synth { or result = convertTypeArgToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TGenericParam` to a raw DB element, if possible. @@ -4720,6 +4307,7 @@ module Synth { or result = convertTypeParamToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TItem` to a raw DB element, if possible. @@ -4749,6 +4337,7 @@ module Synth { or result = convertUseToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLabelableExpr` to a raw DB element, if possible. @@ -4758,6 +4347,7 @@ module Synth { or result = convertLoopingExprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLocatable` to a raw DB element, if possible. @@ -4771,6 +4361,7 @@ module Synth { or result = convertFormatArgumentToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TLoopingExpr` to a raw DB element, if possible. @@ -4782,6 +4373,7 @@ module Synth { or result = convertWhileExprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TMeta` to a raw DB element, if possible. @@ -4799,6 +4391,7 @@ module Synth { or result = convertUnsafeMetaToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TParamBase` to a raw DB element, if possible. @@ -4808,6 +4401,7 @@ module Synth { or result = convertSelfParamToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPat` to a raw DB element, if possible. @@ -4851,6 +4445,7 @@ module Synth { or result = convertWildcardPatToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathAstNode` to a raw DB element, if possible. @@ -4866,6 +4461,7 @@ module Synth { or result = convertTupleStructPatToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TPathExprBase` to a raw DB element, if possible. @@ -4875,6 +4471,7 @@ module Synth { or result = convertPathExprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TStmt` to a raw DB element, if possible. @@ -4886,13 +4483,13 @@ module Synth { or result = convertLetStmtToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TToken` to a raw DB element, if possible. */ - Raw::Element convertTokenToRaw(TToken e) { - result = convertCommentToRaw(e) - } + Raw::Element convertTokenToRaw(TToken e) { result = convertCommentToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeItem` to a raw DB element, if possible. @@ -4904,6 +4501,7 @@ module Synth { or result = convertUnionToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TTypeRepr` to a raw DB element, if possible. @@ -4939,6 +4537,7 @@ module Synth { or result = convertTupleTypeReprToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUnextracted` to a raw DB element, if possible. @@ -4948,6 +4547,7 @@ module Synth { or result = convertUnimplementedToRaw(e) } + /** * INTERNAL: Do not use. * Converts a synthesized `TUseBoundGenericArg` to a raw DB element, if possible.