diff --git a/rust/extractor/src/translate.rs b/rust/extractor/src/translate.rs index 315cfc3991098..0cfc1cc7a0477 100644 --- a/rust/extractor/src/translate.rs +++ b/rust/extractor/src/translate.rs @@ -387,7 +387,10 @@ impl CrateTranslator<'_> { } } fn emit_type_ref(&mut self, _type_ref: &TypeRef) -> trap::Label { - self.emit_unimplemented(None) + self.trap.emit(generated::TypeRef { + id: TrapId::Star, + location: None, + }) } fn emit_match_arm( &mut self, diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 5c21f4e905104..71474b86c6871 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -1,35 +1,35 @@ lib/codeql/rust/elements/ArrayExpr.qll aa558ac94bb7c45145e4788ed1a92e2873c5f57f1a0c7b7faf341f40027cf455 874da62a3d6467af7ae11045229135f8f5229cff33f3edae5b01a5b9afe86dd7 lib/codeql/rust/elements/AstNode.qll 2069047c779514867c12d845dcdf889db6f27fa6a9e484966a3c28a77973b7d4 e214616c81418b0018c0d36896ac2ec7273634e3213bc8257d8b172f396c00ee -lib/codeql/rust/elements/AsyncBlockExpr.qll ce6484a28403bc36e261ae6931b02a15db6fc54cc0c1bfc441e33d7284f6c74a e5b3c00f74543a6ceeaef053aaa1f00006026b8242efbeb7e1e9633e68cc4844 +lib/codeql/rust/elements/AsyncBlockExpr.qll 7cc9709af8c5f844fd6bf6d4cf49e245d19a0ab6d73ef69e84888a4a9b8e47ce 2f9ede385321df47d2e4ac1297d07be987ff53a576a8dded9a615ad83fba6de3 lib/codeql/rust/elements/AsyncBlockExprConstructor.qll 2d7d22caca1984e850d723f9ddd581530734bf4c31c545ea598bc27144a32f1b bf2ff9edff95db8400017b7583d6881581c431755c70e0068a495787993010f9 -lib/codeql/rust/elements/AwaitExpr.qll 310cf2cf155bc472caed76f596d7f789e9fa19c24d73dc0235d601ff9f32de40 d4b53d79a12d4378eebe2211b37b0f819177620b86a3eabfbec4096adfd200c4 +lib/codeql/rust/elements/AwaitExpr.qll da0f5928cfee39223c48b74b1921d18c39cc4f8ce7c2189342fb6e8e79c76985 e72e2cf142058fa93143acf9dc4c420572a234b4d4f11155567a7184e9152257 lib/codeql/rust/elements/AwaitExprConstructor.qll af0dfdf36b300d412a7b8668f68e6594fe3338216cdf1aa420c9a58608aa86f5 cfa115902ccf070e34ee451bc2f89295c97e8418501359a8cdc646d16c4cc7cd -lib/codeql/rust/elements/BecomeExpr.qll 91e08545258ff3bed8b63cb0e719f71f04cf21af758688cdb39d4be56d104db7 ba381c94e998c2fa275ab84f1e785cfb6af5ab40ad690e6b429eb72897837ac4 +lib/codeql/rust/elements/BecomeExpr.qll cf7d219b639e8e93f6a44bb14be14740b17bdb789f7299863560b2b5d4bfc7f7 26511c65fbdbb9352b6628a813e3f00be8495f2a34abdfae5a5ece8dd59cb04f lib/codeql/rust/elements/BecomeExprConstructor.qll 0c206e657417066415850672a804a69e5fccc605c309bb8755737ae01e332f18 e70bd0c411ffc23c37b22a459455c95ff75a72fa2d179f751bff99866eeef2bc -lib/codeql/rust/elements/BinaryOpExpr.qll d85404c249175283d7ac7daada3951f47b19ef56b08749906c8bd3895959db9f 9e1d35061bab3517c716e3d0fe42654568e16b6577d6d26861b87576839a33be +lib/codeql/rust/elements/BinaryOpExpr.qll 8bd02bff68a9a611ed82b2d380bbd8e541f9cfaef570cb33ab33ba9da7169172 2e51a9f16c4c91d2aef717ddb4c3080eab1a9c8720dbe44f83bf668668e4e772 lib/codeql/rust/elements/BinaryOpExprConstructor.qll efa89c084def020961641772f4829fc54bf718817831d4752b9bf403ce0e61dd d7937326ba08410fc3ba37e44b76530804f492177ef5e62dd416094e1e2f9bd6 lib/codeql/rust/elements/BindPat.qll f0209f781d8a14ab7fbb4b4d6a654469aecb0ff1a8ff4810f18a90f3b171e1c3 9734b7907855e46eeded6c3f59912a16212f7e8639fba35c740bb04462240287 lib/codeql/rust/elements/BindPatConstructor.qll 2bbcc296bcdcd945313d83294b90d327c51c9f1e96f92d37dd10bf0c32dfaf6a 612b4fc651f32129155727e866796edee8fff939614c6fd0b7baa1392930a38c -lib/codeql/rust/elements/BlockExpr.qll cd7a978d3ad15156467ee213d65ef0dcc806af43888d1de4635e875b2d76f5fb b0286039d03f2f554ab5c31b902386357e19127d35f70211b1373d591053ed8f +lib/codeql/rust/elements/BlockExpr.qll b699906fba2dee34699e110b8759419079a5ce3dc1fab207001c9c9b612dac5e 429016df600e3905bd235d0e707c50ecdbf12b3ceddedcbf48944ea76e60f915 lib/codeql/rust/elements/BlockExprBase.qll 1b24ea5fd43dce0e240e1d7740a062228c19e8c704f6ce26503ddbd65c6f5282 d2e05a51d3840caf4de4cca6cdab9551f396df317c8ad1da661205aa822646cc lib/codeql/rust/elements/BlockExprConstructor.qll 7fc9214582f0e6e8b4db06f7c6ac3712dc260abc12ff65f3e93bec5f210b0098 13bc676b67ed14b326e4bdaaa43b497ce486dc2c3145a76a25fe960c82a6ba54 -lib/codeql/rust/elements/BoxExpr.qll 02e6f063c8e2aa01b12eb3223783e8d88330f4faadd71fef253b5dd39af8b556 bda6357d99430b524de82be0da444cc180dde9ba1f3e08c1bd4c53143789fcf0 +lib/codeql/rust/elements/BoxExpr.qll f4727005f1b07d0d2f2230379778929351ad9fda986754b48980e8b166cd68a9 adae835238f824a48ad700310c3fce70bc9a890538cf361b4ed5b3d213fcc67a lib/codeql/rust/elements/BoxExprConstructor.qll e30e71b88978b5d0f156152acaf7eaebe26232b7a5a562cf22f1bb9659ae5deb 3ca41494c5101ef73877737420fbc468483ac7ef215d11b431dac2dd6a08ecc5 lib/codeql/rust/elements/BoxPat.qll 1df08d5443c63e21d40d25023da58da50bd6cf6e156b9f5dbd6d41a3193faee9 9837752be4d4a1c3f16d6438bd361c596b6b983d9ae4e486083651e8f4e090ff lib/codeql/rust/elements/BoxPatConstructor.qll 20f79f18beb8b7eeec63b1e30302d9f2e514354a7b1ae077f240db3cda4ecc4c f41ca3fdafc70c6b972598a3af3434bf60687bc2f0252dd11ddd09ec874fe63c -lib/codeql/rust/elements/BreakExpr.qll b760b1f9ba612aa29c917a25d75143e90bbdb607d12ea4a49067ab44595292c1 ee0bf075f2b237c1513cdd03dd35666d4c9158dbf1216a30c5aec05db9e6d317 +lib/codeql/rust/elements/BreakExpr.qll 526da383194cfc0600ba623182ef8e984b44da76609d335b209067b9381e2e18 6d7b6e970b69f093be5015e847512830937e79a2460a6c49d286cd5c8ebd350d lib/codeql/rust/elements/BreakExprConstructor.qll 48b71a034b7b6b0ecda47c72379696c6d4ebb9eadcd6403f9c001945855c5365 fbbccb6d1718393ad6ff3a2bd473dd51691c871db9181cb1e041b318f91d27a7 -lib/codeql/rust/elements/CallExpr.qll 7b76acfa945d7cc04bab4012fc8476f8e4f9970b7051ea02fe5b12ec57927897 57ebf163cd6db203f5dd05d629f68bc4e39666ebc4d1252ba1e09b88ffbe60ef +lib/codeql/rust/elements/CallExpr.qll 68f43b25fc38d3df4909e9b1a44ace18a143db480d1d4c30c98a724ecddd8d94 199356b943f73828efa9b116ceb3549daa7743678122451bb306c4e26abaf184 lib/codeql/rust/elements/CallExprConstructor.qll 9a7e9e780ff6604ddf0b9e5f27bfa43b720bb341673c7740148561c666ccd066 945804ba7c1dbfb9f221810be9d2fc3dbee3ce89dd9d08b3f3e719d31701ed98 -lib/codeql/rust/elements/CastExpr.qll cdd74a040d6b1aa44f6e2bdb2991e642f013848f32a17588291317a7abf38961 06f3228ac826fc452d75505345707b912426f05db78380a72f0ba586fa00c282 +lib/codeql/rust/elements/CastExpr.qll cafc39afc4103781b475906a0e178175b32374a04915b59d84b753d3c1e71544 1cd95a62b3e3983827a7622326110071a839595d1e6a76723f8072ac6cf32f02 lib/codeql/rust/elements/CastExprConstructor.qll cab6e9a9872006cc811620bda522fafde23fc4edb5151af06a5a0938747dbdfb 6d972faff70166c4b07392a0bc90c6d72c9466b58b55e7651ef6c3d06cf72873 lib/codeql/rust/elements/ClosureExpr.qll 2a8b0a94e37b8406acee038ae0737604174b3062f3c12ecea27a3104ded3b2bb 904eed60004ad20c0d03965f91e1d2227cccf3b13ce29341c79d545aabe492f0 lib/codeql/rust/elements/ClosureExprConstructor.qll 238dceb78082a5566276640d4aa31484041700852c0751130d139a69ac8bde46 7aae22930def4d438d742255731cc59b78a95b73a0b1d6334ae9965e083e03bc lib/codeql/rust/elements/ConstBlockPat.qll af7f5f1a8de38266a12e92dee4a5ef5279baccf542cf2c52d982ed075d3bec27 1208223d97230a90d9377164b61454dcc6ca0f46a408e4a5ab2a82340bc92eb3 lib/codeql/rust/elements/ConstBlockPatConstructor.qll 04aa8b4f218ce87157f0d6b10c9c04660c34c90af1f121b1432402de2e5114cd 34e2fecbe91ea9ac1626bc27121a7d5abe99855e3f49bdca12a1969b42ac0ba5 -lib/codeql/rust/elements/ConstExpr.qll df129a4a1f65c07076e15097571ffd12b91a63d3ded97bb3173b50a7f1279bb4 dd3b7a5230baf5d1a062d49324eeb6ee5a76f156944ec149da8bf46c982107b8 +lib/codeql/rust/elements/ConstExpr.qll 70a7c9db14efaf290a77401eb04c439b24ed77c21496cee53b89d92d350daeaf e3f98ac4dde94a4dc8d6df51ba4ecd4acc492d9de569ac3eee9dd3bc258bd03d lib/codeql/rust/elements/ConstExprConstructor.qll b4c96adc2878047c36d7ceaba2346ef66a2269b5260a56c3d7ff6e3a332bad75 ce15bbfd1448e47d3039e912363efa607cc2c29d44b8248ac91c307af7b57016 -lib/codeql/rust/elements/ContinueExpr.qll 46635ab257d8cc8ab3ba4b6786df7a2ff4d2e6360578bebde8bec1d6ae90b8c7 a0c60fb018ced67e1d6eed1c493b2c6d729636f1325b556ed5bcbcff072cd8d7 +lib/codeql/rust/elements/ContinueExpr.qll 6d123e17b40c8512e8abb63657ea6ab4cf3fa2485f503b6d750ec00dd5bb170e 5778fd7bd6ad44b6276b36a85f438c303b11bc6e995ed1cc92b9d51536725710 lib/codeql/rust/elements/ContinueExprConstructor.qll adc5c5b4fda5dc5102cdace41c32a6c94fe07a2e2555ced6ee62a2d2551b90a2 9dc5045b0d91a3a28cc1c0d59c6fd40620257a6c18ea8480792183c4d802fd8a lib/codeql/rust/elements/DbFile.qll 056d363e1ba5ec08cacb2e90b8a7a3b47f52ded5dc2289edd4e85921fc50f37e 18e6926f77265a3a6319ca2f3bf3d529d17d46cebdd2ef6753357fdc53c22c70 lib/codeql/rust/elements/DbFileConstructor.qll ea93dc49b23b1c6d800ab9d0b9cacfa9dc661bfdb04b9e6efcad2bdb050fb0ab f7a891b1786604eee57a784733555b677e2580770d51d18073b59e7ca65df1d4 @@ -41,12 +41,12 @@ lib/codeql/rust/elements/ElementListExprConstructor.qll 12b06597e0700cd0eac70e42 lib/codeql/rust/elements/Expr.qll a0c2cb3ff9628e5dd1a7900d2413390faa433dcef114bdc85279a3a2bf2fc4d8 a0e8e5693ead91b62da5531e070e11a2105ee49046cb69e63b8747eeafc27651 lib/codeql/rust/elements/ExprStmt.qll afe41d6d05ed9d94b3c8529dad743bdf3e2a0e68bed84a80da4dd6df0257451d c1f0c7c1a3c62baffb7d3bb69cc4bc828e6fbbbabe8f87342ec67d8744fcbe7e lib/codeql/rust/elements/ExprStmtConstructor.qll 28e37020abdfce5a8666b0c9a3147c339c7a90d9de527f97fc7d36df2bb921ba 5333db932a2edb791ec3c8f2c215f4c74e825a362f45ee901949d81e328bc7fd -lib/codeql/rust/elements/FieldExpr.qll 1e3d84c3eeeeefa1837b5359f7289c0f03122848b6f95fdb362cfd947304e107 28a6f8201b435b87705afcb8088d017fa699f60be3aefe03dd56f978ac7954d7 +lib/codeql/rust/elements/FieldExpr.qll 54b2dac331f4de45c4520e318373805d41f63d45ca695ae618c8f42d30f38d5d 2f87397d3cfb07763e287b0bca83d625368ee2c6f29f8fff2de509d5696ed27b lib/codeql/rust/elements/FieldExprConstructor.qll 75bd0526fae157460750f3ea1e087c857cc703fca03d34f1f478b57ee8051590 1e5555910c643235e34b73f9844e894e51f357c3f7aba8165c47caa147336c53 lib/codeql/rust/elements/FunctionConstructor.qll a9269b37182c0bf432f9b2b015691da5dbd64819b9bd25445af229d873014a91 69107a7503af14a51e091e6918094a4e9fc316a72de2e1514f001872ce0f2c0c -lib/codeql/rust/elements/IfExpr.qll d5461ea0370765b9dd0c5aae298e53c9b3d84bacc783991fb9dceee44c87e8fb 90c5f959144c767bc8f10b322489264b076c33f19af0d19e97a08d083f76913b +lib/codeql/rust/elements/IfExpr.qll 87d29f7f6eec05e03d3e929e32b526787f41d5320141bfe96028973e15ef225d 42789266b2c54b222c1d980f85e3150c80397668e61c9952df6905f1bf0fc4b0 lib/codeql/rust/elements/IfExprConstructor.qll 961ac42fe811db7c56c9d85e98724a87571e8543265c0424a7b61f26ef41b369 43d9412a22908a7e5c38f1f5e8f88162367407b71037f469dfb7d8dfdc3a063f -lib/codeql/rust/elements/IndexExpr.qll 0729277577ffe82d6dbc8fd275a70de59a3926aafea730e622ecbbca7b84e313 c9bc5616664e072fbaef2b89d4047f5f7e28d002cca2fa17333f29db80adb284 +lib/codeql/rust/elements/IndexExpr.qll 924fe6732ffefca376d099255e2eb6682cabd6cb4267dc997fcf85aa5478a3a6 09e65b09cfdb928d134d3aad17acc07602a0bcbca098d775028bcb7624f16b11 lib/codeql/rust/elements/IndexExprConstructor.qll 37e70c773123d775b6281514a2727e133e02fa87e774076f857a676697a1f2ba da2ed2819a13ab7c526b74c1c375ab2fce63ed17f61d5b29e4212343d6b77d06 lib/codeql/rust/elements/InlineAsmExpr.qll 5883542b068a11c22917bd46e44eda2f5e4a9de67f5346acfaa2334f73ee63ad 9a8823c91daff1337aa60cbd6bf3b6e96ad1e8603dfe79dcf404636de2693a5f lib/codeql/rust/elements/InlineAsmExprConstructor.qll 5a3eb5162805366dcc2aea00714c1a0880c31b614b73b69f1638ff4f088cdb11 89c54b68b0246fe5d86f119c1892149746d7fe22d6ef8b625c9ab64398d19d26 @@ -54,7 +54,7 @@ lib/codeql/rust/elements/ItemStmt.qll 70fc3f9df9794dc78199dfd81b8136701d4ca0c9b3 lib/codeql/rust/elements/ItemStmtConstructor.qll cd27051f73ab2897b1f7a725313f97d36507fc9f5e0dd7b2ad8bd1caaf8c42ad 67596c97386fbe6cb9e5e6abc45b674158f411d927297345cb25359587380bcd lib/codeql/rust/elements/Label.qll f48209b24876d581e95120bc548c44033b6552a7875eea73ce44aa57b675eeb3 d17163f3adc9f94a462269f565153aa2822533d03487e521d9c5d5e72afaa1ac lib/codeql/rust/elements/LabelConstructor.qll 0625a149cb34b9f603b76efd76e679bb63808d47f9fa529959784347d8e7d447 2115bc7de878af444777f96247bc0a775161f3766e38c3c4d363c2f59b2144da -lib/codeql/rust/elements/LetExpr.qll 986598132db0cbc861adc641e633a54b7651ff5f3bc52b5e2f4e84733b774fb5 e61ed80a6732fb344498c8eedf3b787546eaa38f203265e9a3195e93d3534a19 +lib/codeql/rust/elements/LetExpr.qll 49a9ba97471d04d52bee73f9b5651bec09fae40c5779db59d84b69a3e04c0a4f 682c504fb507855c96833677225c4ddafc20dee75f8203e0dc110aeac89fa2f7 lib/codeql/rust/elements/LetExprConstructor.qll 8904b25d70fd0e6f3db74d2e09bb3e3fee407282ee45030fdaeac31b6111db70 36dcc877f6c1810228d593d914cffa7b04ecf0afe13c4c122aca72f33d03f566 lib/codeql/rust/elements/LetStmt.qll f9e28ca0123e2a6e1f6115821282440397cf2647577b4bfc4d00cbb4312d8eea c65442707090461035160ce830c4c0a85d1fe626f03026c13ebc4be06ec96905 lib/codeql/rust/elements/LetStmtConstructor.qll 5882f0e4379d07e8281a955c9eed7dd907b610750887de3dd6451cd1c8d104d4 68b0890d8a493dcca74190904b00f05b0e58aacfe5a2aa63e5ead1ba366d3c38 @@ -62,15 +62,15 @@ lib/codeql/rust/elements/LitPat.qll 539b414883b0b86ff446fa81254f2c71f467e5ea0bda lib/codeql/rust/elements/LitPatConstructor.qll 1a1c5f711b04bfc9b8b9a197564cc8acfeeaff1a9c8b30d57657747d84138fce 19cfa7386fd1f4ad8ba1ffe8b14bc547b9884dc98e731b6935afd11ceac6b5fe lib/codeql/rust/elements/LiteralExpr.qll c5abad970feff4cb2719cc4774aedcfbc494a68fe15e13c36eeb2516d26a88cb fdb399d9a6162be54c3cbdd83654b9736faee9b15aa111f1bbd6f333d332c87a lib/codeql/rust/elements/LiteralExprConstructor.qll 1a6aa25d6700ab9c85bd7b721e4818064a3a092386589ecdc2018b8b8c2464dc 6d6b50e2dabfa671110454d64f0903336563ee4be1dc6751071a801ac2fcb8e8 -lib/codeql/rust/elements/LoopExpr.qll 6596e1d8ef1e9479785871321021930244dfb7736111801aeacd08446f4d2238 5895e4a5d4187fcd852528f0cea99fa378d60d279c7896b221eca8e65109fb96 +lib/codeql/rust/elements/LoopExpr.qll a32330e9f6c5420e7fbd4a61f53dde892c1acadabef074b7e9aa3beae39617eb 97061b3dd86af3ef271587aa337d10f2a7094cb69d7e339baf13e5a7817e1389 lib/codeql/rust/elements/LoopExprConstructor.qll 635348fe22fb47c7e59bed02a8ed6420be5a9ce92a7d9bf4475465ee170c917b 2bcfe70247c55659b3a3e09562da52fc645cc3166748f268c5a38b35fca24233 -lib/codeql/rust/elements/MatchArm.qll f91def96700dd8521c11aef100f494d2d44777186e771b306ec9579b01c882af 021b298096cd88d3de81c2c012102e5b5ce5159d6dbca2bbd32b266593df335d +lib/codeql/rust/elements/MatchArm.qll 33c3d1d149b654f64ec8930aad77605d82ac542412e55084cb2fa914bffc5258 433221b39bd6365a868a5d9fa2d0b5f112561bd691fda98d7d2cec36c25be292 lib/codeql/rust/elements/MatchArmConstructor.qll 49d134823a445a1ee995ebf5637fd0d736b9ab7f2b141026712f231ec4ed3389 f16e8adc8375e6a7334589d5732dcbe10f5ada9de7a12c549c55be3f028ec628 -lib/codeql/rust/elements/MatchExpr.qll 87eea89af08e7b9e4dc958aae0d35035fa8cee5fa7108f59cd0d3050dc70eb29 ceb061ce32c20c9aa12e6376474ea1ce1b8bb9c9b0e58b67abeb4bb666a18676 +lib/codeql/rust/elements/MatchExpr.qll 201ce069a53c70065ececa7005d9b03db34e78b0ff29c22b6f84349097f04f38 94fd75c60941d970aa637d9f3b4477ff6d04793966ffccd306bc25e1b84654f9 lib/codeql/rust/elements/MatchExprConstructor.qll 74df937d7d8bfbfb02bdbf095595eb3f2129ed4c0854bae6d73b5b38d4fc902d 5c388c02f02462d843945111b72de12bce33c7c332d55993d903aeb250213407 -lib/codeql/rust/elements/MethodCallExpr.qll 2dd115a2e5ac298d9a81cab2718b7abdbe52825938ea88115913c82a0f2f7751 9733c353b9e6703ef812eb8b6395db49d6d656460c575dbd75d67fa96784a33c +lib/codeql/rust/elements/MethodCallExpr.qll e92c5214160d6b5bebba76c78f5ec0380a629230991513326585c99dab7be1f3 ed05c7f40fb6d1c97fa0a3a631db1913b8e6abb5c2b3513d0e81a82a2e5f7f95 lib/codeql/rust/elements/MethodCallExprConstructor.qll c9e1137ba6b76eabd941ecaa27a5b43b6fc3ff445ad46d3f625ad086de0e0af6 47bc4c30182b891c7009ba536edad7393dc068b72d9dfc16b26174b15d49748e -lib/codeql/rust/elements/MissingExpr.qll 2158f064d027975e3faba6a858b8e469c324544ae0923319b149fd5ec6548448 500ef109ceb36f5da72040fc733c7e98f94920f51d53d90fff3d86f85da0aad3 +lib/codeql/rust/elements/MissingExpr.qll 30b04d6a7b67acbce40dc1ffb95edb833578fd50ac7165213913b6c83d3181a8 444fb33c01ef6a311539f5b8a3159034aeabbf0284d192139e64c3e66ef0a18a lib/codeql/rust/elements/MissingExprConstructor.qll c51f4f6e897ef2107a27bd91ecf31ce875611b29a5a12238d5312b9489a35b8d b9ea3fdae459aba6c7ed9eb48edbc5bdbdb4cb41220fff81ed4cd256648612e0 lib/codeql/rust/elements/MissingPat.qll eacee2eaede4adb8452a41c14c95c310d0731c2c60fdb818b3e94e34f418aed4 9f81567e8e9c02be0994764a082a2135a6bec952456c2413295f2b0a16e5eb5d lib/codeql/rust/elements/MissingPatConstructor.qll 7bff2fb7fe96388dd703cca5f0bb1d04cea5d1f0729bb54c6604b58e338c7d6b eec9fea46593b3850da111658848cb54cfa9992286eeee313a55def184cf7ec5 @@ -81,29 +81,29 @@ lib/codeql/rust/elements/OffsetOfExprConstructor.qll 8034eb1d3510dffe9e38cdfcb57 lib/codeql/rust/elements/OrPat.qll 9b5cf68d55c57c262a5d630852ff2e842f0caa3aca2a0b4491d601340917db63 c965eb43675b135f3ce11c1e8762af0b764c6d4c262f002f8b9a512ae59e8a03 lib/codeql/rust/elements/OrPatConstructor.qll 9a24cc095adc55ae8ea66f68c695f42de0181a43e23d70e210c63351b47e2586 1f773ae88276289672d93708f4ae9f8c95199e7370a0c610a52c92b5e018e632 lib/codeql/rust/elements/Pat.qll 197aa86d5f317669e38230a20460b271c1d82e830b84150dac65afb67059fa2a ed3e8c74e42ffd5df14dd88711d79660982170a42f9a605704a274298dbbfc41 -lib/codeql/rust/elements/PathExpr.qll 15d12b039c117e78fde972b098e22ce247e5a6df4f52685173241d76f6c18368 8e8222767d49c022b6a69ae8902e86a5be9ac3803301c6c9b409f265546da520 +lib/codeql/rust/elements/PathExpr.qll 99347a5182ad513235052a65507e4345631da0f1156465e2a54b8e78a1349bab ba55817dd50006d4041653456b866d4645d3ffbc21f4b6d144cbfa8855054ab2 lib/codeql/rust/elements/PathExprConstructor.qll 9db3d3ad160d897b65b8b8a62f3243f7ff80d8e2d27875b3cd2c2b046fb0f9b6 26c2ba19a04fba61af8aa0cd72602f7b02bf0e1b693ac9cd14c7ff6066412f75 lib/codeql/rust/elements/PathPat.qll a49036bca0f3f023917fec3547876759987a34747e16b9a15ebb99c82ca9234c b4f77e6e29300f02cb845ab79d4a64edb654a398fe3d6c1a2306423e1c0a237b lib/codeql/rust/elements/PathPatConstructor.qll 476a38723c63bbfa2565946725c90f1224ac2c5283fde79bf14dcefce6f500ca e9e9b000cac44851772bd9ca519edc89e8518e89a0930df21af14a69f5b0e864 -lib/codeql/rust/elements/RangeExpr.qll 05a56b149adf83006243335be90c23eca71e981aea33c2d81dc8ad5cdef757bd 602bc5ec0ab5e7eaf9f1debbb80d2861d53b6de5d10011b50fa71208a6491cd2 +lib/codeql/rust/elements/RangeExpr.qll 42bf1320c3060b6d225e7ece9bef54f3d823704a6aedea6d8af594a0fa676134 03a84ac76225e2a6172f6240af21478ad3f978b03a1b9e3fceba39fd0bcacba1 lib/codeql/rust/elements/RangeExprConstructor.qll a04153bf88dd71c3f516418bdb7377ded9db21c07f7ee6dd245ed8b44719d8f3 2d578f8dbc49da98694676d6a59bb9d58c6d2a200ffc893ffa90dca77878e38a lib/codeql/rust/elements/RangePat.qll 02f3e4647932553481c4d8b1e2d2da3551662a17d75f26f2fb7e9d77ef1d579d e2546bc74035d03c92aa7beab2abca73a587049c95710eb9b59f916363df1552 lib/codeql/rust/elements/RangePatConstructor.qll c391431118ed6ce16f7b7126c5d43e61f07b98fab7b8bc48e9dfe22f7e21ed19 bbafe1c9595b0b004f7b27999a14df27d0710d5b058e7ab14dddd2fae058fc31 lib/codeql/rust/elements/RecordFieldPat.qll e3f69b2c59d50807393928ef9be0b51af016f209cbae68cfde0fdf02b287f353 b24e256f850d1f0bbacea74c4879fee8bcedf47f65db091d7858302355751fa3 lib/codeql/rust/elements/RecordFieldPatConstructor.qll 36859753aa70086c540a1700495fe6c414521553877bfdd56800f586eb577743 1b31233a5e6da0bf88aaf40c52fa08cfbca5b44088cd3f91957ce8c96f4aeaea -lib/codeql/rust/elements/RecordLitExpr.qll f5c0377f0a1805d824052acbcaad393ba10b0f994a5ea6b6f60b5eec2c417c21 e61bb3750d19dad5c4e59dd0bb3a65430879f58909b735f7c28f378cd2217221 +lib/codeql/rust/elements/RecordLitExpr.qll 5dd804785e2bef9decee1aa1b4512dad799ba6b8e70c3fbe65a9a7bca029ed87 875a6b37072010496974a36b535e8ac656928b504b9b9488b31f81108a25102e lib/codeql/rust/elements/RecordLitExprConstructor.qll 7b676a8e0fd9ba5a932988e613fe3dda8b6b0430feed8791ef5585fd9cd81767 f7811928dd8269138d75f0a6dd1c60f70d18806227bd2caaa5cd4cc1341e9286 -lib/codeql/rust/elements/RecordLitField.qll 27bbc256f61f4428578155da47b1a1b3eef43fb5d4d98f168c66fa85337bde24 880aa885f2ba3d1866c6023360a206dc5095385adb908e953ce792beae90b2ca +lib/codeql/rust/elements/RecordLitField.qll 09cabffa00afa3a1e7798b735828b613b2c6bbc03c27c1b3229c0b4ee43ba3be b1ec3a53f7370b2702d042b78d829bffd35b738365e93b289f0f30313ed9222a lib/codeql/rust/elements/RecordLitFieldConstructor.qll 0f83c9dc00937d90ee0d64d157458145078f5f3c87c9c0484600fdcc830ab207 e2852d5bc4f0174d94b90a2ee34fae1e6c4b24d5d8ccb58a51c520b12adf8512 lib/codeql/rust/elements/RecordPat.qll 50f4a2401dc579f3900188043d412ccdd6c57c1da6636c105221cfe243307d32 7812f0e10ce1a8e70c8c45d0c87e52539f6b29469157463456d06c566e86c2dd lib/codeql/rust/elements/RecordPatConstructor.qll 93c794efa5050b86c458470224de7f3206c1a004b46ef374780f080a8e9a4ce0 157800f342de96095e118dbcfa20f8e65cc79ccae712e8e37bff1ba92a227fda -lib/codeql/rust/elements/RefExpr.qll ed47e1a834f2af93197ceda685a368465f7eea59704c2b7df3ef59326e53c0e1 5676825b036eb4cb560238d86c8d1fac48a4e59d91110da0dc75eacd542bcc8e +lib/codeql/rust/elements/RefExpr.qll 4c3176d24c52d61dc220d0ebf0c277126975a7e4189094c5f36e0d386bbd95e3 dd143ae809b9c3cd1ca20e8ccf2ed2fa79f0b75d3ce3d92de5e88dad68bf7fed lib/codeql/rust/elements/RefExprConstructor.qll 4a2b9dd4ec2638a5ccfca268ba377980aab3179b27177e34e44e0e9dc6653b36 752f6f298369b8c0f59d49ca9e729c20aceb3559df68be416c7bbf65f578489d lib/codeql/rust/elements/RefPat.qll 00b2c32e09a02b336d516b7812aa7ffe6202bd1dcdf4ec2060a74ee7a4b1c5c3 90a4b3da60aec10b5d56f6364d0a022c1d7db5fe8cbb65a78f55651d23f9abe7 lib/codeql/rust/elements/RefPatConstructor.qll 98497e0ef76bec0390a23aede2fc6f80050ad2d00bb60f1d473362111a53d4dd e4fde4e3e88c33daee90ab6d90ef2e38b36faedcfe1b6d6304f4eed92980b5b1 lib/codeql/rust/elements/RepeatExpr.qll 24ae3d83a83fc40bcdc6ba5c397a31da388c9137308cecce7da6fc8ac622031a c8114ad0ca7197aa791ae76d1d42b53ebd6f6b98378a779c59727d4e4ec5dbf6 lib/codeql/rust/elements/RepeatExprConstructor.qll 7e141ed538f1dd5debd83de045eadc74ef032acc8a64ee2e8ac760da60ede525 d20206b72b14d03f8a41571948210619ad7d7dc438ba04ae45d929776a11915d -lib/codeql/rust/elements/ReturnExpr.qll b36dc07c367af16c5df6276b10e36d85dbaa500092c555679463f8db817bf6a4 4f95cc9d88bbb8403e35b270897a1ee9ddb4c8bef393b06d7a014d914ca5fdec +lib/codeql/rust/elements/ReturnExpr.qll eaec617f85ae874a9e49a55b819bd47e672ba030f3f785ead54829a8479db195 1bb27640c8b29e099e39eb70fb095bf1dfdb7ff278f884dd71e3488a11e63dd6 lib/codeql/rust/elements/ReturnExprConstructor.qll 825501a55f7b5556ded49fc3c43d45b7d8325e3a1790a2af738a46df33b569a7 ef06e95f1919952e537027861660a4d7c79b832fdbe802bfa5bdc29ba0192f31 lib/codeql/rust/elements/SlicePat.qll 3e88657bd488dcb1ce2fa6f4bf72a9f76c7bfbf64b695070efa0ad89a6af407b ad60e3d0eee368c21c46acb439b599d8867c82193c7279777fea10f3205bd272 lib/codeql/rust/elements/SlicePatConstructor.qll b2885e663932f68ffecf87b4532f533e9177beddd715765474f454a9804afc8b ade153522a4773eb769f4f4d96fa07add34089f131b41a74534b28fbfd2bbb60 @@ -116,39 +116,39 @@ lib/codeql/rust/elements/TupleStructPat.qll 50b7d89498dbe6737d97325037156c7689fd lib/codeql/rust/elements/TupleStructPatConstructor.qll 15a15362572ac2dc98ed3257f195f20bb8dfe34a1fe203cf2a1a193ce16c406f 9e590b50cf865f6bc573b6fc17acea073f0d9389be241b01e820d9f3f8f14acb lib/codeql/rust/elements/TypeRef.qll 223844544eab3e07b6edda805c6344fa8b486aeea7bbe62e4b98e235ce2008d8 7517748b0e7a57c925168f5ce7a31ecc1b59f7521a2095578f599b8d9045a4e5 lib/codeql/rust/elements/TypeRefConstructor.qll f8b2e5ef15517890a8b2d56643f471ae64cc74c420187049e33b182417e72e4f 683611e732b842756e301a77625b385bca0c4969971020c9e11220a1aa665a29 -lib/codeql/rust/elements/UnaryOpExpr.qll 32e637510c03653cc28cb9a25a2873e9bf346aeb63ad2d7a571bfcbda45c59ce 044b22dd35491f9eafc6488fff5bc929aed12e2f36ac55883925c876978bf7cf +lib/codeql/rust/elements/UnaryOpExpr.qll 9948297ab5799279738499586e4fd4457e7770db8f33461d0d1c3641498a268e c637101ddfd1770ed0e47a452b2fc4d210ea6f61f36ea968c23a8cd3032c4884 lib/codeql/rust/elements/UnaryOpExprConstructor.qll 43db7afbd3535b7edc801d99d772233a734f4ed31eeee2ca74e7ab26cae33e87 7345f8d4cb958ee2fa83d3634285f12829bdd1cbac2697236d6fae062313ab6d lib/codeql/rust/elements/UnderscoreExpr.qll cd49049149e268524412a17394daaef696ddca63f1f452b369172b9643e94d82 228568c12efc7c055f2ff7cc08c2d0ae150f6356f77ccea98b7f8be3d6bb4806 lib/codeql/rust/elements/UnderscoreExprConstructor.qll ea9f93fa6529ec4e5bf5c4a98959b2e013e83fce4a74ebfc476b10bce2b331b2 bc36b62fd4fec6fb388d82e2af2aafe0099138d54b7672be81e84fc511fdcc8f lib/codeql/rust/elements/Unimplemented.qll 60387a9def0ea3cb9534311ace088106800af0acb89883c5bc9b26d8d8d61718 9d869f83e73915bbeb5af27ea30b69f20c344cd7d7f253cb7dab74de20baa0a6 lib/codeql/rust/elements/UnimplementedConstructor.qll ee024d4944aebe619ee3ea0ce4f84da0f4fca706baed250c8a65464a8d77979a f95966e3a63cbf2b466241f55bb47c23125645fad206ebd758236465afa4f97d -lib/codeql/rust/elements/UnsafeBlockExpr.qll d708ee1e3e238fc0bc51b045d8364a1f0fd174570c1e6416242f79655d1c1e38 8f67954791bbe9e127ddd4ada533ba97f5cfac9894a979410366b6747fdd4519 +lib/codeql/rust/elements/UnsafeBlockExpr.qll ea7fc05c8f25b99205c098590329465ff9db9293b7d72cc41054b6c4e28ecb00 d617e6873b62ca2871ed87ca2435904da51cbdba42d46a2d160440b11f14dbbb lib/codeql/rust/elements/UnsafeBlockExprConstructor.qll a089d89cb8f9542b3ee94c8eb7ca9ce0ced08c954802b26826f6aff12f8705dd d3919a40e13d97c48b19df647851f120b667300864d3a2178b1b01236c2dcbd4 lib/codeql/rust/elements/WildPat.qll 9791bcd2b36516da82a81c10655fe6b4ef0f788d548cc99cb88578dd9c1278f0 03c192da4f92db637001854f904f5f0ea7406b74c02c1ce26cd375d9cfb26108 lib/codeql/rust/elements/WildPatConstructor.qll 538cde83119510e0b3fc9728127cbf980d17f7f4a9371b4572de26329ab08341 66b96aee3862d5c314a2fbcc6930258f755189c4359394b432e8edb13a9d0eaf -lib/codeql/rust/elements/YeetExpr.qll 04a1f4f7b2bb697e30ab284720ed30c0c8e1377cacf787383518da1e882f3bd6 277a751f38830e92deb0abcde9cbd124bffc84b7d5a1bacb4f1844c6ebceb2ba +lib/codeql/rust/elements/YeetExpr.qll 95a15d0ae79b9cad126700c07d5cb7e4e9699e2e5d11a926ce452588501731bb 848736c361d420945fbf670d6c126d258d095f7f8509ac1cbc949f5ba280f851 lib/codeql/rust/elements/YeetExprConstructor.qll f1871c6e0c966c52806e370dbe2956585bbfa1dcf0bd7ebfdb2bd39b7cfd0d7b a2333e80a325a921a66c34151401da12c250951952ccb0c81e5102dc62299503 -lib/codeql/rust/elements/YieldExpr.qll b0f238ba2e4b83b449b44224d766b6cf6b15523a413467f608f4a711d34edc01 355fcafe43915d69a07725ec3707e66abfefc6157bd7dc1c1fd846a965c6580d +lib/codeql/rust/elements/YieldExpr.qll 72682ae19d37abd6ec26569ae8f575979ebba1e0d373898211a9af4fad4979a1 ef0193011ee5f94cebbac5c007d652568f560685a213bf8be96cd0c0983a3880 lib/codeql/rust/elements/YieldExprConstructor.qll ff46ba17cc24abfcb0e310c7458d0539b704e7a771ad00853bd3a1844e4e6f82 1c13662ef01c88f1cf057d099eb46524036133e51a0e36ddf947f727ac6046bb lib/codeql/rust/elements.qll c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 c0e6bff934b1925ec03e55afc2b5b9127f51dc4a613e047e687bc83cdab4f196 lib/codeql/rust/generated/ArrayExpr.qll b9778720acf4080c065897ba1471be185c0c35f3ea01c15594c0a3ee4029b231 cbc8c9dbcb805063c4b893e21ed0bf00312490a0c92ee126d49dbfff6978fa99 lib/codeql/rust/generated/AstNode.qll 0598fac7859906f4103124270dfb2fbdb838387b1c45000bf50a4b62c797ec41 f47c84878c7c9676109e358073bddab92a1dbeb4d977d236ecc1eae44d81c894 -lib/codeql/rust/generated/AsyncBlockExpr.qll 1e9d3bcd5d5703bf61748f2746d3f9a4e2a12080268b29a2685b762d13c30555 1e9d3bcd5d5703bf61748f2746d3f9a4e2a12080268b29a2685b762d13c30555 -lib/codeql/rust/generated/AwaitExpr.qll 4b5fccfee29fe28dc85df19b4e6677bf565dacba92a0984bb7ca444650852970 0c0be7ea53e41c7708aa84b93d037fa9df2f72e5a676d78e217ca006f21b548f -lib/codeql/rust/generated/BecomeExpr.qll a4cde707b7372dd4c48f9b4a450b6ea710085f323878fc17c58f92cf7d50fef9 44f0fa714080eaf6dfe9fecc422b1aa161375b73eb5536ef8bb40b793d8f48ab -lib/codeql/rust/generated/BinaryOpExpr.qll fe0a286df10f5eaaaba60c74dfc5ef2c17736f24aadb718271e8a17eae736ba1 1f13e04bd6089b956db807e5e0ab974382ef7b5a7271f290a7ae5f75a857a30c +lib/codeql/rust/generated/AsyncBlockExpr.qll 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 4038dd9d888f98e8848de4ab858804bbb6dd835a32e925a9530f350820edaf04 +lib/codeql/rust/generated/AwaitExpr.qll 5a6d94ba4083e00dd971f41be7f32693812cdd7f8efb9dc7ef0fc18296ed560c 7af5433b8e945932a453eededcdc931a62d85d1505c0b4e417291c694ac6cc5b +lib/codeql/rust/generated/BecomeExpr.qll 62daf23501554f0b786adbee8e1d430323c6dac79afb8fdbc28d19dc10bdb3bc b17eac6c775fc38bca90a65caffe1294678aeab92d456fb9b9f555e1ac59a0b7 +lib/codeql/rust/generated/BinaryOpExpr.qll 54902ee8922ebecc3e6c03d5cf31f90a8c305601889b93177f413142c61d451f 56a56b576ac8ec7aed8778b411f7e670b40789fb63a2234d7144b21b5a9dff61 lib/codeql/rust/generated/BindPat.qll 15d3a33c5f56f7659a331f72735f00930fddd6066659e54c5c19d5e7eb8ef078 bc0a916622b2c426b71760caf15b8e005eed276e06e04d04cc5f19f4c31c34f6 -lib/codeql/rust/generated/BlockExpr.qll baf05a376d4c65505d3aa52eb893e1d8d02a8ef8b16bb40d4a59ee10c7d97b5f 789eccc236d0b4d3adf3dcde699a5f3097d333514455776f74b9184aa14fddb0 +lib/codeql/rust/generated/BlockExpr.qll a04d98a1b846a78d5df7c9340348bdc0d4e27f1aebf81ecc389f90010aeb9f39 caa43e2ab10a401af6813218318a970efd60eba23bfaca3210954be277cddaa1 lib/codeql/rust/generated/BlockExprBase.qll f651ce968170b6e05e555924f8004d55b85ff0ae59bce4fea0804691cef0cf66 6ece8056e83d047fc27cdf1110fac166c0d1ba0e26a8d4a7a7cffc05bd6b3b42 -lib/codeql/rust/generated/BoxExpr.qll 880f550a9a6c861efc6310a72830a50bbfdb11982e99f11b5d3f4c6d1fbe826d 380f021014738c86e5745b3320e65a8147ceb30511aa51526a7fab4278a1ecdc +lib/codeql/rust/generated/BoxExpr.qll 939fc9a934c5787e3f3bf9aef8694abe65caeeaeca57079047f6177301e39841 a9563f56abe4fc816f9768735624038e60ff5a075e67c17970a054ffd4d23a12 lib/codeql/rust/generated/BoxPat.qll b69ba2bc341a1bf4c613279e45fb97a530619d4148d5ccc4f05436a316db29eb bf52730243bd1836d5890c745232aba50544c2046d00e80e7d22eebcd104f821 -lib/codeql/rust/generated/BreakExpr.qll d68990513e0b2c0021cccebcdc7dc9ecc1d5b5c7dd0df7014686d6ed8a909940 36875ae186581f10485c1c846c9f6d2bffea3b18375b7f05c2927ba23f08b6ef -lib/codeql/rust/generated/CallExpr.qll 3e29dc45480e3be1989c364bad0ff94deb322cff20e87a3378fc1a7e11237d61 3873462b8811c3e3ef92700045ed05f55869d320ac74eb72111776d3353095f2 -lib/codeql/rust/generated/CastExpr.qll 6ed07afb453706874d7ae7c4bb09ed35ffdd11e7aeb4cbef4d84dad11a203d0f 741d1c0ff092dc9273b0d588aea6b30f7e2c1c5b9d08f2c4722fe26c2cab33ab +lib/codeql/rust/generated/BreakExpr.qll d1cc6452044b4f0351380adc9e46dc52279746d0cfa37baefce8e89494b385f1 c129e16ad176f40bbda2fb1e6af800a5bd240f3e0dca6e2fbc23b75e105ca8b9 +lib/codeql/rust/generated/CallExpr.qll 44cc428b1950e0d560a4e2c18136a956dbc3f85c575317cbf10a0cb5b2dded97 1a5d8dfd704b289774d7190ee331858b39563dcbb2c52940b02df4c5c2208637 +lib/codeql/rust/generated/CastExpr.qll 0264db34cb111644de4d37569791a2c27665f3a7373c26adfdc1d68ab0a6fcc6 3a757ea06c6e0c715d88bf1eeb579998a0ecc5560fcf3b4066bbd86803ffa100 lib/codeql/rust/generated/ClosureExpr.qll f0c7ce7aecc9da9663cbda3e285be73b23464f8baa6b966fb5aebb0bd0f0aca6 685d74b6a94052fc45aff83b7c525a83f9dfcc02c1bf7e7f7a0aed51ce2de945 lib/codeql/rust/generated/ConstBlockPat.qll d0818fe4cee066f1e6d3439c82122942ae62941e69da686b7d5c399e820c395c 2fae5a2f0457bb7106d52ac7457afb597d7ac9658b8dcff8e76294f5fe34019a -lib/codeql/rust/generated/ConstExpr.qll dd851fb049429fe965569beb75957a6a596137b333a6cd7cd588d1c4d40412c4 824825bc46a393827d5df5ae30f622ef2a053ea1f5e338c3b957625a8542cfa5 -lib/codeql/rust/generated/ContinueExpr.qll 436847767d2f68f95d011df0eb8a175924c029ac747daf620a203596479b20b3 e362f28dde0bf3e6ff3b234e81a44bc5026b4c9ed38b8b7872954cca9565eece +lib/codeql/rust/generated/ConstExpr.qll 7bd3d75822259d2ac61bf3bab6a233948617fa09a7a3d48991b643f0c842925d 06785e5b723006a8c51cafda5b8ce3901e0ddd3aeafc0d3c80e61b9389830e85 +lib/codeql/rust/generated/ContinueExpr.qll 452fc59b28ae46d00c6b42dc4b51bd5e65bc92859e769626a6f5b29ff2ec795d 4d7042814fb8f214bf982ad9771ca1a19bbb2a966ec20771478d50927cf1993f lib/codeql/rust/generated/DbFile.qll 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a 4dbf1931124291e0d6a958ae882f8aeef006642f72adc7ff86cffd3a4e9a970a lib/codeql/rust/generated/DbLocation.qll 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 735d9351b5eb46a3231b528600dddec3a4122c18c210d4d632a8d4ceaf7f02e9 lib/codeql/rust/generated/Declaration.qll bbf5ba3792797a829b0032c41fa99d22c26e4277d655099912cdbafb80f0c8cd c4666a71099b21ad5cd83ef6f991ba18f9bef03b3ffbcedfa10aec081d6501d5 @@ -156,45 +156,45 @@ lib/codeql/rust/generated/Element.qll 21567fa7348dccdf69dd34e73cb6de7cc9c7e0f3f7 lib/codeql/rust/generated/ElementListExpr.qll 3f7e9c1f7249f7283406d2e59b00af750b6dea93b284d7f25af66fe4b3345fea d340242d6072e274fbafd6ff2a5455bf53b3b77ed91539e91563d67cf2ed48f0 lib/codeql/rust/generated/Expr.qll 32cdd43d17e8b2fb7c73ec723eba89704d1e853e29d304db5eea3979fcdd2e0b 0b8382b0659afa1bd1d13d0cd492d7fbdc0fd7a5162fa658ca2973bc15ee6534 lib/codeql/rust/generated/ExprStmt.qll f35543fe1481f768eb8abe3fd0d36e2dedf00f0d1adbc31562e6280ef291d0b6 0663097b4b539c5f35dab9b26ab55baee879c7ef543810581347a8951aee46d9 -lib/codeql/rust/generated/FieldExpr.qll 25dd7f15ee3fe1b0de4371cab9df83d3713c1612501e5496c9a15df8d093a755 3c75b0136d1849f6de1bbd14bda4285c52d51c8a6427984c7e5302c05d706e99 +lib/codeql/rust/generated/FieldExpr.qll 5050cabcc1109f0c404a64a80cf8e595088b1dfd9c24364281176400436922ef c7562bc91fd7c3f7305100d146ebc84378e73aa76fd1b36c06e69070105c0401 lib/codeql/rust/generated/File.qll 2eff5c882d044d2e360fe6382fb55e5a45f6ccb9df323cfa1fae41eae9d2a47f 87e7a906b3a1b4de056952e288ddd7f69fa7cb1bd9dc7dd3972868a9002ac1e4 lib/codeql/rust/generated/Function.qll 84a00eb88479efdfe70fe51c3b5cb27ae64a54b48dcca1f2e02f68691b7d907a cde5b965ab27e811f0d24eb4f12bca90c3e8aec3a4c1d9b8bd0023745dfab105 -lib/codeql/rust/generated/IfExpr.qll 7d8e5bd93bb8eda6d5d6551431b0389a2ec5893bd8c13276205d6677856c8341 935bf1be8f790a52e71a6a28456f2f1a5c5cbe6e64bf20fa8602980560899835 -lib/codeql/rust/generated/IndexExpr.qll d44004268aa2e7d79e29133eb593d748beef1d4612318ef469220b3c2252a057 86892c04c59936d33f0cfd5272a04a6ef726f477c2e8f4ef27dae7240af9c804 +lib/codeql/rust/generated/IfExpr.qll 3b68ac5d7741f566081dd8ad028f762c849d02e4f1532267a7660e24335bf08f bcc6b52c950afbe4654ccdbc10d578ca9e134597cc2653daa1832fcb2bef2ab6 +lib/codeql/rust/generated/IndexExpr.qll a8263fb60cb625712b3ca875076994d9a28796482a9fc8fd524610d3107f20d2 a837f66ef6d70dd9ca04ef39d4fff5077e03ffaaf6efaf93e9f6b38eae37b454 lib/codeql/rust/generated/InlineAsmExpr.qll 246c4f255d963f20c8e71fdbd16b4555cb6243820da1d399543205010368ccaa 1ebe22203305195259963bfb90f9928a4255cae993067f6a6fcfbc62069e1b1a lib/codeql/rust/generated/ItemStmt.qll b4d2a06fdd00ea90eed2742bacf0a5781b8ad69e24df794ec075d7305220afaa b4d2a06fdd00ea90eed2742bacf0a5781b8ad69e24df794ec075d7305220afaa lib/codeql/rust/generated/Label.qll 7de504ea71f2847e305ab5ea3b30403cb0aafbaa0eb4cff3956a2931da6c024b 61e3c6a74b573aadcccefe0d4abe5d8e2542b1e5116c95f4e595b36efa3a86dc -lib/codeql/rust/generated/LetExpr.qll 896efc732db1ddc8be7281408dfeaf6f04f29d25ee1240738246e0cb31dfc2aa 14d5add4367164f4aa994cd2ae006e8b5918265dade20b41f363daf9537c6d7b +lib/codeql/rust/generated/LetExpr.qll 377099647451717af698677ca7119436982354d4e038a2097bffe8f34ac5686e 6bd51c497bcf2a684c1e6a2515e67228b0146b47a65e8d922cab54faf48b0d73 lib/codeql/rust/generated/LetStmt.qll 1f8fda11b71689fb1a1b9b25a2ce046c56f36f26cddb354805bd395a03e4db3d 80ad6ea6afb1891a02db434cfefdb95b0fb7d766af6246ff27129dc15cb48ace lib/codeql/rust/generated/LitPat.qll 92c3c0f32ab9d5b08e246231e5465fe18536dee99351f73e158048bb007baf8a 6736a7824e5bdb0cc16de1231bdb5169d2f48251d5917bf2c31a36422b0bf2fd lib/codeql/rust/generated/LiteralExpr.qll 9202e11f56a2c5e99fb98ed784c7ca043c1f5d80680b48ba4ea340dd689ebe55 9202e11f56a2c5e99fb98ed784c7ca043c1f5d80680b48ba4ea340dd689ebe55 lib/codeql/rust/generated/Locatable.qll 9e9685bba50ad2220701f3465e63af9331f7f9dc548ad906ff954fc2ce0a4400 78c89b2cc78a357d682ab65310dd474603071f07c1eaaab07711714ce17549f2 lib/codeql/rust/generated/Location.qll bce4c72988ec6fedd1439c60a37c45aa6147c962904709ef9f12206937174be4 d57000571771a2d997c50d9a43ef1c2f075960f847effa0e80ea91fd4c6b4d6c -lib/codeql/rust/generated/LoopExpr.qll e9304e282a97984e147b92ec7061c98fde238a8691e945e4cb775ccf34c27b0c 65b859e44e83bddb710d4ce9e5ab1346b98eaaa46509671776b75c9e8f1c1667 -lib/codeql/rust/generated/MatchArm.qll 5ad0dc254b6d58ccd856e4235b68ca0226a898c33f1f6b6fe7b48266a01ca627 f519af39f45e820eb3a70cefb0e4dfb541c3cf17952c00c6dd7e59f854a629bd -lib/codeql/rust/generated/MatchExpr.qll f8b422699337324c91ec9c55024630efe114ca617f4f088a18d180df132d5754 13169bde872f533f55aa196d7150761857c593a4657ab34051346dde14e736c7 -lib/codeql/rust/generated/MethodCallExpr.qll 499fa4c78bafbb8f3a6af645c26f1645c9a634976d409493d26d82dddd4b42a3 2dd18cb4868e96e38383c4ae3f8777637422e90b2363bb533f0e9e1c2692dc6e -lib/codeql/rust/generated/MissingExpr.qll 90b164567620c88b8e258fa229633365400abeafa4f4b0fcd1c856efc2f9b206 90b164567620c88b8e258fa229633365400abeafa4f4b0fcd1c856efc2f9b206 +lib/codeql/rust/generated/LoopExpr.qll ddc646e715dced161b60638ac36a7671b45ddd6245a6876d647916d41495faf1 864be7033c093a8513be05691f772f19f99b606abe510f810af5f004596c0c7c +lib/codeql/rust/generated/MatchArm.qll b70dd1934b7190e68cd6f9b2642f6fc67cba7ae13abd19d42f799a77e048d20e 9d544a6e09e9bdc84f0348b7b716e1dfab3bb98063f95938e83fe4264ee6c436 +lib/codeql/rust/generated/MatchExpr.qll d3984b540d7c8e8fda2d99437445f110c789d0c889eca1bd4a38b941884b487d df78f882f75cf443e1a5b21d899559e24e047d5a368dca22b453d8f976d259ef +lib/codeql/rust/generated/MethodCallExpr.qll b94d96216c0203b27eb04c64500487ce284fdcf2158b9b636621fc2d2c93f377 91d00774e94600ba82ae5103b85e1e377b0baef866c7de87c34f806cc4c3bbac +lib/codeql/rust/generated/MissingExpr.qll 9ab4844a2d719d29a95a69d1a6f9477ded0db508f83f3e4f2101847d0486c300 f0706af7d600a4ed1dc253c9e1220e863a58cfb9334f853877b80dffadb35a3a lib/codeql/rust/generated/MissingPat.qll 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 0d8034cee20bacf07ebb9337c797f53a25686a149f163f801916cd6ec5484710 lib/codeql/rust/generated/Module.qll 2a931a4f2cdb2fee00ed83af045ea63d36b7dbd708e58c30445b5610feaae333 cd62add5c31a509f965aa294f44a1607ec7c62e3a9e3fe9ee063b3c814f4eb62 lib/codeql/rust/generated/OffsetOfExpr.qll 58dfd632efcb48de7fe6ffbcb2192fcf95bfabdb407a751133f63a0e32ae7489 21ebb1b3d66849fc21c04083cfa751eb56c55809cd52664020bd61ccfbe5ea68 lib/codeql/rust/generated/OrPat.qll f8fe5c7b83a08dabcc530484a696274930040ea13501ae20f1426faeec67bcf0 f3adb3148890531b698570a48740335983a5e81977ba4ac651778f940f184398 lib/codeql/rust/generated/ParentChild.qll 956f55ac17d66926c59f76d391b75c30767d236b145d6ae402f4308fa22a7d01 dd3cabb5b4a9ba42be60345f445cde18b0d7be934aeb94d7312eeef122e148d2 lib/codeql/rust/generated/Pat.qll fe1c72856442dbab5655eff93f86c2cbce8d69d9fa1f99a0f9203061ea1112a4 d85d86e8b6c48df733589d186f610b1cd9086629180701e017774bddc62402c7 -lib/codeql/rust/generated/PathExpr.qll 3664ed2ad08097e4446b0fdad148118c754f8203541ae588d967ba9d79b6bf21 0d987d2358fe9b42e57585e7ae906de80e9f4ccf7c20e1d9bb7624ffbad96941 +lib/codeql/rust/generated/PathExpr.qll 20bd6a53d0bb6528bc0577c9b9f5da71b680bdc249631a6e3d2ada5230e60c07 7aacd41734ea3da8383f105406b90321956ab1d81f6c50793b1abdb1de918c6f lib/codeql/rust/generated/PathPat.qll acc4dda795bae97626a8d0041538f3ba1f0b591c743fed381cf198a8b04653cb c3deee1b3bb9bd37ae3ed4761d8ee2f498384fe5e1f5e31c0f9b99dfd864a0d5 lib/codeql/rust/generated/PureSynthConstructors.qll 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 5eb1fc4f6a04172c34ae31e4931e4bf1f8b72fbe414c5f644731a45372d13573 -lib/codeql/rust/generated/RangeExpr.qll f499d8c1f260d6262a55c1f3640aaee832ed8c9aac922cb2e05fefbca4509053 a01563640bc23fbce9d33da756bc209fd16155dc76a7fed4ba325979723f48a5 +lib/codeql/rust/generated/RangeExpr.qll 1678fa524166552a36d73cad9d34213309b1989c1e427bc990b5c11a12588ce5 beb90978cea26a2ec9d3e8cc7b0b6a728ae952212ada5d6ad19319120f3218a8 lib/codeql/rust/generated/RangePat.qll 6ec95f6cb9c4bd93b38990bb1e3b89b526624305ac6ee7b94e6fb0a2f3db28fc 0e193f3816a7587d5103dba421bc2bf22b869522353d4e3f43d49a792eac6cf4 -lib/codeql/rust/generated/Raw.qll 48d1e7d642bd2a7605dbafe3929c558560054a4e4e3e4b36925a8bfafb7536b9 3b881e64127e9b41fee7e091de725f5cd1cb1263e4a52c02adb1fb339fe36c3d +lib/codeql/rust/generated/Raw.qll 17a8b5b3b111bb810fd508e45c0777a6dafdc09bf09fb9cde8466bdf85b2fd7e fceb4d13ab3d0ae00637e3d1e24aeae1de173f8a892ffe4ef839105e5ee0e153 lib/codeql/rust/generated/RecordFieldPat.qll 26bed2285d849b9b7ac52d86131eacb40df912db350e423e81fb98c393c08a69 05ed735aecee90901a1bdfae05d9f85d7f6581616eca3a9262fdef6673222f9b -lib/codeql/rust/generated/RecordLitExpr.qll 1d3264446ff57e8b169f1ad6da150b2d457d6b60eda0ff63e2353eb8ef9e9113 f523dd5ce7f4bac0aafab7b27c6cfe766c72a9ee0c92d7a263347e67edf096df -lib/codeql/rust/generated/RecordLitField.qll bc704b56a986f3a399dc9c3dc2b61cca0d40cd389c694b9fe13374780835ffcc ab6b05a87f240a97cc2a8c15bb84a1338ad33ce367619125a8514e8815fd050e +lib/codeql/rust/generated/RecordLitExpr.qll 442772626175d46dcd8e68b84d6a26b869affcc6cb1e88d880d31e7a705c772f 77976fea76b5741c1aff3e8a48eeb07987c3332ab9f52ef0c32caae75ad4f1c9 +lib/codeql/rust/generated/RecordLitField.qll e7442557734e6c99b75bd24935d310e988585e68ffbbeedc1d9c8dbb2edfa32d 5bc6b951327caf00b39504f0efaeeb6ffca1dd67aa88bbf2633f238c6b973063 lib/codeql/rust/generated/RecordPat.qll 5fd26e95dd23b07a847bd28c95a4206df62f7cc22c8d7b3bafa10e902e917d15 e264a96c2af4e2f64a394a119329b8b376d4b23ec6a3fc6d123c5631845bc4ef -lib/codeql/rust/generated/RefExpr.qll bb37b8bff64b0cf1f18de297487455692311b2006c45161f25969e131359c60f bfbc2b67b2b2ec66f3539e4972a947946b29e0ba527042593060eaf6b21e28ad +lib/codeql/rust/generated/RefExpr.qll 917d810bda28f3f4319770ae5c8eb4ae40887f3c97669fde072078d3f5536114 7793027298da1fb787f8823146507f1ccfab046977cc71743045b3c2f3b5da02 lib/codeql/rust/generated/RefPat.qll 3525331e8ba25a8612324e860423a39ddb29e8eb50a9f2bf62e49bf182d64b6d 804efbd32869f92e5515d34852fed6416288f99b0aab95b5be5cb5bdd1eea806 lib/codeql/rust/generated/RepeatExpr.qll 43aff00e966e4550179d756489e4cbc30618d66c93c13530c45b031b9513b915 b91691445e6f7de67d61c787f41b36a383cf36da1a216c18767ac1d2ce5db34c -lib/codeql/rust/generated/ReturnExpr.qll 6160f3a14ff1cbd6a297edae015769f90e8e31201639828d8a9d0d6e38c1ef99 b8c8a12f78281e558d230c6959236780758e9645fe22aca697b948535c20f9be +lib/codeql/rust/generated/ReturnExpr.qll 3d8fffeb6420a35d78f4f2e2e3e4ccf1c8454022c50395be2e8446f29740ddfa cc9dd916dc18114469d2eed9b82f83518af0de78797ad98777b29a5055bc77df lib/codeql/rust/generated/SlicePat.qll b4de6692eebf1205940e04da963adc20a07b15923c3c3a7a512a24e3bd8342c9 ee9b919983807f39d97cfe8ca66b76bdbfde76db02db5c93268ce22cbddf4213 lib/codeql/rust/generated/Stmt.qll 55688c8f42f6e7fd1b871e572d75fac60d0543e38c4be4638abbb00187651d3d f978006a8453137f989249e849a7c935a090da3a9b0116145da80068760e12fd lib/codeql/rust/generated/Synth.qll 03ecd0d7e89aca555d2393bbea8de1cde0476e28fb9f198ed3355a74f1b5c1c8 11855cc446c2d8a77503795a7c395e86ff149ea10d773a6e50e54b08dd438642 @@ -203,21 +203,83 @@ lib/codeql/rust/generated/TupleExpr.qll 13e4dbc1afcabf388c793145cd399789f4014662 lib/codeql/rust/generated/TuplePat.qll 23911b2ac7ee2279df8ef40a6e447437ef0ed62518504b17874a7652bf5e3f4b fc4f6f7ea40754290de194ac55939f08549bd637104baf8dc84ca3938bcbd1f1 lib/codeql/rust/generated/TupleStructPat.qll fff004cce780501eac94fe4b146619a84e02c85cae12ffeba5a4058e8c9738ea 738659f8208aa65d1d8cf601e0d92a90a890d6cbaec51cf04c81fc75a827e30b lib/codeql/rust/generated/TypeRef.qll 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 7cc468c2f473ee13c11a97c4360100376560e8fc42f25a136f1500fe31a31533 -lib/codeql/rust/generated/UnaryOpExpr.qll fd55d4bc9cd1a49d1f38f02fef16771f29bb5fb2512abd18341d56665859d18c f271ef5036410c018f48d6f15b17cb9beaf4111a42fc638ac4ed3db974a5f870 +lib/codeql/rust/generated/UnaryOpExpr.qll e9bf11b289e400b03fa04cf337a6ab8b8dbbedea1f7cfae905cc7b0e525ea5a8 b54fa0d29d357bcbc25ec10ba5b81e1758ba512ccf822fe2d3847fbfac0e3f12 lib/codeql/rust/generated/UnderscoreExpr.qll cd7f615e41562b80d89e413c1c808048da7746fd445f0eb6ad8c5d9996b44d5d cd7f615e41562b80d89e413c1c808048da7746fd445f0eb6ad8c5d9996b44d5d lib/codeql/rust/generated/Unimplemented.qll 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 375b7935b7f4103728ece3042282ae82d19e471d7a9fa58c8cbdea31ea0cb113 lib/codeql/rust/generated/UnknownFile.qll ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 ec9d1a3f15ecbf1743d4e39cb3b2f217aa9b54951c93302c2c4c238c3f0ce595 lib/codeql/rust/generated/UnknownLocation.qll a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf a19e2838c52d702d268ae530f3dbd6fcd8bb28a237a52636a960f225454103cf -lib/codeql/rust/generated/UnsafeBlockExpr.qll 8464597373ea46f6391394f02c4ceb93ffe8441b434e6e71907b0a3369f72d8e 8464597373ea46f6391394f02c4ceb93ffe8441b434e6e71907b0a3369f72d8e +lib/codeql/rust/generated/UnsafeBlockExpr.qll 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 52edde0daa57fea065f06537db05b5d442c63b3fa8777bf55ef2b2106c228ee9 lib/codeql/rust/generated/WildPat.qll 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 8a2cede00ac2941cb94e294ffa81ada9ae6e61d8d8a720ce4f288740345802f8 -lib/codeql/rust/generated/YeetExpr.qll 2b37cf55ec26958cf226885e99d81c8bbc6ece69fbe92d9fcc8884ee0bc4aad4 e371531507311ea8a9fbaac74442fe9994ae85f0acdb79cc870e5318af52aba9 -lib/codeql/rust/generated/YieldExpr.qll 70ca98e14b24f12a3cbfe690417543fdce45b162f241834e2f7f58543aa11bda 40fe1281107317a7d80c7141229eed9c6904805dff615dfd0141ede2457e2c57 -test/extractor-tests/generated/Expr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +lib/codeql/rust/generated/YeetExpr.qll 0e673204c592b6025570098b14e0378a0e0c68d13be9217ce1543f2781667d42 6546ce98d42717d4e6932e1add628591e488d063ef2a79bf093b831645342e21 +lib/codeql/rust/generated/YieldExpr.qll 8f28a069a4a97d17a10b92200766f57ef0d372b88dd650f909167c7b3d643cc7 a0d8578c4f69e042788b7e1a8c066663541f1782589ea7521741d0b801ca0661 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql fae7f09b653698aa78626a268711bbd8336c9d6572ab9fe85967a8bec69e33f5 91dd5893cefeb9fd45dea49962dfee5a373be790f5ab3569f79d9ffa05613033 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql de0941b5e2fad01300b77ac6db85ec37bd85b7d508b01e2b8a332c1ab9f6e787 7f9bdd81447cbc5a63b09c41a7d0edc15f826f7e672c518dc6fca08ae0107639 +test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql 75f59d680d0f559dfc586306af2748c59c15789514a4ebca9f908ccc1fd63674 1a9f952485846fb93fc0afeabeb07845fa5c026520a0542302f971cb6b4d8e3e +test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql bd2a401989b0f452b448fadd8d456dac9c46ca5ffe3775e5ac46e755782a4f20 c1922cdd6995a9c63eb841abf09f575bc78ec0be222062034b89ff63649a875e +test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql 5661cb0d7b2285af31207232de2b685e851e4d70224cb16045bc0221c107de43 1fd41642343791d9b69e0c633ea3318c0a855f51f50062cb58225820a7540d50 +test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql 555112b0180f20ccf917bf83e4b04ab104b194a46fb072ebc0eb3b99c2b3b406 7c085b42741159fb9fcc2debf6f127e9b1a85901068697dc3794085ae732736e +test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql 176bcb2058a63081f2baca1b03b4a0264eede1606ad9396da915963fc00ca425 e4246975686c75b791041ea3f8b4dd428b0f6424d5833ab563acc23da1c77356 +test/extractor-tests/generated/BlockExpr/BlockExpr.ql fd1bc52af4bad96423cb86b1eed02595e139e533f48533299e32b7b45360b47f 021b58c6e6cad40cc0707d0a78fd8c4ddbc529422d3bb9ac62c490b2abc1bb00 +test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b02c87bba8bdbeffab05632133a17d36b355624d7521083cc6c0b02f88b2ba46 91141e01393ec04f4bb1f86373f5f25c837b13865ab540419050e6c547cc2690 +test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql 4de30a1e3c9de174688b8f9af57f72dfa6d9a2e3b3ab1b972ee69342ebd7ecad a6948240014d27fa9af7f56859cff2f8f7b44097f0bc47fbbb91b5be35e11d91 +test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql 6df26e837dc4f8ecf6dda674dfc89b2dce25da5dc3301beba461c5c1e1776201 b4e205949d06fa355997f5a399ce1f7c381023e38be4db4ecbcec676d8ebec69 +test/extractor-tests/generated/BoxExpr/BoxExpr.ql d74e58c16466ae5c08716eb027cb562ed50a96965fcaee3d0ebb64f1c9086c7b 9b01b9343cfa07e76de9ed781a5c03532fc740c8f794147d71815c98dfbcc076 +test/extractor-tests/generated/BreakExpr/BreakExpr.ql 2897243d4fe6e0975f7621cff7a44609f6f0d015e77bff9c73a0dca32e3e7b44 6a072aa7f6ab27d6f6e887e7fe86213668c1bacce6cddfa2b1e65afcc13abce7 +test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql dd9b5ac06b3677eea02bc3204e3b23f212f29c418343a052befd903e622ffc32 f66a646c7efcb326ff70961df623761d342af4134677245e413cb9fc603334ab +test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql e338d2582b191d4ae1640504262d5a0d5ed23ddf850b5adfffb679a057f55e5e f57e618dac8c79d70e520d1508e70032662db8e4fc43b319365e195efcbdc847 +test/extractor-tests/generated/CallExpr/CallExpr.ql 2b91a02ad6f2ba6e200b2797dabda4dbcea08c7c2836d0a1be4bf47a7e7d786c 6830905e8993836f258c84b557f0f044dd5ebb32dad8d74089a903ca0d820eb5 +test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql 0c7e6eb1bab788050c51ae36b954925c48618c5d6fb3129522eada6d911288be 251ae5a7119a2cfe427650c38e7df5d3c0a1711aa7a2ced21f5022798a5088d0 +test/extractor-tests/generated/CastExpr/CastExpr.ql 40308d07046e6cdbe8d4494c41334c7191b377c589cac97776da6377fe0a4c34 47716185cbe23a7bbb6d5e69d737aafd1cad66024ba6600766cf9b7871546db6 +test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/ConstExpr/ConstExpr.ql 644c34489fd7deb3790f9de131d958cd96102d5c09eb3b07bbf5462b3e90d253 025192a0bd742c16baf8b627f3b8216442a74c6497b752dd1207f572743a0f5a +test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql 259d98acb2d237ac630a7f92a26256f1af92372a3ef5b5feaf022b9b42a6a726 bed3e1332d65736194fa758e4a91433785e9da2ddc31d56c29ad27a7df392802 +test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql 0fa15905b4c06382ab6bde50d28804d7b0af4f53229e69fc8038a77f190f7b24 2fb577cb92456371f5f056fed5a07998914a27f560d41da43fc3b94827436cac +test/extractor-tests/generated/ElementListExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/FieldExpr/FieldExpr.ql 6d85c8b85905baf66ae1f6ed716e42530d814f86261d98eddceab861939227e5 5765fb0376978a9006e2dc175bb224c5c944f19ddf628a2b933b1bebf81015a2 test/extractor-tests/generated/File/File.ql dec43be882fad904fab0c6447ca93633d801cb08ff8bec309befde7d2b9e5dda 74e1f1d698558c35fa03935cc34f4c8145d376b56d7657b18aeb338f5ca752cf test/extractor-tests/generated/Function/Function.ql c49434420dbb6fc3d9e6294161dcd3d3b306fae5ba5c85b610e534b8b15ef74c fe02208b673b74eebed92b5cbb3a8a06c31c0681eb28f3e596515663f14fa9e2 +test/extractor-tests/generated/IfExpr/IfExpr.ql 4463607934fd504a6b2d65829d8e336308af6908cf12387fe8bbaa3c8c5360bd 28b5580a4e628286023b5d0de549d087f0a4224ecbb02bc7b3197d8f404b5066 +test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql 4b4f3edfd0ed419fc580f3def6005760711874cc442c42ea817d70053ec07fca f97f65f91aa3f4967a2d3de836235d9c9a15f424cfced79d84f2580abf2c6077 +test/extractor-tests/generated/IndexExpr/IndexExpr.ql 6cfc282e84f9844630ebdb4dfc60f645d18a737d9b0e9f014c08476c935a92f7 86a336ac0193f0d6cc6fc7427b0423867a10323de0f95cda88f76a178c213430 +test/extractor-tests/generated/InlineAsmExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/LetExpr/LetExpr.ql b311fb10d3a65cf682ced02aa4c9b589a84cb92adc653fbe630d471d88ca5f8a 3d93cc0cda8a6f34090d3000fee4a14e31fcf0fdc4d201a8d414e27cb8b9e4f4 +test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/LoopExpr/LoopExpr.ql 58dabe29df959b265fa568cdde1b589d65ca8649c8aae0f30079565c1106ad72 929fd3c5c4f01f47f926c49f1a519d415063ff23d5e1fb2f2e8f72bb5aa7fdd6 +test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql 1febfb8cff9b4f7ba1a658a2832238d2355f0f609778af33a3877e977aaf1805 6b9c008b041beb1c0a7e249b7f4a1bd5cea0885f82543a8909a23a7068f1f837 +test/extractor-tests/generated/MatchArm/MatchArm.ql bf1ff34940f8682e69450bc3429b0e071ae2e31b94699cd7579dddf6126f821b 83329681067983788ac712fd72299719e4cd1ce85cea613e373751e6bed05f42 +test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql 2e99e932536c510e846a51bab4f4e153b1731131f144c813cfadb122d619864e 312c619de2aec0753e4fa66e0500fa67a9982989420a48dd16e75b5a04f01b9f +test/extractor-tests/generated/MatchExpr/MatchExpr.ql c2bf8277536a02691229a1866fb565b2bd2b3ee651cb1d38e1581db19239e0b9 901d909dc00b9f86815f5794d2639dc7367dfd04030d2404fc1e49e9c5948b81 +test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql a66b46c591bf9ce084e74a8b9cd7a0af5ab5e12e166b59cff0a1cc73a97278c3 58f20c67202abed5a9d659008333f3807663f85367db898dffe01bd2ba9c9b03 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql d09a8c2c0d277bfe4770822e79fdf94a2bc80e7b8bcd47361396a5a467aaa193 b6e9710ab5f6f2865c40cc155952e8833955f2c4c2cc5694f1008ffaa4d67bd5 +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql 4d975396405739dbb05a4019add804b92d97b12c8ead6107603540ed2b3fefdb c66bcda4342519fe2179e2cdd67ff6ddc7b3e8a475432b611f6de20578eb2f6d +test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql 2226b4759bee9091d88a7d72be5d8f8ad43f17b07fdd1a1f64ae3da5aa6aa333 ee9e06838b879ce90b00d9289eea32fbda9c02e0074d306a2f1f5991956c7deb +test/extractor-tests/generated/MissingExpr/MissingExpr.ql bb85675a4b8a8118913fd91389f8282863613edda3fb804b917cce0675a8bb76 f2e600f8fb723f8f1bde4b0b0ef41f59b4e652882b5c788e8f6767822d5574e4 test/extractor-tests/generated/Module/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e test/extractor-tests/generated/Pat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/PathExpr/PathExpr.ql aa8c36042688ad96a268b066b38fcaac3befa6490cc3510c15f824fce63e8949 71de233de72dd87c7c9129617d03f9fbc9bb9460ea896002cbb881f84451835d +test/extractor-tests/generated/RangeExpr/RangeExpr.ql c6e56a997c3543818ce6ffadabbab3bb233a099caa9e06e36519ac02f666dc93 0dcabe2df4c8ab3ba7b171cefb009a09c442ff71373f828c6c667bbb9eee2e45 +test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql 063ee8f6146110b97f4ee8944a5f37f0dd7cd5be049f13546d42a888a973d826 1184cc1fe937a01e9d12577478750be1497d4f99231486ae6d75104e7304eeb2 +test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql 6a7eb53c6b2a4587212f65c522387f726b2b9b3f204708a2a764e238aec8d89f 8b3095fdd9c6900eef656d4e9e18f5f4866b285634cc725e73246976af20450c test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e -test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql d31550e195d6642736668ee2a0b0c370546dbd8d8ba77c7a0d266b4acb5253c7 8ff659dcbc2985dcfc04246ad16294701db1c012a37d6743e1befe5746c25def +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql 112614052020c4c775f77e3773ad83b6747bbf30a4d0fea70642f570e2879896 969642f51f1d106f096fcc77002bba057054180c3115ebd8ffd8a69fd0d8f24d +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql d01bae55f1e11a8527e8514262e6b16ec72fad9d294c33296a6c1cc750d910c1 ff680b4716a360b7b91a8d83ba8fdfa570f61369a25b17bcaf9b42a3987257df +test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql 52cb0c020da2e5cf42ab94a9a2379c1ab5f7f6e2ce3763cb1d17e4173841b997 ed8fc6fc13d0f2be9c9c2f0d38ae1dc05824d44e1f1a72844b21f948d3f330c7 +test/extractor-tests/generated/RecordLitField/RecordLitField.ql d27c55513ab2ee8ac62d05f3552476ad5d8c05eb2e09f7cd37f8c4821aab4979 6545caed544f2898706d2cd20854cd15caf2198326c38f69814d50e69954a089 +test/extractor-tests/generated/RefExpr/RefExpr.ql e859cd59dbaa5aa5555aa13d4a75b7bfe2dbdb2d5c50675f3753adaaaabdedc2 d330ee941e9932054c32d0be5a52f38f285e4dc529821759ea38633f8ddbd517 +test/extractor-tests/generated/RepeatExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql 65397add1001e1593a303e3cec51e74aa4830a63e899b458a4247d017a84942d 34f138d22c9fa9195acd0c91a230dcf74dc5373db2315db0414aba710217720b +test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql bea07d8461c84e87bd642ca3af79aeff53f3ca3b79a6cd73ff8c514bcf213655 3cb63fb46da4d1c305694fd7a004016ab7c5ec96372279ce58cdb5c2e7a1dcc1 test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql 3e530c5beba93710b686d0bdaa6edfa58e13357be48bbf038c3a47c280d0bf08 0b0003cbebf44d0d2e3bcc1b318e0a4e90638dfcf3679ef6924a8461e81feabb +test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e cc7c395e7c651d62596826b1a0bedf10f35d01b8afeef47600b4ddaf804f406e +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql ec74c75dedb4e669b3e6eba8f7568c415f5172c1ebd4f73e4710d401928448cc 8923aaaf5c5c70005aabc9696879ea73c5d9d83507c8db5a237cbab037953509 +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql a743dbb15736b809e30769e1ea136afc9f0226885139150d6d1a5d353b6cb6fb 09849f178208406742007009da7f9b359b814477190d9d95370b94378e60be17 +test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql 4409e1c39b7729dc393a0d60f9d6aa0dfeed294a090285442de85ce746095eb5 572d88a9c879905519d9a63d5937949771f9c163ee2ea8ba4eabe0f16c28ca67 +test/extractor-tests/generated/YeetExpr/YeetExpr.ql c5919f7f2f42b7dc08b0fefc553bb602a772925c226c943e2c96158adaea7797 a5bfdf225d9f9653f5aae00f30744d03f7d1045ddb4469f23e57194b3b1a2f8e +test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql 4ab79339d3f0a2a0334f66a7513ae5d27bcd608fdaf557da71757896e20f81b7 6d7b9da72a325b83539da4f353df2a0d4fcd11493773547ac89031525e7cd1fa +test/extractor-tests/generated/YieldExpr/YieldExpr.ql 3bf0ed6b4ec11dbe8b6af6cb0c51813c193e17bd9df0a23cdb1bf39cecddd915 0ff0219d5356bd9cb62df995577909898b4b28e0ecd860339361731e4f64e703 +test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql 944d36a39b4955638c5ae4972110ea84304691d34f39dccfe3ee3964033f383b 62c9be460d299afd0e994f412148ac37585d011efaceb9221be22ebc97943bc0 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 048e925f27424..b8c18c67aee62 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -214,12 +214,74 @@ /lib/codeql/rust/generated/WildPat.qll linguist-generated /lib/codeql/rust/generated/YeetExpr.qll linguist-generated /lib/codeql/rust/generated/YieldExpr.qll linguist-generated -/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql linguist-generated +/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql linguist-generated +/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/BoxExpr/BoxExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr.ql linguist-generated +/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/CastExpr/CastExpr.ql linguist-generated +/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ConstExpr/ConstExpr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql linguist-generated +/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/ElementListExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/FieldExpr/FieldExpr.ql linguist-generated /test/extractor-tests/generated/File/File.ql linguist-generated /test/extractor-tests/generated/Function/Function.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr.ql linguist-generated +/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql linguist-generated +/test/extractor-tests/generated/IndexExpr/IndexExpr.ql linguist-generated +/test/extractor-tests/generated/InlineAsmExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/LetExpr/LetExpr.ql linguist-generated +/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr.ql linguist-generated +/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm.ql linguist-generated +/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr.ql linguist-generated +/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql linguist-generated +/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql linguist-generated +/test/extractor-tests/generated/MissingExpr/MissingExpr.ql linguist-generated /test/extractor-tests/generated/Module/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/Pat/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql linguist-generated +/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql linguist-generated /test/extractor-tests/generated/RecordFieldPat/MISSING_SOURCE.txt linguist-generated -/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql linguist-generated +/test/extractor-tests/generated/RecordLitField/RecordLitField.ql linguist-generated +/test/extractor-tests/generated/RefExpr/RefExpr.ql linguist-generated +/test/extractor-tests/generated/RepeatExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql linguist-generated +/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql linguist-generated /test/extractor-tests/generated/Stmt/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt linguist-generated /test/extractor-tests/generated/TypeRef/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql linguist-generated +/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql linguist-generated +/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr.ql linguist-generated +/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr.ql linguist-generated +/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll b/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll index e024eec6e9203..c07aaa28f5d45 100644 --- a/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.AsyncBlockExpr +/** + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` + */ class AsyncBlockExpr extends Generated::AsyncBlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll index 420be7dc8408c..47a3773b555cf 100644 --- a/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/AwaitExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.AwaitExpr +/** + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` + */ class AwaitExpr extends Generated::AwaitExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll index 6893087ec0e4a..6af07fe750cc5 100644 --- a/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BecomeExpr.qll @@ -5,4 +5,15 @@ private import codeql.rust.generated.BecomeExpr +/** + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` + */ class BecomeExpr extends Generated::BecomeExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll index e5de5d9aa453b..e0e61e46a29a8 100644 --- a/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BinaryOpExpr.qll @@ -5,4 +5,14 @@ private import codeql.rust.generated.BinaryOpExpr +/** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` + */ class BinaryOpExpr extends Generated::BinaryOpExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll index 0ba5e1a2eb8d8..f8f93be4f5c25 100644 --- a/rust/ql/lib/codeql/rust/elements/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BlockExpr.qll @@ -5,4 +5,18 @@ private import codeql.rust.generated.BlockExpr +/** + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` + */ class BlockExpr extends Generated::BlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BoxExpr.qll b/rust/ql/lib/codeql/rust/elements/BoxExpr.qll index 1525f7796f581..f61555a0e03f8 100644 --- a/rust/ql/lib/codeql/rust/elements/BoxExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BoxExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.BoxExpr +/** + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` + */ class BoxExpr extends Generated::BoxExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll index cd98d7003a058..c8b23f6685d2f 100644 --- a/rust/ql/lib/codeql/rust/elements/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/BreakExpr.qll @@ -5,4 +5,21 @@ private import codeql.rust.generated.BreakExpr +/** + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` + */ class BreakExpr extends Generated::BreakExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/CallExpr.qll b/rust/ql/lib/codeql/rust/elements/CallExpr.qll index ee14b172e50c6..ef1b34fd7038d 100644 --- a/rust/ql/lib/codeql/rust/elements/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CallExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.CallExpr +/** + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` + */ class CallExpr extends Generated::CallExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/CastExpr.qll b/rust/ql/lib/codeql/rust/elements/CastExpr.qll index 3b7b41955cd8a..3dcafca58965f 100644 --- a/rust/ql/lib/codeql/rust/elements/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/CastExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.CastExpr +/** + * A cast expression. For example: + * ``` + * value as u64; + * ``` + */ class CastExpr extends Generated::CastExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ConstExpr.qll b/rust/ql/lib/codeql/rust/elements/ConstExpr.qll index 375e7dcc7fdaa..1e76306bea022 100644 --- a/rust/ql/lib/codeql/rust/elements/ConstExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ConstExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.ConstExpr +/** + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` + */ class ConstExpr extends Generated::ConstExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll index f23879671e337..c5674d62b193f 100644 --- a/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ContinueExpr.qll @@ -5,4 +5,21 @@ private import codeql.rust.generated.ContinueExpr +/** + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` + */ class ContinueExpr extends Generated::ContinueExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll index 656bd807afdb0..a70cb61105e71 100644 --- a/rust/ql/lib/codeql/rust/elements/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/FieldExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.FieldExpr +/** + * A field access expression. For example: + * ``` + * x.foo + * ``` + */ class FieldExpr extends Generated::FieldExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/IfExpr.qll b/rust/ql/lib/codeql/rust/elements/IfExpr.qll index c1500f592c079..ca5886e65673c 100644 --- a/rust/ql/lib/codeql/rust/elements/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IfExpr.qll @@ -5,4 +5,19 @@ private import codeql.rust.generated.IfExpr +/** + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` + */ class IfExpr extends Generated::IfExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll index fde06bd4d916d..d67dfeda33b97 100644 --- a/rust/ql/lib/codeql/rust/elements/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/IndexExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.IndexExpr +/** + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` + */ class IndexExpr extends Generated::IndexExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/LetExpr.qll b/rust/ql/lib/codeql/rust/elements/LetExpr.qll index 78862471d1bc6..27979b5145405 100644 --- a/rust/ql/lib/codeql/rust/elements/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LetExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.LetExpr +/** + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` + */ class LetExpr extends Generated::LetExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll index 6f08d6648a217..fdc49e1e85e68 100644 --- a/rust/ql/lib/codeql/rust/elements/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/LoopExpr.qll @@ -5,4 +5,28 @@ private import codeql.rust.generated.LoopExpr +/** + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` + */ class LoopExpr extends Generated::LoopExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MatchArm.qll b/rust/ql/lib/codeql/rust/elements/MatchArm.qll index 914d70d355832..1d2c565264e80 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchArm.qll @@ -5,4 +5,19 @@ private import codeql.rust.generated.MatchArm +/** + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ class MatchArm extends Generated::MatchArm { } diff --git a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll index fcb352bc2b44a..175946568e342 100644 --- a/rust/ql/lib/codeql/rust/elements/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MatchExpr.qll @@ -5,4 +5,18 @@ private import codeql.rust.generated.MatchExpr +/** + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` + */ class MatchExpr extends Generated::MatchExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll index 855035925c3ba..0a7bdc6b85670 100644 --- a/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MethodCallExpr.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.MethodCallExpr +/** + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); + */ class MethodCallExpr extends Generated::MethodCallExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll index 3ee2f3a6e4e81..4a9b9806abebd 100644 --- a/rust/ql/lib/codeql/rust/elements/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/MissingExpr.qll @@ -5,4 +5,11 @@ private import codeql.rust.generated.MissingExpr +/** + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` + */ class MissingExpr extends Generated::MissingExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/PathExpr.qll b/rust/ql/lib/codeql/rust/elements/PathExpr.qll index 237ca6b71f1f3..ccaa8d1f2500a 100644 --- a/rust/ql/lib/codeql/rust/elements/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/PathExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.PathExpr +/** + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo + * let z = ::foo + * ``` + */ class PathExpr extends Generated::PathExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll index 67cd4b1072175..106922a0602bf 100644 --- a/rust/ql/lib/codeql/rust/elements/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RangeExpr.qll @@ -5,4 +5,15 @@ private import codeql.rust.generated.RangeExpr +/** + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` + */ class RangeExpr extends Generated::RangeExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll index 87653911e1d08..bda6fae412161 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordLitExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RecordLitExpr +/** + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` + */ class RecordLitExpr extends Generated::RecordLitExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll b/rust/ql/lib/codeql/rust/elements/RecordLitField.qll index 1a30e1a1e91ae..b432ba6fd8529 100644 --- a/rust/ql/lib/codeql/rust/elements/RecordLitField.qll +++ b/rust/ql/lib/codeql/rust/elements/RecordLitField.qll @@ -5,4 +5,10 @@ private import codeql.rust.generated.RecordLitField +/** + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` + */ class RecordLitField extends Generated::RecordLitField { } diff --git a/rust/ql/lib/codeql/rust/elements/RefExpr.qll b/rust/ql/lib/codeql/rust/elements/RefExpr.qll index 3916a8ad3bc96..b4a1a44f71003 100644 --- a/rust/ql/lib/codeql/rust/elements/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/RefExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.RefExpr +/** + * A reference expression. For example: + * ``` + * 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; + * ``` + */ class RefExpr extends Generated::RefExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll index c8a26c595cd9e..384e83f313662 100644 --- a/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/ReturnExpr.qll @@ -5,4 +5,17 @@ private import codeql.rust.generated.ReturnExpr +/** + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` + */ class ReturnExpr extends Generated::ReturnExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll index b0b3608b0c789..57350920fb164 100644 --- a/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnaryOpExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.UnaryOpExpr +/** + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` + */ class UnaryOpExpr extends Generated::UnaryOpExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll b/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll index 514cfeb0c97e4..513192521905e 100644 --- a/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/UnsafeBlockExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.UnsafeBlockExpr +/** + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` + */ class UnsafeBlockExpr extends Generated::UnsafeBlockExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll index 8cab74bd9535e..6e891621e477c 100644 --- a/rust/ql/lib/codeql/rust/elements/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YeetExpr.qll @@ -5,4 +5,12 @@ private import codeql.rust.generated.YeetExpr +/** + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` + */ class YeetExpr extends Generated::YeetExpr { } diff --git a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll index f9aed8f7e1c1e..e92218e1a2fe1 100644 --- a/rust/ql/lib/codeql/rust/elements/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/elements/YieldExpr.qll @@ -5,4 +5,13 @@ private import codeql.rust.generated.YieldExpr +/** + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` + */ class YieldExpr extends Generated::YieldExpr { } diff --git a/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll b/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll index 17b7d1b630d66..3d011e059ac97 100644 --- a/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/AsyncBlockExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.BlockExprBase */ module Generated { /** + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` * INTERNAL: Do not reference the `Generated::AsyncBlockExpr` class directly. * Use the subclass `AsyncBlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll b/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll index 4c982b7c249e6..2e80995a7b9c5 100644 --- a/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/AwaitExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::AwaitExpr` class directly. * Use the subclass `AwaitExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll b/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll index 5af91bbd3ff38..d021d10468092 100644 --- a/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BecomeExpr.qll @@ -14,6 +14,15 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` * INTERNAL: Do not reference the `Generated::BecomeExpr` class directly. * Use the subclass `BecomeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll index 3f790dfec9a9d..eeef87aa292c5 100644 --- a/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BinaryOpExpr.qll @@ -14,6 +14,14 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` * INTERNAL: Do not reference the `Generated::BinaryOpExpr` class directly. * Use the subclass `BinaryOpExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BlockExpr.qll b/rust/ql/lib/codeql/rust/generated/BlockExpr.qll index 52ca4526377d9..d1fbf92c3ab44 100644 --- a/rust/ql/lib/codeql/rust/generated/BlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BlockExpr.qll @@ -15,6 +15,18 @@ import codeql.rust.elements.Label */ module Generated { /** + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` * INTERNAL: Do not reference the `Generated::BlockExpr` class directly. * Use the subclass `BlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BoxExpr.qll b/rust/ql/lib/codeql/rust/generated/BoxExpr.qll index 4a367bc7b2f7b..4a59828330c98 100644 --- a/rust/ql/lib/codeql/rust/generated/BoxExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BoxExpr.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` * INTERNAL: Do not reference the `Generated::BoxExpr` class directly. * Use the subclass `BoxExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/BreakExpr.qll b/rust/ql/lib/codeql/rust/generated/BreakExpr.qll index 9e4d90b4973ec..2fbd3280280d5 100644 --- a/rust/ql/lib/codeql/rust/generated/BreakExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/BreakExpr.qll @@ -15,6 +15,21 @@ import codeql.rust.elements.Label */ module Generated { /** + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::BreakExpr` class directly. * Use the subclass `BreakExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/CallExpr.qll b/rust/ql/lib/codeql/rust/generated/CallExpr.qll index 0ca5f2b604d5d..6152049b6785a 100644 --- a/rust/ql/lib/codeql/rust/generated/CallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CallExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` * INTERNAL: Do not reference the `Generated::CallExpr` class directly. * Use the subclass `CallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/CastExpr.qll b/rust/ql/lib/codeql/rust/generated/CastExpr.qll index f9b717f9114cf..e546735ea7119 100644 --- a/rust/ql/lib/codeql/rust/generated/CastExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/CastExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.TypeRef */ module Generated { /** + * A cast expression. For example: + * ``` + * value as u64; + * ``` * INTERNAL: Do not reference the `Generated::CastExpr` class directly. * Use the subclass `CastExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ConstExpr.qll b/rust/ql/lib/codeql/rust/generated/ConstExpr.qll index 1c11dba419c1a..d237ec3d9d596 100644 --- a/rust/ql/lib/codeql/rust/generated/ConstExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ConstExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` * INTERNAL: Do not reference the `Generated::ConstExpr` class directly. * Use the subclass `ConstExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll b/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll index b03aed387ae9d..d11925dfb3a18 100644 --- a/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ContinueExpr.qll @@ -15,6 +15,21 @@ import codeql.rust.elements.Label */ module Generated { /** + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` * INTERNAL: Do not reference the `Generated::ContinueExpr` class directly. * Use the subclass `ContinueExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/FieldExpr.qll b/rust/ql/lib/codeql/rust/generated/FieldExpr.qll index 82688dbf44b49..fc282ca4a493f 100644 --- a/rust/ql/lib/codeql/rust/generated/FieldExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/FieldExpr.qll @@ -14,6 +14,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A field access expression. For example: + * ``` + * x.foo + * ``` * INTERNAL: Do not reference the `Generated::FieldExpr` class directly. * Use the subclass `FieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/IfExpr.qll b/rust/ql/lib/codeql/rust/generated/IfExpr.qll index 4b90ac9b50ace..728ad847fb06a 100644 --- a/rust/ql/lib/codeql/rust/generated/IfExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/IfExpr.qll @@ -14,6 +14,19 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` * INTERNAL: Do not reference the `Generated::IfExpr` class directly. * Use the subclass `IfExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/IndexExpr.qll b/rust/ql/lib/codeql/rust/generated/IndexExpr.qll index fd6021f30145b..a9a762be1bd0c 100644 --- a/rust/ql/lib/codeql/rust/generated/IndexExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/IndexExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` * INTERNAL: Do not reference the `Generated::IndexExpr` class directly. * Use the subclass `IndexExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LetExpr.qll b/rust/ql/lib/codeql/rust/generated/LetExpr.qll index a4dccae487607..3608012f30e0b 100644 --- a/rust/ql/lib/codeql/rust/generated/LetExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/LetExpr.qll @@ -15,6 +15,12 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` * INTERNAL: Do not reference the `Generated::LetExpr` class directly. * Use the subclass `LetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/LoopExpr.qll b/rust/ql/lib/codeql/rust/generated/LoopExpr.qll index c4479efdb1af5..0f2d6ef94f730 100644 --- a/rust/ql/lib/codeql/rust/generated/LoopExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/LoopExpr.qll @@ -15,6 +15,28 @@ import codeql.rust.elements.Label */ module Generated { /** + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` * INTERNAL: Do not reference the `Generated::LoopExpr` class directly. * Use the subclass `LoopExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MatchArm.qll b/rust/ql/lib/codeql/rust/generated/MatchArm.qll index cec99d17c3214..d57bec537fa27 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchArm.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchArm.qll @@ -16,6 +16,19 @@ import codeql.rust.elements.Pat */ module Generated { /** + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::MatchArm` class directly. * Use the subclass `MatchArm`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll index 87569d02ba026..2163751f20a66 100644 --- a/rust/ql/lib/codeql/rust/generated/MatchExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MatchExpr.qll @@ -15,6 +15,18 @@ import codeql.rust.elements.MatchArm */ module Generated { /** + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` * INTERNAL: Do not reference the `Generated::MatchExpr` class directly. * Use the subclass `MatchExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll index 18eacc9dc2029..fb3c2e5d21b35 100644 --- a/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MethodCallExpr.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); * INTERNAL: Do not reference the `Generated::MethodCallExpr` class directly. * Use the subclass `MethodCallExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll index 250c639fbeb8e..2b2641f52db32 100644 --- a/rust/ql/lib/codeql/rust/generated/MissingExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/MissingExpr.qll @@ -14,6 +14,11 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` * INTERNAL: Do not reference the `Generated::MissingExpr` class directly. * Use the subclass `MissingExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/PathExpr.qll b/rust/ql/lib/codeql/rust/generated/PathExpr.qll index 7a164820a73d6..fc8c275feb72c 100644 --- a/rust/ql/lib/codeql/rust/generated/PathExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/PathExpr.qll @@ -15,6 +15,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo + * let z = ::foo + * ``` * INTERNAL: Do not reference the `Generated::PathExpr` class directly. * Use the subclass `PathExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RangeExpr.qll b/rust/ql/lib/codeql/rust/generated/RangeExpr.qll index d1d783e228807..5b038040f94e3 100644 --- a/rust/ql/lib/codeql/rust/generated/RangeExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RangeExpr.qll @@ -14,6 +14,15 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` * INTERNAL: Do not reference the `Generated::RangeExpr` class directly. * Use the subclass `RangeExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/Raw.qll b/rust/ql/lib/codeql/rust/generated/Raw.qll index 28531dfe4a0bf..0d00b5651f7b5 100644 --- a/rust/ql/lib/codeql/rust/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/generated/Raw.qll @@ -103,6 +103,19 @@ module Raw { /** * INTERNAL: Do not use. + * A match arm. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` */ class MatchArm extends @match_arm, AstNode { override string toString() { result = "MatchArm" } @@ -147,6 +160,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` */ class RecordLitField extends @record_lit_field, AstNode { override string toString() { result = "RecordLitField" } @@ -188,6 +205,13 @@ module Raw { /** * INTERNAL: Do not use. + * An `await` expression. For example: + * ``` + * async { + * let x = foo().await; + * x + * } + * ``` */ class AwaitExpr extends @await_expr, Expr { override string toString() { result = "AwaitExpr" } @@ -200,6 +224,15 @@ module Raw { /** * INTERNAL: Do not use. + * A `become` expression. For example: + * ``` + * fn fact_a(n: i32, a: i32) -> i32 { + * if n == 0 { + * a + * } else { + * become fact_a(n - 1, n * a) + * } + * } ``` */ class BecomeExpr extends @become_expr, Expr { override string toString() { result = "BecomeExpr" } @@ -212,6 +245,14 @@ module Raw { /** * INTERNAL: Do not use. + * A binary operation expression. For example: + * ``` + * x + y; + * x && y; + * x <= y; + * x = y; + * x += y; + * ``` */ class BinaryOpExpr extends @binary_op_expr, Expr { override string toString() { result = "BinaryOpExpr" } @@ -266,6 +307,10 @@ module Raw { /** * INTERNAL: Do not use. + * A box expression. For example: + * ``` + * let x = #[rustc_box] Box::new(42); + * ``` */ class BoxExpr extends @box_expr, Expr { override string toString() { result = "BoxExpr" } @@ -290,6 +335,21 @@ module Raw { /** * INTERNAL: Do not use. + * A break expression. For example: + * ``` + * loop { + * if not_ready() { + * break; + * } + * } + * ``` + * ``` + * let x = 'label: loop { + * if done() { + * break 'label 42; + * } + * }; + * ``` */ class BreakExpr extends @break_expr, Expr { override string toString() { result = "BreakExpr" } @@ -307,6 +367,13 @@ module Raw { /** * INTERNAL: Do not use. + * A function call expression. For example: + * ``` + * foo(42); + * foo::(42); + * foo[0](42); + * foo(1) = 4; + * ``` */ class CallExpr extends @call_expr, Expr { override string toString() { result = "CallExpr" } @@ -329,6 +396,10 @@ module Raw { /** * INTERNAL: Do not use. + * A cast expression. For example: + * ``` + * value as u64; + * ``` */ class CastExpr extends @cast_expr, Expr { override string toString() { result = "CastExpr" } @@ -395,6 +466,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `const` block expression. For example: + * ``` + * if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + * return false; + * } + * ``` */ class ConstExpr extends @const_expr, Expr { override string toString() { result = "ConstExpr" } @@ -407,6 +484,21 @@ module Raw { /** * INTERNAL: Do not use. + * A continue expression. For example: + * ``` + * loop { + * if not_ready() { + * continue; + * } + * } + * ``` + * ``` + * 'label: loop { + * if not_ready() { + * continue 'label; + * } + * } + * ``` */ class ContinueExpr extends @continue_expr, Expr { override string toString() { result = "ContinueExpr" } @@ -436,6 +528,10 @@ module Raw { /** * INTERNAL: Do not use. + * A field access expression. For example: + * ``` + * x.foo + * ``` */ class FieldExpr extends @field_expr, Expr { override string toString() { result = "FieldExpr" } @@ -480,6 +576,19 @@ module Raw { /** * INTERNAL: Do not use. + * An `if` expression. For example: + * ``` + * if x == 42 { + * println!("that's the answer"); + * } + * ``` + * ``` + * let y = if x > 0 { + * 1 + * } else { + * 0 + * } + * ``` */ class IfExpr extends @if_expr, Expr { override string toString() { result = "IfExpr" } @@ -502,6 +611,11 @@ module Raw { /** * INTERNAL: Do not use. + * An index expression. For example: + * ``` + * list[42]; + * list[42] = 1; + * ``` */ class IndexExpr extends @index_expr, Expr { override string toString() { result = "IndexExpr" } @@ -543,6 +657,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `let` expression. For example: + * ``` + * if let Some(x) = maybe_some { + * println!("{}", x); + * } + * ``` */ class LetExpr extends @let_expr, Expr { override string toString() { result = "LetExpr" } @@ -606,6 +726,28 @@ module Raw { /** * INTERNAL: Do not use. + * A loop expression. For example: + * ``` + * loop { + * println!("Hello, world (again)!"); + * }; + * ``` + * ``` + * 'label: loop { + * println!("Hello, world (once)!"); + * break 'label; + * }; + * ``` + * ``` + * let mut x = 0; + * loop { + * if x < 10 { + * x += 1; + * } else { + * break; + * } + * }; + * ``` */ class LoopExpr extends @loop_expr, Expr { override string toString() { result = "LoopExpr" } @@ -623,6 +765,18 @@ module Raw { /** * INTERNAL: Do not use. + * A match expression. For example: + * ``` + * match x { + * Some(y) => y, + * None => 0, + * } + * ``` + * match x { + * Some(y) if y != 0 => 1 / y, + * _ => 0, + * } + * ``` */ class MatchExpr extends @match_expr, Expr { override string toString() { result = "MatchExpr" } @@ -640,6 +794,10 @@ module Raw { /** * INTERNAL: Do not use. + * A method call expression. For example: + * ``` + * x.foo(42); + * x.foo::(42); */ class MethodCallExpr extends @method_call_expr, Expr { override string toString() { result = "MethodCallExpr" } @@ -667,6 +825,11 @@ module Raw { /** * INTERNAL: Do not use. + * A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + * + * ``` + * let x = non_existing_macro!(); + * ``` */ class MissingExpr extends @missing_expr, Expr { override string toString() { result = "MissingExpr" } @@ -722,6 +885,13 @@ module Raw { /** * INTERNAL: Do not use. + * A path expression. For example: + * ``` + * let x = variable; + * let x = foo::bar; + * let y = ::foo + * let z = ::foo + * ``` */ class PathExpr extends @path_expr, Expr { override string toString() { result = "PathExpr" } @@ -746,6 +916,15 @@ module Raw { /** * INTERNAL: Do not use. + * A range expression. For example: + * ``` + * let x = 1..=10; + * let x = 1..10; + * let x = 10..; + * let x = ..10; + * let x = ..=10; + * let x = ..; + * ``` */ class RangeExpr extends @range_expr, Expr { override string toString() { result = "RangeExpr" } @@ -785,6 +964,13 @@ module Raw { /** * INTERNAL: Do not use. + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` */ class RecordLitExpr extends @record_lit_expr, Expr { override string toString() { result = "RecordLitExpr" } @@ -839,6 +1025,13 @@ module Raw { /** * INTERNAL: Do not use. + * A reference expression. For example: + * ``` + * 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; + * ``` */ class RefExpr extends @ref_expr, Expr { override string toString() { result = "RefExpr" } @@ -878,6 +1071,17 @@ module Raw { /** * INTERNAL: Do not use. + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` */ class ReturnExpr extends @return_expr, Expr { override string toString() { result = "ReturnExpr" } @@ -968,6 +1172,12 @@ module Raw { /** * INTERNAL: Do not use. + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` */ class UnaryOpExpr extends @unary_op_expr, Expr { override string toString() { result = "UnaryOpExpr" } @@ -999,6 +1209,12 @@ module Raw { /** * INTERNAL: Do not use. + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` */ class YeetExpr extends @yeet_expr, Expr { override string toString() { result = "YeetExpr" } @@ -1011,6 +1227,13 @@ module Raw { /** * INTERNAL: Do not use. + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` */ class YieldExpr extends @yield_expr, Expr { override string toString() { result = "YieldExpr" } @@ -1023,6 +1246,13 @@ module Raw { /** * INTERNAL: Do not use. + * An async block expression. For example: + * ``` + * async { + * let x = 42; + * x + * }.await + * ``` */ class AsyncBlockExpr extends @async_block_expr, BlockExprBase { override string toString() { result = "AsyncBlockExpr" } @@ -1030,6 +1260,18 @@ module Raw { /** * INTERNAL: Do not use. + * A block expression. For example: + * ``` + * { + * let x = 42; + * } + * ``` + * ``` + * 'label: { + * let x = 42; + * x + * } + * ``` */ class BlockExpr extends @block_expr, BlockExprBase { override string toString() { result = "BlockExpr" } @@ -1076,6 +1318,13 @@ module Raw { /** * INTERNAL: Do not use. + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` */ class UnsafeBlockExpr extends @unsafe_block_expr, BlockExprBase { override string toString() { result = "UnsafeBlockExpr" } diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll index 71318e79a6f33..373dd18089537 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordLitExpr.qll @@ -16,6 +16,13 @@ import codeql.rust.elements.Unimplemented */ module Generated { /** + * A record literal expression. For example: + * ``` + * let first = Foo { a: 1, b: 2 }; + * let second = Foo { a: 2, ..first }; + * Foo { a: 1, b: 2 }[2] = 10; + * Foo { .. } = second; + * ``` * INTERNAL: Do not reference the `Generated::RecordLitExpr` class directly. * Use the subclass `RecordLitExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll b/rust/ql/lib/codeql/rust/generated/RecordLitField.qll index 55a488e2ff6d7..af1188ba8d1ef 100644 --- a/rust/ql/lib/codeql/rust/generated/RecordLitField.qll +++ b/rust/ql/lib/codeql/rust/generated/RecordLitField.qll @@ -15,6 +15,10 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A field in a record literal. For example `a: 1` in: + * ``` + * Foo { a: 1, b: 2 }; + * ``` * INTERNAL: Do not reference the `Generated::RecordLitField` class directly. * Use the subclass `RecordLitField`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/RefExpr.qll b/rust/ql/lib/codeql/rust/generated/RefExpr.qll index 6fce583db98ed..43886e0ad4103 100644 --- a/rust/ql/lib/codeql/rust/generated/RefExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/RefExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A reference expression. For example: + * ``` + * 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; + * ``` * INTERNAL: Do not reference the `Generated::RefExpr` class directly. * Use the subclass `RefExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll b/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll index 1d9ee4be7ac64..9bb35923999db 100644 --- a/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/ReturnExpr.qll @@ -14,6 +14,17 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A return expression. For example: + * ``` + * fn some_value() -> i32 { + * return 42; + * } + * ``` + * ``` + * fn no_value() -> () { + * return; + * } + * ``` * INTERNAL: Do not reference the `Generated::ReturnExpr` class directly. * Use the subclass `ReturnExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll b/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll index 283b8f8eae1fb..1849af2d4112d 100644 --- a/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/UnaryOpExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A unary operation expression. For example: + * ``` + * let x = -42 + * let y = !true + * let z = *ptr + * ``` * INTERNAL: Do not reference the `Generated::UnaryOpExpr` class directly. * Use the subclass `UnaryOpExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll b/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll index e53ce046fa66c..0cdfee165cad7 100644 --- a/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/UnsafeBlockExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.BlockExprBase */ module Generated { /** + * An unsafe block expression. For example: + * ``` + * let layout = unsafe { + * let x = 42; + * Layout::from_size_align_unchecked(size, align) + * }; + * ``` * INTERNAL: Do not reference the `Generated::UnsafeBlockExpr` class directly. * Use the subclass `UnsafeBlockExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/YeetExpr.qll b/rust/ql/lib/codeql/rust/generated/YeetExpr.qll index 3599779650d20..483af5adcb3be 100644 --- a/rust/ql/lib/codeql/rust/generated/YeetExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/YeetExpr.qll @@ -14,6 +14,12 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `yeet` expression. For example: + * ``` + * if x < size { + * do yeet "index out of bounds"; + * } + * ``` * INTERNAL: Do not reference the `Generated::YeetExpr` class directly. * Use the subclass `YeetExpr`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/generated/YieldExpr.qll b/rust/ql/lib/codeql/rust/generated/YieldExpr.qll index 6abe7de7fba60..9e5023bc55fd0 100644 --- a/rust/ql/lib/codeql/rust/generated/YieldExpr.qll +++ b/rust/ql/lib/codeql/rust/generated/YieldExpr.qll @@ -14,6 +14,13 @@ import codeql.rust.elements.Expr */ module Generated { /** + * A `yield` expression. For example: + * ``` + * let one = #[coroutine] + * || { + * yield 1; + * }; + * ``` * INTERNAL: Do not reference the `Generated::YieldExpr` class directly. * Use the subclass `YieldExpr`, where the following predicates are available. */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index aca5873c82078..f88af479c0e78 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -1 +1,31 @@ +AsyncBlockExpr/gen_async_block_expr.rs 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 63b31fbeeead710902aa31184c06e88e604a1b7ff3308aba52b5d6a965870ff6 +AwaitExpr/gen_await_expr.rs 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b 09632657a74dda663c217b0e16d7f1b33f7f49efb2ef480c0d2cc9c66b65202b +BecomeExpr/gen_become_expr.rs 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c 15f42386c7362b50d8bcefda432167104e537fa63f038c1ab016f75a171f728c +BinaryOpExpr/gen_binary_op_expr.rs a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 a0d68df2a7cb33e08a2d3a9f8e1f3a84b07d458c66201fe6a012e99498c63ce3 +BlockExpr/gen_block_expr.rs b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 b09aa0406d2e772bc14bb1be4959ac21ebaf75c65a1d9f92bb3d8be5fd571023 +BoxExpr/gen_box_expr.rs f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 f4392a8e9daae2492c087fc8f7323f45ffbdb43a4ae5035be61e6edeaf427f23 +BreakExpr/gen_break_expr.rs 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 4938cdab0fdb9b7bafa021912d59595a190fffbabfb3889ea7ee0917150b0a55 +CallExpr/gen_call_expr.rs 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 8a3b00e4af996dcfd4593783316b2d793e8b90b24b4bb78acccca6f974cf9c36 +CastExpr/gen_cast_expr.rs 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 35ba1e109899f5b6297cb0db6d6a48270e031c91b27fab212b07a9f93948f816 +ConstExpr/gen_const_expr.rs 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b 04a1e4620c843101bfccd38027af68390817dbb750c203250f4fcc208af0d26b +ContinueExpr/gen_continue_expr.rs cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 cbbed5b8dd235c4702281c9772094799012d785cc0c39a25b9f21cd659bc98d2 +FieldExpr/gen_field_expr.rs 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 7ab04efc8b45892d3214eccaeac0b1659213623ae95acb463c531b865988f148 Function/gen_function.rs 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 4be46d4798cd32b51e449d1b6c4bc7461216a8a0e765b61abac21354401a7776 +IfExpr/gen_if_expr.rs 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b 073ba575b54a553945d3131d7e92cdb1520c24f380361723a1b9d848b6296d7b +IndexExpr/gen_index_expr.rs b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 b1a1b9eadd40ac1652d944dc925337435ef5782bf485a0f0360c971f4938cdd8 +LetExpr/gen_let_expr.rs 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d 83e9726f3f14fb9d3d332462230fc939f0214216997f5ca84f58518ffd65653d +LoopExpr/gen_loop_expr.rs 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 0a7e6dd7690fae82495c466f8a175b3a4097478041ec0e0bc0b7db97d2e50e66 +MatchArm/gen_match_arm.rs 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 197eb98990fb149ac01900420653a1fef8772a1767fe914e7d2ae89451b81110 +MatchExpr/gen_match_expr.rs 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 65d1ac55b7aac6de608175313004d07dcc89cc483ac6b24012d7ae38ac9410b1 +MethodCallExpr/gen_method_call_expr.rs 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 2e303e2677134db6d1e757f093f78bbd0db08f067c86d6d9b141b7115f352fd7 +MissingExpr/gen_missing_expr.rs 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 8e32068d7db05b0bd02ce7087e36e7dafbbc5edd1cd40fc98cf47a68e20b1746 +PathExpr/gen_path_expr.rs a8cd85c3f828407530f0f34af426937f9e6037b5a7109c78be673fbd3f2645f9 a8cd85c3f828407530f0f34af426937f9e6037b5a7109c78be673fbd3f2645f9 +RangeExpr/gen_range_expr.rs 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 3d77ccdc55a774c41b7d34773e5c65e4fdad6ef76aadd4d24c2694b324e9c006 +RecordLitExpr/gen_record_lit_expr.rs da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a da87c8e281532866920ad1a352be3e6d226e21946bd52a9422bee3b264dc3c3a +RecordLitField/gen_record_lit_field.rs 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a 86e654672e4323f3347d1215784375cc61b2ce0d3a8e3d8822469b1f8ec0c89a +RefExpr/gen_ref_expr.rs b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 b79b89935a758c51488ffe654c662bb51af867abd140825859db97197dc7af29 +ReturnExpr/gen_return_expr.rs ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 ab3d5f8f19c8b2ad1410c9855b7f437b96dc9d50d67e99047678b515e58e5425 +UnaryOpExpr/gen_unary_op_expr.rs b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 b56c95c11fe7f0b06fea1740dba991856daee4fb6bc051f56f831dca28d81987 +UnsafeBlockExpr/gen_unsafe_block_expr.rs 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 250656a4c0333c1260617117ae7ca96fc265d5109f948b90dce071867d020486 +YeetExpr/gen_yeet_expr.rs 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 060b64c82db9015a28f375c05b98e932a78c3b1e11dc171d0c4844c988c6d8d9 +YieldExpr/gen_yield_expr.rs 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 4742abc490211a92cd2aa7ebf7f2749aff5227db64fb1b7b5ede20727140c445 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 2ca6c13705381..f10fc597ea02a 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -1,3 +1,33 @@ /.generated_tests.list linguist-generated /.gitattributes linguist-generated +/AsyncBlockExpr/gen_async_block_expr.rs linguist-generated +/AwaitExpr/gen_await_expr.rs linguist-generated +/BecomeExpr/gen_become_expr.rs linguist-generated +/BinaryOpExpr/gen_binary_op_expr.rs linguist-generated +/BlockExpr/gen_block_expr.rs linguist-generated +/BoxExpr/gen_box_expr.rs linguist-generated +/BreakExpr/gen_break_expr.rs linguist-generated +/CallExpr/gen_call_expr.rs linguist-generated +/CastExpr/gen_cast_expr.rs linguist-generated +/ConstExpr/gen_const_expr.rs linguist-generated +/ContinueExpr/gen_continue_expr.rs linguist-generated +/FieldExpr/gen_field_expr.rs linguist-generated /Function/gen_function.rs linguist-generated +/IfExpr/gen_if_expr.rs linguist-generated +/IndexExpr/gen_index_expr.rs linguist-generated +/LetExpr/gen_let_expr.rs linguist-generated +/LoopExpr/gen_loop_expr.rs linguist-generated +/MatchArm/gen_match_arm.rs linguist-generated +/MatchExpr/gen_match_expr.rs linguist-generated +/MethodCallExpr/gen_method_call_expr.rs linguist-generated +/MissingExpr/gen_missing_expr.rs linguist-generated +/PathExpr/gen_path_expr.rs linguist-generated +/RangeExpr/gen_range_expr.rs linguist-generated +/RecordLitExpr/gen_record_lit_expr.rs linguist-generated +/RecordLitField/gen_record_lit_field.rs linguist-generated +/RefExpr/gen_ref_expr.rs linguist-generated +/ReturnExpr/gen_return_expr.rs linguist-generated +/UnaryOpExpr/gen_unary_op_expr.rs linguist-generated +/UnsafeBlockExpr/gen_unsafe_block_expr.rs linguist-generated +/YeetExpr/gen_yeet_expr.rs linguist-generated +/YieldExpr/gen_yield_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected new file mode 100644 index 0000000000000..1cd82381fb4fd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql new file mode 100644 index 0000000000000..132be12a64f45 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x, int getNumberOfStatements, string hasTail +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + if x.hasTail() then hasTail = "yes" else hasTail = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected new file mode 100644 index 0000000000000..d9c3f9a68979e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | 0 | gen_async_block_expr.rs:6:12:6:12 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql new file mode 100644 index 0000000000000..84e5c344a6f4d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected new file mode 100644 index 0000000000000..66ead87e31223 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.expected @@ -0,0 +1 @@ +| gen_async_block_expr.rs:5:5:8:5 | AsyncBlockExpr | gen_async_block_expr.rs:7:8:7:8 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql new file mode 100644 index 0000000000000..574c7fa720341 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/AsyncBlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AsyncBlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs new file mode 100644 index 0000000000000..fec15de4176e6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AsyncBlockExpr/gen_async_block_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_async_block_expr() -> i32 { + // An async block expression. For example: + async { + let x = 42; + x + }.await +} diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected new file mode 100644 index 0000000000000..df585132030cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.expected @@ -0,0 +1 @@ +| gen_await_expr.rs:6:17:6:27 | AwaitExpr | getExpr: | gen_await_expr.rs:6:17:6:21 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql new file mode 100644 index 0000000000000..30400ffc9bc0b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/AwaitExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from AwaitExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs new file mode 100644 index 0000000000000..7534fbc19a5d5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/AwaitExpr/gen_await_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_await_expr() -> () { + // An `await` expression. For example: + async { + let x = foo().await; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected new file mode 100644 index 0000000000000..f067a46ca8d7c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.expected @@ -0,0 +1 @@ +| gen_become_expr.rs:8:10:8:36 | BecomeExpr | getExpr: | gen_become_expr.rs:8:17:8:36 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql new file mode 100644 index 0000000000000..25eb0809f2cf3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/BecomeExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BecomeExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs new file mode 100644 index 0000000000000..dd35255f47887 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BecomeExpr/gen_become_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen + +// A `become` expression. For example: +fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } + } ``` diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected new file mode 100644 index 0000000000000..1b6b562af537a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.expected @@ -0,0 +1,5 @@ +| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:5:5:5:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:5:9:5:9 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:6:5:6:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:6:10:6:10 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:7:5:7:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:7:10:7:10 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:8:5:8:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:8:9:8:9 | PathExpr | hasOp: | yes | +| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | getLhs: | gen_binary_op_expr.rs:9:5:9:5 | PathExpr | getRhs: | gen_binary_op_expr.rs:9:10:9:10 | PathExpr | hasOp: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql new file mode 100644 index 0000000000000..e74d8022c0af6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BinaryOpExpr x, Expr getLhs, Expr getRhs, string hasOp +where + toBeTested(x) and + not x.isUnknown() and + getLhs = x.getLhs() and + getRhs = x.getRhs() and + if x.hasOp() then hasOp = "yes" else hasOp = "no" +select x, "getLhs:", getLhs, "getRhs:", getRhs, "hasOp:", hasOp diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected new file mode 100644 index 0000000000000..8b155e5641a71 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.expected @@ -0,0 +1,5 @@ +| gen_binary_op_expr.rs:5:5:5:9 | BinaryOpExpr | + | +| gen_binary_op_expr.rs:6:5:6:10 | BinaryOpExpr | && | +| gen_binary_op_expr.rs:7:5:7:10 | BinaryOpExpr | <= | +| gen_binary_op_expr.rs:8:5:8:9 | BinaryOpExpr | = | +| gen_binary_op_expr.rs:9:5:9:10 | BinaryOpExpr | += | diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql new file mode 100644 index 0000000000000..834e678ec82d2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/BinaryOpExpr_getOp.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BinaryOpExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getOp() diff --git a/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs new file mode 100644 index 0000000000000..8612377ff2177 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BinaryOpExpr/gen_binary_op_expr.rs @@ -0,0 +1,10 @@ +// generated by codegen + +fn test_binary_op_expr() -> () { + // A binary operation expression. For example: + x + y; + x && y; + x <= y; + x = y; + x += y; +} diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected new file mode 100644 index 0000000000000..348f98b730ba9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | hasLabel: | no | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | no | hasLabel: | no | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql new file mode 100644 index 0000000000000..d0c3e4e3e6dbf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int getNumberOfStatements, string hasTail, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + (if x.hasTail() then hasTail = "yes" else hasTail = "no") and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail, "hasLabel:", + hasLabel diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected new file mode 100644 index 0000000000000..3a935228e0511 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql new file mode 100644 index 0000000000000..dcc97bc9a4856 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected new file mode 100644 index 0000000000000..66dc93e503df0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.expected @@ -0,0 +1,3 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | 0 | gen_block_expr.rs:5:5:7:5 | ExprStmt | +| gen_block_expr.rs:5:5:7:5 | BlockExpr | 0 | gen_block_expr.rs:6:13:6:13 | LetStmt | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | 0 | gen_block_expr.rs:9:13:9:13 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql new file mode 100644 index 0000000000000..22c05e398d0a4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected new file mode 100644 index 0000000000000..2a3d8031821cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.expected @@ -0,0 +1,2 @@ +| gen_block_expr.rs:3:28:12:1 | BlockExpr | gen_block_expr.rs:8:5:11:5 | BlockExpr | +| gen_block_expr.rs:8:5:11:5 | BlockExpr | gen_block_expr.rs:10:9:10:9 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql new file mode 100644 index 0000000000000..f86117be4b9d6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/BlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs new file mode 100644 index 0000000000000..9ccff26f1aae6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BlockExpr/gen_block_expr.rs @@ -0,0 +1,12 @@ +// generated by codegen + +fn test_block_expr() -> () { + // A block expression. For example: + { + let x = 42; + } + 'label: { + let x = 42; + x + } +} diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected new file mode 100644 index 0000000000000..b3324e400f5d8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.expected @@ -0,0 +1 @@ +| gen_box_expr.rs:5:13:5:37 | BoxExpr | getExpr: | gen_box_expr.rs:5:35:5:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql new file mode 100644 index 0000000000000..e24ec8ce6031c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/BoxExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BoxExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs b/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs new file mode 100644 index 0000000000000..9ea4053ecf4bf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BoxExpr/gen_box_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_box_expr() -> () { + // A box expression. For example: + let x = #[rustc_box] Box::new(42); +} diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected new file mode 100644 index 0000000000000..c7b451c235fc4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.expected @@ -0,0 +1,2 @@ +| gen_break_expr.rs:7:13:7:17 | BreakExpr | hasExpr: | no | hasLabel: | no | +| gen_break_expr.rs:12:13:12:27 | BreakExpr | hasExpr: | yes | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql new file mode 100644 index 0000000000000..10d6cec5b6113 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x, string hasExpr, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "hasExpr:", hasExpr, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected new file mode 100644 index 0000000000000..16dfc81245904 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql new file mode 100644 index 0000000000000..f83545cb7ce5f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected new file mode 100644 index 0000000000000..e8918129a36e8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:10:13:10:19 | Label | diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql new file mode 100644 index 0000000000000..6211ec52591a0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/BreakExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from BreakExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs new file mode 100644 index 0000000000000..4d2ec0573e32e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/BreakExpr/gen_break_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen + +fn test_break_expr() -> () { + // A break expression. For example: + loop { + if not_ready() { + break; + } + } + let x = 'label: loop { + if done() { + break 'label 42; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected new file mode 100644 index 0000000000000..111ff8392d21f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | getCallee: | gen_call_expr.rs:5:5:5:7 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:6:5:6:23 | CallExpr | getCallee: | gen_call_expr.rs:6:5:6:19 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:7:5:7:14 | CallExpr | getCallee: | gen_call_expr.rs:7:5:7:10 | IndexExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | no | +| gen_call_expr.rs:8:5:8:10 | CallExpr | getCallee: | gen_call_expr.rs:8:5:8:7 | PathExpr | getNumberOfArgs: | 1 | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql new file mode 100644 index 0000000000000..2d2c45c75b06f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr.ql @@ -0,0 +1,13 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CallExpr x, Expr getCallee, int getNumberOfArgs, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getCallee = x.getCallee() and + getNumberOfArgs = x.getNumberOfArgs() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getCallee:", getCallee, "getNumberOfArgs:", getNumberOfArgs, "isAssigneeExpr:", + isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected new file mode 100644 index 0000000000000..6ff1a242993c9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.expected @@ -0,0 +1,4 @@ +| gen_call_expr.rs:5:5:5:11 | CallExpr | 0 | gen_call_expr.rs:5:9:5:10 | LiteralExpr | +| gen_call_expr.rs:6:5:6:23 | CallExpr | 0 | gen_call_expr.rs:6:21:6:22 | LiteralExpr | +| gen_call_expr.rs:7:5:7:14 | CallExpr | 0 | gen_call_expr.rs:7:12:7:13 | LiteralExpr | +| gen_call_expr.rs:8:5:8:10 | CallExpr | 0 | gen_call_expr.rs:8:9:8:9 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql new file mode 100644 index 0000000000000..8f7ead93761e4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/CallExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs new file mode 100644 index 0000000000000..4d6c737e95cb2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CallExpr/gen_call_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_call_expr() -> () { + // A function call expression. For example: + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; +} diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected new file mode 100644 index 0000000000000..13f055c32ad65 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.expected @@ -0,0 +1 @@ +| gen_cast_expr.rs:5:5:5:16 | CastExpr | getExpr: | gen_cast_expr.rs:5:5:5:9 | PathExpr | getTypeRef: | file://:0:0:0:0 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql new file mode 100644 index 0000000000000..463f70948038f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/CastExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from CastExpr x, Expr getExpr, TypeRef getTypeRef +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getTypeRef = x.getTypeRef() +select x, "getExpr:", getExpr, "getTypeRef:", getTypeRef diff --git a/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs new file mode 100644 index 0000000000000..11230130d0650 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/CastExpr/gen_cast_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_cast_expr() -> () { + // A cast expression. For example: + value as u64; +} diff --git a/rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt similarity index 100% rename from rust/ql/test/extractor-tests/generated/Expr/MISSING_SOURCE.txt rename to rust/ql/test/extractor-tests/generated/ClosureExpr/MISSING_SOURCE.txt diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected new file mode 100644 index 0000000000000..b36d974f77349 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.expected @@ -0,0 +1 @@ +| gen_const_expr.rs:5:8:5:97 | ConstExpr | getExpr: | gen_const_expr.rs:5:8:5:97 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql new file mode 100644 index 0000000000000..700a5c7040225 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/ConstExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ConstExpr x, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() +select x, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs b/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs new file mode 100644 index 0000000000000..c9e3e35509069 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ConstExpr/gen_const_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_const_expr() -> bool { + // A `const` block expression. For example: + if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + return false; + } +} diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected new file mode 100644 index 0000000000000..5bc5e5fc66677 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.expected @@ -0,0 +1,2 @@ +| gen_continue_expr.rs:7:13:7:20 | ContinueExpr | hasLabel: | no | +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | hasLabel: | yes | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql new file mode 100644 index 0000000000000..399b8783da208 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ContinueExpr x, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected new file mode 100644 index 0000000000000..8688627b27ee9 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_continue_expr.rs:12:13:12:27 | ContinueExpr | gen_continue_expr.rs:10:5:10:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql new file mode 100644 index 0000000000000..b9944aa073033 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/ContinueExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ContinueExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs new file mode 100644 index 0000000000000..e818d65270b37 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ContinueExpr/gen_continue_expr.rs @@ -0,0 +1,15 @@ +// generated by codegen + +fn test_continue_expr() -> () { + // A continue expression. For example: + loop { + if not_ready() { + continue; + } + } + 'label: loop { + if not_ready() { + continue 'label; + } + } +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/ElementListExpr/MISSING_SOURCE.txt similarity index 100% rename from rust/ql/test/extractor-tests/generated/RecordLitField/MISSING_SOURCE.txt rename to rust/ql/test/extractor-tests/generated/ElementListExpr/MISSING_SOURCE.txt diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected new file mode 100644 index 0000000000000..0ac28f7f13f89 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.expected @@ -0,0 +1 @@ +| gen_field_expr.rs:5:5:5:9 | FieldExpr | getExpr: | gen_field_expr.rs:5:5:5:5 | PathExpr | getName: | foo | diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql new file mode 100644 index 0000000000000..5cc4bc15dafd2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/FieldExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from FieldExpr x, Expr getExpr, string getName +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getName = x.getName() +select x, "getExpr:", getExpr, "getName:", getName diff --git a/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs new file mode 100644 index 0000000000000..d5f02eb26512d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/FieldExpr/gen_field_expr.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_field_expr() -> () { + // A field access expression. For example: + x.foo +} diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected new file mode 100644 index 0000000000000..fc99c3eae67c5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.expected @@ -0,0 +1,2 @@ +| gen_if_expr.rs:5:5:7:5 | IfExpr | getCondition: | gen_if_expr.rs:5:8:5:14 | BinaryOpExpr | getThen: | gen_if_expr.rs:5:16:7:5 | BlockExpr | hasElse: | no | +| gen_if_expr.rs:8:13:12:5 | IfExpr | getCondition: | gen_if_expr.rs:8:16:8:20 | BinaryOpExpr | getThen: | gen_if_expr.rs:8:22:10:5 | BlockExpr | hasElse: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql new file mode 100644 index 0000000000000..a684dcd54341a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IfExpr x, Expr getCondition, Expr getThen, string hasElse +where + toBeTested(x) and + not x.isUnknown() and + getCondition = x.getCondition() and + getThen = x.getThen() and + if x.hasElse() then hasElse = "yes" else hasElse = "no" +select x, "getCondition:", getCondition, "getThen:", getThen, "hasElse:", hasElse diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected new file mode 100644 index 0000000000000..a857dbe2099a3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.expected @@ -0,0 +1 @@ +| gen_if_expr.rs:8:13:12:5 | IfExpr | gen_if_expr.rs:10:12:12:5 | BlockExpr | diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql new file mode 100644 index 0000000000000..8e6209a248c10 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/IfExpr_getElse.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IfExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getElse() diff --git a/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs new file mode 100644 index 0000000000000..6ef2659892bcb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IfExpr/gen_if_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_if_expr() -> () { + // An `if` expression. For example: + if x == 42 { + println!("that's the answer"); + } + let y = if x > 0 { + 1 + } else { + 0 + } +} diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected new file mode 100644 index 0000000000000..edbf139dfc35f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.expected @@ -0,0 +1,2 @@ +| gen_index_expr.rs:5:5:5:12 | IndexExpr | getBase: | gen_index_expr.rs:5:5:5:8 | PathExpr | getIndex: | gen_index_expr.rs:5:10:5:11 | LiteralExpr | isAssigneeExpr: | no | +| gen_index_expr.rs:6:5:6:12 | IndexExpr | getBase: | gen_index_expr.rs:6:5:6:8 | PathExpr | getIndex: | gen_index_expr.rs:6:10:6:11 | LiteralExpr | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql new file mode 100644 index 0000000000000..e03488ac6d080 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/IndexExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from IndexExpr x, Expr getBase, Expr getIndex, string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + getBase = x.getBase() and + getIndex = x.getIndex() and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "getBase:", getBase, "getIndex:", getIndex, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs new file mode 100644 index 0000000000000..117577d368e37 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/IndexExpr/gen_index_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_index_expr() -> () { + // An index expression. For example: + list[42]; + list[42] = 1; +} diff --git a/rust/ql/test/extractor-tests/generated/InlineAsmExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/InlineAsmExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/LetExpr/LetExpr.expected b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected new file mode 100644 index 0000000000000..41d358886f42e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.expected @@ -0,0 +1 @@ +| gen_let_expr.rs:5:8:5:31 | LetExpr | getPat: | gen_let_expr.rs:5:12:5:18 | TupleStructPat | getExpr: | gen_let_expr.rs:5:22:5:31 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql new file mode 100644 index 0000000000000..bcb2e11126783 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/LetExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LetExpr x, Pat getPat, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + getExpr = x.getExpr() +select x, "getPat:", getPat, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs new file mode 100644 index 0000000000000..1a8bab21c4fe5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LetExpr/gen_let_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_let_expr(maybe_some: Option) -> () { + // A `let` expression. For example: + if let Some(x) = maybe_some { + println!("{}", x); + } +} diff --git a/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LiteralExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/LoopExpr/LoopExpr.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected new file mode 100644 index 0000000000000..82e50bf474f48 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.expected @@ -0,0 +1,3 @@ +| gen_loop_expr.rs:5:5:7:5 | LoopExpr | getBody: | gen_loop_expr.rs:5:10:7:5 | BlockExpr | hasLabel: | no | +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | getBody: | gen_loop_expr.rs:8:18:11:5 | BlockExpr | hasLabel: | yes | +| gen_loop_expr.rs:13:5:19:5 | LoopExpr | getBody: | gen_loop_expr.rs:13:10:19:5 | BlockExpr | hasLabel: | no | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql new file mode 100644 index 0000000000000..aa62fe0be91e0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LoopExpr x, Expr getBody, string hasLabel +where + toBeTested(x) and + not x.isUnknown() and + getBody = x.getBody() and + if x.hasLabel() then hasLabel = "yes" else hasLabel = "no" +select x, "getBody:", getBody, "hasLabel:", hasLabel diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected new file mode 100644 index 0000000000000..98a657f09832a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.expected @@ -0,0 +1 @@ +| gen_loop_expr.rs:8:5:11:5 | LoopExpr | gen_loop_expr.rs:8:5:8:11 | Label | diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql new file mode 100644 index 0000000000000..67d1fd3e07bde --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/LoopExpr_getLabel.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from LoopExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLabel() diff --git a/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs new file mode 100644 index 0000000000000..699cbe243164c --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/LoopExpr/gen_loop_expr.rs @@ -0,0 +1,20 @@ +// generated by codegen + +fn test_loop_expr() -> () { + // A loop expression. For example: + loop { + println!("Hello, world (again)!"); + }; + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; +} diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected new file mode 100644 index 0000000000000..dea4efb1cc4f6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.expected @@ -0,0 +1,4 @@ +| gen_match_arm.rs:6:9:6:15 | MatchArm | getPat: | gen_match_arm.rs:6:9:6:15 | TupleStructPat | hasGuard: | no | getExpr: | gen_match_arm.rs:6:20:6:20 | PathExpr | +| gen_match_arm.rs:7:9:7:12 | MatchArm | getPat: | gen_match_arm.rs:7:9:7:12 | PathPat | hasGuard: | no | getExpr: | gen_match_arm.rs:7:17:7:17 | LiteralExpr | +| gen_match_arm.rs:10:9:10:15 | MatchArm | getPat: | gen_match_arm.rs:10:9:10:15 | TupleStructPat | hasGuard: | yes | getExpr: | gen_match_arm.rs:10:30:10:34 | BinaryOpExpr | +| gen_match_arm.rs:11:9:11:9 | MatchArm | getPat: | gen_match_arm.rs:11:9:11:9 | WildPat | hasGuard: | no | getExpr: | gen_match_arm.rs:11:14:11:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql new file mode 100644 index 0000000000000..6f65a88f202c8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchArm x, Pat getPat, string hasGuard, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getPat = x.getPat() and + (if x.hasGuard() then hasGuard = "yes" else hasGuard = "no") and + getExpr = x.getExpr() +select x, "getPat:", getPat, "hasGuard:", hasGuard, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected new file mode 100644 index 0000000000000..891432f91e0ec --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.expected @@ -0,0 +1 @@ +| gen_match_arm.rs:10:9:10:15 | MatchArm | gen_match_arm.rs:10:20:10:25 | BinaryOpExpr | diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql new file mode 100644 index 0000000000000..345a08a7c6a5b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/MatchArm_getGuard.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchArm x +where toBeTested(x) and not x.isUnknown() +select x, x.getGuard() diff --git a/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs new file mode 100644 index 0000000000000..b4c8732b8e4ce --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchArm/gen_match_arm.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_match_arm(x: i32) -> i32 { + // A match arm. For example: + match x { + Some(y) => y, + None => 0, + } + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } +} diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql new file mode 100644 index 0000000000000..3b59363841f06 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchExpr x, Expr getExpr, int getNumberOfBranches +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getNumberOfBranches = x.getNumberOfBranches() +select x, "getExpr:", getExpr, "getNumberOfBranches:", getNumberOfBranches diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql new file mode 100644 index 0000000000000..42f235a3a6e50 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/MatchExpr_getBranch.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MatchExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getBranch(index) diff --git a/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs new file mode 100644 index 0000000000000..3a6080e83cbca --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MatchExpr/gen_match_expr.rs @@ -0,0 +1,13 @@ +// generated by codegen + +fn test_match_expr(x: i32) -> i32 { + // A match expression. For example: + match x { + Some(y) => y, + None => 0, + } + // match x { + // Some(y) if y != 0 => 1 / y, + // _ => 0, + // } +} diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected new file mode 100644 index 0000000000000..d28ebe1c53edf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | getReceiver: | gen_method_call_expr.rs:5:5:5:5 | PathExpr | getMethodName: | foo | getNumberOfArgs: | 1 | hasGenericArgs: | no | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | getReceiver: | gen_method_call_expr.rs:6:5:6:5 | PathExpr | getMethodName: | foo | getNumberOfArgs: | 1 | hasGenericArgs: | yes | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql new file mode 100644 index 0000000000000..70b43f0707c20 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr.ql @@ -0,0 +1,16 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from + MethodCallExpr x, Expr getReceiver, string getMethodName, int getNumberOfArgs, + string hasGenericArgs +where + toBeTested(x) and + not x.isUnknown() and + getReceiver = x.getReceiver() and + getMethodName = x.getMethodName() and + getNumberOfArgs = x.getNumberOfArgs() and + if x.hasGenericArgs() then hasGenericArgs = "yes" else hasGenericArgs = "no" +select x, "getReceiver:", getReceiver, "getMethodName:", getMethodName, "getNumberOfArgs:", + getNumberOfArgs, "hasGenericArgs:", hasGenericArgs diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected new file mode 100644 index 0000000000000..601b344cd0fc7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.expected @@ -0,0 +1,2 @@ +| gen_method_call_expr.rs:5:5:5:13 | MethodCallExpr | 0 | gen_method_call_expr.rs:5:11:5:12 | LiteralExpr | +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | 0 | gen_method_call_expr.rs:6:23:6:24 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql new file mode 100644 index 0000000000000..9ddca09719081 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getArg.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getArg(index) diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected new file mode 100644 index 0000000000000..e1dbf7481846a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.expected @@ -0,0 +1 @@ +| gen_method_call_expr.rs:6:5:6:25 | MethodCallExpr | file://:0:0:0:0 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql new file mode 100644 index 0000000000000..a1e4ef6c20983 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/MethodCallExpr_getGenericArgs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MethodCallExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getGenericArgs() diff --git a/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs new file mode 100644 index 0000000000000..d4c2d5bc13527 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MethodCallExpr/gen_method_call_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_method_call_expr() -> () { + // A method call expression. For example: + x.foo(42); + x.foo::(42); +} diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected new file mode 100644 index 0000000000000..bd096b3f48804 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.expected @@ -0,0 +1 @@ +| gen_missing_expr.rs:6:13:6:33 | MissingExpr | diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql new file mode 100644 index 0000000000000..eb4a28543c747 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/MissingExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from MissingExpr x +where toBeTested(x) and not x.isUnknown() +select x diff --git a/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs new file mode 100644 index 0000000000000..e4fd065c36452 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/MissingExpr/gen_missing_expr.rs @@ -0,0 +1,7 @@ +// generated by codegen + +fn test_missing_expr() -> () { + // A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + // + let x = non_existing_macro!(); +} diff --git a/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/OffsetOfExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected new file mode 100644 index 0000000000000..90b110d363eb6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:5:13:5:20 | PathExpr | getPath: | gen_path_expr.rs:5:13:5:20 | Unimplemented | +| gen_path_expr.rs:6:13:6:20 | PathExpr | getPath: | gen_path_expr.rs:6:13:6:20 | Unimplemented | +| gen_path_expr.rs:7:13:7:20 | PathExpr | getPath: | gen_path_expr.rs:7:13:7:20 | Unimplemented | +| gen_path_expr.rs:8:13:8:32 | PathExpr | getPath: | gen_path_expr.rs:8:13:8:32 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql new file mode 100644 index 0000000000000..b7936833509b0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from PathExpr x, Unimplemented getPath +where + toBeTested(x) and + not x.isUnknown() and + getPath = x.getPath() +select x, "getPath:", getPath diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs new file mode 100644 index 0000000000000..018d64746d9f3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_path_expr() -> () { + // A path expression. For example: + let x = variable; + let x = foo::bar; + let y = ::foo + let z = ::foo +} diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected new file mode 100644 index 0000000000000..12e7e47c757ef --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.expected @@ -0,0 +1,6 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | hasLhs: | yes | hasRhs: | yes | isInclusive: | yes | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | hasLhs: | yes | hasRhs: | yes | isInclusive: | no | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | hasLhs: | yes | hasRhs: | no | isInclusive: | no | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | hasLhs: | no | hasRhs: | yes | isInclusive: | no | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | hasLhs: | no | hasRhs: | yes | isInclusive: | yes | +| gen_range_expr.rs:10:13:10:14 | RangeExpr | hasLhs: | no | hasRhs: | no | isInclusive: | no | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql new file mode 100644 index 0000000000000..94d158792dedd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x, string hasLhs, string hasRhs, string isInclusive +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasLhs() then hasLhs = "yes" else hasLhs = "no") and + (if x.hasRhs() then hasRhs = "yes" else hasRhs = "no") and + if x.isInclusive() then isInclusive = "yes" else isInclusive = "no" +select x, "hasLhs:", hasLhs, "hasRhs:", hasRhs, "isInclusive:", isInclusive diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected new file mode 100644 index 0000000000000..f88c18b39c2d5 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.expected @@ -0,0 +1,3 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:13:5:13 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:13:6:13 | LiteralExpr | +| gen_range_expr.rs:7:13:7:16 | RangeExpr | gen_range_expr.rs:7:13:7:14 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql new file mode 100644 index 0000000000000..9b184651733fb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getLhs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getLhs() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected new file mode 100644 index 0000000000000..f596145bfc9da --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.expected @@ -0,0 +1,4 @@ +| gen_range_expr.rs:5:13:5:18 | RangeExpr | gen_range_expr.rs:5:17:5:18 | LiteralExpr | +| gen_range_expr.rs:6:13:6:17 | RangeExpr | gen_range_expr.rs:6:16:6:17 | LiteralExpr | +| gen_range_expr.rs:8:13:8:16 | RangeExpr | gen_range_expr.rs:8:15:8:16 | LiteralExpr | +| gen_range_expr.rs:9:13:9:17 | RangeExpr | gen_range_expr.rs:9:16:9:17 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql new file mode 100644 index 0000000000000..ead566af537b6 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/RangeExpr_getRhs.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RangeExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getRhs() diff --git a/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs new file mode 100644 index 0000000000000..b27f504d81c79 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RangeExpr/gen_range_expr.rs @@ -0,0 +1,11 @@ +// generated by codegen + +fn test_range_expr() -> () { + // A range expression. For example: + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected new file mode 100644 index 0000000000000..aaa310b00d1ef --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.expected @@ -0,0 +1,4 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | no | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 1 | hasSpread: | yes | hasEllipsis: | yes | isAssigneeExpr: | no | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 2 | hasSpread: | no | hasEllipsis: | no | isAssigneeExpr: | yes | +| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | hasPath: | yes | getNumberOfFields: | 0 | hasSpread: | no | hasEllipsis: | yes | isAssigneeExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql new file mode 100644 index 0000000000000..a8e24a4fa9150 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr.ql @@ -0,0 +1,17 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from + RecordLitExpr x, string hasPath, int getNumberOfFields, string hasSpread, string hasEllipsis, + string isAssigneeExpr +where + toBeTested(x) and + not x.isUnknown() and + (if x.hasPath() then hasPath = "yes" else hasPath = "no") and + getNumberOfFields = x.getNumberOfFields() and + (if x.hasSpread() then hasSpread = "yes" else hasSpread = "no") and + (if x.hasEllipsis() then hasEllipsis = "yes" else hasEllipsis = "no") and + if x.isAssigneeExpr() then isAssigneeExpr = "yes" else isAssigneeExpr = "no" +select x, "hasPath:", hasPath, "getNumberOfFields:", getNumberOfFields, "hasSpread:", hasSpread, + "hasEllipsis:", hasEllipsis, "isAssigneeExpr:", isAssigneeExpr diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected new file mode 100644 index 0000000000000..2ee172341bbd0 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.expected @@ -0,0 +1,5 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 0 | gen_record_lit_expr.rs:5:26:5:26 | RecordLitField | +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | 1 | gen_record_lit_expr.rs:5:32:5:32 | RecordLitField | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | 0 | gen_record_lit_expr.rs:6:27:6:27 | RecordLitField | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 0 | gen_record_lit_expr.rs:7:14:7:14 | RecordLitField | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | 1 | gen_record_lit_expr.rs:7:20:7:20 | RecordLitField | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql new file mode 100644 index 0000000000000..46a88b0398915 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getField.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getField(index) diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected new file mode 100644 index 0000000000000..febf7f1e78b45 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.expected @@ -0,0 +1,4 @@ +| gen_record_lit_expr.rs:5:17:5:34 | RecordLitExpr | gen_record_lit_expr.rs:5:17:5:34 | Unimplemented | +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:18:6:38 | Unimplemented | +| gen_record_lit_expr.rs:7:5:7:22 | RecordLitExpr | gen_record_lit_expr.rs:7:5:7:22 | Unimplemented | +| gen_record_lit_expr.rs:8:5:8:14 | RecordLitExpr | gen_record_lit_expr.rs:8:5:8:14 | Unimplemented | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql new file mode 100644 index 0000000000000..eb97f36fe3ff3 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getPath.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getPath() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected new file mode 100644 index 0000000000000..5b1ccb6b3da9b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.expected @@ -0,0 +1 @@ +| gen_record_lit_expr.rs:6:18:6:38 | RecordLitExpr | gen_record_lit_expr.rs:6:32:6:36 | PathExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql new file mode 100644 index 0000000000000..2b798749d1073 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/RecordLitExpr_getSpread.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getSpread() diff --git a/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs b/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs new file mode 100644 index 0000000000000..51f77e53c8a7d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitExpr/gen_record_lit_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_record_lit_expr() -> () { + // A record literal expression. For example: + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; +} diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected new file mode 100644 index 0000000000000..81acaffde0343 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.expected @@ -0,0 +1,2 @@ +| gen_record_lit_field.rs:5:14:5:14 | RecordLitField | getName: | a | getExpr: | gen_record_lit_field.rs:5:14:5:14 | LiteralExpr | +| gen_record_lit_field.rs:5:20:5:20 | RecordLitField | getName: | b | getExpr: | gen_record_lit_field.rs:5:20:5:20 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql new file mode 100644 index 0000000000000..bba23ee596461 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/RecordLitField.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RecordLitField x, string getName, Expr getExpr +where + toBeTested(x) and + not x.isUnknown() and + getName = x.getName() and + getExpr = x.getExpr() +select x, "getName:", getName, "getExpr:", getExpr diff --git a/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs b/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs new file mode 100644 index 0000000000000..ecef8089af09f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RecordLitField/gen_record_lit_field.rs @@ -0,0 +1,6 @@ +// generated by codegen + +fn test_record_lit_field() -> () { + // A field in a record literal. For example `a: 1` in: + Foo { a: 1, b: 2 }; +} diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected new file mode 100644 index 0000000000000..b2b75ae61e14a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.expected @@ -0,0 +1,4 @@ +| gen_ref_expr.rs:5:25:5:28 | RefExpr | getExpr: | gen_ref_expr.rs:5:26:5:28 | PathExpr | isRaw: | no | isMut: | no | +| gen_ref_expr.rs:6:23:6:30 | RefExpr | getExpr: | gen_ref_expr.rs:6:28:6:30 | PathExpr | isRaw: | no | isMut: | yes | +| gen_ref_expr.rs:7:35:7:48 | RefExpr | getExpr: | gen_ref_expr.rs:7:46:7:48 | PathExpr | isRaw: | yes | isMut: | no | +| gen_ref_expr.rs:8:33:8:44 | RefExpr | getExpr: | gen_ref_expr.rs:8:42:8:44 | PathExpr | isRaw: | yes | isMut: | yes | diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql new file mode 100644 index 0000000000000..e69683486ddbf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql @@ -0,0 +1,12 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from RefExpr x, Expr getExpr, string isRaw, string isMut +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + (if x.isRaw() then isRaw = "yes" else isRaw = "no") and + if x.isMut() then isMut = "yes" else isMut = "no" +select x, "getExpr:", getExpr, "isRaw:", isRaw, "isMut:", isMut diff --git a/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs new file mode 100644 index 0000000000000..551b957cc65c1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RefExpr/gen_ref_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_ref_expr() -> () { + // A reference expression. For example: + 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; +} diff --git a/rust/ql/test/extractor-tests/generated/RepeatExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/RepeatExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/RepeatExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/ReturnExpr/ReturnExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected new file mode 100644 index 0000000000000..d715c0cb6641f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.expected @@ -0,0 +1,2 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | hasExpr: | yes | +| gen_return_expr.rs:8:5:8:10 | ReturnExpr | hasExpr: | no | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql new file mode 100644 index 0000000000000..fab38b3b8ad55 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ReturnExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected new file mode 100644 index 0000000000000..4247069ccc253 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_return_expr.rs:5:5:5:13 | ReturnExpr | gen_return_expr.rs:5:12:5:13 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql new file mode 100644 index 0000000000000..f93fa9c35231e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/ReturnExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from ReturnExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs new file mode 100644 index 0000000000000..8e72e8324f87b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/ReturnExpr/gen_return_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +// A return expression. For example: +fn some_value() -> i32 { + return 42; +} +fn no_value() -> () { + return; +} diff --git a/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/TupleExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/UnaryOpExpr/UnaryOpExpr.expected b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected new file mode 100644 index 0000000000000..b332f6493404b --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.expected @@ -0,0 +1,3 @@ +| gen_unary_op_expr.rs:5:13:5:15 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:5:14:5:15 | LiteralExpr | getOp: | - | +| gen_unary_op_expr.rs:6:13:6:17 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:6:14:6:17 | LiteralExpr | getOp: | ! | +| gen_unary_op_expr.rs:7:13:7:16 | UnaryOpExpr | getExpr: | gen_unary_op_expr.rs:7:14:7:16 | PathExpr | getOp: | * | diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql new file mode 100644 index 0000000000000..be6a0b6ebe9af --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/UnaryOpExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnaryOpExpr x, Expr getExpr, string getOp +where + toBeTested(x) and + not x.isUnknown() and + getExpr = x.getExpr() and + getOp = x.getOp() +select x, "getExpr:", getExpr, "getOp:", getOp diff --git a/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs new file mode 100644 index 0000000000000..7a185c3b6448a --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnaryOpExpr/gen_unary_op_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_unary_op_expr() -> () { + // A unary operation expression. For example: + let x = -42 + let y = !true + let z = *ptr +} diff --git a/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt new file mode 100644 index 0000000000000..9cb54ddd059ea --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnderscoreExpr/MISSING_SOURCE.txt @@ -0,0 +1,4 @@ +// generated by codegen + +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/UnsafeBlockExpr/UnsafeBlockExpr.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected new file mode 100644 index 0000000000000..2fb952294e6e2 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | getNumberOfStatements: | 1 | hasTail: | yes | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql new file mode 100644 index 0000000000000..fe7906db5fa39 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr.ql @@ -0,0 +1,11 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x, int getNumberOfStatements, string hasTail +where + toBeTested(x) and + not x.isUnknown() and + getNumberOfStatements = x.getNumberOfStatements() and + if x.hasTail() then hasTail = "yes" else hasTail = "no" +select x, "getNumberOfStatements:", getNumberOfStatements, "hasTail:", hasTail diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected new file mode 100644 index 0000000000000..a9c91832300cd --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | 0 | gen_unsafe_block_expr.rs:6:13:6:13 | LetStmt | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql new file mode 100644 index 0000000000000..e813310cd46a1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getStatement.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x, int index +where toBeTested(x) and not x.isUnknown() +select x, index, x.getStatement(index) diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected new file mode 100644 index 0000000000000..c0d12ae28a5b4 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.expected @@ -0,0 +1 @@ +| gen_unsafe_block_expr.rs:5:18:8:5 | UnsafeBlockExpr | gen_unsafe_block_expr.rs:7:9:7:54 | CallExpr | diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql new file mode 100644 index 0000000000000..cce5b9284fcfc --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/UnsafeBlockExpr_getTail.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from UnsafeBlockExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getTail() diff --git a/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs new file mode 100644 index 0000000000000..6adf2190cdfae --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/UnsafeBlockExpr/gen_unsafe_block_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_unsafe_block_expr() -> () { + // An unsafe block expression. For example: + let layout = unsafe { + let x = 42; + Layout::from_size_align_unchecked(size, align) + }; +} diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected new file mode 100644 index 0000000000000..bda4e84abfd99 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql new file mode 100644 index 0000000000000..0f99cbc0c3f1e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YeetExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected new file mode 100644 index 0000000000000..074c6fbff74c1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yeet_expr.rs:6:8:6:36 | YeetExpr | gen_yeet_expr.rs:6:16:6:36 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql new file mode 100644 index 0000000000000..526ac38ba1daf --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/YeetExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YeetExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs new file mode 100644 index 0000000000000..877710805c318 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YeetExpr/gen_yeet_expr.rs @@ -0,0 +1,8 @@ +// generated by codegen + +fn test_yeet_expr() -> () { + // A `yeet` expression. For example: + if x < size { + do yeet "index out of bounds"; + } +} diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected new file mode 100644 index 0000000000000..e897a88bb2404 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | hasExpr: | yes | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql new file mode 100644 index 0000000000000..18fd38bac9c6e --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr.ql @@ -0,0 +1,10 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YieldExpr x, string hasExpr +where + toBeTested(x) and + not x.isUnknown() and + if x.hasExpr() then hasExpr = "yes" else hasExpr = "no" +select x, "hasExpr:", hasExpr diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected new file mode 100644 index 0000000000000..87b88ef24196d --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.expected @@ -0,0 +1 @@ +| gen_yield_expr.rs:7:13:7:19 | YieldExpr | gen_yield_expr.rs:7:19:7:19 | LiteralExpr | diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql new file mode 100644 index 0000000000000..8bba6eb87e952 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/YieldExpr_getExpr.ql @@ -0,0 +1,7 @@ +// generated by codegen +import codeql.rust.elements +import TestUtils + +from YieldExpr x +where toBeTested(x) and not x.isUnknown() +select x, x.getExpr() diff --git a/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs new file mode 100644 index 0000000000000..b6d951f7adf47 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/YieldExpr/gen_yield_expr.rs @@ -0,0 +1,9 @@ +// generated by codegen + +fn test_yield_expr() -> () { + // A `yield` expression. For example: + let one = #[coroutine] + || { + yield 1; + }; +} diff --git a/rust/schema.py b/rust/schema.py index 1a5a19b2e0b83..d29b7245e582a 100644 --- a/rust/schema.py +++ b/rust/schema.py @@ -76,7 +76,6 @@ class Module(Declaration): declarations: list[Declaration] | child -@qltest.collapse_hierarchy class Expr(AstNode): pass @@ -119,15 +118,31 @@ class Function(Declaration): body: Expr | child -# Missing, +@rust.doc_test_signature("() -> ()") class MissingExpr(Expr): + """ + A missing expression, used as a place holder for incomplete syntax, as well as bodies of functions that are defined externally. + + ``` + let x = non_existing_macro!(); + ``` + """ pass # Path(Path), - +@rust.doc_test_signature("() -> ()") class PathExpr(Expr): + """ + A path expression. For example: + ``` + let x = variable; + let x = foo::bar; + let y = ::foo + let z = ::foo + ``` + """ path: Unimplemented | child # If { @@ -137,7 +152,23 @@ class PathExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class IfExpr(Expr): + """ + An `if` expression. For example: + ``` + if x == 42 { + println!("that's the answer"); + } + ``` + ``` + let y = if x > 0 { + 1 + } else { + 0 + } + ``` + """ condition: Expr | child then: Expr | child else_: optional[Expr] | child @@ -148,7 +179,16 @@ class IfExpr(Expr): # }, +@rust.doc_test_signature("(maybe_some: Option) -> ()") class LetExpr(Expr): + """ + A `let` expression. For example: + ``` + if let Some(x) = maybe_some { + println!("{}", x); + } + ``` + """ pat: Pat | child expr: Expr | child @@ -165,7 +205,22 @@ class BlockExprBase(Expr): tail: optional[Expr] | child +@rust.doc_test_signature("() -> ()") class BlockExpr(BlockExprBase): + """ + A block expression. For example: + ``` + { + let x = 42; + } + ``` + ``` + 'label: { + let x = 42; + x + } + ``` + """ label: optional[Label] | child # Async { @@ -175,13 +230,30 @@ class BlockExpr(BlockExprBase): # }, +@rust.doc_test_signature("() -> i32") class AsyncBlockExpr(BlockExprBase): + """ + An async block expression. For example: + ``` + async { + let x = 42; + x + }.await + ``` + """ pass -# Const(ConstBlockId), - +@rust.doc_test_signature("() -> bool") class ConstExpr(Expr): + """ + A `const` block expression. For example: + ``` + if const { SRC::IS_ZST || DEST::IS_ZST || mem::align_of::() != mem::align_of::() } { + return false; + } + ``` + """ expr: Expr | child # // FIXME: Fold this into Block with an unsafe flag? @@ -192,7 +264,17 @@ class ConstExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class UnsafeBlockExpr(BlockExprBase): + """ + An unsafe block expression. For example: + ``` + let layout = unsafe { + let x = 42; + Layout::from_size_align_unchecked(size, align) + }; + ``` + """ pass # Loop { @@ -201,7 +283,32 @@ class UnsafeBlockExpr(BlockExprBase): # }, +@rust.doc_test_signature("() -> ()") class LoopExpr(Expr): + """ + A loop expression. For example: + ``` + loop { + println!("Hello, world (again)!"); + }; + ``` + ``` + 'label: loop { + println!("Hello, world (once)!"); + break 'label; + }; + ``` + ``` + let mut x = 0; + loop { + if x < 10 { + x += 1; + } else { + break; + } + }; + ``` + """ body: Expr | child label: optional[Label] | child @@ -212,7 +319,17 @@ class LoopExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class CallExpr(Expr): + """ + A function call expression. For example: + ``` + foo(42); + foo::(42); + foo[0](42); + foo(1) = 4; + ``` + """ callee: Expr | child args: list[Expr] | child is_assignee_expr: predicate @@ -225,7 +342,14 @@ class CallExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class MethodCallExpr(Expr): + """ + A method call expression. For example: + ``` + x.foo(42); + x.foo::(42); + """ receiver: Expr | child method_name: string args: list[Expr] | child @@ -238,8 +362,23 @@ class MethodCallExpr(Expr): # } -@qltest.skip +@rust.doc_test_signature("(x: i32) -> i32") class MatchArm(AstNode): + """ + A match arm. For example: + ``` + match x { + Some(y) => y, + None => 0, + } + ``` + ``` + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } + ``` + """ pat: Pat | child guard: optional[Expr] | child expr: Expr | child @@ -249,7 +388,22 @@ class MatchArm(AstNode): # }, +@rust.doc_test_signature("(x: i32) -> i32") class MatchExpr(Expr): + """ + A match expression. For example: + ``` + match x { + Some(y) => y, + None => 0, + } + ``` + match x { + Some(y) if y != 0 => 1 / y, + _ => 0, + } + ``` + """ expr: Expr | child branches: list[MatchArm] | child @@ -258,7 +412,25 @@ class MatchExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class ContinueExpr(Expr): + """ + A continue expression. For example: + ``` + loop { + if not_ready() { + continue; + } + } + ``` + ``` + 'label: loop { + if not_ready() { + continue 'label; + } + } + ``` + """ label: optional[Label] | child # Break { @@ -267,7 +439,25 @@ class ContinueExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class BreakExpr(Expr): + """ + A break expression. For example: + ``` + loop { + if not_ready() { + break; + } + } + ``` + ``` + let x = 'label: loop { + if done() { + break 'label 42; + } + }; + ``` + """ expr: optional[Expr] | child label: optional[Label] | child @@ -277,6 +467,19 @@ class BreakExpr(Expr): # }, class ReturnExpr(Expr): + """ + A return expression. For example: + ``` + fn some_value() -> i32 { + return 42; + } + ``` + ``` + fn no_value() -> () { + return; + } + ``` + """ expr: optional[Expr] | child # Become { # expr: ExprId, @@ -284,13 +487,34 @@ class ReturnExpr(Expr): class BecomeExpr(Expr): + """ + A `become` expression. For example: + ``` + fn fact_a(n: i32, a: i32) -> i32 { + if n == 0 { + a + } else { + become fact_a(n - 1, n * a) + } + } ``` + """ expr: Expr | child # Yield { # expr: Option, # }, +@rust.doc_test_signature("() -> ()") class YieldExpr(Expr): + """ + A `yield` expression. For example: + ``` + let one = #[coroutine] + || { + yield 1; + }; + ``` + """ expr: optional[Expr] | child # Yeet { @@ -298,7 +522,16 @@ class YieldExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class YeetExpr(Expr): + """ + A `yeet` expression. For example: + ``` + if x < size { + do yeet "index out of bounds"; + } + ``` + """ expr: optional[Expr] | child # RecordLit { # path: Option>, @@ -309,17 +542,29 @@ class YeetExpr(Expr): # }, -class RecordFieldPat(AstNode): - name: string - pat: Pat | child - - +@rust.doc_test_signature("() -> ()") class RecordLitField(AstNode): + """ + A field in a record literal. For example `a: 1` in: + ``` + Foo { a: 1, b: 2 }; + ``` + """ name: string expr: Expr | child +@rust.doc_test_signature("() -> ()") class RecordLitExpr(Expr): + """ + A record literal expression. For example: + ``` + let first = Foo { a: 1, b: 2 }; + let second = Foo { a: 2, ..first }; + Foo { a: 1, b: 2 }[2] = 10; + Foo { .. } = second; + ``` + """ path: optional[Unimplemented] | child fields: list[RecordLitField] | child spread: optional[Expr] | child @@ -331,8 +576,14 @@ class RecordLitExpr(Expr): # expr: ExprId, # name: Name, # }, - +@rust.doc_test_signature("() -> ()") class FieldExpr(Expr): + """ + A field access expression. For example: + ``` + x.foo + ``` + """ expr: Expr | child name: string @@ -341,7 +592,17 @@ class FieldExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class AwaitExpr(Expr): + """ + An `await` expression. For example: + ``` + async { + let x = foo().await; + x + } + ``` + """ expr: Expr | child # Cast { @@ -350,7 +611,14 @@ class AwaitExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class CastExpr(Expr): + """ + A cast expression. For example: + ``` + value as u64; + ``` + """ expr: Expr | child type_ref: TypeRef | child # Ref { @@ -360,7 +628,17 @@ class CastExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class RefExpr(Expr): + """ + A reference expression. For example: + ``` + 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; + ``` + """ expr: Expr | child is_raw: predicate is_mut: predicate @@ -369,7 +647,14 @@ class RefExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class BoxExpr(Expr): + """ + A box expression. For example: + ``` + let x = #[rustc_box] Box::new(42); + ``` + """ expr: Expr | child # UnaryOp { # expr: ExprId, @@ -377,7 +662,16 @@ class BoxExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class UnaryOpExpr(Expr): + """ + A unary operation expression. For example: + ``` + let x = -42 + let y = !true + let z = *ptr + ``` + """ expr: Expr | child op: string @@ -387,9 +681,18 @@ class UnaryOpExpr(Expr): # rhs: ExprId, # op: Option, # }, - - +@rust.doc_test_signature("() -> ()") class BinaryOpExpr(Expr): + """ + A binary operation expression. For example: + ``` + x + y; + x && y; + x <= y; + x = y; + x += y; + ``` + """ lhs: Expr | child rhs: Expr | child op: optional[string] @@ -402,7 +705,19 @@ class BinaryOpExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class RangeExpr(Expr): + """ + A range expression. For example: + ``` + let x = 1..=10; + let x = 1..10; + let x = 10..; + let x = ..10; + let x = ..=10; + let x = ..; + ``` + """ lhs: optional[Expr] | child rhs: optional[Expr] | child is_inclusive: predicate @@ -414,7 +729,15 @@ class RangeExpr(Expr): # }, +@rust.doc_test_signature("() -> ()") class IndexExpr(Expr): + """ + An index expression. For example: + ``` + list[42]; + list[42] = 1; + ``` + """ base: Expr | child index: Expr | child is_assignee_expr: predicate @@ -543,6 +866,10 @@ class OrPat(Pat): args: list[Pat] | child +class RecordFieldPat(AstNode): + name: string + pat: Pat | child + # Record { path: Option>, args: Box<[RecordFieldPat]>, ellipsis: bool },