diff --git a/rust/ql/.generated.list b/rust/ql/.generated.list index 3e240b0b61d..4ab35c1b4b3 100644 --- a/rust/ql/.generated.list +++ b/rust/ql/.generated.list @@ -98,11 +98,11 @@ lib/codeql/rust/elements/ParenExpr.qll b635f0e5d300cd9cf3651cfcefd58316c21727295 lib/codeql/rust/elements/ParenPat.qll 40d033de6c85ad042223e0da80479adebab35494396ab652da85d3497e435c5a 8f2febe5d5cefcb076d201ae9607d403b9cfe8169d2f4b71d13868e0af43dc25 lib/codeql/rust/elements/ParenType.qll e1f5695b143c97b98ccdb460a5cf872461cfc13b83a4f005f26c288dc0afae10 1164f8efae7f255925411bddb33939fab0bf1c07955a16fef173b3f4675d09ae lib/codeql/rust/elements/Pat.qll 56211c5cb4709e7c12a2bfd2da5e413a451672d99e23a8386c08ad0b999fd45c b1b1893a13a75c4f0390f7e2a14ee98a46f067cfdc991a8d43adc82497d20aff -lib/codeql/rust/elements/Path.qll a0078e6d57dfd5a3b7fb2be4587f55f8e9c65ee042815a8a5b8dbd5273b4076a 0e2d4f8cbd54bd60aa4929b5fd50fe214346b6c0451f73e45143445d15420108 +lib/codeql/rust/elements/Path.qll 94869df09b929c4a60bae42b7e3a66c007f41078c08b7d9c6defb705b953ce8e eb317f75b89978d41fd3b166c7e3d871da4c04b3e17afbbcd0a5d73881e0d1d9 lib/codeql/rust/elements/PathExpr.qll 906df1d80c662b79f1b0b0428c39754b7f8dbcb2234919dd45dd8206a099dd36 1d6015afab6378c926c5838c9a5772cfcfeedf474e2eeca3e46085300ff8d4e1 lib/codeql/rust/elements/PathExprBase.qll bb41092ec690ae926e3233c215dcaf1fd8e161b8a6955151949f492e02dba13a b2257072f8062d31c29c63ee1311b07e0d2eb37075f582cfc76bb542ef773198 lib/codeql/rust/elements/PathPat.qll 6897e69bcb24b56d39ede796cf5767988dcd5741e02333fa8495dd7c814f771a 2a011fb92f17e4b4ff713e6d29f591054dfede22a9aaa006e67fca2c23ab76bf -lib/codeql/rust/elements/PathSegment.qll 536a8fe172db367e5f1dc678a014e2350eadfc379242d2b5451725e826ab1448 1a3a237f56c1d9ccdce6832ec6417fed25cd3e29ba836363cc6085e2125de4c5 +lib/codeql/rust/elements/PathSegment.qll 9560551cf8b65e84705e7f302e12b48330e048613129e87c0f65a7eb297a6cc3 3aa75a5fd81f8ea32bd2b4bf0c51c386de57cbe9ab035fe3ec68ad7fcf51b375 lib/codeql/rust/elements/PathType.qll a7bd3b05dc2c0e96c91c5485db508a1f5bb8fe3a01486be6815ae9dabb163add b11e996b6c0cc21a3d8d1ddc23c37e4d54a78e84a9278b3ceca1e94cb7321532 lib/codeql/rust/elements/PrefixExpr.qll 107e7bd111b637fd6d76026062d54c2780760b965f172ef119c50dd0714a377d 46954a9404e561c51682395729daac3bda5442113f29839d043e9605d63f7f6d lib/codeql/rust/elements/PtrType.qll b137f47a53e41b3b30c7d80dbdd6724bf15f99530ca40cc264a04af5f07aa878 b2ffdf739bfb7564d942fe54409834a59511c0b305b6d5b2219a8ee0ef594332 @@ -512,18 +512,18 @@ lib/codeql/rust/elements/internal/generated/ParenPat.qll ce24b8f8ecbf0f204af2003 lib/codeql/rust/elements/internal/generated/ParenType.qll 9cc954d73f8330dcac7b475f97748b63af5c8766dee9d2f2872c0a7e4c903537 c07534c8a9c683c4a9b11d490095647e420de0a0bfc23273eaf6f31b00244273 lib/codeql/rust/elements/internal/generated/ParentChild.qll 2237ba700c7d790cbbf7ad4d86889d22c6d210af62474ad8d363d79abb574722 36f9d47b002a241f0f793816ca9e6327fbbefb02268665553c56ded6012f82ec lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4 -lib/codeql/rust/elements/internal/generated/Path.qll f2b1be2f8f44001a6533533c978c4a9a8b7d64838d6f39eef5f0c0e7890611b8 d724a00a38f42429ffa8fb3bffbb5ec69e16a32ceeeb1d1f026fc7adf87424a8 +lib/codeql/rust/elements/internal/generated/Path.qll 4c1c8e840ed57880e574142b081b11d7a7428a009f10e3aa8f4645e211f6b2e0 989668cf0f1bdee7557e2f97c01e41d2a56848227fed41477833f5fc1e1d35f6 lib/codeql/rust/elements/internal/generated/PathExpr.qll 2096e3c1db22ee488a761690adabfc9cfdea501c99f7c5d96c0019cb113fc506 54245ce0449c4e263173213df01e079d5168a758503a5dbd61b25ad35a311140 lib/codeql/rust/elements/internal/generated/PathExprBase.qll d8218e201b8557fa6d9ca2c30b764e5ad9a04a2e4fb695cc7219bbd7636a6ac2 4ef178426d7095a156f4f8c459b4d16f63abc64336cb50a6cf883a5f7ee09113 lib/codeql/rust/elements/internal/generated/PathPat.qll 98c9938d6a359fd717829b196eb09701d2c798e18c1f43fa7b2a9145afdf6c19 caba2e629cae08682baac90a76ae9a48cda2d7d6f9c23d506fa0ff3f292978a4 -lib/codeql/rust/elements/internal/generated/PathSegment.qll 4621597fd86246f788b8f9ca73f6b0f27929fc04261ce3ccf85da1183071431d aadda8bce386a3b7a9c53b98465eedcc4f724e37b8a904c1775af5b7ffb041ee +lib/codeql/rust/elements/internal/generated/PathSegment.qll 0fa07886deb0fc4d909d7edf691238a344f2739900aafb168cbac171eb1729a8 8f4bb418d8bea5e40128a87977c57d0a9183d06d111601ad93130c8615c11465 lib/codeql/rust/elements/internal/generated/PathType.qll 45de78e5374d6eb0446e2112ec72d3692c2811df9fa2ad03d0127e426940abe3 622cf70408413a565a0dac58f451035ac1339c8d0ee5b24f630680201cb0aa48 lib/codeql/rust/elements/internal/generated/PrefixExpr.qll c9ede5f2deb7b41bc8240969e8554f645057018fe96e7e9ad9c2924c8b14722b 5ae2e3c3dc8fa73e7026ef6534185afa6b0b5051804435d8b741dd3640c864e1 lib/codeql/rust/elements/internal/generated/PtrType.qll 40099c5a4041314b66932dfd777c9e2bef90a0711fb8d7c2c2cec764c003ac4a cf8297d93557356a572223d3e8acca701837c4b1f54e8d4351ba195fb7ed27f8 lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590 ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590 lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9 lib/codeql/rust/elements/internal/generated/RangePat.qll efd93730de217cf50dcba5875595263a5eadf9f7e4e1272401342a094d158614 229b251b3d118932e31e78ac4dfb75f48b766f240f20d436062785606d44467b -lib/codeql/rust/elements/internal/generated/Raw.qll 462d87edee9e0fc463f789a765e19d94c4c027a73db876ad306f918dd87e9511 33a6782598a6ba0e02e6b772b5b74ebbe609b0bc3a92180f85db7472e00aa8d9 +lib/codeql/rust/elements/internal/generated/Raw.qll fd2eeb93f84b668f5083ecad8ff5f5d4bbdfcf4c65f4a40907aca47e33b031d6 de433b9feec8276ed34d106b97c7b66d81206a21a2b5343253f4cf799f1bf567 lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40 lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1 lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0 @@ -888,25 +888,25 @@ test/extractor-tests/generated/ParenPat/ParenPat_getPat.ql 96f3db0ec4e71fd870619 test/extractor-tests/generated/ParenType/ParenType.ql 81c8ad667397ce36157941abd9b879e9305a440018853af4528eb737ae4d2935 3ef3b86203b0143be2d7f7f4833f55fd6c226cb9205e3c1940b6c2a1371622f3 test/extractor-tests/generated/ParenType/ParenType_getTy.ql 41dd6605e7b348618156712b559e2f1b6aac02d6c727e8cbf8653530794ec969 30ac6611c730e76cfb75f98efcf817783a50cec0cf3b3197459d7642f74dde85 test/extractor-tests/generated/Path/Path.ql f17c1c4d23c0d5e9776cee84444f6ee7445de88afbc1f26c34b96e13ab618158 89499cb0f63b3634d6b5e2b8c4a13bd4401ce82e54af0ab46e41a34b0288eeb9 +test/extractor-tests/generated/Path/PathExpr.ql b9696cd7ad9f3874e4bc4b1b9c77f42f06ab6c61b77fb641458da63667087b9b db84a7a8dd05e30ff80733af01f08d43ff031bb4b3e3af06332a73ba7e7bbc43 +test/extractor-tests/generated/Path/PathExpr_getAttr.ql 2ccac48cd91d86670c1d2742de20344135d424e6f0e3dafcc059555046f92d92 9b7b5f5f9e3674fad9b3a5bcd3cabc0dff32a95640da0fce6f4d0eb931f1757d +test/extractor-tests/generated/Path/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 +test/extractor-tests/generated/Path/PathPat.ql 823732954a5882e33a37bd0bf0cafb2cec51659a5203a4831eec2516da0e49fa 54001149718a9ca15d8c0d4be63f3fe00a9f0d44fa1309e2f605d7932355ea5d +test/extractor-tests/generated/Path/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb +test/extractor-tests/generated/Path/PathSegment.ql efc39cea1b4c0b2b0da6434136334430d074699f84124d6bcf94c24aa854dc64 c0a4bd60c67665c058ca22a59e535e925fdb00dec95ffc5c71697fb0ed78a329 +test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql 8f6e67b3e316309f20e21d7e7944accf66b0256b76fa50ee9a714044c6ec8cea 15f10a701fc4d3f9fd6734da90790cdbc8a1ddd57bf52695740acedcb2e6e485 +test/extractor-tests/generated/Path/PathSegment_getNameRef.ql 799d284e2f9267d6bbe67aa7035e525ef347dc74cb3e2180e7b2171b5cb49674 592130bc2358989536abf62e8a261272c851483ede4f19783f7d61ffc1803e4b +test/extractor-tests/generated/Path/PathSegment_getParamList.ql e1e7b9b5062f936c33b7e7e29b21456448242df4985c6cffb54900063cfd3e63 6568e851cb6bcb32622f89d01e3aa6e7dd21940d21572a9988584e34bdf25366 +test/extractor-tests/generated/Path/PathSegment_getPathType.ql 01942da6d0b10c1d15caec6abb8c53f1dc7f8c04a91a797f572063aa003dbc4b cb21e6cb160652527ba571265297dae86beffe191dd7dfc4d0beee45cb0cda29 +test/extractor-tests/generated/Path/PathSegment_getRetType.ql 36386a514bc925f5b17ad87afba9fef7986900c1b791732de061213c6e86743f f38bcee68c1da19e70bb1e1c4a4047c763a466f1b8ef2c4f65f8c724c0b58197 +test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql d1db51208a311c30af369ce2fdc3a3296e7d598b27bf4960b8b34622a9d9163b 561b1e38c6d8b301fdc016e1d012dd805fde1b42b0720c17d7b15535715047f2 +test/extractor-tests/generated/Path/PathSegment_getTy.ql a0ceaf3f37e521cc92c21cc0bae929499ef3584f86349ef34808c20963d31c75 d674e56e08a6d2a7d211503a466df2cc90c35a3951e41598febf62c8dc693655 +test/extractor-tests/generated/Path/PathType.ql cb67b05cf7e4f32cbd46ac89a15f6eafe3507cc655db0b9d54a1cf8e7fbcca40 890053e7fd8cd8a92015c09588c7c646f075901cddc3eb8d57210b02b23a5944 +test/extractor-tests/generated/Path/PathType_getPath.ql 7043c7939e4f835e4b2c7e3e207637c362d7a9dbdba0151b38c873fdaf43e7a5 ee2aad1b4fb2b00e1a5d39387848aa164a39e3cd49141f07c175b205c8451bb1 test/extractor-tests/generated/Path/Path_getPart.ql 8aa45a0b58203ef1177166efbe1c2851faf4b4c9a453c83137f0c9298badcdbf b82d490d9b3a8237487cd5da8b3b6fc4aa477977b332a5c6539b3cd4e6d5b45b test/extractor-tests/generated/Path/Path_getQualifier.ql 9af95e22cdf3a65da6a41d93136aef4523db5ce81d38f6ed4bc613f1c68784d0 3102d9241a417a92c97a53ac56a7a8683463f1adc7a593cda1382c0d25b3f261 test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.ql 7c0ff524595514630de4178028260d4832bfc4f57bfddec9f8e72a6c6dbf241c 55e617380476c183ef9259199d2cfd551b07466e94bc452c4723754d0c82691b test/extractor-tests/generated/Path/Path_getResolvedPath.ql 20c8977781dfe687d5db03290612179cf1360eb47b86ea62d25d1eef62a681e7 c35b76e7d63c05dc80867285bb913042cbe90b45d4d4306df9eac2cba5e8db70 -test/extractor-tests/generated/PathExpr/PathExpr.ql b9696cd7ad9f3874e4bc4b1b9c77f42f06ab6c61b77fb641458da63667087b9b db84a7a8dd05e30ff80733af01f08d43ff031bb4b3e3af06332a73ba7e7bbc43 -test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql 2ccac48cd91d86670c1d2742de20344135d424e6f0e3dafcc059555046f92d92 9b7b5f5f9e3674fad9b3a5bcd3cabc0dff32a95640da0fce6f4d0eb931f1757d -test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql e7894071313a74166bdd31d7cd974037fcd5a7f0e92d5eec42833266196eb858 46a06e8a1207e7a0fa175cd4b61068e5fd6c43b5575b88986409f0ac2be64c51 -test/extractor-tests/generated/PathPat/PathPat.ql 823732954a5882e33a37bd0bf0cafb2cec51659a5203a4831eec2516da0e49fa 54001149718a9ca15d8c0d4be63f3fe00a9f0d44fa1309e2f605d7932355ea5d -test/extractor-tests/generated/PathPat/PathPat_getPath.ql 6c0c71c80a6e631ea7775ec8660b470ff6b264bab14a399606cf113b1fb190fc 8e34cbb4d064db929e94652e1901ec4f26affa71e30e556b7acdff71dd622cbb -test/extractor-tests/generated/PathSegment/PathSegment.ql efc39cea1b4c0b2b0da6434136334430d074699f84124d6bcf94c24aa854dc64 c0a4bd60c67665c058ca22a59e535e925fdb00dec95ffc5c71697fb0ed78a329 -test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql 8f6e67b3e316309f20e21d7e7944accf66b0256b76fa50ee9a714044c6ec8cea 15f10a701fc4d3f9fd6734da90790cdbc8a1ddd57bf52695740acedcb2e6e485 -test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql 799d284e2f9267d6bbe67aa7035e525ef347dc74cb3e2180e7b2171b5cb49674 592130bc2358989536abf62e8a261272c851483ede4f19783f7d61ffc1803e4b -test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql e1e7b9b5062f936c33b7e7e29b21456448242df4985c6cffb54900063cfd3e63 6568e851cb6bcb32622f89d01e3aa6e7dd21940d21572a9988584e34bdf25366 -test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql 01942da6d0b10c1d15caec6abb8c53f1dc7f8c04a91a797f572063aa003dbc4b cb21e6cb160652527ba571265297dae86beffe191dd7dfc4d0beee45cb0cda29 -test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql 36386a514bc925f5b17ad87afba9fef7986900c1b791732de061213c6e86743f f38bcee68c1da19e70bb1e1c4a4047c763a466f1b8ef2c4f65f8c724c0b58197 -test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql d1db51208a311c30af369ce2fdc3a3296e7d598b27bf4960b8b34622a9d9163b 561b1e38c6d8b301fdc016e1d012dd805fde1b42b0720c17d7b15535715047f2 -test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql a0ceaf3f37e521cc92c21cc0bae929499ef3584f86349ef34808c20963d31c75 d674e56e08a6d2a7d211503a466df2cc90c35a3951e41598febf62c8dc693655 -test/extractor-tests/generated/PathType/PathType.ql cb67b05cf7e4f32cbd46ac89a15f6eafe3507cc655db0b9d54a1cf8e7fbcca40 890053e7fd8cd8a92015c09588c7c646f075901cddc3eb8d57210b02b23a5944 -test/extractor-tests/generated/PathType/PathType_getPath.ql 7043c7939e4f835e4b2c7e3e207637c362d7a9dbdba0151b38c873fdaf43e7a5 ee2aad1b4fb2b00e1a5d39387848aa164a39e3cd49141f07c175b205c8451bb1 test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql 44fb7174365c6deecdc22c720d84617c6e060c05d49c41c90433451588f8aa6f 871fab471c82fede3c36edc003f9decee5bb7844c016951d28be78d0c91487e5 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql fdad6ad5199435ded1e4a9ea6b246e76b904cd73a36aaa4780e84eef91741c5b 75d63940046e62c1efa1151b0cac45b5ec0bab5e39aec2e11d43f6c385e37984 test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql 2d1d97f6277794871fbb032ea87ac30b1aa902a74cd874720156162057ea202e b1b9880fce07d66df7ec87f12189c37adf9f233a1d0b38a1b09808d052a95642 diff --git a/rust/ql/.gitattributes b/rust/ql/.gitattributes index 91644fc94af..40fea9eb65d 100644 --- a/rust/ql/.gitattributes +++ b/rust/ql/.gitattributes @@ -890,25 +890,25 @@ /test/extractor-tests/generated/ParenType/ParenType.ql linguist-generated /test/extractor-tests/generated/ParenType/ParenType_getTy.ql linguist-generated /test/extractor-tests/generated/Path/Path.ql linguist-generated +/test/extractor-tests/generated/Path/PathExpr.ql linguist-generated +/test/extractor-tests/generated/Path/PathExpr_getAttr.ql linguist-generated +/test/extractor-tests/generated/Path/PathExpr_getPath.ql linguist-generated +/test/extractor-tests/generated/Path/PathPat.ql linguist-generated +/test/extractor-tests/generated/Path/PathPat_getPath.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getNameRef.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getParamList.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getPathType.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getRetType.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql linguist-generated +/test/extractor-tests/generated/Path/PathSegment_getTy.ql linguist-generated +/test/extractor-tests/generated/Path/PathType.ql linguist-generated +/test/extractor-tests/generated/Path/PathType_getPath.ql linguist-generated /test/extractor-tests/generated/Path/Path_getPart.ql linguist-generated /test/extractor-tests/generated/Path/Path_getQualifier.ql linguist-generated /test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.ql linguist-generated /test/extractor-tests/generated/Path/Path_getResolvedPath.ql linguist-generated -/test/extractor-tests/generated/PathExpr/PathExpr.ql linguist-generated -/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql linguist-generated -/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql linguist-generated -/test/extractor-tests/generated/PathPat/PathPat.ql linguist-generated -/test/extractor-tests/generated/PathPat/PathPat_getPath.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql linguist-generated -/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql linguist-generated -/test/extractor-tests/generated/PathType/PathType.ql linguist-generated -/test/extractor-tests/generated/PathType/PathType_getPath.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getAttr.ql linguist-generated /test/extractor-tests/generated/PrefixExpr/PrefixExpr_getExpr.ql linguist-generated diff --git a/rust/ql/lib/codeql/rust/elements/Path.qll b/rust/ql/lib/codeql/rust/elements/Path.qll index 530c40397c3..cb228373cf5 100644 --- a/rust/ql/lib/codeql/rust/elements/Path.qll +++ b/rust/ql/lib/codeql/rust/elements/Path.qll @@ -10,6 +10,7 @@ import codeql.rust.elements.Resolvable /** * A path. For example: * ```rust + * use some_crate::some_module::some_item; * foo::bar; * ``` */ diff --git a/rust/ql/lib/codeql/rust/elements/PathSegment.qll b/rust/ql/lib/codeql/rust/elements/PathSegment.qll index 5566ba322b6..9edc7d6573f 100644 --- a/rust/ql/lib/codeql/rust/elements/PathSegment.qll +++ b/rust/ql/lib/codeql/rust/elements/PathSegment.qll @@ -14,9 +14,6 @@ import codeql.rust.elements.ReturnTypeSyntax import codeql.rust.elements.TypeRef /** - * A PathSegment. For example: - * ```rust - * todo!() - * ``` + * A path segment, which is one part of a whole path. */ final class PathSegment = Impl::PathSegment; diff --git a/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll index 9104a07a547..d156e207150 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll @@ -104,7 +104,9 @@ module Impl { ) } - override string toString() { result = concat(int i | | this.toStringPart(i), " " order by i) } + override string toString() { + result = strictconcat(int i | | this.toStringPart(i), " " order by i) + } private string toStringPart(int index) { index = 0 and result = "break" diff --git a/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll index 59cc960a67b..13270d1ca0b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/CastExprImpl.qll @@ -20,7 +20,7 @@ module Impl { */ class CastExpr extends Generated::CastExpr { override string toString() { - result = this.getExpr().toAbbreviatedString() + " as " + this.getTy().toString() + result = this.getExpr().toAbbreviatedString() + " as " + this.getTy().toAbbreviatedString() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll index 957574d409a..ecfcd1a4842 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ContinueExprImpl.qll @@ -49,12 +49,14 @@ module Impl { * ``` */ class ContinueExpr extends Generated::ContinueExpr { - override string toString() { result = concat(int i | | this.toStringPart(i), " " order by i) } + override string toString() { + result = strictconcat(int i | | this.toStringPart(i), " " order by i) + } private string toStringPart(int index) { index = 0 and result = "continue" or - index = 1 and result = this.getLifetime().toString() + index = 1 and result = this.getLifetime().getText() } /** diff --git a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll index 532fa3ed0b3..0299ce9f05e 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/EnumImpl.qll @@ -19,6 +19,6 @@ module Impl { * ``` */ class Enum extends Generated::Enum { - override string toString() { result = "enum " + this.getName().toString() } + override string toString() { result = "enum " + this.getName().getText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll index 922de73c65d..b3cd63b7922 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/FieldExprImpl.qll @@ -22,7 +22,7 @@ module Impl { override string toString() { exists(string abbr, string name | abbr = this.getExpr().toAbbreviatedString() and - name = this.getNameRef().toString() and + name = this.getNameRef().getText() and if abbr = "..." then result = "... ." + name else result = abbr + "." + name ) } diff --git a/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll index d8ec0ca9d37..c75c36b280b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/ImplImpl.qll @@ -22,11 +22,11 @@ module Impl { override string toString() { exists(string trait | ( - trait = this.getTrait().toString() + " for " + trait = this.getTrait().toAbbreviatedString() + " for " or not this.hasTrait() and trait = "" ) and - result = "impl " + trait + this.getSelfTy().toString() + " { ... }" + result = "impl " + trait + this.getSelfTy().toAbbreviatedString() + " { ... }" ) } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll index e1b3eb4e4d7..822029bf3a7 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LabelImpl.qll @@ -22,6 +22,13 @@ module Impl { * ``` */ class Label extends Generated::Label { - override string toString() { result = this.getLifetime().toString() } + override string toString() { result = this.getText() } + + override string toAbbreviatedString() { result = this.getText() } + + /** + * Gets the name of the label, together with the leading `'`. + */ + string getText() { result = this.getLifetime().getText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LabelableExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LabelableExprImpl.qll index 1b354658a2e..07048181714 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LabelableExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LabelableExprImpl.qll @@ -16,8 +16,16 @@ module Impl { * The base class for expressions that can be labeled (`LoopExpr`, `ForExpr`, `WhileExpr` or `BlockExpr`). */ class LabelableExpr extends Generated::LabelableExpr { - override string toString() { - result = concat([this.getLabel().toString() + ":", this.toStringPrefix(), "{ ... }"], " ") + final override string toString() { + result = strictconcat(int i | | this.toStringPart(i), " " order by i) + } + + private string toStringPart(int index) { + index = 0 and result = this.getLabel().getText() + ":" + or + index = 1 and result = this.toStringPrefix() + or + index = 2 and result = "{ ... }" } /** diff --git a/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll index 7924d8d8453..0ca4e58fb85 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LetElseImpl.qll @@ -19,6 +19,8 @@ module Impl { * ``` */ class LetElse extends Generated::LetElse { - override string toString() { result = "else { ... }" } + override string toString() { result = this.toAbbreviatedString() } + + override string toAbbreviatedString() { result = "else {...}" } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll index 1205836c230..d612c2082a6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LetStmtImpl.qll @@ -26,7 +26,9 @@ module Impl { * ``` */ class LetStmt extends Generated::LetStmt { - override string toString() { result = concat(int i | | this.toStringPart(i), " " order by i) } + override string toString() { + result = strictconcat(int i | | this.toStringPart(i), " " order by i) + } private string toStringPart(int index) { index = 0 and result = "let" @@ -35,7 +37,7 @@ module Impl { or index = 2 and result = "= " + this.getInitializer().toAbbreviatedString() or - index = 3 and result = this.getLetElse().toString() + index = 3 and result = this.getLetElse().toAbbreviatedString() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll index efcc4bf073e..f68c79da16b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LiteralExprImpl.qll @@ -26,8 +26,20 @@ module Impl { * ``` */ class LiteralExpr extends Generated::LiteralExpr { - override string toString() { result = this.getTextValue() } + override string toString() { result = this.getTrimmedText() } - override string toAbbreviatedString() { result = this.getTextValue() } + override string toAbbreviatedString() { result = this.getTrimmedText() } + + /** + * Get the text of this literal, trimmed with `...` if it is too long. + * + * INTERNAL: Do not use. + */ + string getTrimmedText() { + exists(string v | + v = this.getTextValue() and + if v.length() > 30 then result = v.substring(0, 30) + "..." else result = v + ) + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll index 65074603796..1c59c3fa284 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/LiteralPatImpl.qll @@ -24,6 +24,6 @@ module Impl { class LiteralPat extends Generated::LiteralPat { override string toString() { result = this.toAbbreviatedString() } - override string toAbbreviatedString() { result = this.getLiteral().toString() } + override string toAbbreviatedString() { result = this.getLiteral().getTrimmedText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll index eed9a65d432..a34d64c0735 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/MacroCallImpl.qll @@ -19,6 +19,6 @@ module Impl { * ``` */ class MacroCall extends Generated::MacroCall { - override string toString() { result = this.getPath().toString() + "!..." } + override string toString() { result = this.getPath().toAbbreviatedString() + "!..." } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll index 8d0a2ab0ecf..34cd16c144b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathImpl.qll @@ -15,6 +15,7 @@ module Impl { /** * A path. For example: * ```rust + * use some_crate::some_module::some_item; * foo::bar; * ``` */ @@ -23,9 +24,7 @@ module Impl { override string toAbbreviatedString() { if this.hasQualifier() - then - result = - this.getQualifier().toAbbreviatedString() + "::" + this.getPart().toAbbreviatedString() + then result = "...::" + this.getPart().toAbbreviatedString() else result = this.getPart().toAbbreviatedString() } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll index a78d0dd7ab9..27914a8f415 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathPatImpl.qll @@ -24,6 +24,6 @@ module Impl { class PathPat extends Generated::PathPat { override string toString() { result = this.toAbbreviatedString() } - override string toAbbreviatedString() { result = this.getPath().toString() } + override string toAbbreviatedString() { result = this.getPath().toAbbreviatedString() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll index 90d7cee6639..01ce5878834 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathSegmentImpl.qll @@ -13,19 +13,23 @@ private import codeql.rust.elements.internal.generated.PathSegment module Impl { // the following QLdoc is generated: if you need to edit it, do it in the schema file /** - * A PathSegment. For example: - * ```rust - * todo!() - * ``` + * A path segment, which is one part of a whole path. */ class PathSegment extends Generated::PathSegment { override string toString() { result = this.toAbbreviatedString() } override string toAbbreviatedString() { - // TODO: this does not cover everything - if this.hasGenericArgList() - then result = this.getNameRef().toString() + "::<...>" - else result = this.getNameRef().toString() + result = this.getAbbreviatedPrefix() + this.getAbbreviatedGenericArgList() + } + + private string getAbbreviatedGenericArgList() { + if this.hasGenericArgList() then result = "::<...>" else result = "" + } + + private string getAbbreviatedPrefix() { + if this.hasPathType() or this.hasTy() + then result = "<...>" + else result = this.getNameRef().getText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll index 3f88c50fa6a..a2ca1752cca 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/PathTypeImpl.qll @@ -21,6 +21,8 @@ module Impl { class PathType extends Generated::PathType { override string toString() { result = this.toAbbreviatedString() } - override string toAbbreviatedString() { result = this.getPath().toString() } + override string toAbbreviatedString() { + result = "<" + this.getPath().toAbbreviatedString() + ">" + } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll index 6e24c31d552..fe898c82fea 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordExprFieldImpl.qll @@ -22,7 +22,7 @@ module Impl { override string toString() { result = concat(int i | | this.toStringPart(i) order by i) } private string toStringPart(int index) { - index = 0 and result = this.getNameRef().toString() + index = 0 and result = this.getNameRef().getText() or index = 1 and result = ": " + this.getExpr().toAbbreviatedString() } diff --git a/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll index 39ccad02065..0bed25bb779 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/RecordPatImpl.qll @@ -22,6 +22,6 @@ module Impl { * ``` */ class RecordPat extends Generated::RecordPat { - override string toString() { result = this.getPath().toString() + " {...}" } + override string toString() { result = this.getPath().toAbbreviatedString() + " {...}" } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll index 59d685a18e8..564e54e78d6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/TraitImpl.qll @@ -25,6 +25,6 @@ module Impl { * ``` */ class Trait extends Generated::Trait { - override string toString() { result = "trait " + this.getName() } + override string toString() { result = "trait " + this.getName().getText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll index 4357dcf68a9..15a79374117 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/UnionImpl.qll @@ -19,6 +19,6 @@ module Impl { * ``` */ class Union extends Generated::Union { - override string toString() { result = "union " + this.getName().toString() } + override string toString() { result = "union " + this.getName().getText() } } } diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll index 58f7d891d26..36313ca9fe9 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Path.qll @@ -18,6 +18,7 @@ module Generated { /** * A path. For example: * ```rust + * use some_crate::some_module::some_item; * foo::bar; * ``` * INTERNAL: Do not reference the `Generated::Path` class directly. diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll index 0878635e7d1..a2c3b970df6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/PathSegment.qll @@ -21,10 +21,7 @@ import codeql.rust.elements.TypeRef */ module Generated { /** - * A PathSegment. For example: - * ```rust - * todo!() - * ``` + * A path segment, which is one part of a whole path. * INTERNAL: Do not reference the `Generated::PathSegment` class directly. * Use the subclass `PathSegment`, where the following predicates are available. */ diff --git a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll index dc9f577bffc..90fc0ae935b 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll @@ -578,10 +578,7 @@ module Raw { /** * INTERNAL: Do not use. - * A PathSegment. For example: - * ```rust - * todo!() - * ``` + * A path segment, which is one part of a whole path. */ class PathSegment extends @path_segment, AstNode { override string toString() { result = "PathSegment" } @@ -2337,6 +2334,7 @@ module Raw { * INTERNAL: Do not use. * A path. For example: * ```rust + * use some_crate::some_module::some_item; * foo::bar; * ``` */ diff --git a/rust/ql/test/extractor-tests/generated/.generated_tests.list b/rust/ql/test/extractor-tests/generated/.generated_tests.list index b60779ebd86..e8221c66efd 100644 --- a/rust/ql/test/extractor-tests/generated/.generated_tests.list +++ b/rust/ql/test/extractor-tests/generated/.generated_tests.list @@ -78,11 +78,10 @@ ParamList/gen_param_list.rs ef2e83d0aed45b969fe78dd717e87ef3c1f848e6179cfb4dc3cb ParenExpr/gen_paren_expr.rs dd0c4a21a92e54e8a6151145e013cbec9c9e1cad093d572e293b4f51d6c44aea dd0c4a21a92e54e8a6151145e013cbec9c9e1cad093d572e293b4f51d6c44aea ParenPat/gen_paren_pat.rs c8d18521b9a0b7d39841eb72e3895914aa652b7235dea42ed12a4eb280e3bf0e c8d18521b9a0b7d39841eb72e3895914aa652b7235dea42ed12a4eb280e3bf0e ParenType/gen_paren_type.rs ae1a945b56020eab14bb0ef75ae9ccb735d8e45d1213adee210a90e6dba8430f ae1a945b56020eab14bb0ef75ae9ccb735d8e45d1213adee210a90e6dba8430f -Path/gen_path.rs e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 e32637d04445d5b9411086f3ad5d8b41de24327f7ad641d1a1a25c1d160121c8 -PathExpr/gen_path_expr.rs a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a -PathPat/gen_path_pat.rs fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 -PathSegment/gen_path_segment.rs bc0c914821a70f9a7db23766f4d84e2d69fc76d5075a8bc3341f2ba59a8ce911 bc0c914821a70f9a7db23766f4d84e2d69fc76d5075a8bc3341f2ba59a8ce911 -PathType/gen_path_type.rs 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 +Path/gen_path.rs 490268d6bfb1635883b8bdefc683d59c4dd0e9c7f86c2e55954661efb3ab0253 490268d6bfb1635883b8bdefc683d59c4dd0e9c7f86c2e55954661efb3ab0253 +Path/gen_path_expr.rs a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a a1e0ececfe62a63a43583c9bd8064a80a90c042c55bac29d86776c0c6559f33a +Path/gen_path_pat.rs fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 fd7f941f8b33f19d3693be1fdb595c2fb2e85e8296702b82bf12bcd44632f371 +Path/gen_path_type.rs 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 710a5505615769da940202e7c6d9031edc23a4b05cd9fb25241c60affbba4027 PrefixExpr/gen_prefix_expr.rs c4b53e87f370713b9a9e257be26d082b0761497bac19b1d7401a31b22b30d1ab c4b53e87f370713b9a9e257be26d082b0761497bac19b1d7401a31b22b30d1ab PtrType/gen_ptr_type.rs dd7faad19454b92d7942ef664df1a5f26c01863e408b87249aa4d5d4f68c78b3 dd7faad19454b92d7942ef664df1a5f26c01863e408b87249aa4d5d4f68c78b3 RangeExpr/gen_range_expr.rs 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 3f27cff9cc76b2703beff622d1453b84121e1970a869e45f9428deac92c4ecb0 diff --git a/rust/ql/test/extractor-tests/generated/.gitattributes b/rust/ql/test/extractor-tests/generated/.gitattributes index 8ea3a00a31f..b585a058480 100644 --- a/rust/ql/test/extractor-tests/generated/.gitattributes +++ b/rust/ql/test/extractor-tests/generated/.gitattributes @@ -81,10 +81,9 @@ /ParenPat/gen_paren_pat.rs linguist-generated /ParenType/gen_paren_type.rs linguist-generated /Path/gen_path.rs linguist-generated -/PathExpr/gen_path_expr.rs linguist-generated -/PathPat/gen_path_pat.rs linguist-generated -/PathSegment/gen_path_segment.rs linguist-generated -/PathType/gen_path_type.rs linguist-generated +/Path/gen_path_expr.rs linguist-generated +/Path/gen_path_pat.rs linguist-generated +/Path/gen_path_type.rs linguist-generated /PrefixExpr/gen_prefix_expr.rs linguist-generated /PtrType/gen_ptr_type.rs linguist-generated /RangeExpr/gen_range_expr.rs linguist-generated diff --git a/rust/ql/test/extractor-tests/generated/Path/Path.expected b/rust/ql/test/extractor-tests/generated/Path/Path.expected index db093224b76..42f266cb4ed 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path.expected @@ -1,2 +1,23 @@ -| gen_path.rs:5:5:5:7 | foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | -| gen_path.rs:5:5:5:12 | foo::bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path.rs:5:9:5:18 | some_crate | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path.rs:5:9:5:31 | ...::some_module | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path.rs:5:9:5:42 | ...::some_item | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path.rs:6:5:6:7 | foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path.rs:6:5:6:12 | ...::bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path_expr.rs:5:13:5:20 | variable | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:6:13:6:15 | foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:6:13:6:20 | ...::bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path_expr.rs:7:13:7:15 | <...> | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:7:13:7:20 | ...::foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path_expr.rs:7:14:7:14 | T | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:7:14:7:14 | T | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:8:13:8:30 | <...> | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:8:13:8:35 | ...::foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path_expr.rs:8:14:8:20 | TypeRef | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_expr.rs:8:14:8:20 | TypeRef | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_pat.rs:5:11:5:11 | x | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_pat.rs:6:9:6:11 | Foo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | yes | hasPart: | yes | +| gen_path_type.rs:5:5:5:8 | todo | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_type.rs:5:5:5:11 | $crate | hasResolvedPath: | no | hasResolvedCrateOrigin: | no | hasQualifier: | no | hasPart: | yes | +| gen_path_type.rs:5:5:5:11 | ...::panic | hasResolvedPath: | yes | hasResolvedCrateOrigin: | yes | hasQualifier: | yes | hasPart: | yes | +| gen_path_type.rs:5:5:5:11 | ...::panicking | hasResolvedPath: | yes | hasResolvedCrateOrigin: | yes | hasQualifier: | yes | hasPart: | yes | diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected new file mode 100644 index 00000000000..c84497c6881 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr.expected @@ -0,0 +1,7 @@ +| gen_path.rs:6:5:6:12 | ...::bar | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:5:13:5:20 | variable | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:6:13:6:20 | ...::bar | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:7:13:7:20 | ...::foo | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_expr.rs:8:13:8:35 | ...::foo | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_pat.rs:5:11:5:11 | x | getNumberOfAttrs: | 0 | hasPath: | yes | +| gen_path_type.rs:5:5:5:11 | ...::panic | getNumberOfAttrs: | 0 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.ql rename to rust/ql/test/extractor-tests/generated/Path/PathExpr.ql diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.expected similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.expected rename to rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.expected diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getAttr.ql rename to rust/ql/test/extractor-tests/generated/Path/PathExpr_getAttr.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected new file mode 100644 index 00000000000..925412bc616 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.expected @@ -0,0 +1,7 @@ +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:12 | ...::bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:20 | ...::bar | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:20 | ...::foo | +| gen_path_expr.rs:8:13:8:35 | ...::foo | gen_path_expr.rs:8:13:8:35 | ...::foo | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +| gen_path_type.rs:5:5:5:11 | ...::panic | gen_path_type.rs:5:5:5:11 | ...::panic | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.ql rename to rust/ql/test/extractor-tests/generated/Path/PathExpr_getPath.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected new file mode 100644 index 00000000000..159f006eecb --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | ...::Bar | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathPat/PathPat.ql rename to rust/ql/test/extractor-tests/generated/Path/PathPat.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected new file mode 100644 index 00000000000..3a601023f3f --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.expected @@ -0,0 +1 @@ +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:16 | ...::Bar | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.ql rename to rust/ql/test/extractor-tests/generated/Path/PathPat_getPath.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected new file mode 100644 index 00000000000..41889509341 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment.expected @@ -0,0 +1,23 @@ +| gen_path.rs:5:9:5:18 | some_crate | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path.rs:5:21:5:31 | some_module | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path.rs:5:34:5:42 | some_item | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path.rs:6:5:6:7 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path.rs:6:10:6:12 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:5:13:5:20 | variable | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:6:13:6:15 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:6:18:6:20 | bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:7:13:7:15 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | yes | +| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:7:14:7:14 | T | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:7:18:7:20 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:8:13:8:30 | <...> | hasGenericArgList: | no | hasNameRef: | no | hasParamList: | no | hasPathType: | yes | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | yes | +| gen_path_expr.rs:8:14:8:20 | TypeRef | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:8:14:8:20 | TypeRef | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_expr.rs:8:33:8:35 | foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_pat.rs:5:11:5:11 | x | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_pat.rs:6:9:6:11 | Foo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_pat.rs:6:14:6:16 | Bar | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_type.rs:5:5:5:8 | todo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_type.rs:5:5:5:11 | $crate | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_type.rs:5:5:5:11 | panic | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | +| gen_path_type.rs:5:5:5:11 | panicking | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment.ql diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.expected similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.expected rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.expected diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getGenericArgList.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getGenericArgList.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getNameRef.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getNameRef.expected new file mode 100644 index 00000000000..e6b487851b7 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getNameRef.expected @@ -0,0 +1,21 @@ +| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:21:5:31 | some_module | gen_path.rs:5:21:5:31 | some_module | +| gen_path.rs:5:34:5:42 | some_item | gen_path.rs:5:34:5:42 | some_item | +| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:10:6:12 | bar | gen_path.rs:6:10:6:12 | bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:18:6:20 | bar | gen_path_expr.rs:6:18:6:20 | bar | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:18:7:20 | foo | gen_path_expr.rs:7:18:7:20 | foo | +| gen_path_expr.rs:8:14:8:20 | TypeRef | gen_path_expr.rs:8:14:8:20 | TypeRef | +| gen_path_expr.rs:8:14:8:20 | TypeRef | gen_path_expr.rs:8:14:8:20 | TypeRef | +| gen_path_expr.rs:8:33:8:35 | foo | gen_path_expr.rs:8:33:8:35 | foo | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:14:6:16 | Bar | gen_path_pat.rs:6:14:6:16 | Bar | +| gen_path_type.rs:5:5:5:8 | todo | gen_path_type.rs:5:5:5:8 | todo | +| gen_path_type.rs:5:5:5:11 | $crate | gen_path_type.rs:5:5:5:11 | $crate | +| gen_path_type.rs:5:5:5:11 | panic | gen_path_type.rs:5:5:5:11 | panic | +| gen_path_type.rs:5:5:5:11 | panicking | gen_path_type.rs:5:5:5:11 | panicking | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getNameRef.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getNameRef.ql diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParamList.expected similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.expected rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getParamList.expected diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getParamList.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getParamList.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getParamList.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getPathType.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getPathType.expected new file mode 100644 index 00000000000..b63a629ccb1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getPathType.expected @@ -0,0 +1,2 @@ +| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:14:7:14 | | +| gen_path_expr.rs:8:13:8:30 | <...> | gen_path_expr.rs:8:14:8:20 | | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getPathType.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getPathType.ql diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.expected similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.expected rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.expected diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getRetType.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getRetType.ql diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.expected similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.expected rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.expected diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getReturnTypeSyntax.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getReturnTypeSyntax.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTy.expected b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTy.expected new file mode 100644 index 00000000000..b63a629ccb1 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTy.expected @@ -0,0 +1,2 @@ +| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:14:7:14 | | +| gen_path_expr.rs:8:13:8:30 | <...> | gen_path_expr.rs:8:14:8:20 | | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql b/rust/ql/test/extractor-tests/generated/Path/PathSegment_getTy.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.ql rename to rust/ql/test/extractor-tests/generated/Path/PathSegment_getTy.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathType.expected b/rust/ql/test/extractor-tests/generated/Path/PathType.expected new file mode 100644 index 00000000000..5347001fb41 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathType.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:7:14:7:14 | | hasPath: | yes | +| gen_path_expr.rs:7:14:7:14 | | hasPath: | yes | +| gen_path_expr.rs:8:14:8:20 | | hasPath: | yes | +| gen_path_expr.rs:8:14:8:20 | | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType.ql b/rust/ql/test/extractor-tests/generated/Path/PathType.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathType/PathType.ql rename to rust/ql/test/extractor-tests/generated/Path/PathType.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/PathType_getPath.expected b/rust/ql/test/extractor-tests/generated/Path/PathType_getPath.expected new file mode 100644 index 00000000000..3d98da0c2b8 --- /dev/null +++ b/rust/ql/test/extractor-tests/generated/Path/PathType_getPath.expected @@ -0,0 +1,4 @@ +| gen_path_expr.rs:7:14:7:14 | | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:14:7:14 | | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:14:8:20 | | gen_path_expr.rs:8:14:8:20 | TypeRef | +| gen_path_expr.rs:8:14:8:20 | | gen_path_expr.rs:8:14:8:20 | TypeRef | diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql b/rust/ql/test/extractor-tests/generated/Path/PathType_getPath.ql similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.ql rename to rust/ql/test/extractor-tests/generated/Path/PathType_getPath.ql diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected index 0e05956ea89..9b0f05f0727 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getPart.expected @@ -1,2 +1,23 @@ -| gen_path.rs:5:5:5:7 | foo | gen_path.rs:5:5:5:7 | foo | -| gen_path.rs:5:5:5:12 | foo::bar | gen_path.rs:5:10:5:12 | bar | +| gen_path.rs:5:9:5:18 | some_crate | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:21:5:31 | some_module | +| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:34:5:42 | some_item | +| gen_path.rs:6:5:6:7 | foo | gen_path.rs:6:5:6:7 | foo | +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:10:6:12 | bar | +| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | +| gen_path_expr.rs:6:13:6:15 | foo | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:18:6:20 | bar | +| gen_path_expr.rs:7:13:7:15 | <...> | gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:18:7:20 | foo | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:7:14:7:14 | T | gen_path_expr.rs:7:14:7:14 | T | +| gen_path_expr.rs:8:13:8:30 | <...> | gen_path_expr.rs:8:13:8:30 | <...> | +| gen_path_expr.rs:8:13:8:35 | ...::foo | gen_path_expr.rs:8:33:8:35 | foo | +| gen_path_expr.rs:8:14:8:20 | TypeRef | gen_path_expr.rs:8:14:8:20 | TypeRef | +| gen_path_expr.rs:8:14:8:20 | TypeRef | gen_path_expr.rs:8:14:8:20 | TypeRef | +| gen_path_pat.rs:5:11:5:11 | x | gen_path_pat.rs:5:11:5:11 | x | +| gen_path_pat.rs:6:9:6:11 | Foo | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:14:6:16 | Bar | +| gen_path_type.rs:5:5:5:8 | todo | gen_path_type.rs:5:5:5:8 | todo | +| gen_path_type.rs:5:5:5:11 | $crate | gen_path_type.rs:5:5:5:11 | $crate | +| gen_path_type.rs:5:5:5:11 | ...::panic | gen_path_type.rs:5:5:5:11 | panic | +| gen_path_type.rs:5:5:5:11 | ...::panicking | gen_path_type.rs:5:5:5:11 | panicking | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected index 44aa2ca5a00..6fb72c5159a 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getQualifier.expected @@ -1 +1,9 @@ -| gen_path.rs:5:5:5:12 | foo::bar | gen_path.rs:5:5:5:7 | foo | +| gen_path.rs:5:9:5:31 | ...::some_module | gen_path.rs:5:9:5:18 | some_crate | +| gen_path.rs:5:9:5:42 | ...::some_item | gen_path.rs:5:9:5:31 | ...::some_module | +| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:7 | foo | +| gen_path_expr.rs:6:13:6:20 | ...::bar | gen_path_expr.rs:6:13:6:15 | foo | +| gen_path_expr.rs:7:13:7:20 | ...::foo | gen_path_expr.rs:7:13:7:15 | <...> | +| gen_path_expr.rs:8:13:8:35 | ...::foo | gen_path_expr.rs:8:13:8:30 | <...> | +| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:11 | Foo | +| gen_path_type.rs:5:5:5:11 | ...::panic | gen_path_type.rs:5:5:5:11 | ...::panicking | +| gen_path_type.rs:5:5:5:11 | ...::panicking | gen_path_type.rs:5:5:5:11 | $crate | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.expected index e69de29bb2d..9da37a05d71 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedCrateOrigin.expected @@ -0,0 +1,2 @@ +| gen_path_type.rs:5:5:5:11 | ...::panic | lang:core | +| gen_path_type.rs:5:5:5:11 | ...::panicking | lang:core | diff --git a/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedPath.expected b/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedPath.expected index e69de29bb2d..4a7a9a1e2ae 100644 --- a/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedPath.expected +++ b/rust/ql/test/extractor-tests/generated/Path/Path_getResolvedPath.expected @@ -0,0 +1,2 @@ +| gen_path_type.rs:5:5:5:11 | ...::panic | crate::panicking::panic | +| gen_path_type.rs:5:5:5:11 | ...::panicking | crate::panicking | diff --git a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs index 3b3f054875a..de58e6978af 100644 --- a/rust/ql/test/extractor-tests/generated/Path/gen_path.rs +++ b/rust/ql/test/extractor-tests/generated/Path/gen_path.rs @@ -2,5 +2,6 @@ fn test_path() -> () { // A path. For example: + use some_crate::some_module::some_item; foo::bar; } diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path_expr.rs similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathExpr/gen_path_expr.rs rename to rust/ql/test/extractor-tests/generated/Path/gen_path_expr.rs diff --git a/rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path_pat.rs similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathPat/gen_path_pat.rs rename to rust/ql/test/extractor-tests/generated/Path/gen_path_pat.rs diff --git a/rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs b/rust/ql/test/extractor-tests/generated/Path/gen_path_type.rs similarity index 100% rename from rust/ql/test/extractor-tests/generated/PathType/gen_path_type.rs rename to rust/ql/test/extractor-tests/generated/Path/gen_path_type.rs diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/CONSISTENCY/DataFlowConsistency.expected b/rust/ql/test/extractor-tests/generated/PathExpr/CONSISTENCY/DataFlowConsistency.expected deleted file mode 100644 index c54360f7361..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathExpr/CONSISTENCY/DataFlowConsistency.expected +++ /dev/null @@ -1,3 +0,0 @@ -uniqueNodeToString -| gen_path_expr.rs:7:13:7:20 | (no string representation) | Node should have one toString but has 0. | -| gen_path_expr.rs:8:13:8:35 | (no string representation) | Node should have one toString but has 0. | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected deleted file mode 100644 index a676396a2f9..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_path_expr.rs:5:13:5:20 | variable | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:6:13:6:20 | foo::bar | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:7:13:7:20 | (no string representation) | getNumberOfAttrs: | 0 | hasPath: | yes | -| gen_path_expr.rs:8:13:8:35 | (no string representation) | getNumberOfAttrs: | 0 | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected b/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected deleted file mode 100644 index a5765b5be60..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathExpr/PathExpr_getPath.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable | -| gen_path_expr.rs:6:13:6:20 | foo::bar | gen_path_expr.rs:6:13:6:20 | foo::bar | -| gen_path_expr.rs:7:13:7:20 | (no string representation) | gen_path_expr.rs:7:13:7:20 | (no string representation) | -| gen_path_expr.rs:8:13:8:35 | (no string representation) | gen_path_expr.rs:8:13:8:35 | (no string representation) | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected deleted file mode 100644 index f7cee5c5586..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathPat/PathPat.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_path_pat.rs:6:9:6:16 | Foo::Bar | hasPath: | yes | diff --git a/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected b/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected deleted file mode 100644 index 1f450c24938..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathPat/PathPat_getPath.expected +++ /dev/null @@ -1 +0,0 @@ -| gen_path_pat.rs:6:9:6:16 | Foo::Bar | gen_path_pat.rs:6:9:6:16 | Foo::Bar | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected deleted file mode 100644 index 32042fc6a59..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_path_segment.rs:5:5:5:8 | todo | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | -| gen_path_segment.rs:5:5:5:11 | $crate | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | -| gen_path_segment.rs:5:5:5:11 | panic | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | -| gen_path_segment.rs:5:5:5:11 | panicking | hasGenericArgList: | no | hasNameRef: | yes | hasParamList: | no | hasPathType: | no | hasRetType: | no | hasReturnTypeSyntax: | no | hasTy: | no | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected deleted file mode 100644 index 28346240d29..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getNameRef.expected +++ /dev/null @@ -1,4 +0,0 @@ -| gen_path_segment.rs:5:5:5:8 | todo | gen_path_segment.rs:5:5:5:8 | todo | -| gen_path_segment.rs:5:5:5:11 | $crate | gen_path_segment.rs:5:5:5:11 | $crate | -| gen_path_segment.rs:5:5:5:11 | panic | gen_path_segment.rs:5:5:5:11 | panic | -| gen_path_segment.rs:5:5:5:11 | panicking | gen_path_segment.rs:5:5:5:11 | panicking | diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getPathType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.expected b/rust/ql/test/extractor-tests/generated/PathSegment/PathSegment_getTy.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs b/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs deleted file mode 100644 index 0ab008b6a68..00000000000 --- a/rust/ql/test/extractor-tests/generated/PathSegment/gen_path_segment.rs +++ /dev/null @@ -1,6 +0,0 @@ -// generated by codegen, do not edit - -fn test_path_segment() -> () { - // A PathSegment. For example: - todo!() -} diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType.expected b/rust/ql/test/extractor-tests/generated/PathType/PathType.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.expected b/rust/ql/test/extractor-tests/generated/PathType/PathType_getPath.expected deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/rust/schema/annotations.py b/rust/schema/annotations.py index 323e946e4f9..8f5aee1677b 100644 --- a/rust/schema/annotations.py +++ b/rust/schema/annotations.py @@ -81,6 +81,7 @@ class _: """ A path. For example: ```rust + use some_crate::some_module::some_item; foo::bar; ``` """ @@ -120,6 +121,7 @@ class PathExprBase(Expr): @annotate(PathExpr, replace_bases={Expr: PathExprBase}) +@qltest.test_with(Path) class _: """ A path expression. For example: @@ -721,6 +723,7 @@ class _: @annotate(PathPat) +@qltest.test_with(Path) class _: """ A path pattern. For example: @@ -1366,16 +1369,15 @@ class _: @annotate(PathSegment) +@qltest.test_with(Path) class _: """ - A PathSegment. For example: - ```rust - todo!() - ``` + A path segment, which is one part of a whole path. """ @annotate(PathType) +@qltest.test_with(Path) class _: """ A PathType. For example: