Merge branch 'main' into pin

This commit is contained in:
Geoffrey White
2025-05-27 11:46:07 +01:00
232 changed files with 21428 additions and 7228 deletions

View File

@@ -43,7 +43,7 @@ lib/codeql/rust/elements/ConstArg.qll f37b34417503bbd2f3ce09b3211d8fa71f6a954970
lib/codeql/rust/elements/ConstBlockPat.qll a25f42b84dbeb33e10955735ef53b8bb7e3258522d6d1a9068f19adaf1af89d9 eeb816d2b54db77a1e7bb70e90b68d040a0cd44e9d44455a223311c3615c5e6e
lib/codeql/rust/elements/ConstParam.qll 248db1e3abef6943326c42478a15f148f8cdaa25649ef5578064b15924c53351 28babba3aea28a65c3fe3b3db6cb9c86f70d7391e9d6ef9188eb2e4513072f9f
lib/codeql/rust/elements/ContinueExpr.qll 9f27c5d5c819ad0ebc5bd10967ba8d33a9dc95b9aae278fcfb1fcf9216bda79c 0dc061445a6b89854fdce92aaf022fdc76b724511a50bb777496ce75c9ecb262
lib/codeql/rust/elements/Crate.qll 37e8d0daa7bef38cee51008499ee3fd6c19800c48f23983a82b7b36bae250813 95eb88b896fe01d57627c1766daf0fe859f086aed6ca1184e1e16b10c9cdaf37
lib/codeql/rust/elements/Crate.qll 1426960e6f36195e42ea5ea321405c1a72fccd40cd6c0a33673c321c20302d8d 1571a89f89dab43c5291b71386de7aadf52730755ba10f9d696db9ad2f760aff
lib/codeql/rust/elements/DynTraitTypeRepr.qll 5953263ec1e77613170c13b5259b22a71c206a7e08841d2fa1a0b373b4014483 d4380c6cc460687dcd8598df27cad954ef4f508f1117a82460d15d295a7b64ab
lib/codeql/rust/elements/Element.qll 0b62d139fef54ed2cf2e2334806aa9bfbc036c9c2085d558f15a42cc3fa84c48 24b999b93df79383ef27ede46e38da752868c88a07fe35fcff5d526684ba7294
lib/codeql/rust/elements/Enum.qll 2f122b042519d55e221fceac72fce24b30d4caf1947b25e9b68ee4a2095deb11 83a47445145e4fda8c3631db602a42dbb7a431f259eddf5c09dccd86f6abdd0e
@@ -192,7 +192,6 @@ lib/codeql/rust/elements/YeetExpr.qll 4172bf70de31cab17639da6eed4a12a7afcefd7aa9
lib/codeql/rust/elements/YieldExpr.qll de2dc096a077f6c57bba9d1c2b2dcdbecce501333753b866d77c3ffbe06aa516 1f3e8949689c09ed356ff4777394fe39f2ed2b1e6c381fd391790da4f5d5c76a
lib/codeql/rust/elements/internal/AbiConstructor.qll 4484538db49d7c1d31c139f0f21879fceb48d00416e24499a1d4b1337b4141ac 460818e397f2a1a8f2e5466d9551698b0e569d4640fcb87de6c4268a519b3da1
lib/codeql/rust/elements/internal/AbiImpl.qll 01439712ecadc9dc8da6f74d2e19cee13c77f8e1e25699055da675b2c88cb02d dcc9395ef8abd1af3805f3e7fcbc2d7ce30affbce654b6f5e559924768db403c
lib/codeql/rust/elements/internal/AddressableImpl.qll e01a6104980960f5708d5a0ada774ba21db9a344e33deeaf3d3239c627268c77 b8bfc711b267df305ac9fe5f6a994f051ddeca7fc95dacd76d1bae2d4fa7adde
lib/codeql/rust/elements/internal/ArgListConstructor.qll a73685c8792ae23a2d628e7357658efb3f6e34006ff6e9661863ef116ec0b015 0bee572a046e8dfc031b1216d729843991519d94ae66280f5e795d20aea07a22
lib/codeql/rust/elements/internal/ArgListImpl.qll 19664651c06b46530f0ae5745ccb3233afc97b9152e053761d641de6e9c62d38 40af167e571f5c255f264b3be7cc7f5ff42ec109661ca03dcee94e92f8facfc6
lib/codeql/rust/elements/internal/ArrayExprInternal.qll 07a219b3d3fba3ff8b18e77686b2f58ab01acd99e0f5d5cad5d91af937e228f5 7528fc0e2064c481f0d6cbff3835950a044e429a2cd00c4d8442d2e132560d37
@@ -504,7 +503,7 @@ lib/codeql/rust/elements/internal/generated/ConstArg.qll e2451cac6ee464f5b64883d
lib/codeql/rust/elements/internal/generated/ConstBlockPat.qll 7526d83ee9565d74776f42db58b1a2efff6fb324cfc7137f51f2206fee815d79 0ab3c22908ff790e7092e576a5df3837db33c32a7922a513a0f5e495729c1ac5
lib/codeql/rust/elements/internal/generated/ConstParam.qll 310342603959a4d521418caec45b585b97e3a5bf79368769c7150f52596a7266 a5dd92f0b24d7dbdaea2daedba3c8d5f700ec7d3ace81ca368600da2ad610082
lib/codeql/rust/elements/internal/generated/ContinueExpr.qll e2010feb14fb6edeb83a991d9357e50edb770172ddfde2e8670b0d3e68169f28 48d09d661e1443002f6d22b8710e22c9c36d9daa9cde09c6366a61e960d717cb
lib/codeql/rust/elements/internal/generated/Crate.qll d245f24e9da4f180c526a6d092f554a9577bae7225c81c36a391947c0865eeb3 c95dbb32b2ce4d9664be56c95b19fcd01c2d3244385e55151f9b06b07f04ce9b
lib/codeql/rust/elements/internal/generated/Crate.qll 37f3760d7c0c1c3ca809d07daf7215a8eae6053eda05e88ed7db6e07f4db0781 649a3d7cd7ee99f95f8a4d3d3c41ea2fa848ce7d8415ccbac62977dfc9a49d35
lib/codeql/rust/elements/internal/generated/DynTraitTypeRepr.qll a9d540717af1f00dbea1c683fd6b846cddfb2968c7f3e021863276f123337787 1972efb9bca7aae9a9708ca6dcf398e5e8c6d2416a07d525dba1649b80fbe4d1
lib/codeql/rust/elements/internal/generated/Element.qll d56d22c060fa929464f837b1e16475a4a2a2e42d68235a014f7369bcb48431db 0e48426ca72179f675ac29aa49bbaadb8b1d27b08ad5cbc72ec5a005c291848e
lib/codeql/rust/elements/internal/generated/Enum.qll 4f4cbc9cd758c20d476bc767b916c62ba434d1750067d0ffb63e0821bb95ec86 3da735d54022add50cec0217bbf8ec4cf29b47f4851ee327628bcdd6454989d0
@@ -579,7 +578,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll c808c9d84dd7800573832b
lib/codeql/rust/elements/internal/generated/ParenExpr.qll bc0731505bfe88516205ec360582a4222d2681d11342c93e15258590ddee82f2 d4bd6e0c80cf1d63746c88d4bcb3a01d4c75732e5da09e3ebd9437ced227fb60
lib/codeql/rust/elements/internal/generated/ParenPat.qll 4f168ef5d5bb87a903251cc31b2e44a759b099ec69c90af31783fbb15778c940 0e34f94a45a13396fd57d94c245dc64d1adde2ab0e22b56946f7e94c04e297fc
lib/codeql/rust/elements/internal/generated/ParenTypeRepr.qll 40ab5c592e7699c621787793743e33988de71ff42ca27599f5ab3ddb70e3f7d8 12c0a6eed2202ee3e892f61da3b3ce77ac3190854cdf3097e8d2be98aa3cb91d
lib/codeql/rust/elements/internal/generated/ParentChild.qll 2f620064351fc0275ee1c13d1d0681ac927a2af81c13fbb3fae9ef86dd08e585 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
lib/codeql/rust/elements/internal/generated/ParentChild.qll e2c6aaaa1735113f160c0e178d682bff8e9ebc627632f73c0dd2d1f4f9d692a8 61cf70eb649f241e2fcd5e0ba34df63f3a14f07032811b9ae151721783a0fd20
lib/codeql/rust/elements/internal/generated/ParenthesizedArgList.qll c5fa328ea60d3a3333d7c7bb3480969c1873166c7ac8ebb9d0afad7a8099d1a8 2dbbb6200d96f7db7dea4a55bdeab8d67b14d39a43e0bd54ada019f7e466f163
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
lib/codeql/rust/elements/internal/generated/Path.qll 9b12afb46fc5a9ad3a811b05472621bbecccb900c47504feb7f29d96b28421ca bcacbffc36fb3e0c9b26523b5963af0ffa9fd6b19f00a2a31bdb2316071546bd
@@ -594,7 +593,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 51d1e9e683fc79dddbff
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f
lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9
lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9
lib/codeql/rust/elements/internal/generated/Raw.qll 96e66877688eafb2f901d2790aa3a0d3176d795732fbcd349c3f950016651fdf 855be30b38dd0886938d51219f90e8ce8c4929e23c0f6697f344d5296fbb07cc
lib/codeql/rust/elements/internal/generated/Raw.qll de98fe8481864e23e1cd67d926ffd2e8bb8a83ed48901263122068f9c29ab372 3bd67fe283aaf24b94a2e3fd8f6e73ae34f61a097817900925d1cdcd3b745ecc
lib/codeql/rust/elements/internal/generated/RefExpr.qll 7d995884e3dc1c25fc719f5d7253179344d63650e217e9ff6530285fe7a57f64 f2c3c12551deea4964b66553fb9b6423ee16fec53bd63db4796191aa60dc6c66
lib/codeql/rust/elements/internal/generated/RefPat.qll 456ede39837463ee22a630ec7ab6c8630d3664a8ea206fcc6e4f199e92fa564c 5622062765f32930465ba6b170e986706f159f6070f48adee3c20e24e8df4e05
lib/codeql/rust/elements/internal/generated/RefTypeRepr.qll 3d8c0bd296d33b91a81633f697a43269a6538df06d277262d3990d3f6880ef57 13680f39e89bcd8299c218aba396f3deec804597e6f7cb7d4a7e7c748b6faa77

1
rust/ql/.gitattributes generated vendored
View File

@@ -194,7 +194,6 @@
/lib/codeql/rust/elements/YieldExpr.qll linguist-generated
/lib/codeql/rust/elements/internal/AbiConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/AbiImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/AddressableImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/ArgListConstructor.qll linguist-generated
/lib/codeql/rust/elements/internal/ArgListImpl.qll linguist-generated
/lib/codeql/rust/elements/internal/ArrayExprInternal.qll linguist-generated

View File

@@ -7,6 +7,10 @@
import codeql.rust.Diagnostics
query predicate extractionError(ExtractionError ee) { any() }
query predicate extractionError(ExtractionError ee) {
not exists(ee.getLocation()) or ee.getLocation().fromSource()
}
query predicate extractionWarning(ExtractionWarning ew) { any() }
query predicate extractionWarning(ExtractionWarning ew) {
not exists(ew.getLocation()) or ew.getLocation().fromSource()
}

View File

@@ -5,4 +5,29 @@
* @id rust/diagnostics/path-resolution-consistency
*/
import codeql.rust.internal.PathResolutionConsistency
private import rust
private import codeql.rust.internal.PathResolution
private import codeql.rust.internal.PathResolutionConsistency as PathResolutionConsistency
private import codeql.rust.elements.Locatable
private import codeql.Locations
import PathResolutionConsistency
class SourceLocatable extends Locatable {
Location getLocation() {
if super.getLocation().fromSource()
then result = super.getLocation()
else result instanceof EmptyLocation
}
}
query predicate multipleMethodCallTargets(SourceLocatable a, SourceLocatable b) {
PathResolutionConsistency::multipleMethodCallTargets(a, b)
}
query predicate multiplePathResolutions(SourceLocatable a, SourceLocatable b) {
PathResolutionConsistency::multiplePathResolutions(a, b)
}
query predicate multipleCanonicalPaths(SourceLocatable i, SourceLocatable c, string path) {
PathResolutionConsistency::multipleCanonicalPaths(i, c, path)
}

View File

@@ -9,6 +9,10 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"extractLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"findManifests": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
@@ -25,12 +29,16 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"parseLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"total": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
}
},
"numberOfFiles": 6,
"numberOfFiles": 5,
"numberOfManifests": 1
},
"severity": "note",

View File

@@ -1,6 +1,4 @@
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
| file:///types.rs:0:0:0:0 | Extract(/types.rs) |
| file:///types.rs:0:0:0:0 | Parse(/types.rs) |
| file://:0:0:0:0 | CrateGraph |
| file://:0:0:0:0 | FindManifests |
| src/directory_module/mod.rs:0:0:0:0 | Extract(src/directory_module/mod.rs) |

View File

@@ -1,27 +1,5 @@
import codeql.rust.elements.internal.ExtractorStep
private class Step instanceof ExtractorStep {
string toString() {
result = super.getAction() + "(" + this.getFilePath() + ")"
or
not super.hasFile() and result = super.getAction()
}
private string getFilePath() {
exists(File file | file = super.getFile() |
exists(file.getRelativePath()) and result = file.getAbsolutePath()
or
not exists(file.getRelativePath()) and result = "/" + file.getBaseName()
)
}
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
super.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
filepath = this.getFilePath()
}
}
from Step step
from ExtractorStep step
where not step.getAction() = ["ParseLibrary", "ExtractLibrary"]
select step

View File

@@ -1,5 +1,3 @@
| file:///types.rs:0:0:0:0 | Extract(/types.rs) |
| file:///types.rs:0:0:0:0 | Parse(/types.rs) |
| file://:0:0:0:0 | CrateGraph |
| file://:0:0:0:0 | FindManifests |
| rust-project.json:0:0:0:0 | LoadManifest(rust-project.json) |

View File

@@ -9,7 +9,7 @@
| Inconsistencies - Path resolution | 0 |
| Inconsistencies - SSA | 0 |
| Inconsistencies - data flow | 0 |
| Lines of code extracted | 23 |
| Lines of code extracted | 6 |
| Lines of user code extracted | 6 |
| Macro calls - resolved | 2 |
| Macro calls - total | 2 |

View File

@@ -9,6 +9,10 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"extractLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"findManifests": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
@@ -25,12 +29,16 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"parseLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"total": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
}
},
"numberOfFiles": 5,
"numberOfFiles": 4,
"numberOfManifests": 1
},
"severity": "note",

View File

@@ -9,6 +9,10 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"extractLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"findManifests": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
@@ -25,12 +29,16 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"parseLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"total": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
}
},
"numberOfFiles": 5,
"numberOfFiles": 4,
"numberOfManifests": 1
},
"severity": "note",

View File

@@ -5,8 +5,6 @@
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
| file:///types.rs:0:0:0:0 | Extract(/types.rs) |
| file:///types.rs:0:0:0:0 | Parse(/types.rs) |
| file://:0:0:0:0 | CrateGraph |
| file://:0:0:0:0 | FindManifests |
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |

View File

@@ -1,27 +1,5 @@
import codeql.rust.elements.internal.ExtractorStep
private class Step instanceof ExtractorStep {
string toString() {
result = super.getAction() + "(" + this.getFilePath() + ")"
or
not super.hasFile() and result = super.getAction()
}
private string getFilePath() {
exists(File file | file = super.getFile() |
exists(file.getRelativePath()) and result = file.getAbsolutePath()
or
not exists(file.getRelativePath()) and result = "/" + file.getBaseName()
)
}
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
super.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
filepath = this.getFilePath()
}
}
from Step step
from ExtractorStep step
where not step.getAction() = ["ParseLibrary", "ExtractLibrary"]
select step

View File

@@ -4,8 +4,6 @@
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
| file:///types.rs:0:0:0:0 | Extract(/types.rs) |
| file:///types.rs:0:0:0:0 | Parse(/types.rs) |
| file://:0:0:0:0 | CrateGraph |
| file://:0:0:0:0 | FindManifests |
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |

View File

@@ -9,7 +9,7 @@
| Inconsistencies - Path resolution | 0 |
| Inconsistencies - SSA | 0 |
| Inconsistencies - data flow | 0 |
| Lines of code extracted | 26 |
| Lines of code extracted | 9 |
| Lines of user code extracted | 9 |
| Macro calls - resolved | 2 |
| Macro calls - total | 2 |

View File

@@ -9,7 +9,7 @@
| Inconsistencies - Path resolution | 0 |
| Inconsistencies - SSA | 0 |
| Inconsistencies - data flow | 0 |
| Lines of code extracted | 26 |
| Lines of code extracted | 9 |
| Lines of user code extracted | 9 |
| Macro calls - resolved | 2 |
| Macro calls - total | 2 |

View File

@@ -9,6 +9,10 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"extractLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"findManifests": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
@@ -25,12 +29,16 @@
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"parseLibrary": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
},
"total": {
"ms": "__REDACTED__",
"pretty": "__REDACTED__"
}
},
"numberOfFiles": 3,
"numberOfFiles": 2,
"numberOfManifests": 1
},
"severity": "note",

View File

@@ -1,7 +1,12 @@
use macros::repeat;
#[repeat(3)]
fn foo() {}
fn foo() {
println!("Hello, world!");
#[repeat(2)]
fn inner() {}
}
#[repeat(2)]
#[repeat(3)]

View File

@@ -0,0 +1,16 @@
| Extraction errors | 0 |
| Extraction warnings | 0 |
| Files extracted - total | 2 |
| Files extracted - with errors | 0 |
| Files extracted - without errors | 2 |
| Files extracted - without errors % | 100 |
| Inconsistencies - AST | 0 |
| Inconsistencies - CFG | 0 |
| Inconsistencies - Path resolution | 0 |
| Inconsistencies - SSA | 0 |
| Inconsistencies - data flow | 0 |
| Lines of code extracted | 29 |
| Lines of user code extracted | 29 |
| Macro calls - resolved | 52 |
| Macro calls - total | 53 |
| Macro calls - unresolved | 1 |

View File

@@ -0,0 +1 @@
queries/summary/SummaryStatsReduced.ql

View File

@@ -1,11 +1,17 @@
| src/lib.rs:3:1:4:11 | fn foo | 0 | src/lib.rs:4:1:4:10 | fn foo_0 |
| src/lib.rs:3:1:4:11 | fn foo | 1 | src/lib.rs:4:1:4:10 | fn foo_1 |
| src/lib.rs:3:1:4:11 | fn foo | 2 | src/lib.rs:4:1:4:10 | fn foo_2 |
| src/lib.rs:6:1:8:11 | fn bar | 0 | src/lib.rs:7:1:8:10 | fn bar_0 |
| src/lib.rs:6:1:8:11 | fn bar | 1 | src/lib.rs:7:1:8:10 | fn bar_1 |
| src/lib.rs:7:1:8:10 | fn bar_0 | 0 | src/lib.rs:8:1:8:10 | fn bar_0_0 |
| src/lib.rs:7:1:8:10 | fn bar_0 | 1 | src/lib.rs:8:1:8:10 | fn bar_0_1 |
| src/lib.rs:7:1:8:10 | fn bar_0 | 2 | src/lib.rs:8:1:8:10 | fn bar_0_2 |
| src/lib.rs:7:1:8:10 | fn bar_1 | 0 | src/lib.rs:8:1:8:10 | fn bar_1_0 |
| src/lib.rs:7:1:8:10 | fn bar_1 | 1 | src/lib.rs:8:1:8:10 | fn bar_1_1 |
| src/lib.rs:7:1:8:10 | fn bar_1 | 2 | src/lib.rs:8:1:8:10 | fn bar_1_2 |
| src/lib.rs:3:1:9:1 | fn foo | 0 | src/lib.rs:4:1:8:16 | fn foo_0 |
| src/lib.rs:3:1:9:1 | fn foo | 1 | src/lib.rs:4:1:8:16 | fn foo_1 |
| src/lib.rs:3:1:9:1 | fn foo | 2 | src/lib.rs:4:1:8:16 | fn foo_2 |
| src/lib.rs:7:5:8:16 | fn inner | 0 | src/lib.rs:8:5:8:16 | fn inner_0 |
| src/lib.rs:7:5:8:16 | fn inner | 0 | src/lib.rs:8:5:8:16 | fn inner_0 |
| src/lib.rs:7:5:8:16 | fn inner | 0 | src/lib.rs:8:5:8:16 | fn inner_0 |
| src/lib.rs:7:5:8:16 | fn inner | 1 | src/lib.rs:8:5:8:16 | fn inner_1 |
| src/lib.rs:7:5:8:16 | fn inner | 1 | src/lib.rs:8:5:8:16 | fn inner_1 |
| src/lib.rs:7:5:8:16 | fn inner | 1 | src/lib.rs:8:5:8:16 | fn inner_1 |
| src/lib.rs:11:1:13:11 | fn bar | 0 | src/lib.rs:12:1:13:10 | fn bar_0 |
| src/lib.rs:11:1:13:11 | fn bar | 1 | src/lib.rs:12:1:13:10 | fn bar_1 |
| src/lib.rs:12:1:13:10 | fn bar_0 | 0 | src/lib.rs:13:1:13:10 | fn bar_0_0 |
| src/lib.rs:12:1:13:10 | fn bar_0 | 1 | src/lib.rs:13:1:13:10 | fn bar_0_1 |
| src/lib.rs:12:1:13:10 | fn bar_0 | 2 | src/lib.rs:13:1:13:10 | fn bar_0_2 |
| src/lib.rs:12:1:13:10 | fn bar_1 | 0 | src/lib.rs:13:1:13:10 | fn bar_1_0 |
| src/lib.rs:12:1:13:10 | fn bar_1 | 1 | src/lib.rs:13:1:13:10 | fn bar_1_1 |
| src/lib.rs:12:1:13:10 | fn bar_1 | 2 | src/lib.rs:13:1:13:10 | fn bar_1_2 |

View File

@@ -1,5 +1,5 @@
import rust
from Item i, MacroItems items, int index, Item expanded
where i.getAttributeMacroExpansion() = items and items.getItem(index) = expanded
where i.fromSource() and i.getAttributeMacroExpansion() = items and items.getItem(index) = expanded
select i, index, expanded

View File

@@ -1,8 +1,6 @@
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
| file:///types.rs:0:0:0:0 | Extract(/types.rs) |
| file:///types.rs:0:0:0:0 | Parse(/types.rs) |
| file://:0:0:0:0 | CrateGraph |
| file://:0:0:0:0 | FindManifests |
| lib/src/lib.rs:0:0:0:0 | Extract(lib/src/lib.rs) |

View File

@@ -1,27 +1,5 @@
import codeql.rust.elements.internal.ExtractorStep
private class Step instanceof ExtractorStep {
string toString() {
result = super.getAction() + "(" + this.getFilePath() + ")"
or
not super.hasFile() and result = super.getAction()
}
private string getFilePath() {
exists(File file | file = super.getFile() |
exists(file.getRelativePath()) and result = file.getAbsolutePath()
or
not exists(file.getRelativePath()) and result = "/" + file.getBaseName()
)
}
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
super.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
filepath = this.getFilePath()
}
}
from Step step
from ExtractorStep step
where not step.getAction() = ["ParseLibrary", "ExtractLibrary"]
select step

View File

@@ -29,3 +29,25 @@ private module Input implements InputSig<Location, RustDataFlow> {
}
import MakeConsistency<Location, RustDataFlow, RustTaintTracking, Input>
private import codeql.rust.dataflow.internal.ModelsAsData
query predicate missingMadSummaryCanonicalPath(string crate, string path, Addressable a) {
summaryModel(crate, path, _, _, _, _, _) and
a.getCrateOrigin() = crate and
a.getExtendedCanonicalPath() = path and
not exists(a.getCanonicalPath())
}
query predicate missingMadSourceCanonicalPath(string crate, string path, Addressable a) {
sourceModel(crate, path, _, _, _, _) and
a.getCrateOrigin() = crate and
a.getExtendedCanonicalPath() = path and
not exists(a.getCanonicalPath())
}
query predicate missingMadSinkCanonicalPath(string crate, string path, Addressable a) {
sinkModel(crate, path, _, _, _, _) and
a.getCrateOrigin() = crate and
a.getExtendedCanonicalPath() = path and
not exists(a.getCanonicalPath())
}

View File

@@ -523,97 +523,103 @@ module RustDataFlow implements InputSig<Location> {
exists(c)
}
pragma[nomagic]
additional predicate readContentStep(Node node1, Content c, Node node2) {
exists(TupleStructPatCfgNode pat, int pos |
pat = node1.asPat() and
node2.asPat() = pat.getField(pos) and
c = TTupleFieldContent(pat.getTupleStructPat().getTupleField(pos))
)
or
exists(TuplePatCfgNode pat, int pos |
pos = c.(TuplePositionContent).getPosition() and
node1.asPat() = pat and
node2.asPat() = pat.getField(pos)
)
or
exists(StructPatCfgNode pat, string field |
pat = node1.asPat() and
c = TStructFieldContent(pat.getStructPat().getStructField(field)) and
node2.asPat() = pat.getFieldPat(field)
)
or
c instanceof ReferenceContent and
node1.asPat().(RefPatCfgNode).getPat() = node2.asPat()
or
exists(FieldExprCfgNode access |
node1.asExpr() = access.getContainer() and
node2.asExpr() = access and
access = c.(FieldContent).getAnAccess()
)
or
exists(IndexExprCfgNode arr |
c instanceof ElementContent and
node1.asExpr() = arr.getBase() and
node2.asExpr() = arr
)
or
exists(ForExprCfgNode for |
c instanceof ElementContent and
node1.asExpr() = for.getIterable() and
node2.asPat() = for.getPat()
)
or
exists(SlicePatCfgNode pat |
c instanceof ElementContent and
node1.asPat() = pat and
node2.asPat() = pat.getAPat()
)
or
exists(TryExprCfgNode try |
node1.asExpr() = try.getExpr() and
node2.asExpr() = try and
c.(TupleFieldContent)
.isVariantField([any(OptionEnum o).getSome(), any(ResultEnum r).getOk()], 0)
)
or
exists(PrefixExprCfgNode deref |
c instanceof ReferenceContent and
deref.getOperatorName() = "*" and
node1.asExpr() = deref.getExpr() and
node2.asExpr() = deref
)
or
// Read from function return
exists(DataFlowCall call |
lambdaCall(call, _, node1) and
call = node2.(OutNode).getCall(TNormalReturnKind()) and
c instanceof FunctionCallReturnContent
)
or
exists(AwaitExprCfgNode await |
c instanceof FutureContent and
node1.asExpr() = await.getExpr() and
node2.asExpr() = await
)
or
referenceExprToExpr(node2.(PostUpdateNode).getPreUpdateNode(),
node1.(PostUpdateNode).getPreUpdateNode(), c)
or
// Step from receiver expression to receiver node, in case of an implicit
// dereference.
implicitDerefToReceiver(node1, node2, c)
or
// A read step dual to the store step for implicit borrows.
implicitBorrowToReceiver(node2.(PostUpdateNode).getPreUpdateNode(),
node1.(PostUpdateNode).getPreUpdateNode(), c)
or
VariableCapture::readStep(node1, c, node2)
}
/**
* Holds if data can flow from `node1` to `node2` via a read of `c`. Thus,
* `node1` references an object with a content `c.getAReadContent()` whose
* value ends up in `node2`.
*/
predicate readStep(Node node1, ContentSet cs, Node node2) {
exists(Content c | c = cs.(SingletonContentSet).getContent() |
exists(TupleStructPatCfgNode pat, int pos |
pat = node1.asPat() and
node2.asPat() = pat.getField(pos) and
c = TTupleFieldContent(pat.getTupleStructPat().getTupleField(pos))
)
or
exists(TuplePatCfgNode pat, int pos |
pos = c.(TuplePositionContent).getPosition() and
node1.asPat() = pat and
node2.asPat() = pat.getField(pos)
)
or
exists(StructPatCfgNode pat, string field |
pat = node1.asPat() and
c = TStructFieldContent(pat.getStructPat().getStructField(field)) and
node2.asPat() = pat.getFieldPat(field)
)
or
c instanceof ReferenceContent and
node1.asPat().(RefPatCfgNode).getPat() = node2.asPat()
or
exists(FieldExprCfgNode access |
node1.asExpr() = access.getContainer() and
node2.asExpr() = access and
access = c.(FieldContent).getAnAccess()
)
or
exists(IndexExprCfgNode arr |
c instanceof ElementContent and
node1.asExpr() = arr.getBase() and
node2.asExpr() = arr
)
or
exists(ForExprCfgNode for |
c instanceof ElementContent and
node1.asExpr() = for.getIterable() and
node2.asPat() = for.getPat()
)
or
exists(SlicePatCfgNode pat |
c instanceof ElementContent and
node1.asPat() = pat and
node2.asPat() = pat.getAPat()
)
or
exists(TryExprCfgNode try |
node1.asExpr() = try.getExpr() and
node2.asExpr() = try and
c.(TupleFieldContent)
.isVariantField([any(OptionEnum o).getSome(), any(ResultEnum r).getOk()], 0)
)
or
exists(PrefixExprCfgNode deref |
c instanceof ReferenceContent and
deref.getOperatorName() = "*" and
node1.asExpr() = deref.getExpr() and
node2.asExpr() = deref
)
or
// Read from function return
exists(DataFlowCall call |
lambdaCall(call, _, node1) and
call = node2.(OutNode).getCall(TNormalReturnKind()) and
c instanceof FunctionCallReturnContent
)
or
exists(AwaitExprCfgNode await |
c instanceof FutureContent and
node1.asExpr() = await.getExpr() and
node2.asExpr() = await
)
or
referenceExprToExpr(node2.(PostUpdateNode).getPreUpdateNode(),
node1.(PostUpdateNode).getPreUpdateNode(), c)
or
// Step from receiver expression to receiver node, in case of an implicit
// dereference.
implicitDerefToReceiver(node1, node2, c)
or
// A read step dual to the store step for implicit borrows.
implicitBorrowToReceiver(node2.(PostUpdateNode).getPreUpdateNode(),
node1.(PostUpdateNode).getPreUpdateNode(), c)
or
VariableCapture::readStep(node1, c, node2)
exists(Content c |
c = cs.(SingletonContentSet).getContent() and
readContentStep(node1, c, node2)
)
or
FlowSummaryImpl::Private::Steps::summaryReadStep(node1.(FlowSummaryNode).getSummaryNode(), cs,
@@ -652,7 +658,7 @@ module RustDataFlow implements InputSig<Location> {
}
pragma[nomagic]
private predicate storeContentStep(Node node1, Content c, Node node2) {
additional predicate storeContentStep(Node node1, Content c, Node node2) {
exists(CallExprCfgNode call, int pos |
node1.asExpr() = call.getArgument(pragma[only_bind_into](pos)) and
node2.asExpr() = call and

View File

@@ -363,17 +363,25 @@ private module DataFlowIntegrationInput implements Impl::DataFlowIntegrationInpu
class Guard extends CfgNodes::AstCfgNode {
/**
* Holds if the control flow branching from `bb1` is dependent on this guard,
* and that the edge from `bb1` to `bb2` corresponds to the evaluation of this
* guard to `branch`.
* Holds if the evaluation of this guard to `branch` corresponds to the edge
* from `bb1` to `bb2`.
*/
predicate controlsBranchEdge(SsaInput::BasicBlock bb1, SsaInput::BasicBlock bb2, boolean branch) {
predicate hasBranchEdge(SsaInput::BasicBlock bb1, SsaInput::BasicBlock bb2, boolean branch) {
exists(Cfg::ConditionalSuccessor s |
this = bb1.getANode() and
bb2 = bb1.getASuccessor(s) and
s.getValue() = branch
)
}
/**
* Holds if this guard evaluating to `branch` controls the control-flow
* branch edge from `bb1` to `bb2`. That is, following the edge from
* `bb1` to `bb2` implies that this guard evaluated to `branch`.
*/
predicate controlsBranchEdge(SsaInput::BasicBlock bb1, SsaInput::BasicBlock bb2, boolean branch) {
this.hasBranchEdge(bb1, bb2, branch)
}
}
/** Holds if the guard `guard` controls block `bb` upon evaluating to `branch`. */

View File

@@ -0,0 +1,38 @@
/**
* Provides classes for arithmetic operations.
*/
private import codeql.rust.elements.BinaryExpr
private import codeql.rust.elements.PrefixExpr
private import codeql.rust.elements.Operation
private import codeql.rust.elements.AssignmentOperation
/**
* An arithmetic operation, such as `+`, `*=`, or `-`.
*/
abstract private class ArithmeticOperationImpl extends Operation { }
final class ArithmeticOperation = ArithmeticOperationImpl;
/**
* A binary arithmetic operation, such as `+` or `*`.
*/
final class BinaryArithmeticOperation extends BinaryExpr, ArithmeticOperationImpl {
BinaryArithmeticOperation() { this.getOperatorName() = ["+", "-", "*", "/", "%"] }
}
/**
* An arithmetic assignment operation, such as `+=` or `*=`.
*/
final class AssignArithmeticOperation extends BinaryExpr, ArithmeticOperationImpl,
AssignmentOperation
{
AssignArithmeticOperation() { this.getOperatorName() = ["+=", "-=", "*=", "/=", "%="] }
}
/**
* A prefix arithmetic operation, such as `-`.
*/
final class PrefixArithmeticOperation extends PrefixExpr, ArithmeticOperationImpl {
PrefixArithmeticOperation() { this.getOperatorName() = "-" }
}

View File

@@ -0,0 +1,28 @@
/**
* Provides classes for bitwise operations.
*/
private import codeql.rust.elements.BinaryExpr
private import codeql.rust.elements.Operation
private import codeql.rust.elements.AssignmentOperation
/**
* A bitwise operation, such as `&`, `<<`, or `|=`.
*/
abstract private class BitwiseOperationImpl extends Operation { }
final class BitwiseOperation = BitwiseOperationImpl;
/**
* A binary bitwise operation, such as `&` or `<<`.
*/
final class BinaryBitwiseOperation extends BinaryExpr, BitwiseOperationImpl {
BinaryBitwiseOperation() { this.getOperatorName() = ["&", "|", "^", "<<", ">>"] }
}
/**
* A bitwise assignment operation, such as `|=` or `<<=`.
*/
final class AssignBitwiseOperation extends BinaryExpr, BitwiseOperationImpl, AssignmentOperation {
AssignBitwiseOperation() { this.getOperatorName() = ["&=", "|=", "^=", "<<=", ">>="] }
}

View File

@@ -0,0 +1,101 @@
/**
* Provides classes for comparison operations.
*/
private import codeql.rust.elements.BinaryExpr
private import codeql.rust.elements.Operation
/**
* A comparison operation, such as `==`, `<`, or `>=`.
*/
abstract private class ComparisonOperationImpl extends Operation { }
final class ComparisonOperation = ComparisonOperationImpl;
/**
* An equality comparison operation, `==` or `!=`.
*/
abstract private class EqualityOperationImpl extends BinaryExpr, ComparisonOperationImpl { }
final class EqualityOperation = EqualityOperationImpl;
/**
* The equal comparison operation, `==`.
*/
final class EqualsOperation extends EqualityOperationImpl {
EqualsOperation() { this.getOperatorName() = "==" }
}
/**
* The not equal comparison operation, `!=`.
*/
final class NotEqualsOperation extends EqualityOperationImpl {
NotEqualsOperation() { this.getOperatorName() = "!=" }
}
/**
* A relational comparison operation, that is, one of `<=`, `<`, `>`, or `>=`.
*/
abstract private class RelationalOperationImpl extends BinaryExpr, ComparisonOperationImpl {
/**
* Gets the operand on the "greater" (or "greater-or-equal") side
* of this relational expression, that is, the side that is larger
* if the overall expression evaluates to `true`; for example on
* `x <= 20` this is the `20`, and on `y > 0` it is `y`.
*/
abstract Expr getGreaterOperand();
/**
* Gets the operand on the "lesser" (or "lesser-or-equal") side
* of this relational expression, that is, the side that is smaller
* if the overall expression evaluates to `true`; for example on
* `x <= 20` this is `x`, and on `y > 0` it is the `0`.
*/
abstract Expr getLesserOperand();
}
final class RelationalOperation = RelationalOperationImpl;
/**
* The less than comparison operation, `<`.
*/
final class LessThanOperation extends RelationalOperationImpl {
LessThanOperation() { this.getOperatorName() = "<" }
override Expr getGreaterOperand() { result = this.getRhs() }
override Expr getLesserOperand() { result = this.getLhs() }
}
/**
* The greater than comparison operation, `>`.
*/
final class GreaterThanOperation extends RelationalOperationImpl {
GreaterThanOperation() { this.getOperatorName() = ">" }
override Expr getGreaterOperand() { result = this.getLhs() }
override Expr getLesserOperand() { result = this.getRhs() }
}
/**
* The less than or equal comparison operation, `<=`.
*/
final class LessOrEqualsOperation extends RelationalOperationImpl {
LessOrEqualsOperation() { this.getOperatorName() = "<=" }
override Expr getGreaterOperand() { result = this.getRhs() }
override Expr getLesserOperand() { result = this.getLhs() }
}
/**
* The greater than or equal comparison operation, `>=`.
*/
final class GreaterOrEqualsOperation extends RelationalOperationImpl {
GreaterOrEqualsOperation() { this.getOperatorName() = ">=" }
override Expr getGreaterOperand() { result = this.getLhs() }
override Expr getLesserOperand() { result = this.getRhs() }
}

View File

@@ -5,7 +5,6 @@
private import internal.CrateImpl
import codeql.rust.elements.Locatable
import codeql.rust.elements.Module
import codeql.rust.elements.internal.NamedCrate
final class Crate = Impl::Crate;

View File

@@ -0,0 +1,13 @@
/**
* Provides classes for deref expressions (`*`).
*/
private import codeql.rust.elements.PrefixExpr
private import codeql.rust.elements.Operation
/**
* A dereference expression, the prefix operator `*`.
*/
final class DerefExpr extends PrefixExpr, Operation {
DerefExpr() { this.getOperatorName() = "*" }
}

View File

@@ -1,3 +1,7 @@
/**
* Provides classes for logical operations.
*/
private import codeql.rust.elements.Expr
private import codeql.rust.elements.BinaryExpr
private import codeql.rust.elements.PrefixExpr

View File

@@ -1,4 +1,3 @@
// generated by codegen, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `Addressable`.
*
@@ -12,10 +11,43 @@ private import codeql.rust.elements.internal.generated.Addressable
* be referenced directly.
*/
module Impl {
private import rust
private import codeql.rust.internal.PathResolution
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* Something that can be addressed by a path.
*
* TODO: This does not yet include all possible cases.
*/
class Addressable extends Generated::Addressable { }
class Addressable extends Generated::Addressable {
/**
* Gets the canonical path of this item, if any.
*
* The crate `c` is the root of the path.
*
* See [The Rust Reference][1] for more details.
*
* [1]: https://doc.rust-lang.org/reference/paths.html#canonical-paths
*/
string getCanonicalPath(Crate c) { result = this.(ItemNode).getCanonicalPath(c) }
/**
* Gets the canonical path of this item, if any.
*
* See [The Rust Reference][1] for more details.
*
* [1]: https://doc.rust-lang.org/reference/paths.html#canonical-paths
*/
string getCanonicalPath() { result = this.getCanonicalPath(_) }
/**
* Holds if this item has a canonical path.
*
* See [The Rust Reference][1] for more details.
*
* [1]: https://doc.rust-lang.org/reference/paths.html#canonical-paths
*/
predicate hasCanonicalPath() { exists(this.getCanonicalPath()) }
}
}

View File

@@ -15,6 +15,7 @@ module Impl {
private import rust
private import codeql.rust.elements.internal.generated.ParentChild
private import codeql.rust.controlflow.ControlFlowGraph
private import codeql.rust.elements.internal.MacroCallImpl::Impl as MacroCallImpl
/**
* Gets the immediate parent of a non-`AstNode` element `e`.
@@ -59,10 +60,20 @@ module Impl {
}
/** Holds if this node is inside a macro expansion. */
predicate isInMacroExpansion() {
this = any(MacroCall mc).getMacroCallExpansion()
or
this.getParentNode().isInMacroExpansion()
predicate isInMacroExpansion() { MacroCallImpl::isInMacroExpansion(_, this) }
/**
* Holds if this node exists only as the result of a macro expansion.
*
* This is the same as `isInMacroExpansion()`, but excludes AST nodes corresponding
* to macro arguments.
*/
pragma[nomagic]
predicate isFromMacroExpansion() {
exists(MacroCall mc |
MacroCallImpl::isInMacroExpansion(mc, this) and
not this = mc.getATokenTreeNode()
)
}
/**

View File

@@ -14,6 +14,7 @@ private import codeql.rust.elements.PathExpr
module Impl {
private import rust
private import codeql.rust.internal.PathResolution as PathResolution
private import codeql.rust.internal.TypeInference as TypeInference
pragma[nomagic]
Path getFunctionPath(CallExpr ce) { result = ce.getFunction().(PathExpr).getPath() }
@@ -36,7 +37,14 @@ module Impl {
class CallExpr extends Generated::CallExpr {
override string toStringImpl() { result = this.getFunction().toAbbreviatedString() + "(...)" }
override Callable getStaticTarget() { result = getResolvedFunction(this) }
override Callable getStaticTarget() {
// If this call is to a trait method, e.g., `Trait::foo(bar)`, then check
// if type inference can resolve it to the correct trait implementation.
result = TypeInference::resolveMethodCallTarget(this)
or
not exists(TypeInference::resolveMethodCallTarget(this)) and
result = getResolvedFunction(this)
}
/** Gets the struct that this call resolves to, if any. */
Struct getStruct() { result = getResolvedFunction(this) }

View File

@@ -60,13 +60,11 @@ module Impl {
Crate getADependency() { result = this.getDependency(_) }
/** Gets the source file that defines this crate, if any. */
SourceFile getSourceFile() { result.getFile() = this.getModule().getFile() }
SourceFile getSourceFile() { result.getFile() = this.getLocation().getFile() }
/**
* Gets a source file that belongs to this crate, if any.
*/
SourceFile getASourceFile() { result = this.(CrateItemNode).getASourceFile() }
override Location getLocation() { result = this.getModule().getLocation() }
}
}

View File

@@ -43,7 +43,7 @@ module Impl {
File getFile() { result = this.getLocation().getFile() }
/** Holds if this element is from source code. */
predicate fromSource() { exists(this.getFile().getRelativePath()) }
predicate fromSource() { this.getFile().fromSource() }
}
private @location_default getDbLocation(Locatable l) {

View File

@@ -77,13 +77,76 @@ module LocationImpl {
)
}
/** Holds if this location starts strictly before the specified location. */
/** Holds if this location starts before location `that`. */
pragma[inline]
predicate strictlyBefore(Location other) {
this.getStartLine() < other.getStartLine()
or
this.getStartLine() = other.getStartLine() and this.getStartColumn() < other.getStartColumn()
predicate startsBefore(Location that) {
exists(string f, int sl1, int sc1, int sl2, int sc2 |
this.hasLocationInfo(f, sl1, sc1, _, _) and
that.hasLocationInfo(f, sl2, sc2, _, _)
|
sl1 < sl2
or
sl1 = sl2 and sc1 <= sc2
)
}
/** Holds if this location starts strictly before location `that`. */
pragma[inline]
predicate startsStrictlyBefore(Location that) {
exists(string f, int sl1, int sc1, int sl2, int sc2 |
this.hasLocationInfo(f, sl1, sc1, _, _) and
that.hasLocationInfo(f, sl2, sc2, _, _)
|
sl1 < sl2
or
sl1 = sl2 and sc1 < sc2
)
}
/** Holds if this location ends after location `that`. */
pragma[inline]
predicate endsAfter(Location that) {
exists(string f, int el1, int ec1, int el2, int ec2 |
this.hasLocationInfo(f, _, _, el1, ec1) and
that.hasLocationInfo(f, _, _, el2, ec2)
|
el1 > el2
or
el1 = el2 and ec1 >= ec2
)
}
/** Holds if this location ends strictly after location `that`. */
pragma[inline]
predicate endsStrictlyAfter(Location that) {
exists(string f, int el1, int ec1, int el2, int ec2 |
this.hasLocationInfo(f, _, _, el1, ec1) and
that.hasLocationInfo(f, _, _, el2, ec2)
|
el1 > el2
or
el1 = el2 and ec1 > ec2
)
}
/**
* Holds if this location contains location `that`, meaning that it starts
* before and ends after it.
*/
pragma[inline]
predicate contains(Location that) { this.startsBefore(that) and this.endsAfter(that) }
/**
* Holds if this location strictlycontains location `that`, meaning that it starts
* strictly before and ends strictly after it.
*/
pragma[inline]
predicate strictlyContains(Location that) {
this.startsStrictlyBefore(that) and this.endsStrictlyAfter(that)
}
/** Holds if this location is from source code. */
predicate fromSource() { this.getFile().fromSource() }
}
class LocationDefault extends Location, TLocationDefault {

View File

@@ -11,6 +11,15 @@ private import codeql.rust.elements.internal.generated.MacroCall
* be referenced directly.
*/
module Impl {
private import rust
pragma[nomagic]
predicate isInMacroExpansion(MacroCall mc, AstNode n) {
n = mc.getMacroCallExpansion()
or
isInMacroExpansion(mc, n.getParentNode())
}
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A MacroCall. For example:
@@ -20,5 +29,12 @@ module Impl {
*/
class MacroCall extends Generated::MacroCall {
override string toStringImpl() { result = this.getPath().toAbbreviatedString() + "!..." }
/** Gets an AST node whose location is inside the token tree belonging to this macro call. */
pragma[nomagic]
AstNode getATokenTreeNode() {
isInMacroExpansion(this, result) and
this.getTokenTree().getLocation().contains(result.getLocation())
}
}
}

View File

@@ -14,14 +14,6 @@ private import codeql.rust.internal.TypeInference
* be referenced directly.
*/
module Impl {
private predicate isInherentImplFunction(Function f) {
f = any(Impl impl | not impl.hasTrait()).(ImplItemNode).getAnAssocItem()
}
private predicate isTraitImplFunction(Function f) {
f = any(Impl impl | impl.hasTrait()).(ImplItemNode).getAnAssocItem()
}
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A method call expression. For example:
@@ -31,38 +23,7 @@ module Impl {
* ```
*/
class MethodCallExpr extends Generated::MethodCallExpr {
private Function getStaticTargetFrom(boolean fromSource) {
result = resolveMethodCallExpr(this) and
(if result.fromSource() then fromSource = true else fromSource = false) and
(
// prioritize inherent implementation methods first
isInherentImplFunction(result)
or
not isInherentImplFunction(resolveMethodCallExpr(this)) and
(
// then trait implementation methods
isTraitImplFunction(result)
or
not isTraitImplFunction(resolveMethodCallExpr(this)) and
(
// then trait methods with default implementations
result.hasBody()
or
// and finally trait methods without default implementations
not resolveMethodCallExpr(this).hasBody()
)
)
)
}
override Function getStaticTarget() {
// Functions in source code also gets extracted as library code, due to
// this duplication we prioritize functions from source code.
result = this.getStaticTargetFrom(true)
or
not exists(this.getStaticTargetFrom(true)) and
result = this.getStaticTargetFrom(false)
}
override Function getStaticTarget() { result = resolveMethodCallTarget(this) }
private string toStringPart(int index) {
index = 0 and

View File

@@ -5,6 +5,7 @@
*/
private import codeql.rust.elements.internal.generated.RefExpr
private import codeql.rust.elements.internal.OperationImpl::Impl as OperationImpl
/**
* INTERNAL: This module contains the customizable definition of `RefExpr` and should not
@@ -21,11 +22,15 @@ module Impl {
* let raw_mut: &mut i32 = &raw mut foo;
* ```
*/
class RefExpr extends Generated::RefExpr {
class RefExpr extends Generated::RefExpr, OperationImpl::Operation {
override string toStringImpl() {
result = "&" + concat(int i | | this.getSpecPart(i), " " order by i)
}
override string getOperatorName() { result = "&" }
override Expr getAnOperand() { result = this.getExpr() }
private string getSpecPart(int index) {
index = 0 and this.isRaw() and result = "raw"
or

View File

@@ -610,7 +610,7 @@ module Impl {
exists(Expr mid |
assignmentExprDescendant(mid) and
getImmediateParent(e) = mid and
not mid.(PrefixExpr).getOperatorName() = "*" and
not mid instanceof DerefExpr and
not mid instanceof FieldExpr and
not mid instanceof IndexExpr
)

View File

@@ -7,7 +7,6 @@
private import codeql.rust.elements.internal.generated.Synth
private import codeql.rust.elements.internal.generated.Raw
import codeql.rust.elements.internal.LocatableImpl::Impl as LocatableImpl
import codeql.rust.elements.Module
import codeql.rust.elements.internal.NamedCrate
/**
@@ -42,18 +41,6 @@ module Generated {
*/
final predicate hasVersion() { exists(this.getVersion()) }
/**
* Gets the module of this crate, if it exists.
*/
Module getModule() {
result = Synth::convertModuleFromRaw(Synth::convertCrateToRaw(this).(Raw::Crate).getModule())
}
/**
* Holds if `getModule()` exists.
*/
final predicate hasModule() { exists(this.getModule()) }
/**
* Gets the `index`th cfg option of this crate (0-based).
*/

View File

@@ -86,11 +86,6 @@ module Raw {
*/
string getVersion() { crate_versions(this, result) }
/**
* Gets the module of this crate, if it exists.
*/
Module getModule() { crate_modules(this, result) }
/**
* Gets the `index`th cfg option of this crate (0-based).
*/

View File

@@ -17,3 +17,7 @@ extensions:
- ["lang:core", "crate::panicking::panic_fmt", "Argument[0]", "log-injection", "manual"]
- ["lang:core", "crate::panicking::assert_failed", "Argument[3].Field[crate::option::Option::Some(0)]", "log-injection", "manual"]
- ["lang:core", "<crate::option::Option>::expect", "Argument[0]", "log-injection", "manual"]
- ["repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err", "<crate::option::Option as crate::LogErrOption>::log_expect", "Argument[0]", "log-injection", "manual"]
- ["repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err", "<crate::result::Result as crate::LogErrResult>::log_unwrap", "Argument[self].Field[crate::result::Result::Err(0)]", "log-injection", "manual"]
- ["repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err", "<crate::result::Result as crate::LogErrResult>::log_expect", "Argument[0]", "log-injection", "manual"]
- ["repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err", "<crate::result::Result as crate::LogErrResult>::log_expect", "Argument[self].Field[crate::result::Result::Err(0)]", "log-injection", "manual"]

View File

@@ -7,6 +7,7 @@ private import codeql.rust.Concepts
private import codeql.rust.controlflow.ControlFlowGraph as Cfg
private import codeql.rust.controlflow.CfgNodes as CfgNodes
private import codeql.rust.dataflow.DataFlow
private import codeql.rust.internal.PathResolution
/**
* A call to the `starts_with` method on a `Path`.
@@ -28,16 +29,7 @@ private class StartswithCall extends Path::SafeAccessCheck::Range, CfgNodes::Met
* [1]: https://doc.rust-lang.org/std/option/enum.Option.html
*/
class OptionEnum extends Enum {
OptionEnum() {
// todo: replace with canonical path, once calculated in QL
exists(Crate core, Module m |
core.getName() = "core" and
m = core.getModule().getItemList().getAnItem() and
m.getName().getText() = "option" and
this = m.getItemList().getAnItem() and
this.getName().getText() = "Option"
)
}
OptionEnum() { this.getCanonicalPath() = "core::option::Option" }
/** Gets the `Some` variant. */
Variant getSome() { result = this.getVariant("Some") }
@@ -49,16 +41,7 @@ class OptionEnum extends Enum {
* [1]: https://doc.rust-lang.org/stable/std/result/enum.Result.html
*/
class ResultEnum extends Enum {
ResultEnum() {
// todo: replace with canonical path, once calculated in QL
exists(Crate core, Module m |
core.getName() = "core" and
m = core.getModule().getItemList().getAnItem() and
m.getName().getText() = "result" and
this = m.getItemList().getAnItem() and
this.getName().getText() = "Result"
)
}
ResultEnum() { this.getCanonicalPath() = "core::result::Result" }
/** Gets the `Ok` variant. */
Variant getOk() { result = this.getVariant("Ok") }

View File

@@ -24,10 +24,7 @@ query predicate multipleLocations(Locatable e) { strictcount(e.getLocation()) >
/**
* Holds if `e` does not have a `Location`.
*/
query predicate noLocation(Locatable e) {
not exists(e.getLocation()) and
not e.(AstNode).getParentNode*() = any(Crate c).getModule()
}
query predicate noLocation(Locatable e) { not exists(e.getLocation()) }
private predicate multiplePrimaryQlClasses(Element e) {
strictcount(string cls | cls = e.getAPrimaryQlClass() and cls != "VariableAccess") > 1

View File

@@ -180,7 +180,8 @@ abstract class ItemNode extends Locatable {
or
preludeEdge(this, name, result) and not declares(this, _, name)
or
builtinEdge(this, name, result)
this instanceof SourceFile and
builtin(name, result)
or
name = "super" and
if this instanceof Module or this instanceof SourceFile
@@ -196,11 +197,11 @@ abstract class ItemNode extends Locatable {
this = result.(ImplOrTraitItemNode).getAnItemInSelfScope()
or
name = "crate" and
this = result.(CrateItemNode).getARootModuleNode()
this = result.(CrateItemNode).getASourceFile()
or
// todo: implement properly
name = "$crate" and
result = any(CrateItemNode crate | this = crate.getARootModuleNode()).(Crate).getADependency*() and
result = any(CrateItemNode crate | this = crate.getASourceFile()).(Crate).getADependency*() and
result.(CrateItemNode).isPotentialDollarCrateTarget()
}
@@ -225,6 +226,45 @@ abstract class ItemNode extends Locatable {
)
}
/** Holds if this item has a canonical path belonging to the crate `c`. */
abstract predicate hasCanonicalPath(Crate c);
/** Holds if this node provides a canonical path prefix for `child` in crate `c`. */
pragma[nomagic]
predicate providesCanonicalPathPrefixFor(Crate c, ItemNode child) {
child.getImmediateParent() = this and
this.hasCanonicalPath(c)
}
/** Holds if this node has a canonical path prefix in crate `c`. */
pragma[nomagic]
final predicate hasCanonicalPathPrefix(Crate c) {
any(ItemNode parent).providesCanonicalPathPrefixFor(c, this)
}
/**
* Gets the canonical path of this item, if any.
*
* See [The Rust Reference][1] for more details.
*
* [1]: https://doc.rust-lang.org/reference/paths.html#canonical-paths
*/
cached
abstract string getCanonicalPath(Crate c);
/** Gets the canonical path prefix that this node provides for `child`. */
pragma[nomagic]
string getCanonicalPathPrefixFor(Crate c, ItemNode child) {
this.providesCanonicalPathPrefixFor(c, child) and
result = this.getCanonicalPath(c)
}
/** Gets the canonical path prefix of this node, if any. */
pragma[nomagic]
final string getCanonicalPathPrefix(Crate c) {
result = any(ItemNode parent).getCanonicalPathPrefixFor(c, this)
}
/** Gets the location of this item. */
Location getLocation() { result = super.getLocation() }
}
@@ -242,16 +282,6 @@ abstract private class ModuleLikeNode extends ItemNode {
not mid instanceof ModuleLikeNode
)
}
/**
* Holds if this is a root module, meaning either a source file or
* the entry module of a crate.
*/
predicate isRoot() {
this instanceof SourceFileItemNode
or
this = any(Crate c).getModule()
}
}
private class SourceFileItemNode extends ModuleLikeNode, SourceFile {
@@ -269,25 +299,21 @@ private class SourceFileItemNode extends ModuleLikeNode, SourceFile {
override Visibility getVisibility() { none() }
override TypeParam getTypeParam(int i) { none() }
override predicate hasCanonicalPath(Crate c) { none() }
override string getCanonicalPath(Crate c) { none() }
}
class CrateItemNode extends ItemNode instanceof Crate {
/**
* Gets the module node that defines this crate.
*
* This is either a source file, when the crate is defined in source code,
* or a module, when the crate is defined in a dependency.
* Gets the source file that defines this crate.
*/
pragma[nomagic]
ModuleLikeNode getModuleNode() {
result = super.getSourceFile()
or
not exists(super.getSourceFile()) and
result = super.getModule()
}
SourceFileItemNode getSourceFile() { result = super.getSourceFile() }
/**
* Gets a source file that belongs to this crate, if any.
* Gets a source file that belongs to this crate.
*
* This is calculated as those source files that can be reached from the entry
* file of this crate using zero or more `mod` imports, without going through
@@ -305,15 +331,6 @@ class CrateItemNode extends ItemNode instanceof Crate {
)
}
/**
* Gets a root module node belonging to this crate.
*/
ModuleLikeNode getARootModuleNode() {
result = this.getASourceFile()
or
result = super.getModule()
}
pragma[nomagic]
predicate isPotentialDollarCrateTarget() {
exists(string name, RelevantPath p |
@@ -331,12 +348,45 @@ class CrateItemNode extends ItemNode instanceof Crate {
override Visibility getVisibility() { none() }
override TypeParam getTypeParam(int i) { none() }
override predicate hasCanonicalPath(Crate c) { c = this }
override predicate providesCanonicalPathPrefixFor(Crate c, ItemNode child) {
this.hasCanonicalPath(c) and
exists(ModuleLikeNode m |
child.getImmediateParent() = m and
not m = child.(SourceFileItemNode).getSuper() and
m = super.getSourceFile()
)
}
override string getCanonicalPath(Crate c) { c = this and result = Crate.super.getName() }
}
/** An item that can occur in a trait or an `impl` block. */
abstract private class AssocItemNode extends ItemNode, AssocItem {
/** Holds if this associated item has an implementation. */
abstract predicate hasImplementation();
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
private class ConstItemNode extends AssocItemNode instanceof Const {
@@ -366,6 +416,26 @@ private class EnumItemNode extends ItemNode instanceof Enum {
override Visibility getVisibility() { result = Enum.super.getVisibility() }
override TypeParam getTypeParam(int i) { result = super.getGenericParamList().getTypeParam(i) }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
private class VariantItemNode extends ItemNode instanceof Variant {
@@ -380,6 +450,26 @@ private class VariantItemNode extends ItemNode instanceof Variant {
}
override Visibility getVisibility() { result = super.getEnum().getVisibility() }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
class FunctionItemNode extends AssocItemNode instanceof Function {
@@ -457,6 +547,75 @@ class ImplItemNode extends ImplOrTraitItemNode instanceof Impl {
override TypeParam getTypeParam(int i) { result = super.getGenericParamList().getTypeParam(i) }
override Visibility getVisibility() { result = Impl.super.getVisibility() }
override predicate hasCanonicalPath(Crate c) { this.resolveSelfTy().hasCanonicalPathPrefix(c) }
/**
* Holds if `(c1, c2)` forms a pair of crates for the type and trait
* being implemented, for which a canonical path can be computed.
*
* This is the case when either the type and the trait belong to the
* same crate, or when they belong to different crates where one depends
* on the other.
*/
pragma[nomagic]
private predicate selfTraitCratePair(Crate c1, Crate c2) {
this.hasCanonicalPath(pragma[only_bind_into](c1)) and
exists(TraitItemNode trait |
trait = this.resolveTraitTy() and
trait.hasCanonicalPath(c2) and
if this.hasCanonicalPath(c2)
then c1 = c2
else (
c2 = c1.getADependency() or c1 = c2.getADependency()
)
)
}
pragma[nomagic]
private string getTraitCanonicalPath(Crate c) {
result = this.resolveTraitTy().getCanonicalPath(c)
}
pragma[nomagic]
private string getCanonicalPathTraitPart(Crate c) {
exists(Crate c2 |
this.selfTraitCratePair(c, c2) and
result = this.getTraitCanonicalPath(c2)
)
}
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = "<"
or
i = 1 and
result = this.resolveSelfTy().getCanonicalPath(c)
or
if exists(this.getTraitPath())
then
i = 2 and
result = " as "
or
i = 3 and
result = this.getCanonicalPathTraitPart(c)
or
i = 4 and
result = ">"
else (
i = 2 and
result = ">"
)
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
exists(int m | if exists(this.getTraitPath()) then m = 4 else m = 2 |
result = strictconcat(int i | i in [0 .. m] | this.getCanonicalPathPart(c, i) order by i)
)
}
}
private class MacroCallItemNode extends AssocItemNode instanceof MacroCall {
@@ -469,6 +628,20 @@ private class MacroCallItemNode extends AssocItemNode instanceof MacroCall {
override TypeParam getTypeParam(int i) { none() }
override Visibility getVisibility() { none() }
override predicate providesCanonicalPathPrefixFor(Crate c, ItemNode child) {
any(ItemNode parent).providesCanonicalPathPrefixFor(c, this) and
child.getImmediateParent() = this
}
override string getCanonicalPathPrefixFor(Crate c, ItemNode child) {
result = this.getCanonicalPathPrefix(c) and
this.providesCanonicalPathPrefixFor(c, child)
}
override predicate hasCanonicalPath(Crate c) { none() }
override string getCanonicalPath(Crate c) { none() }
}
private class ModuleItemNode extends ModuleLikeNode instanceof Module {
@@ -479,6 +652,43 @@ private class ModuleItemNode extends ModuleLikeNode instanceof Module {
override Visibility getVisibility() { result = Module.super.getVisibility() }
override TypeParam getTypeParam(int i) { none() }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
override predicate providesCanonicalPathPrefixFor(Crate c, ItemNode child) {
this.hasCanonicalPath(c) and
(
exists(SourceFile f |
fileImport(this, f) and
sourceFileEdge(f, _, child)
)
or
this = child.getImmediateParent()
or
exists(ItemNode mid |
this.providesCanonicalPathPrefixFor(c, mid) and
mid.(MacroCallItemNode) = child.getImmediateParent()
)
)
}
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
private class StructItemNode extends ItemNode instanceof Struct {
@@ -494,6 +704,26 @@ private class StructItemNode extends ItemNode instanceof Struct {
override Visibility getVisibility() { result = Struct.super.getVisibility() }
override TypeParam getTypeParam(int i) { result = super.getGenericParamList().getTypeParam(i) }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
class TraitItemNode extends ImplOrTraitItemNode instanceof Trait {
@@ -514,6 +744,43 @@ class TraitItemNode extends ImplOrTraitItemNode instanceof Trait {
override Visibility getVisibility() { result = Trait.super.getVisibility() }
override TypeParam getTypeParam(int i) { result = super.getGenericParamList().getTypeParam(i) }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
override predicate providesCanonicalPathPrefixFor(Crate c, ItemNode child) {
this.hasCanonicalPath(c) and
child = this.getAnAssocItem()
}
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = "<_ as "
or
i = 1 and
result = this.getCanonicalPathPrefix(c)
or
i = 2 and
result = "::"
or
i = 3 and
result = this.getName()
or
i = 4 and
result = ">"
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [1 .. 3] | this.getCanonicalPathPart(c, i) order by i)
}
language[monotonicAggregates]
override string getCanonicalPathPrefixFor(Crate c, ItemNode child) {
this.providesCanonicalPathPrefixFor(c, child) and
result = strictconcat(int i | i in [0 .. 4] | this.getCanonicalPathPart(c, i) order by i)
}
}
class TypeAliasItemNode extends AssocItemNode instanceof TypeAlias {
@@ -536,6 +803,26 @@ private class UnionItemNode extends ItemNode instanceof Union {
override Visibility getVisibility() { result = Union.super.getVisibility() }
override TypeParam getTypeParam(int i) { result = super.getGenericParamList().getTypeParam(i) }
override predicate hasCanonicalPath(Crate c) { this.hasCanonicalPathPrefix(c) }
bindingset[c]
private string getCanonicalPathPart(Crate c, int i) {
i = 0 and
result = this.getCanonicalPathPrefix(c)
or
i = 1 and
result = "::"
or
i = 2 and
result = this.getName()
}
language[monotonicAggregates]
override string getCanonicalPath(Crate c) {
this.hasCanonicalPath(c) and
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
}
}
private class UseItemNode extends ItemNode instanceof Use {
@@ -546,6 +833,10 @@ private class UseItemNode extends ItemNode instanceof Use {
override Visibility getVisibility() { result = Use.super.getVisibility() }
override TypeParam getTypeParam(int i) { none() }
override predicate hasCanonicalPath(Crate c) { none() }
override string getCanonicalPath(Crate c) { none() }
}
private class BlockExprItemNode extends ItemNode instanceof BlockExpr {
@@ -556,6 +847,10 @@ private class BlockExprItemNode extends ItemNode instanceof BlockExpr {
override Visibility getVisibility() { none() }
override TypeParam getTypeParam(int i) { none() }
override predicate hasCanonicalPath(Crate c) { none() }
override string getCanonicalPath(Crate c) { none() }
}
class TypeParamItemNode extends ItemNode instanceof TypeParam {
@@ -621,6 +916,10 @@ class TypeParamItemNode extends ItemNode instanceof TypeParam {
override TypeParam getTypeParam(int i) { none() }
override Location getLocation() { result = TypeParam.super.getName().getLocation() }
override predicate hasCanonicalPath(Crate c) { none() }
override string getCanonicalPath(Crate c) { none() }
}
/** Holds if `item` has the name `name` and is a top-level item inside `f`. */
@@ -670,7 +969,7 @@ private predicate modImport0(Module m, string name, Folder lookup) {
// sibling import
lookup = parent and
(
m.getFile() = any(CrateItemNode c).getModuleNode().(SourceFileItemNode).getFile()
m.getFile() = any(CrateItemNode c).getSourceFile().getFile()
or
m.getFile().getBaseName() = "mod.rs"
)
@@ -758,7 +1057,7 @@ private predicate fileImportEdge(Module mod, string name, ItemNode item) {
*/
pragma[nomagic]
private predicate crateDefEdge(CrateItemNode c, string name, ItemNode i) {
i = c.getModuleNode().getASuccessorRec(name) and
i = c.getSourceFile().getASuccessorRec(name) and
not i instanceof Crate
}
@@ -766,17 +1065,10 @@ private predicate crateDefEdge(CrateItemNode c, string name, ItemNode i) {
* Holds if `m` depends on crate `dep` named `name`.
*/
private predicate crateDependencyEdge(ModuleLikeNode m, string name, CrateItemNode dep) {
exists(CrateItemNode c | dep = c.(Crate).getDependency(name) |
// entry module/entry source file
m = c.getModuleNode()
or
// entry/transitive source file
exists(CrateItemNode c |
dep = c.(Crate).getDependency(name) and
m = c.getASourceFile()
)
or
// paths inside the crate graph use the name of the crate itself as prefix,
// although that is not valid in Rust
dep = any(Crate c | name = c.getName() and m = c.getModule())
}
private predicate useTreeDeclares(UseTree tree, string name) {
@@ -844,9 +1136,9 @@ class RelevantPath extends Path {
private predicate isModule(ItemNode m) { m instanceof Module }
/** Holds if root module `root` contains the module `m`. */
private predicate rootHasModule(ItemNode root, ItemNode m) =
doublyBoundedFastTC(hasChild/2, isRoot/1, isModule/1)(root, m)
/** Holds if source file `source` contains the module `m`. */
private predicate rootHasModule(SourceFileItemNode source, ItemNode m) =
doublyBoundedFastTC(hasChild/2, isSourceFile/1, isModule/1)(source, m)
pragma[nomagic]
private ItemNode getOuterScope(ItemNode i) {
@@ -899,14 +1191,14 @@ private ItemNode getASuccessorFull(ItemNode pred, string name, Namespace ns) {
ns = result.getNamespace()
}
private predicate isRoot(ItemNode root) { root.(ModuleLikeNode).isRoot() }
private predicate isSourceFile(ItemNode source) { source instanceof SourceFileItemNode }
private predicate hasCratePath(ItemNode i) { any(RelevantPath path).isCratePath(_, i) }
private predicate hasChild(ItemNode parent, ItemNode child) { child.getImmediateParent() = parent }
private predicate rootHasCratePathTc(ItemNode i1, ItemNode i2) =
doublyBoundedFastTC(hasChild/2, isRoot/1, hasCratePath/1)(i1, i2)
private predicate sourceFileHasCratePathTc(ItemNode i1, ItemNode i2) =
doublyBoundedFastTC(hasChild/2, isSourceFile/1, hasCratePath/1)(i1, i2)
/**
* Holds if the unqualified path `p` references a keyword item named `name`, and
@@ -916,10 +1208,10 @@ pragma[nomagic]
private predicate keywordLookup(ItemNode encl, string name, Namespace ns, RelevantPath p) {
// For `($)crate`, jump directly to the root module
exists(ItemNode i | p.isCratePath(name, i) |
encl.(ModuleLikeNode).isRoot() and
encl instanceof SourceFile and
encl = i
or
rootHasCratePathTc(encl, i)
sourceFileHasCratePathTc(encl, i)
)
or
name = ["super", "self"] and
@@ -1120,10 +1412,10 @@ private predicate useImportEdge(Use use, string name, ItemNode item) {
* [1]: https://doc.rust-lang.org/core/prelude/index.html
*/
private predicate preludeEdge(SourceFile f, string name, ItemNode i) {
exists(Crate core, ModuleItemNode mod, ModuleItemNode prelude, ModuleItemNode rust |
exists(Crate core, ModuleLikeNode mod, ModuleItemNode prelude, ModuleItemNode rust |
f = any(Crate c0 | core = c0.getDependency(_)).getASourceFile() and
core.getName() = "core" and
mod = core.getModule() and
mod = core.getSourceFile() and
prelude = mod.getASuccessorRec("prelude") and
rust = prelude.getASuccessorRec(["rust_2015", "rust_2018", "rust_2021", "rust_2024"]) and
i = rust.getASuccessorRec(name) and
@@ -1134,12 +1426,7 @@ private predicate preludeEdge(SourceFile f, string name, ItemNode i) {
private import codeql.rust.frameworks.stdlib.Bultins as Builtins
pragma[nomagic]
private predicate builtinEdge(ModuleLikeNode m, string name, ItemNode i) {
(
m instanceof SourceFile
or
m = any(CrateItemNode c).getModuleNode()
) and
private predicate builtin(string name, ItemNode i) {
exists(SourceFileItemNode builtins |
builtins.getFile().getParentContainer() instanceof Builtins::BuiltinsFolder and
i = builtins.getASuccessorRec(name)
@@ -1151,8 +1438,8 @@ private module Debug {
private Locatable getRelevantLocatable() {
exists(string filepath, int startline, int startcolumn, int endline, int endcolumn |
result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and
filepath.matches("%/test_logging.rs") and
startline = 163
filepath.matches("%/term.rs") and
startline = [71]
)
}
@@ -1160,7 +1447,7 @@ private module Debug {
RelevantPath p, string name, Namespace ns, ItemNode encl, string path
) {
p = getRelevantLocatable() and
unqualifiedPathLookup(p, name, ns, encl) and
unqualifiedPathLookup(encl, name, ns, p) and
path = p.toStringDebug()
}
@@ -1188,4 +1475,14 @@ private module Debug {
m = getRelevantLocatable() and
fileImport(m, f)
}
predicate debugPreludeEdge(SourceFile f, string name, ItemNode i) {
preludeEdge(f, name, i) and
f = getRelevantLocatable()
}
string debugGetCanonicalPath(ItemNode i, Crate c) {
result = i.getCanonicalPath(c) and
i = getRelevantLocatable()
}
}

View File

@@ -38,6 +38,12 @@ query predicate multipleTupleFields(FieldExpr fe, TupleField field) {
strictcount(fe.getTupleField()) > 1
}
/** Holds if `p` may resolve to multiple items including `i`. */
query predicate multipleCanonicalPaths(ItemNode i, Crate c, string path) {
path = i.getCanonicalPath(c) and
strictcount(i.getCanonicalPath(c)) > 1
}
/**
* Gets counts of path resolution inconsistencies of each type.
*/
@@ -53,4 +59,7 @@ int getPathResolutionInconsistencyCounts(string type) {
or
type = "Multiple tuple fields" and
result = count(FieldExpr fe | multipleTupleFields(fe, _) | fe)
or
type = "Multiple canonical paths" and
result = count(ItemNode i | multipleCanonicalPaths(i, _, _) | i)
}

View File

@@ -9,10 +9,10 @@ private import codeql.rust.elements.internal.generated.Synth
cached
newtype TType =
TUnit() or
TStruct(Struct s) { Stages::TypeInferenceStage::ref() } or
TEnum(Enum e) or
TTrait(Trait t) or
TImpl(Impl i) or
TArrayType() or // todo: add size?
TRefType() or // todo: add mut?
TTypeParamTypeParameter(TypeParam t) or
@@ -48,6 +48,21 @@ abstract class Type extends TType {
abstract Location getLocation();
}
/** The unit type `()`. */
class UnitType extends Type, TUnit {
UnitType() { this = TUnit() }
override StructField getStructField(string name) { none() }
override TupleField getTupleField(int i) { none() }
override TypeParameter getTypeParameter(int i) { none() }
override string toString() { result = "()" }
override Location getLocation() { result instanceof EmptyLocation }
}
abstract private class StructOrEnumType extends Type {
abstract ItemNode asItemNode();
}
@@ -116,75 +131,6 @@ class TraitType extends Type, TTrait {
override Location getLocation() { result = trait.getLocation() }
}
/**
* An `impl` block type.
*
* Although `impl` blocks are not really types, we treat them as such in order
* to be able to match type parameters from structs (or enums) with type
* parameters from `impl` blocks. For example, in
*
* ```rust
* struct S<T1>(T1);
*
* impl<T2> S<T2> {
* fn id(self) -> S<T2> { self }
* }
*
* let x : S(i64) = S(42);
* x.id();
* ```
*
* we pretend that the `impl` block is a base type mention of the struct `S`,
* with type argument `T1`. This means that from knowing that `x` has type
* `S(i64)`, we can first match `i64` with `T1`, and then by matching `T1` with
* `T2`, we can match `i64` with `T2`.
*
* `impl` blocks can also have base type mentions, namely the trait that they
* implement (if any). Example:
*
* ```rust
* struct S<T1>(T1);
*
* trait Trait<T2> {
* fn f(self) -> T2;
*
* fn g(self) -> T2 { self.f() }
* }
*
* impl<T3> Trait<T3> for S<T3> { // `Trait<T3>` is a base type mention of this `impl` block
* fn f(self) -> T3 {
* match self {
* S(x) => x
* }
* }
* }
*
* let x : S(i64) = S(42);
* x.g();
* ```
*
* In this case we can match `i64` with `T1`, `T1` with `T3`, and `T3` with `T2`,
* allowing us match `i64` with `T2`, and hence infer that the return type of `g`
* is `i64`.
*/
class ImplType extends Type, TImpl {
private Impl impl;
ImplType() { this = TImpl(impl) }
override StructField getStructField(string name) { none() }
override TupleField getTupleField(int i) { none() }
override TypeParameter getTypeParameter(int i) {
result = TTypeParamTypeParameter(impl.getGenericParamList().getTypeParam(i))
}
override string toString() { result = impl.toString() }
override Location getLocation() { result = impl.getLocation() }
}
/**
* An array type.
*

View File

@@ -7,6 +7,7 @@ private import Type as T
private import TypeMention
private import codeql.typeinference.internal.TypeInference
private import codeql.rust.frameworks.stdlib.Stdlib
private import codeql.rust.frameworks.stdlib.Bultins as Builtins
class Type = T::Type;
@@ -190,6 +191,21 @@ private Type inferAnnotatedType(AstNode n, TypePath path) {
result = getTypeAnnotation(n).resolveTypeAt(path)
}
private Type inferLogicalOperationType(AstNode n, TypePath path) {
exists(Builtins::BuiltinType t, BinaryLogicalOperation be |
n = [be, be.getLhs(), be.getRhs()] and
path.isEmpty() and
result = TStruct(t) and
t instanceof Builtins::Bool
)
}
private Type inferAssignmentOperationType(AstNode n, TypePath path) {
n instanceof AssignmentOperation and
path.isEmpty() and
result = TUnit()
}
/**
* Holds if the type of `n1` at `path1` is the same as the type of `n2` at
* `path2` and type information should propagate in both directions through the
@@ -213,13 +229,6 @@ private predicate typeEquality(AstNode n1, TypePath path1, AstNode n2, TypePath
path1 = path2
)
or
n2 =
any(PrefixExpr pe |
pe.getOperatorName() = "*" and
pe.getExpr() = n1 and
path1 = TypePath::cons(TRefTypeParameter(), path2)
)
or
n1 = n2.(ParenExpr).getExpr() and
path1 = path2
or
@@ -237,14 +246,42 @@ private predicate typeEquality(AstNode n1, TypePath path1, AstNode n2, TypePath
break.getTarget() = n2.(LoopExpr) and
path1 = path2
)
or
exists(AssignmentExpr be |
n1 = be.getLhs() and
n2 = be.getRhs() and
path1 = path2
)
}
bindingset[path1]
private predicate typeEqualityLeft(AstNode n1, TypePath path1, AstNode n2, TypePath path2) {
typeEquality(n1, path1, n2, path2)
or
n2 =
any(DerefExpr pe |
pe.getExpr() = n1 and
path1.isCons(TRefTypeParameter(), path2)
)
}
bindingset[path2]
private predicate typeEqualityRight(AstNode n1, TypePath path1, AstNode n2, TypePath path2) {
typeEquality(n1, path1, n2, path2)
or
n2 =
any(DerefExpr pe |
pe.getExpr() = n1 and
path1 = TypePath::cons(TRefTypeParameter(), path2)
)
}
pragma[nomagic]
private Type inferTypeEquality(AstNode n, TypePath path) {
exists(AstNode n2, TypePath path2 | result = inferType(n2, path2) |
typeEquality(n, path, n2, path2)
typeEqualityRight(n, path, n2, path2)
or
typeEquality(n2, path2, n, path)
typeEqualityLeft(n2, path2, n, path)
)
}
@@ -639,7 +676,7 @@ private module CallExprBaseMatchingInput implements MatchingInputSig {
Declaration getTarget() {
result = CallExprImpl::getResolvedFunction(this)
or
result = resolveMethodCallExpr(this) // mutual recursion; resolving method calls requires resolving types and vice versa
result = inferMethodCallTarget(this) // mutual recursion; resolving method calls requires resolving types and vice versa
}
}
@@ -909,7 +946,7 @@ private Type inferRefExprType(Expr e, TypePath path) {
e = re.getExpr() and
exists(TypePath exprPath, TypePath refPath, Type exprType |
result = inferType(re, exprPath) and
exprPath = TypePath::cons(TRefTypeParameter(), refPath) and
exprPath.isCons(TRefTypeParameter(), refPath) and
exprType = inferType(e)
|
if exprType = TRefType()
@@ -923,8 +960,9 @@ private Type inferRefExprType(Expr e, TypePath path) {
pragma[nomagic]
private Type inferTryExprType(TryExpr te, TypePath path) {
exists(TypeParam tp |
result = inferType(te.getExpr(), TypePath::cons(TTypeParamTypeParameter(tp), path))
exists(TypeParam tp, TypePath path0 |
result = inferType(te.getExpr(), path0) and
path0.isCons(TTypeParamTypeParameter(tp), path)
|
tp = any(ResultEnum r).getGenericParamList().getGenericParam(0)
or
@@ -932,8 +970,6 @@ private Type inferTryExprType(TryExpr te, TypePath path) {
)
}
private import codeql.rust.frameworks.stdlib.Bultins as Builtins
pragma[nomagic]
private StructType inferLiteralType(LiteralExpr le) {
exists(Builtins::BuiltinType t | result = TStruct(t) |
@@ -962,6 +998,150 @@ private StructType inferLiteralType(LiteralExpr le) {
)
}
private module MethodCall {
/** An expression that calls a method. */
abstract private class MethodCallImpl extends Expr {
/** Gets the name of the method targeted. */
abstract string getMethodName();
/** Gets the number of arguments _excluding_ the `self` argument. */
abstract int getArity();
/** Gets the trait targeted by this method call, if any. */
Trait getTrait() { none() }
/** Gets the type of the receiver of the method call at `path`. */
abstract Type getTypeAt(TypePath path);
}
final class MethodCall = MethodCallImpl;
private class MethodCallExprMethodCall extends MethodCallImpl instanceof MethodCallExpr {
override string getMethodName() { result = super.getIdentifier().getText() }
override int getArity() { result = super.getArgList().getNumberOfArgs() }
pragma[nomagic]
override Type getTypeAt(TypePath path) {
exists(TypePath path0 | result = inferType(super.getReceiver(), path0) |
path0.isCons(TRefTypeParameter(), path)
or
not path0.isCons(TRefTypeParameter(), _) and
not (path0.isEmpty() and result = TRefType()) and
path = path0
)
}
}
private class CallExprMethodCall extends MethodCallImpl instanceof CallExpr {
TraitItemNode trait;
string methodName;
Expr receiver;
CallExprMethodCall() {
receiver = this.getArgList().getArg(0) and
exists(Path path, Function f |
path = this.getFunction().(PathExpr).getPath() and
f = resolvePath(path) and
f.getParamList().hasSelfParam() and
trait = resolvePath(path.getQualifier()) and
trait.getAnAssocItem() = f and
path.getSegment().getIdentifier().getText() = methodName
)
}
override string getMethodName() { result = methodName }
override int getArity() { result = super.getArgList().getNumberOfArgs() - 1 }
override Trait getTrait() { result = trait }
pragma[nomagic]
override Type getTypeAt(TypePath path) { result = inferType(receiver, path) }
}
}
import MethodCall
/**
* Holds if a method for `type` with the name `name` and the arity `arity`
* exists in `impl`.
*/
private predicate methodCandidate(Type type, string name, int arity, Impl impl) {
type = impl.getSelfTy().(TypeMention).resolveType() and
exists(Function f |
f = impl.(ImplItemNode).getASuccessor(name) and
f.getParamList().hasSelfParam() and
arity = f.getParamList().getNumberOfParams()
)
}
/**
* Holds if a method for `type` for `trait` with the name `name` and the arity
* `arity` exists in `impl`.
*/
pragma[nomagic]
private predicate methodCandidateTrait(Type type, Trait trait, string name, int arity, Impl impl) {
trait = resolvePath(impl.(ImplItemNode).getTraitPath()) and
methodCandidate(type, name, arity, impl)
}
private module IsInstantiationOfInput implements IsInstantiationOfInputSig<MethodCall> {
pragma[nomagic]
predicate potentialInstantiationOf(MethodCall mc, TypeAbstraction impl, TypeMention constraint) {
exists(Type rootType, string name, int arity |
rootType = mc.getTypeAt(TypePath::nil()) and
name = mc.getMethodName() and
arity = mc.getArity() and
constraint = impl.(ImplTypeAbstraction).getSelfTy()
|
methodCandidateTrait(rootType, mc.getTrait(), name, arity, impl)
or
not exists(mc.getTrait()) and
methodCandidate(rootType, name, arity, impl)
)
}
predicate relevantTypeMention(TypeMention constraint) {
exists(Impl impl | methodCandidate(_, _, _, impl) and constraint = impl.getSelfTy())
}
}
bindingset[item, name]
pragma[inline_late]
private Function getMethodSuccessor(ItemNode item, string name) {
result = item.getASuccessor(name)
}
bindingset[tp, name]
pragma[inline_late]
private Function getTypeParameterMethod(TypeParameter tp, string name) {
result = getMethodSuccessor(tp.(TypeParamTypeParameter).getTypeParam(), name)
or
result = getMethodSuccessor(tp.(SelfTypeParameter).getTrait(), name)
}
/** Gets a method from an `impl` block that matches the method call `mc`. */
private Function getMethodFromImpl(MethodCall mc) {
exists(Impl impl |
IsInstantiationOf<MethodCall, IsInstantiationOfInput>::isInstantiationOf(mc, impl, _) and
result = getMethodSuccessor(impl, mc.getMethodName())
)
}
/**
* Gets a method that the method call `mc` resolves to based on type inference,
* if any.
*/
private Function inferMethodCallTarget(MethodCall mc) {
// The method comes from an `impl` block targeting the type of the receiver.
result = getMethodFromImpl(mc)
or
// The type of the receiver is a type parameter and the method comes from a
// trait bound on the type parameter.
result = getTypeParameterMethod(mc.getTypeAt(TypePath::nil()), mc.getMethodName())
}
cached
private module Cached {
private import codeql.rust.internal.CachedStages
@@ -988,92 +1168,49 @@ private module Cached {
)
}
private class ReceiverExpr extends Expr {
MethodCallExpr mce;
ReceiverExpr() { mce.getReceiver() = this }
string getField() { result = mce.getIdentifier().getText() }
int getNumberOfArgs() { result = mce.getArgList().getNumberOfArgs() }
pragma[nomagic]
Type getTypeAt(TypePath path) {
exists(TypePath path0 | result = inferType(this, path0) |
path0 = TypePath::cons(TRefTypeParameter(), path)
or
not path0.isCons(TRefTypeParameter(), _) and
not (path0.isEmpty() and result = TRefType()) and
path = path0
)
}
private predicate isInherentImplFunction(Function f) {
f = any(Impl impl | not impl.hasTrait()).(ImplItemNode).getAnAssocItem()
}
/** Holds if a method for `type` with the name `name` and the arity `arity` exists in `impl`. */
pragma[nomagic]
private predicate methodCandidate(Type type, string name, int arity, Impl impl) {
type = impl.getSelfTy().(TypeReprMention).resolveType() and
exists(Function f |
f = impl.(ImplItemNode).getASuccessor(name) and
f.getParamList().hasSelfParam() and
arity = f.getParamList().getNumberOfParams()
)
private predicate isTraitImplFunction(Function f) {
f = any(Impl impl | impl.hasTrait()).(ImplItemNode).getAnAssocItem()
}
private module IsInstantiationOfInput implements IsInstantiationOfInputSig<ReceiverExpr> {
pragma[nomagic]
predicate potentialInstantiationOf(
ReceiverExpr receiver, TypeAbstraction impl, TypeMention constraint
) {
methodCandidate(receiver.getTypeAt(TypePath::nil()), receiver.getField(),
receiver.getNumberOfArgs(), impl) and
constraint = impl.(ImplTypeAbstraction).getSelfTy()
}
predicate relevantTypeMention(TypeMention constraint) {
exists(Impl impl | methodCandidate(_, _, _, impl) and constraint = impl.getSelfTy())
}
}
bindingset[item, name]
pragma[inline_late]
private Function getMethodSuccessor(ItemNode item, string name) {
result = item.getASuccessor(name)
}
bindingset[tp, name]
pragma[inline_late]
private Function getTypeParameterMethod(TypeParameter tp, string name) {
result = getMethodSuccessor(tp.(TypeParamTypeParameter).getTypeParam(), name)
or
result = getMethodSuccessor(tp.(SelfTypeParameter).getTrait(), name)
}
/**
* Gets the method from an `impl` block with an implementing type that matches
* the type of `receiver` and with a name of the method call in which
* `receiver` occurs, if any.
*/
private Function getMethodFromImpl(ReceiverExpr receiver) {
exists(Impl impl |
IsInstantiationOf<ReceiverExpr, IsInstantiationOfInput>::isInstantiationOf(receiver, impl, _) and
result = getMethodSuccessor(impl, receiver.getField())
)
}
/** Gets a method that the method call `mce` resolves to, if any. */
cached
Function resolveMethodCallExpr(MethodCallExpr mce) {
exists(ReceiverExpr receiver | mce.getReceiver() = receiver |
// The method comes from an `impl` block targeting the type of `receiver`.
result = getMethodFromImpl(receiver)
private Function resolveMethodCallTargetFrom(MethodCall mc, boolean fromSource) {
result = inferMethodCallTarget(mc) and
(if result.fromSource() then fromSource = true else fromSource = false) and
(
// prioritize inherent implementation methods first
isInherentImplFunction(result)
or
// The type of `receiver` is a type parameter and the method comes from a
// trait bound on the type parameter.
result = getTypeParameterMethod(receiver.getTypeAt(TypePath::nil()), receiver.getField())
not isInherentImplFunction(inferMethodCallTarget(mc)) and
(
// then trait implementation methods
isTraitImplFunction(result)
or
not isTraitImplFunction(inferMethodCallTarget(mc)) and
(
// then trait methods with default implementations
result.hasBody()
or
// and finally trait methods without default implementations
not inferMethodCallTarget(mc).hasBody()
)
)
)
}
/** Gets a method that the method call `mc` resolves to, if any. */
cached
Function resolveMethodCallTarget(MethodCall mc) {
// Functions in source code also gets extracted as library code, due to
// this duplication we prioritize functions from source code.
result = resolveMethodCallTargetFrom(mc, true)
or
not exists(resolveMethodCallTargetFrom(mc, true)) and
result = resolveMethodCallTargetFrom(mc, false)
}
pragma[inline]
private Type inferRootTypeDeref(AstNode n) {
result = inferType(n) and
@@ -1156,6 +1293,10 @@ private module Cached {
Stages::TypeInferenceStage::ref() and
result = inferAnnotatedType(n, path)
or
result = inferLogicalOperationType(n, path)
or
result = inferAssignmentOperationType(n, path)
or
result = inferTypeEquality(n, path)
or
result = inferImplicitSelfType(n, path)
@@ -1190,7 +1331,7 @@ private module Debug {
exists(string filepath, int startline, int startcolumn, int endline, int endcolumn |
result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and
filepath.matches("%/main.rs") and
startline = 28
startline = 948
)
}
@@ -1201,6 +1342,6 @@ private module Debug {
Function debugResolveMethodCallExpr(MethodCallExpr mce) {
mce = getRelevantLocatable() and
result = resolveMethodCallExpr(mce)
result = resolveMethodCallTarget(mce)
}
}

View File

@@ -189,56 +189,6 @@ class TypeAliasMention extends TypeMention, TypeAlias {
override Type resolveType() { result = t }
}
/**
* Holds if the `i`th type argument of `selfPath`, belonging to `impl`, resolves
* to type parameter `tp`.
*
* Example:
*
* ```rust
* impl<T> Foo<T> for Bar<T> { ... }
* // ^^^^^^ selfPath
* // ^ tp
* ```
*/
pragma[nomagic]
private predicate isImplSelfTypeParam(
ImplItemNode impl, PathMention selfPath, int i, TypeParameter tp
) {
exists(PathMention path |
selfPath = impl.getSelfPath() and
path = selfPath.getSegment().getGenericArgList().getTypeArg(i).(PathTypeRepr).getPath() and
tp = path.resolveType()
)
}
class ImplMention extends TypeMention, ImplItemNode {
override TypeReprMention getTypeArgument(int i) { none() }
override Type resolveType() { result = TImpl(this) }
override Type resolveTypeAt(TypePath path) {
result = TImpl(this) and
path.isEmpty()
or
// For example, in
//
// ```rust
// struct S<T1>(T1);
//
// impl<T2> S<T2> { ... }
// ```
//
// We get that the type path "0" resolves to `T1` for the `impl` block,
// which is considered a base type mention of `S`.
exists(PathMention selfPath, TypeParameter tp, int i |
isImplSelfTypeParam(this, selfPath, pragma[only_bind_into](i), tp) and
result = selfPath.resolveType().getTypeParameter(pragma[only_bind_into](i)) and
path = TypePath::singleton(tp)
)
}
}
class TraitMention extends TypeMention, TraitItemNode {
override TypeMention getTypeArgument(int i) {
result = this.getTypeParam(i)

View File

@@ -50,9 +50,7 @@ module AccessInvalidPointer {
* A pointer access using the unary `*` operator.
*/
private class DereferenceSink extends Sink {
DereferenceSink() {
exists(PrefixExpr p | p.getOperatorName() = "*" and p.getExpr() = this.asExpr().getExpr())
}
DereferenceSink() { any(DerefExpr p).getExpr() = this.asExpr().getExpr() }
}
/**

View File

@@ -43,51 +43,23 @@ module UncontrolledAllocationSize {
}
}
/**
* Gets the operand on the "greater" (or "greater-or-equal") side
* of this relational expression, that is, the side that is larger
* if the overall expression evaluates to `true`; for example on
* `x <= 20` this is the `20`, and on `y > 0` it is `y`.
*/
private Expr getGreaterOperand(BinaryExpr op) {
op.getOperatorName() = ["<", "<="] and
result = op.getRhs()
or
op.getOperatorName() = [">", ">="] and
result = op.getLhs()
}
/**
* Gets the operand on the "lesser" (or "lesser-or-equal") side
* of this relational expression, that is, the side that is smaller
* if the overall expression evaluates to `true`; for example on
* `x <= 20` this is `x`, and on `y > 0` it is the `0`.
*/
private Expr getLesserOperand(BinaryExpr op) {
op.getOperatorName() = ["<", "<="] and
result = op.getLhs()
or
op.getOperatorName() = [">", ">="] and
result = op.getRhs()
}
/**
* Holds if comparison `g` having result `branch` indicates an upper bound for the sub-expression
* `node`. For example when the comparison `x < 10` is true, we have an upper bound for `x`.
*/
private predicate isUpperBoundCheck(CfgNodes::AstCfgNode g, Cfg::CfgNode node, boolean branch) {
exists(BinaryExpr cmp | g = cmp.getACfgNode() |
node = getLesserOperand(cmp).getACfgNode() and
node = cmp.(RelationalOperation).getLesserOperand().getACfgNode() and
branch = true
or
node = getGreaterOperand(cmp).getACfgNode() and
node = cmp.(RelationalOperation).getGreaterOperand().getACfgNode() and
branch = false
or
cmp.getOperatorName() = "==" and
cmp instanceof EqualsOperation and
[cmp.getLhs(), cmp.getRhs()].getACfgNode() = node and
branch = true
or
cmp.getOperatorName() = "!=" and
cmp instanceof NotEqualsOperation and
[cmp.getLhs(), cmp.getRhs()].getACfgNode() = node and
branch = false
)

View File

@@ -238,12 +238,6 @@ crate_versions(
string version: string ref
);
#keyset[id]
crate_modules(
int id: @crate ref,
int module: @module ref
);
#keyset[id, index]
crate_cfg_options(
int id: @crate ref,

View File

@@ -4,7 +4,11 @@ import codeql.rust.elements
import codeql.Locations
import codeql.files.FileSystem
import codeql.rust.elements.Operation
import codeql.rust.elements.ArithmeticOperation
import codeql.rust.elements.AssignmentOperation
import codeql.rust.elements.BitwiseOperation
import codeql.rust.elements.ComparisonOperation
import codeql.rust.elements.DerefExpr
import codeql.rust.elements.LiteralExprExt
import codeql.rust.elements.LogicalOperation
import codeql.rust.elements.AsyncBlockExpr

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
description: Remove 'module' from Crate
compatibility: partial
crate_modules.rel: delete

View File

@@ -18,7 +18,8 @@ private module ResolveTest implements TestSig {
private predicate commmentAt(string text, string filepath, int line) {
exists(Comment c |
c.getLocation().hasLocationInfo(filepath, line, _, _, _) and
c.getCommentText().trim() = text
c.getCommentText().trim() = text and
c.fromSource()
)
}
@@ -35,6 +36,8 @@ private module ResolveTest implements TestSig {
exists(AstNode n |
not n = any(Path parent).getQualifier() and
location = n.getLocation() and
n.fromSource() and
not n.isFromMacroExpansion() and
element = n.toString() and
tag = "item"
|

View File

@@ -8,5 +8,5 @@
import rust
from MacroCall mc
where not mc.hasMacroCallExpansion()
where mc.fromSource() and not mc.hasMacroCallExpansion()
select mc, "Macro call was not resolved to a target."

View File

@@ -44,8 +44,16 @@ class PathElement = AstNode;
* reachable from a source.
*/
predicate edgesFwd(PathElement pred, PathElement succ) {
// attribute (source) -> callable
pred.(CtorAttr) = succ.(Callable).getAnAttr()
// attribute (source) -> function in macro expansion
exists(Function f |
pred.(CtorAttr) = f.getAnAttr() and
(
f.getAttributeMacroExpansion().getAnItem() = succ.(Callable)
or
// if for some reason the ctor/dtor macro expansion failed, fall back to looking into the unexpanded item
not f.hasAttributeMacroExpansion() and f = succ.(Callable)
)
)
or
// [forwards reachable] callable -> enclosed call
edgesFwd(_, pred) and
@@ -73,4 +81,5 @@ query predicate edges(PathElement pred, PathElement succ) {
from CtorAttr source, StdCall sink
where edges+(source, sink)
select sink, source, sink,
"Call to " + sink.toString() + " in a function with the " + source.getWhichAttr() + " attribute."
"Call to " + sink.toString() + " from the standard library in a function with the " +
source.getWhichAttr() + " attribute."

View File

@@ -28,7 +28,7 @@ private import codeql.rust.security.WeakSensitiveDataHashingExtensions
/**
* Gets a count of the total number of lines of code in the database.
*/
int getLinesOfCode() { result = sum(File f | | f.getNumberOfLinesOfCode()) }
int getLinesOfCode() { result = sum(File f | f.fromSource() | f.getNumberOfLinesOfCode()) }
/**
* Gets a count of the total number of lines of code from the source code directory in the database.
@@ -91,8 +91,7 @@ int getQuerySinksCount() { result = count(QuerySink s) }
class CrateElement extends Element {
CrateElement() {
this instanceof Crate or
this instanceof NamedCrate or
this.(AstNode).getParentNode*() = any(Crate c).getModule()
this instanceof NamedCrate
}
}
@@ -110,9 +109,11 @@ predicate elementStats(string key, int value) {
* Gets summary statistics about extraction.
*/
predicate extractionStats(string key, int value) {
key = "Extraction errors" and value = count(ExtractionError e)
key = "Extraction errors" and
value = count(ExtractionError e | not exists(e.getLocation()) or e.getLocation().fromSource())
or
key = "Extraction warnings" and value = count(ExtractionWarning w)
key = "Extraction warnings" and
value = count(ExtractionWarning w | not exists(w.getLocation()) or w.getLocation().fromSource())
or
key = "Files extracted - total" and value = count(ExtractedFile f | exists(f.getRelativePath()))
or
@@ -134,11 +135,13 @@ predicate extractionStats(string key, int value) {
or
key = "Lines of user code extracted" and value = getLinesOfUserCode()
or
key = "Macro calls - total" and value = count(MacroCall mc)
key = "Macro calls - total" and value = count(MacroCall mc | mc.fromSource())
or
key = "Macro calls - resolved" and value = count(MacroCall mc | mc.hasMacroCallExpansion())
key = "Macro calls - resolved" and
value = count(MacroCall mc | mc.fromSource() and mc.hasMacroCallExpansion())
or
key = "Macro calls - unresolved" and value = count(MacroCall mc | not mc.hasMacroCallExpansion())
key = "Macro calls - unresolved" and
value = count(MacroCall mc | mc.fromSource() and not mc.hasMacroCallExpansion())
}
/**

View File

@@ -145,3 +145,8 @@ private module QlCallGraph implements CompareSig<CallGraph> {
}
module CallGraphCompare = Compare<CallGraph, RustAnalyzerCallGraph, QlCallGraph>;
predicate qlMissingCanonicalPath(Addressable a, string path) {
path = a.getExtendedCanonicalPath() and
not exists(a.getCanonicalPath(_))
}

View File

@@ -1,12 +1,19 @@
private import rust
predicate toBeTested(Element e) { not e instanceof CrateElement and not e instanceof Builtin }
predicate toBeTested(Element e) {
not e instanceof CrateElement and
not e instanceof Builtin and
(
not e instanceof Locatable
or
e.(Locatable).fromSource()
)
}
class CrateElement extends Element {
CrateElement() {
this instanceof Crate or
this instanceof NamedCrate or
any(Crate c).getModule() = this.(AstNode).getParentNode*()
this instanceof NamedCrate
}
}

View File

@@ -1,3 +1,26 @@
canonicalPath
| anonymous.rs:3:1:32:1 | fn canonicals | test::anonymous::canonicals |
| anonymous.rs:34:1:36:1 | fn other | test::anonymous::other |
| lib.rs:1:1:1:14 | mod anonymous | test::anonymous |
| lib.rs:2:1:2:12 | mod regular | test::regular |
| regular.rs:1:1:2:18 | struct Struct | test::regular::Struct |
| regular.rs:4:1:6:1 | trait Trait | test::regular::Trait |
| regular.rs:5:5:5:16 | fn f | <_ as test::regular::Trait>::f |
| regular.rs:8:1:10:1 | impl Trait for Struct { ... } | <test::regular::Struct as test::regular::Trait> |
| regular.rs:9:5:9:18 | fn f | <test::regular::Struct as test::regular::Trait>::f |
| regular.rs:12:1:14:1 | impl Struct { ... } | <test::regular::Struct> |
| regular.rs:13:5:13:18 | fn g | <test::regular::Struct>::g |
| regular.rs:16:1:18:1 | trait TraitWithBlanketImpl | test::regular::TraitWithBlanketImpl |
| regular.rs:17:5:17:16 | fn h | <_ as test::regular::TraitWithBlanketImpl>::h |
| regular.rs:24:1:24:12 | fn free | test::regular::free |
| regular.rs:26:1:32:1 | fn usage | test::regular::usage |
| regular.rs:34:1:38:1 | enum MyEnum | test::regular::MyEnum |
| regular.rs:35:5:35:12 | Variant1 | test::regular::MyEnum::Variant1 |
| regular.rs:36:5:36:19 | Variant2 | test::regular::MyEnum::Variant2 |
| regular.rs:37:5:37:25 | Variant3 | test::regular::MyEnum::Variant3 |
| regular.rs:40:1:46:1 | fn enum_qualified_usage | test::regular::enum_qualified_usage |
| regular.rs:48:1:55:1 | fn enum_unqualified_usage | test::regular::enum_unqualified_usage |
| regular.rs:57:1:63:1 | fn enum_match | test::regular::enum_match |
canonicalPaths
| anonymous.rs:1:1:1:26 | use ...::Trait | None | None |
| anonymous.rs:3:1:32:1 | fn canonicals | repo::test | crate::anonymous::canonicals |

View File

@@ -1,6 +1,11 @@
import rust
import TestUtils
query predicate canonicalPath(Addressable a, string path) {
toBeTested(a) and
path = a.getCanonicalPath(_)
}
query predicate canonicalPaths(Item i, string origin, string path) {
toBeTested(i) and
(

View File

@@ -1,3 +1,26 @@
canonicalPath
| anonymous.rs:6:1:35:1 | fn canonicals | test::anonymous::canonicals |
| anonymous.rs:37:1:39:1 | fn other | test::anonymous::other |
| lib.rs:1:1:1:14 | mod anonymous | test::anonymous |
| lib.rs:2:1:2:12 | mod regular | test::regular |
| regular.rs:4:1:5:18 | struct Struct | test::regular::Struct |
| regular.rs:7:1:9:1 | trait Trait | test::regular::Trait |
| regular.rs:8:5:8:16 | fn f | <_ as test::regular::Trait>::f |
| regular.rs:11:1:13:1 | impl Trait for Struct { ... } | <test::regular::Struct as test::regular::Trait> |
| regular.rs:12:5:12:18 | fn f | <test::regular::Struct as test::regular::Trait>::f |
| regular.rs:15:1:17:1 | impl Struct { ... } | <test::regular::Struct> |
| regular.rs:16:5:16:18 | fn g | <test::regular::Struct>::g |
| regular.rs:19:1:21:1 | trait TraitWithBlanketImpl | test::regular::TraitWithBlanketImpl |
| regular.rs:20:5:20:16 | fn h | <_ as test::regular::TraitWithBlanketImpl>::h |
| regular.rs:27:1:27:12 | fn free | test::regular::free |
| regular.rs:29:1:35:1 | fn usage | test::regular::usage |
| regular.rs:37:1:41:1 | enum MyEnum | test::regular::MyEnum |
| regular.rs:38:5:38:12 | Variant1 | test::regular::MyEnum::Variant1 |
| regular.rs:39:5:39:19 | Variant2 | test::regular::MyEnum::Variant2 |
| regular.rs:40:5:40:25 | Variant3 | test::regular::MyEnum::Variant3 |
| regular.rs:43:1:49:1 | fn enum_qualified_usage | test::regular::enum_qualified_usage |
| regular.rs:51:1:58:1 | fn enum_unqualified_usage | test::regular::enum_unqualified_usage |
| regular.rs:60:1:66:1 | fn enum_match | test::regular::enum_match |
canonicalPaths
| anonymous.rs:4:1:4:26 | use ...::Trait | None | None |
| anonymous.rs:6:1:35:1 | fn canonicals | None | None |

View File

@@ -0,0 +1,13 @@
multipleCanonicalPaths
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord> |

View File

@@ -1,140 +0,0 @@
#-----| Const
#-----| Static
#-----| enum X
#-----| fn as_string
#-----| fn as_string
#-----| fn fmt
#-----| fn from
#-----| fn length
#-----| impl ...::AsString for ...::X { ... }
#-----| -> fn as_string
#-----| impl ...::Display for ...::X { ... }
#-----| -> fn fmt
#-----| impl ...::From::<...> for ...::Thing::<...> { ... }
#-----| -> fn from
lib.rs:
# 0| mod crate
#-----| -> mod module
#-----| mod module
#-----| -> Const
#-----| -> Static
#-----| -> enum X
#-----| -> fn length
#-----| -> impl ...::AsString for ...::X { ... }
#-----| -> impl ...::Display for ...::X { ... }
#-----| -> impl ...::From::<...> for ...::Thing::<...> { ... }
#-----| -> struct LocalKey<T>
#-----| -> struct Thing<T>
#-----| -> struct X_List
#-----| -> trait AsString
#-----| -> use ...::DirBuilder
#-----| -> use ...::DirEntry
#-----| -> use ...::File
#-----| -> use ...::FileTimes
#-----| -> use ...::FileType
#-----| -> use ...::Metadata
#-----| -> use ...::OpenOptions
#-----| -> use ...::PathBuf
#-----| -> use ...::Permissions
#-----| -> use ...::ReadDir
#-----| -> use ...::canonicalize
#-----| -> use ...::copy
#-----| -> use ...::create_dir
#-----| -> use ...::create_dir as mkdir
#-----| -> use ...::create_dir_all
#-----| -> use ...::exists
#-----| -> use ...::hard_link
#-----| -> use ...::metadata
#-----| -> use ...::read
#-----| -> use ...::read_dir
#-----| -> use ...::read_link
#-----| -> use ...::read_to_string
#-----| -> use ...::remove_dir
#-----| -> use ...::remove_dir_all
#-----| -> use ...::remove_file
#-----| -> use ...::rename
#-----| -> use ...::set_permissions
#-----| -> use ...::soft_link
#-----| -> use ...::symlink_metadata
#-----| -> use ...::write
#-----| struct LocalKey<T>
#-----| struct Thing<T>
#-----| struct X_List
#-----| trait AsString
#-----| -> fn as_string
#-----| use ...::DirBuilder
#-----| use ...::DirEntry
#-----| use ...::File
#-----| use ...::FileTimes
#-----| use ...::FileType
#-----| use ...::Metadata
#-----| use ...::OpenOptions
#-----| use ...::PathBuf
#-----| use ...::Permissions
#-----| use ...::ReadDir
#-----| use ...::canonicalize
#-----| use ...::copy
#-----| use ...::create_dir
#-----| use ...::create_dir as mkdir
#-----| use ...::create_dir_all
#-----| use ...::exists
#-----| use ...::hard_link
#-----| use ...::metadata
#-----| use ...::read
#-----| use ...::read_dir
#-----| use ...::read_link
#-----| use ...::read_to_string
#-----| use ...::remove_dir
#-----| use ...::remove_dir_all
#-----| use ...::remove_file
#-----| use ...::rename
#-----| use ...::set_permissions
#-----| use ...::soft_link
#-----| use ...::symlink_metadata
#-----| use ...::write

View File

@@ -1,72 +0,0 @@
/**
* @id module-graph
* @name Module and Item Graph
* @kind graph
*/
import rust
predicate nodes(Item i) { i instanceof RelevantNode }
class RelevantNode extends Item {
RelevantNode() {
this.getParentNode*() =
any(Crate m | m.getName() = "test" and m.getVersion() = "0.0.1").getModule()
}
string label() { result = this.toString() }
}
class HasGenericParams extends RelevantNode {
private GenericParamList params;
HasGenericParams() {
params = this.(Function).getGenericParamList() or
params = this.(Enum).getGenericParamList() or
params = this.(Struct).getGenericParamList() or
params = this.(Union).getGenericParamList() or
params = this.(Impl).getGenericParamList() or
params = this.(Enum).getGenericParamList() or
params = this.(Trait).getGenericParamList() or
params = this.(TraitAlias).getGenericParamList()
}
override string label() {
result =
super.toString() + "<" +
strictconcat(string part, int index |
part = params.getGenericParam(index).toString()
|
part, ", " order by index
) + ">"
}
}
predicate edges(RelevantNode container, RelevantNode element) {
element = container.(Module).getItemList().getAnItem() or
element = container.(Impl).getAssocItemList().getAnAssocItem() or
element = container.(Trait).getAssocItemList().getAnAssocItem()
}
query predicate nodes(RelevantNode node, string attr, string val) {
nodes(node) and
(
attr = "semmle.label" and
val = node.label()
or
attr = "semmle.order" and
val =
any(int i | node = rank[i](RelevantNode n | nodes(n) | n order by n.toString())).toString()
)
}
query predicate edges(RelevantNode pred, RelevantNode succ, string attr, string val) {
edges(pred, succ) and
(
attr = "semmle.label" and
val = ""
or
attr = "semmle.order" and
val = any(int i | succ = rank[i](Item s | edges(pred, s) | s order by s.toString())).toString()
)
}

View File

@@ -1,13 +1,16 @@
import rust
import TestUtils
query predicate charLiteral(CharLiteralExpr e) { any() }
query predicate charLiteral(CharLiteralExpr e) { toBeTested(e) }
query predicate stringLiteral(StringLiteralExpr e) { any() }
query predicate stringLiteral(StringLiteralExpr e) { toBeTested(e) }
query predicate integerLiteral(IntegerLiteralExpr e, string suffix) {
suffix = concat(e.getSuffix())
toBeTested(e) and suffix = concat(e.getSuffix())
}
query predicate floatLiteral(FloatLiteralExpr e, string suffix) { suffix = concat(e.getSuffix()) }
query predicate floatLiteral(FloatLiteralExpr e, string suffix) {
toBeTested(e) and suffix = concat(e.getSuffix())
}
query predicate booleanLiteral(BooleanLiteralExpr e) { any() }
query predicate booleanLiteral(BooleanLiteralExpr e) { toBeTested(e) }

View File

@@ -1,23 +1,28 @@
import rust
import codeql.rust.controlflow.ControlFlowGraph
import codeql.rust.controlflow.BasicBlocks
import TestUtils
query predicate dominates(BasicBlock bb1, BasicBlock bb2) { bb1.dominates(bb2) }
query predicate dominates(BasicBlock bb1, BasicBlock bb2) {
toBeTested(bb1.getScope()) and bb1.dominates(bb2)
}
query predicate postDominance(BasicBlock bb1, BasicBlock bb2) { bb1.postDominates(bb2) }
query predicate postDominance(BasicBlock bb1, BasicBlock bb2) {
toBeTested(bb1.getScope()) and bb1.postDominates(bb2)
}
query predicate immediateDominator(BasicBlock bb1, BasicBlock bb2) {
bb1.getImmediateDominator() = bb2
toBeTested(bb1.getScope()) and bb1.getImmediateDominator() = bb2
}
query predicate controls(ConditionBasicBlock bb1, BasicBlock bb2, SuccessorType t) {
bb1.edgeDominates(bb2, t)
toBeTested(bb1.getScope()) and bb1.edgeDominates(bb2, t)
}
query predicate successor(ConditionBasicBlock bb1, BasicBlock bb2, SuccessorType t) {
bb1.getASuccessor(t) = bb2
toBeTested(bb1.getScope()) and bb1.getASuccessor(t) = bb2
}
query predicate joinBlockPredecessor(JoinBasicBlock bb1, BasicBlock bb2, int i) {
bb1.getJoinBlockPredecessor(i) = bb2
toBeTested(bb1.getScope()) and bb1.getJoinBlockPredecessor(i) = bb2
}

View File

@@ -92,6 +92,24 @@ edges
| main.rs:188:9:188:9 | d [MyInt] | main.rs:189:10:189:10 | d [MyInt] | provenance | |
| main.rs:188:13:188:20 | a.add(...) [MyInt] | main.rs:188:9:188:9 | d [MyInt] | provenance | |
| main.rs:189:10:189:10 | d [MyInt] | main.rs:189:10:189:16 | d.value | provenance | |
| main.rs:201:18:201:21 | SelfParam [MyInt] | main.rs:201:48:203:5 | { ... } [MyInt] | provenance | |
| main.rs:205:26:205:37 | ...: MyInt [MyInt] | main.rs:205:49:207:5 | { ... } [MyInt] | provenance | |
| main.rs:211:9:211:9 | a [MyInt] | main.rs:213:49:213:49 | a [MyInt] | provenance | |
| main.rs:211:13:211:38 | MyInt {...} [MyInt] | main.rs:211:9:211:9 | a [MyInt] | provenance | |
| main.rs:211:28:211:36 | source(...) | main.rs:211:13:211:38 | MyInt {...} [MyInt] | provenance | |
| main.rs:213:9:213:26 | MyInt {...} [MyInt] | main.rs:213:24:213:24 | c | provenance | |
| main.rs:213:24:213:24 | c | main.rs:214:10:214:10 | c | provenance | |
| main.rs:213:30:213:53 | ...::take_self(...) [MyInt] | main.rs:213:9:213:26 | MyInt {...} [MyInt] | provenance | |
| main.rs:213:49:213:49 | a [MyInt] | main.rs:201:18:201:21 | SelfParam [MyInt] | provenance | |
| main.rs:213:49:213:49 | a [MyInt] | main.rs:213:30:213:53 | ...::take_self(...) [MyInt] | provenance | |
| main.rs:217:9:217:9 | b [MyInt] | main.rs:218:54:218:54 | b [MyInt] | provenance | |
| main.rs:217:13:217:39 | MyInt {...} [MyInt] | main.rs:217:9:217:9 | b [MyInt] | provenance | |
| main.rs:217:28:217:37 | source(...) | main.rs:217:13:217:39 | MyInt {...} [MyInt] | provenance | |
| main.rs:218:9:218:26 | MyInt {...} [MyInt] | main.rs:218:24:218:24 | c | provenance | |
| main.rs:218:24:218:24 | c | main.rs:219:10:219:10 | c | provenance | |
| main.rs:218:30:218:55 | ...::take_second(...) [MyInt] | main.rs:218:9:218:26 | MyInt {...} [MyInt] | provenance | |
| main.rs:218:54:218:54 | b [MyInt] | main.rs:205:26:205:37 | ...: MyInt [MyInt] | provenance | |
| main.rs:218:54:218:54 | b [MyInt] | main.rs:218:30:218:55 | ...::take_second(...) [MyInt] | provenance | |
| main.rs:227:32:231:1 | { ... } | main.rs:246:41:246:54 | async_source(...) | provenance | |
| main.rs:228:9:228:9 | a | main.rs:227:32:231:1 | { ... } | provenance | |
| main.rs:228:9:228:9 | a | main.rs:229:10:229:10 | a | provenance | |
@@ -202,6 +220,26 @@ nodes
| main.rs:188:13:188:20 | a.add(...) [MyInt] | semmle.label | a.add(...) [MyInt] |
| main.rs:189:10:189:10 | d [MyInt] | semmle.label | d [MyInt] |
| main.rs:189:10:189:16 | d.value | semmle.label | d.value |
| main.rs:201:18:201:21 | SelfParam [MyInt] | semmle.label | SelfParam [MyInt] |
| main.rs:201:48:203:5 | { ... } [MyInt] | semmle.label | { ... } [MyInt] |
| main.rs:205:26:205:37 | ...: MyInt [MyInt] | semmle.label | ...: MyInt [MyInt] |
| main.rs:205:49:207:5 | { ... } [MyInt] | semmle.label | { ... } [MyInt] |
| main.rs:211:9:211:9 | a [MyInt] | semmle.label | a [MyInt] |
| main.rs:211:13:211:38 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
| main.rs:211:28:211:36 | source(...) | semmle.label | source(...) |
| main.rs:213:9:213:26 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
| main.rs:213:24:213:24 | c | semmle.label | c |
| main.rs:213:30:213:53 | ...::take_self(...) [MyInt] | semmle.label | ...::take_self(...) [MyInt] |
| main.rs:213:49:213:49 | a [MyInt] | semmle.label | a [MyInt] |
| main.rs:214:10:214:10 | c | semmle.label | c |
| main.rs:217:9:217:9 | b [MyInt] | semmle.label | b [MyInt] |
| main.rs:217:13:217:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
| main.rs:217:28:217:37 | source(...) | semmle.label | source(...) |
| main.rs:218:9:218:26 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
| main.rs:218:24:218:24 | c | semmle.label | c |
| main.rs:218:30:218:55 | ...::take_second(...) [MyInt] | semmle.label | ...::take_second(...) [MyInt] |
| main.rs:218:54:218:54 | b [MyInt] | semmle.label | b [MyInt] |
| main.rs:219:10:219:10 | c | semmle.label | c |
| main.rs:227:32:231:1 | { ... } | semmle.label | { ... } |
| main.rs:228:9:228:9 | a | semmle.label | a |
| main.rs:228:13:228:21 | source(...) | semmle.label | source(...) |
@@ -225,6 +263,8 @@ subpaths
| main.rs:143:38:143:38 | a | main.rs:106:27:106:32 | ...: i64 | main.rs:106:42:112:5 | { ... } | main.rs:143:13:143:39 | ...::data_through(...) |
| main.rs:161:24:161:33 | source(...) | main.rs:155:12:155:17 | ...: i64 | main.rs:155:28:157:5 | { ... } [MyInt] | main.rs:161:13:161:34 | ...::new(...) [MyInt] |
| main.rs:186:9:186:9 | a [MyInt] | main.rs:169:12:169:15 | SelfParam [MyInt] | main.rs:169:42:172:5 | { ... } [MyInt] | main.rs:188:13:188:20 | a.add(...) [MyInt] |
| main.rs:213:49:213:49 | a [MyInt] | main.rs:201:18:201:21 | SelfParam [MyInt] | main.rs:201:48:203:5 | { ... } [MyInt] | main.rs:213:30:213:53 | ...::take_self(...) [MyInt] |
| main.rs:218:54:218:54 | b [MyInt] | main.rs:205:26:205:37 | ...: MyInt [MyInt] | main.rs:205:49:207:5 | { ... } [MyInt] | main.rs:218:30:218:55 | ...::take_second(...) [MyInt] |
testFailures
#select
| main.rs:18:10:18:10 | a | main.rs:13:5:13:13 | source(...) | main.rs:18:10:18:10 | a | $@ | main.rs:13:5:13:13 | source(...) | source(...) |
@@ -241,6 +281,8 @@ testFailures
| main.rs:144:10:144:10 | b | main.rs:142:13:142:22 | source(...) | main.rs:144:10:144:10 | b | $@ | main.rs:142:13:142:22 | source(...) | source(...) |
| main.rs:163:10:163:10 | m | main.rs:161:24:161:33 | source(...) | main.rs:163:10:163:10 | m | $@ | main.rs:161:24:161:33 | source(...) | source(...) |
| main.rs:189:10:189:16 | d.value | main.rs:186:28:186:36 | source(...) | main.rs:189:10:189:16 | d.value | $@ | main.rs:186:28:186:36 | source(...) | source(...) |
| main.rs:214:10:214:10 | c | main.rs:211:28:211:36 | source(...) | main.rs:214:10:214:10 | c | $@ | main.rs:211:28:211:36 | source(...) | source(...) |
| main.rs:219:10:219:10 | c | main.rs:217:28:217:37 | source(...) | main.rs:219:10:219:10 | c | $@ | main.rs:217:28:217:37 | source(...) | source(...) |
| main.rs:229:10:229:10 | a | main.rs:228:13:228:21 | source(...) | main.rs:229:10:229:10 | a | $@ | main.rs:228:13:228:21 | source(...) | source(...) |
| main.rs:239:14:239:14 | c | main.rs:238:17:238:25 | source(...) | main.rs:239:14:239:14 | c | $@ | main.rs:238:17:238:25 | source(...) | source(...) |
| main.rs:247:10:247:10 | a | main.rs:228:13:228:21 | source(...) | main.rs:247:10:247:10 | a | $@ | main.rs:228:13:228:21 | source(...) | source(...) |

View File

@@ -211,12 +211,12 @@ fn data_through_trait_method_called_as_function() {
let a = MyInt { value: source(8) };
let b = MyInt { value: 2 };
let MyInt { value: c } = MyTrait::take_self(a, b);
sink(c); // $ MISSING: hasValueFlow=8
sink(c); // $ hasValueFlow=8
let a = MyInt { value: 0 };
let b = MyInt { value: source(37) };
let MyInt { value: c } = MyTrait::take_second(a, b);
sink(c); // $ MISSING: hasValueFlow=37
sink(c); // $ hasValueFlow=37
let a = MyInt { value: 0 };
let b = MyInt { value: source(38) };

View File

@@ -48,10 +48,13 @@
| main.rs:188:13:188:20 | a.add(...) | main.rs:169:5:172:5 | fn add |
| main.rs:189:5:189:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:211:28:211:36 | source(...) | main.rs:1:1:3:1 | fn source |
| main.rs:213:30:213:53 | ...::take_self(...) | main.rs:201:5:203:5 | fn take_self |
| main.rs:214:5:214:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:217:28:217:37 | source(...) | main.rs:1:1:3:1 | fn source |
| main.rs:218:30:218:55 | ...::take_second(...) | main.rs:205:5:207:5 | fn take_second |
| main.rs:219:5:219:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:222:28:222:37 | source(...) | main.rs:1:1:3:1 | fn source |
| main.rs:223:30:223:53 | ...::take_self(...) | main.rs:201:5:203:5 | fn take_self |
| main.rs:224:5:224:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:228:13:228:21 | source(...) | main.rs:1:1:3:1 | fn source |
| main.rs:229:5:229:11 | sink(...) | main.rs:5:1:7:1 | fn sink |

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,6 @@
import codeql.rust.dataflow.DataFlow
import codeql.rust.dataflow.internal.DataFlowImpl
import codeql.rust.dataflow.internal.Node
import utils.test.TranslateModels
query predicate localStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
@@ -7,6 +8,27 @@ query predicate localStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
RustDataFlow::simpleLocalFlowStep(nodeFrom, nodeTo, "")
}
query predicate storeStep = RustDataFlow::storeStep/3;
class Content extends DataFlow::Content {
predicate hasLocationInfo(
string filepath, int startline, int startcolumn, int endline, int endcolumn
) {
exists(string file |
this.getLocation().hasLocationInfo(file, startline, startcolumn, endline, endcolumn) and
filepath =
file.regexpReplaceAll("^/.*/tools/builtins/", "/BUILTINS/")
.regexpReplaceAll("^/.*/.rustup/toolchains/[^/]+/", "/RUSTUP_HOME/toolchain/")
)
}
}
query predicate readStep = RustDataFlow::readStep/3;
class Node extends DataFlow::Node {
Node() { not this instanceof FlowSummaryNode }
}
query predicate storeStep(Node node1, Content c, Node node2) {
RustDataFlow::storeContentStep(node1, c, node2)
}
query predicate readStep(Node node1, Content c, Node node2) {
RustDataFlow::readContentStep(node1, c, node2)
}

View File

@@ -34,58 +34,64 @@ edges
| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | MaD:10 |
| main.rs:28:13:28:13 | a | main.rs:28:13:28:21 | a.clone() | provenance | generated |
| main.rs:28:13:28:21 | a.clone() | main.rs:28:9:28:9 | b | provenance | |
| main.rs:41:13:41:13 | w [Wrapper] | main.rs:42:15:42:15 | w [Wrapper] | provenance | |
| main.rs:41:17:41:41 | Wrapper {...} [Wrapper] | main.rs:41:13:41:13 | w [Wrapper] | provenance | |
| main.rs:41:30:41:39 | source(...) | main.rs:41:17:41:41 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:42:15:42:15 | w [Wrapper] | main.rs:43:13:43:28 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:42:15:42:15 | w [Wrapper] | main.rs:45:17:45:17 | w [Wrapper] | provenance | |
| main.rs:43:13:43:28 | Wrapper {...} [Wrapper] | main.rs:43:26:43:26 | n | provenance | |
| main.rs:43:26:43:26 | n | main.rs:43:38:43:38 | n | provenance | |
| main.rs:45:13:45:13 | u [Wrapper] | main.rs:46:15:46:15 | u [Wrapper] | provenance | |
| main.rs:45:17:45:17 | w [Wrapper] | main.rs:45:17:45:25 | w.clone() [Wrapper] | provenance | generated |
| main.rs:45:17:45:25 | w.clone() [Wrapper] | main.rs:45:13:45:13 | u [Wrapper] | provenance | |
| main.rs:46:15:46:15 | u [Wrapper] | main.rs:47:13:47:28 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:47:13:47:28 | Wrapper {...} [Wrapper] | main.rs:47:26:47:26 | n | provenance | |
| main.rs:47:26:47:26 | n | main.rs:47:38:47:38 | n | provenance | |
| main.rs:58:13:58:13 | b [Some] | main.rs:59:23:59:23 | b [Some] | provenance | |
| main.rs:58:17:58:32 | Some(...) [Some] | main.rs:58:13:58:13 | b [Some] | provenance | |
| main.rs:58:22:58:31 | source(...) | main.rs:58:17:58:32 | Some(...) [Some] | provenance | |
| main.rs:59:13:59:13 | z [Some, tuple.1] | main.rs:60:15:60:15 | z [Some, tuple.1] | provenance | |
| main.rs:59:17:59:24 | a.zip(...) [Some, tuple.1] | main.rs:59:13:59:13 | z [Some, tuple.1] | provenance | |
| main.rs:59:23:59:23 | b [Some] | main.rs:59:17:59:24 | a.zip(...) [Some, tuple.1] | provenance | MaD:6 |
| main.rs:60:15:60:15 | z [Some, tuple.1] | main.rs:61:13:61:24 | Some(...) [Some, tuple.1] | provenance | |
| main.rs:61:13:61:24 | Some(...) [Some, tuple.1] | main.rs:61:18:61:23 | TuplePat [tuple.1] | provenance | |
| main.rs:61:18:61:23 | TuplePat [tuple.1] | main.rs:61:22:61:22 | m | provenance | |
| main.rs:61:22:61:22 | m | main.rs:63:22:63:22 | m | provenance | |
| main.rs:84:29:84:29 | [post] y [&ref] | main.rs:85:33:85:33 | y [&ref] | provenance | |
| main.rs:84:32:84:41 | source(...) | main.rs:84:29:84:29 | [post] y [&ref] | provenance | MaD:12 |
| main.rs:85:33:85:33 | y [&ref] | main.rs:85:18:85:34 | ...::read(...) | provenance | MaD:11 |
| main.rs:100:13:100:17 | mut i | main.rs:101:34:101:34 | i | provenance | |
| main.rs:100:13:100:17 | mut i | main.rs:102:33:102:33 | i | provenance | |
| main.rs:100:13:100:17 | mut i | main.rs:103:47:103:47 | i | provenance | |
| main.rs:100:13:100:17 | mut i | main.rs:105:14:105:14 | i | provenance | |
| main.rs:100:21:100:30 | source(...) | main.rs:100:13:100:17 | mut i | provenance | |
| main.rs:101:13:101:20 | mut pin1 [&ref] | main.rs:106:15:106:18 | pin1 [&ref] | provenance | |
| main.rs:101:13:101:20 | mut pin1 [&ref] | main.rs:107:31:107:34 | pin1 [&ref] | provenance | |
| main.rs:101:24:101:35 | ...::new(...) [&ref] | main.rs:101:13:101:20 | mut pin1 [&ref] | provenance | |
| main.rs:101:33:101:34 | &i [&ref] | main.rs:101:24:101:35 | ...::new(...) [&ref] | provenance | MaD:8 |
| main.rs:101:34:101:34 | i | main.rs:101:33:101:34 | &i [&ref] | provenance | |
| main.rs:102:13:102:20 | mut pin2 [&ref] | main.rs:108:15:108:18 | pin2 [&ref] | provenance | |
| main.rs:102:24:102:34 | ...::pin(...) [&ref] | main.rs:102:13:102:20 | mut pin2 [&ref] | provenance | |
| main.rs:102:33:102:33 | i | main.rs:102:24:102:34 | ...::pin(...) [&ref] | provenance | MaD:3 |
| main.rs:103:13:103:20 | mut pin3 [&ref] | main.rs:109:15:109:18 | pin3 [&ref] | provenance | |
| main.rs:103:24:103:49 | ...::into_pin(...) [&ref] | main.rs:103:13:103:20 | mut pin3 [&ref] | provenance | |
| main.rs:103:38:103:48 | ...::new(...) [&ref] | main.rs:103:24:103:49 | ...::into_pin(...) [&ref] | provenance | MaD:1 |
| main.rs:103:47:103:47 | i | main.rs:103:38:103:48 | ...::new(...) [&ref] | provenance | MaD:2 |
| main.rs:106:15:106:18 | pin1 [&ref] | main.rs:106:14:106:18 | * ... | provenance | |
| main.rs:107:15:107:35 | ...::into_inner(...) [&ref] | main.rs:107:14:107:35 | * ... | provenance | |
| main.rs:107:31:107:34 | pin1 [&ref] | main.rs:107:15:107:35 | ...::into_inner(...) [&ref] | provenance | MaD:7 |
| main.rs:108:15:108:18 | pin2 [&ref] | main.rs:108:14:108:18 | * ... | provenance | |
| main.rs:109:15:109:18 | pin3 [&ref] | main.rs:109:14:109:18 | * ... | provenance | |
| main.rs:114:13:114:18 | mut ms [MyStruct] | main.rs:119:14:119:15 | ms [MyStruct] | provenance | |
| main.rs:114:22:114:49 | MyStruct {...} [MyStruct] | main.rs:114:13:114:18 | mut ms [MyStruct] | provenance | |
| main.rs:114:38:114:47 | source(...) | main.rs:114:22:114:49 | MyStruct {...} [MyStruct] | provenance | |
| main.rs:119:14:119:15 | ms [MyStruct] | main.rs:119:14:119:19 | ms.val | provenance | |
| main.rs:43:18:43:22 | SelfParam [Wrapper] | main.rs:44:26:44:29 | self [Wrapper] | provenance | |
| main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | main.rs:43:33:45:9 | { ... } [Wrapper] | provenance | |
| main.rs:44:26:44:29 | self [Wrapper] | main.rs:44:26:44:31 | self.n | provenance | |
| main.rs:44:26:44:31 | self.n | main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:49:13:49:13 | w [Wrapper] | main.rs:50:15:50:15 | w [Wrapper] | provenance | |
| main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | main.rs:49:13:49:13 | w [Wrapper] | provenance | |
| main.rs:49:30:49:39 | source(...) | main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:50:15:50:15 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [Wrapper] | provenance | |
| main.rs:50:15:50:15 | w [Wrapper] | main.rs:51:13:51:28 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:50:15:50:15 | w [Wrapper] | main.rs:53:17:53:17 | w [Wrapper] | provenance | |
| main.rs:50:15:50:15 | w [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | provenance | |
| main.rs:51:13:51:28 | Wrapper {...} [Wrapper] | main.rs:51:26:51:26 | n | provenance | |
| main.rs:51:26:51:26 | n | main.rs:51:38:51:38 | n | provenance | |
| main.rs:53:13:53:13 | u [Wrapper] | main.rs:54:15:54:15 | u [Wrapper] | provenance | |
| main.rs:53:17:53:17 | w [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] | provenance | generated |
| main.rs:53:17:53:25 | w.clone() [Wrapper] | main.rs:53:13:53:13 | u [Wrapper] | provenance | |
| main.rs:54:15:54:15 | u [Wrapper] | main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | provenance | |
| main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | main.rs:55:26:55:26 | n | provenance | |
| main.rs:55:26:55:26 | n | main.rs:55:38:55:38 | n | provenance | |
| main.rs:66:13:66:13 | b [Some] | main.rs:67:23:67:23 | b [Some] | provenance | |
| main.rs:66:17:66:32 | Some(...) [Some] | main.rs:66:13:66:13 | b [Some] | provenance | |
| main.rs:66:22:66:31 | source(...) | main.rs:66:17:66:32 | Some(...) [Some] | provenance | |
| main.rs:67:13:67:13 | z [Some, tuple.1] | main.rs:68:15:68:15 | z [Some, tuple.1] | provenance | |
| main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | main.rs:67:13:67:13 | z [Some, tuple.1] | provenance | |
| main.rs:67:23:67:23 | b [Some] | main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | provenance | MaD:6 |
| main.rs:68:15:68:15 | z [Some, tuple.1] | main.rs:69:13:69:24 | Some(...) [Some, tuple.1] | provenance | |
| main.rs:69:13:69:24 | Some(...) [Some, tuple.1] | main.rs:69:18:69:23 | TuplePat [tuple.1] | provenance | |
| main.rs:69:18:69:23 | TuplePat [tuple.1] | main.rs:69:22:69:22 | m | provenance | |
| main.rs:69:22:69:22 | m | main.rs:71:22:71:22 | m | provenance | |
| main.rs:92:29:92:29 | [post] y [&ref] | main.rs:93:33:93:33 | y [&ref] | provenance | |
| main.rs:92:32:92:41 | source(...) | main.rs:92:29:92:29 | [post] y [&ref] | provenance | MaD:12 |
| main.rs:93:33:93:33 | y [&ref] | main.rs:93:18:93:34 | ...::read(...) | provenance | MaD:11 |
| main.rs:108:13:108:17 | mut i | main.rs:109:34:109:34 | i | provenance | |
| main.rs:108:13:108:17 | mut i | main.rs:110:33:110:33 | i | provenance | |
| main.rs:108:13:108:17 | mut i | main.rs:111:47:111:47 | i | provenance | |
| main.rs:108:13:108:17 | mut i | main.rs:113:14:113:14 | i | provenance | |
| main.rs:108:21:108:30 | source(...) | main.rs:108:13:108:17 | mut i | provenance | |
| main.rs:109:13:109:20 | mut pin1 [&ref] | main.rs:114:15:114:18 | pin1 [&ref] | provenance | |
| main.rs:109:13:109:20 | mut pin1 [&ref] | main.rs:115:31:115:34 | pin1 [&ref] | provenance | |
| main.rs:109:24:109:35 | ...::new(...) [&ref] | main.rs:109:13:109:20 | mut pin1 [&ref] | provenance | |
| main.rs:109:33:109:34 | &i [&ref] | main.rs:109:24:109:35 | ...::new(...) [&ref] | provenance | MaD:8 |
| main.rs:109:34:109:34 | i | main.rs:109:33:109:34 | &i [&ref] | provenance | |
| main.rs:110:13:110:20 | mut pin2 [&ref] | main.rs:116:15:116:18 | pin2 [&ref] | provenance | |
| main.rs:110:24:110:34 | ...::pin(...) [&ref] | main.rs:110:13:110:20 | mut pin2 [&ref] | provenance | |
| main.rs:110:33:110:33 | i | main.rs:110:24:110:34 | ...::pin(...) [&ref] | provenance | MaD:3 |
| main.rs:111:13:111:20 | mut pin3 [&ref] | main.rs:117:15:117:18 | pin3 [&ref] | provenance | |
| main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | main.rs:111:13:111:20 | mut pin3 [&ref] | provenance | |
| main.rs:111:38:111:48 | ...::new(...) [&ref] | main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | provenance | MaD:1 |
| main.rs:111:47:111:47 | i | main.rs:111:38:111:48 | ...::new(...) [&ref] | provenance | MaD:2 |
| main.rs:114:15:114:18 | pin1 [&ref] | main.rs:114:14:114:18 | * ... | provenance | |
| main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | main.rs:115:14:115:35 | * ... | provenance | |
| main.rs:115:31:115:34 | pin1 [&ref] | main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | provenance | MaD:7 |
| main.rs:116:15:116:18 | pin2 [&ref] | main.rs:116:14:116:18 | * ... | provenance | |
| main.rs:117:15:117:18 | pin3 [&ref] | main.rs:117:14:117:18 | * ... | provenance | |
| main.rs:122:13:122:18 | mut ms [MyStruct] | main.rs:127:14:127:15 | ms [MyStruct] | provenance | |
| main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | main.rs:122:13:122:18 | mut ms [MyStruct] | provenance | |
| main.rs:122:38:122:47 | source(...) | main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | provenance | |
| main.rs:127:14:127:15 | ms [MyStruct] | main.rs:127:14:127:19 | ms.val | provenance | |
nodes
| main.rs:12:9:12:9 | a [Some] | semmle.label | a [Some] |
| main.rs:12:13:12:28 | Some(...) [Some] | semmle.label | Some(...) [Some] |
@@ -110,64 +116,70 @@ nodes
| main.rs:28:13:28:13 | a | semmle.label | a |
| main.rs:28:13:28:21 | a.clone() | semmle.label | a.clone() |
| main.rs:29:10:29:10 | b | semmle.label | b |
| main.rs:41:13:41:13 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:41:17:41:41 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:41:30:41:39 | source(...) | semmle.label | source(...) |
| main.rs:42:15:42:15 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:43:13:43:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:43:26:43:26 | n | semmle.label | n |
| main.rs:43:38:43:38 | n | semmle.label | n |
| main.rs:45:13:45:13 | u [Wrapper] | semmle.label | u [Wrapper] |
| main.rs:45:17:45:17 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:45:17:45:25 | w.clone() [Wrapper] | semmle.label | w.clone() [Wrapper] |
| main.rs:46:15:46:15 | u [Wrapper] | semmle.label | u [Wrapper] |
| main.rs:47:13:47:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:47:26:47:26 | n | semmle.label | n |
| main.rs:47:38:47:38 | n | semmle.label | n |
| main.rs:58:13:58:13 | b [Some] | semmle.label | b [Some] |
| main.rs:58:17:58:32 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| main.rs:58:22:58:31 | source(...) | semmle.label | source(...) |
| main.rs:59:13:59:13 | z [Some, tuple.1] | semmle.label | z [Some, tuple.1] |
| main.rs:59:17:59:24 | a.zip(...) [Some, tuple.1] | semmle.label | a.zip(...) [Some, tuple.1] |
| main.rs:59:23:59:23 | b [Some] | semmle.label | b [Some] |
| main.rs:60:15:60:15 | z [Some, tuple.1] | semmle.label | z [Some, tuple.1] |
| main.rs:61:13:61:24 | Some(...) [Some, tuple.1] | semmle.label | Some(...) [Some, tuple.1] |
| main.rs:61:18:61:23 | TuplePat [tuple.1] | semmle.label | TuplePat [tuple.1] |
| main.rs:61:22:61:22 | m | semmle.label | m |
| main.rs:63:22:63:22 | m | semmle.label | m |
| main.rs:84:29:84:29 | [post] y [&ref] | semmle.label | [post] y [&ref] |
| main.rs:84:32:84:41 | source(...) | semmle.label | source(...) |
| main.rs:85:18:85:34 | ...::read(...) | semmle.label | ...::read(...) |
| main.rs:85:33:85:33 | y [&ref] | semmle.label | y [&ref] |
| main.rs:100:13:100:17 | mut i | semmle.label | mut i |
| main.rs:100:21:100:30 | source(...) | semmle.label | source(...) |
| main.rs:101:13:101:20 | mut pin1 [&ref] | semmle.label | mut pin1 [&ref] |
| main.rs:101:24:101:35 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] |
| main.rs:101:33:101:34 | &i [&ref] | semmle.label | &i [&ref] |
| main.rs:101:34:101:34 | i | semmle.label | i |
| main.rs:102:13:102:20 | mut pin2 [&ref] | semmle.label | mut pin2 [&ref] |
| main.rs:102:24:102:34 | ...::pin(...) [&ref] | semmle.label | ...::pin(...) [&ref] |
| main.rs:102:33:102:33 | i | semmle.label | i |
| main.rs:103:13:103:20 | mut pin3 [&ref] | semmle.label | mut pin3 [&ref] |
| main.rs:103:24:103:49 | ...::into_pin(...) [&ref] | semmle.label | ...::into_pin(...) [&ref] |
| main.rs:103:38:103:48 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] |
| main.rs:103:47:103:47 | i | semmle.label | i |
| main.rs:105:14:105:14 | i | semmle.label | i |
| main.rs:106:14:106:18 | * ... | semmle.label | * ... |
| main.rs:106:15:106:18 | pin1 [&ref] | semmle.label | pin1 [&ref] |
| main.rs:107:14:107:35 | * ... | semmle.label | * ... |
| main.rs:107:15:107:35 | ...::into_inner(...) [&ref] | semmle.label | ...::into_inner(...) [&ref] |
| main.rs:107:31:107:34 | pin1 [&ref] | semmle.label | pin1 [&ref] |
| main.rs:108:14:108:18 | * ... | semmle.label | * ... |
| main.rs:108:15:108:18 | pin2 [&ref] | semmle.label | pin2 [&ref] |
| main.rs:109:14:109:18 | * ... | semmle.label | * ... |
| main.rs:109:15:109:18 | pin3 [&ref] | semmle.label | pin3 [&ref] |
| main.rs:114:13:114:18 | mut ms [MyStruct] | semmle.label | mut ms [MyStruct] |
| main.rs:114:22:114:49 | MyStruct {...} [MyStruct] | semmle.label | MyStruct {...} [MyStruct] |
| main.rs:114:38:114:47 | source(...) | semmle.label | source(...) |
| main.rs:119:14:119:15 | ms [MyStruct] | semmle.label | ms [MyStruct] |
| main.rs:119:14:119:19 | ms.val | semmle.label | ms.val |
| main.rs:43:18:43:22 | SelfParam [Wrapper] | semmle.label | SelfParam [Wrapper] |
| main.rs:43:33:45:9 | { ... } [Wrapper] | semmle.label | { ... } [Wrapper] |
| main.rs:44:13:44:33 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:44:26:44:29 | self [Wrapper] | semmle.label | self [Wrapper] |
| main.rs:44:26:44:31 | self.n | semmle.label | self.n |
| main.rs:49:13:49:13 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:49:17:49:41 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:49:30:49:39 | source(...) | semmle.label | source(...) |
| main.rs:50:15:50:15 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:51:13:51:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:51:26:51:26 | n | semmle.label | n |
| main.rs:51:38:51:38 | n | semmle.label | n |
| main.rs:53:13:53:13 | u [Wrapper] | semmle.label | u [Wrapper] |
| main.rs:53:17:53:17 | w [Wrapper] | semmle.label | w [Wrapper] |
| main.rs:53:17:53:25 | w.clone() [Wrapper] | semmle.label | w.clone() [Wrapper] |
| main.rs:54:15:54:15 | u [Wrapper] | semmle.label | u [Wrapper] |
| main.rs:55:13:55:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
| main.rs:55:26:55:26 | n | semmle.label | n |
| main.rs:55:38:55:38 | n | semmle.label | n |
| main.rs:66:13:66:13 | b [Some] | semmle.label | b [Some] |
| main.rs:66:17:66:32 | Some(...) [Some] | semmle.label | Some(...) [Some] |
| main.rs:66:22:66:31 | source(...) | semmle.label | source(...) |
| main.rs:67:13:67:13 | z [Some, tuple.1] | semmle.label | z [Some, tuple.1] |
| main.rs:67:17:67:24 | a.zip(...) [Some, tuple.1] | semmle.label | a.zip(...) [Some, tuple.1] |
| main.rs:67:23:67:23 | b [Some] | semmle.label | b [Some] |
| main.rs:68:15:68:15 | z [Some, tuple.1] | semmle.label | z [Some, tuple.1] |
| main.rs:69:13:69:24 | Some(...) [Some, tuple.1] | semmle.label | Some(...) [Some, tuple.1] |
| main.rs:69:18:69:23 | TuplePat [tuple.1] | semmle.label | TuplePat [tuple.1] |
| main.rs:69:22:69:22 | m | semmle.label | m |
| main.rs:71:22:71:22 | m | semmle.label | m |
| main.rs:92:29:92:29 | [post] y [&ref] | semmle.label | [post] y [&ref] |
| main.rs:92:32:92:41 | source(...) | semmle.label | source(...) |
| main.rs:93:18:93:34 | ...::read(...) | semmle.label | ...::read(...) |
| main.rs:93:33:93:33 | y [&ref] | semmle.label | y [&ref] |
| main.rs:108:13:108:17 | mut i | semmle.label | mut i |
| main.rs:108:21:108:30 | source(...) | semmle.label | source(...) |
| main.rs:109:13:109:20 | mut pin1 [&ref] | semmle.label | mut pin1 [&ref] |
| main.rs:109:24:109:35 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] |
| main.rs:109:33:109:34 | &i [&ref] | semmle.label | &i [&ref] |
| main.rs:109:34:109:34 | i | semmle.label | i |
| main.rs:110:13:110:20 | mut pin2 [&ref] | semmle.label | mut pin2 [&ref] |
| main.rs:110:24:110:34 | ...::pin(...) [&ref] | semmle.label | ...::pin(...) [&ref] |
| main.rs:110:33:110:33 | i | semmle.label | i |
| main.rs:111:13:111:20 | mut pin3 [&ref] | semmle.label | mut pin3 [&ref] |
| main.rs:111:24:111:49 | ...::into_pin(...) [&ref] | semmle.label | ...::into_pin(...) [&ref] |
| main.rs:111:38:111:48 | ...::new(...) [&ref] | semmle.label | ...::new(...) [&ref] |
| main.rs:111:47:111:47 | i | semmle.label | i |
| main.rs:113:14:113:14 | i | semmle.label | i |
| main.rs:114:14:114:18 | * ... | semmle.label | * ... |
| main.rs:114:15:114:18 | pin1 [&ref] | semmle.label | pin1 [&ref] |
| main.rs:115:14:115:35 | * ... | semmle.label | * ... |
| main.rs:115:15:115:35 | ...::into_inner(...) [&ref] | semmle.label | ...::into_inner(...) [&ref] |
| main.rs:115:31:115:34 | pin1 [&ref] | semmle.label | pin1 [&ref] |
| main.rs:116:14:116:18 | * ... | semmle.label | * ... |
| main.rs:116:15:116:18 | pin2 [&ref] | semmle.label | pin2 [&ref] |
| main.rs:117:14:117:18 | * ... | semmle.label | * ... |
| main.rs:117:15:117:18 | pin3 [&ref] | semmle.label | pin3 [&ref] |
| main.rs:122:13:122:18 | mut ms [MyStruct] | semmle.label | mut ms [MyStruct] |
| main.rs:122:22:122:49 | MyStruct {...} [MyStruct] | semmle.label | MyStruct {...} [MyStruct] |
| main.rs:122:38:122:47 | source(...) | semmle.label | source(...) |
| main.rs:127:14:127:15 | ms [MyStruct] | semmle.label | ms [MyStruct] |
| main.rs:127:14:127:19 | ms.val | semmle.label | ms.val |
subpaths
| main.rs:50:15:50:15 | w [Wrapper] | main.rs:43:18:43:22 | SelfParam [Wrapper] | main.rs:43:33:45:9 | { ... } [Wrapper] | main.rs:53:17:53:25 | w.clone() [Wrapper] |
testFailures
#select
| main.rs:13:10:13:19 | a.unwrap() | main.rs:12:18:12:27 | source(...) | main.rs:13:10:13:19 | a.unwrap() | $@ | main.rs:12:18:12:27 | source(...) | source(...) |
@@ -176,13 +188,13 @@ testFailures
| main.rs:22:10:22:19 | b.unwrap() | main.rs:19:34:19:43 | source(...) | main.rs:22:10:22:19 | b.unwrap() | $@ | main.rs:19:34:19:43 | source(...) | source(...) |
| main.rs:27:10:27:10 | a | main.rs:26:13:26:22 | source(...) | main.rs:27:10:27:10 | a | $@ | main.rs:26:13:26:22 | source(...) | source(...) |
| main.rs:29:10:29:10 | b | main.rs:26:13:26:22 | source(...) | main.rs:29:10:29:10 | b | $@ | main.rs:26:13:26:22 | source(...) | source(...) |
| main.rs:43:38:43:38 | n | main.rs:41:30:41:39 | source(...) | main.rs:43:38:43:38 | n | $@ | main.rs:41:30:41:39 | source(...) | source(...) |
| main.rs:47:38:47:38 | n | main.rs:41:30:41:39 | source(...) | main.rs:47:38:47:38 | n | $@ | main.rs:41:30:41:39 | source(...) | source(...) |
| main.rs:63:22:63:22 | m | main.rs:58:22:58:31 | source(...) | main.rs:63:22:63:22 | m | $@ | main.rs:58:22:58:31 | source(...) | source(...) |
| main.rs:85:18:85:34 | ...::read(...) | main.rs:84:32:84:41 | source(...) | main.rs:85:18:85:34 | ...::read(...) | $@ | main.rs:84:32:84:41 | source(...) | source(...) |
| main.rs:105:14:105:14 | i | main.rs:100:21:100:30 | source(...) | main.rs:105:14:105:14 | i | $@ | main.rs:100:21:100:30 | source(...) | source(...) |
| main.rs:106:14:106:18 | * ... | main.rs:100:21:100:30 | source(...) | main.rs:106:14:106:18 | * ... | $@ | main.rs:100:21:100:30 | source(...) | source(...) |
| main.rs:107:14:107:35 | * ... | main.rs:100:21:100:30 | source(...) | main.rs:107:14:107:35 | * ... | $@ | main.rs:100:21:100:30 | source(...) | source(...) |
| main.rs:108:14:108:18 | * ... | main.rs:100:21:100:30 | source(...) | main.rs:108:14:108:18 | * ... | $@ | main.rs:100:21:100:30 | source(...) | source(...) |
| main.rs:109:14:109:18 | * ... | main.rs:100:21:100:30 | source(...) | main.rs:109:14:109:18 | * ... | $@ | main.rs:100:21:100:30 | source(...) | source(...) |
| main.rs:119:14:119:19 | ms.val | main.rs:114:38:114:47 | source(...) | main.rs:119:14:119:19 | ms.val | $@ | main.rs:114:38:114:47 | source(...) | source(...) |
| main.rs:51:38:51:38 | n | main.rs:49:30:49:39 | source(...) | main.rs:51:38:51:38 | n | $@ | main.rs:49:30:49:39 | source(...) | source(...) |
| main.rs:55:38:55:38 | n | main.rs:49:30:49:39 | source(...) | main.rs:55:38:55:38 | n | $@ | main.rs:49:30:49:39 | source(...) | source(...) |
| main.rs:71:22:71:22 | m | main.rs:66:22:66:31 | source(...) | main.rs:71:22:71:22 | m | $@ | main.rs:66:22:66:31 | source(...) | source(...) |
| main.rs:93:18:93:34 | ...::read(...) | main.rs:92:32:92:41 | source(...) | main.rs:93:18:93:34 | ...::read(...) | $@ | main.rs:92:32:92:41 | source(...) | source(...) |
| main.rs:113:14:113:14 | i | main.rs:108:21:108:30 | source(...) | main.rs:113:14:113:14 | i | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
| main.rs:114:14:114:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:114:14:114:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
| main.rs:115:14:115:35 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:115:14:115:35 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
| main.rs:116:14:116:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:116:14:116:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
| main.rs:117:14:117:18 | * ... | main.rs:108:21:108:30 | source(...) | main.rs:117:14:117:18 | * ... | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
| main.rs:127:14:127:19 | ms.val | main.rs:122:38:122:47 | source(...) | main.rs:127:14:127:19 | ms.val | $@ | main.rs:122:38:122:47 | source(...) | source(...) |

View File

@@ -32,11 +32,19 @@ fn i64_clone() {
mod my_clone {
use super::{sink, source};
#[derive(Clone)]
// TODO: Replace manual implementation below with `#[derive(Clone)]`,
// once the extractor expands the `#[derive]` attributes.
// #[derive(Clone)]
struct Wrapper {
n: i64,
}
impl Clone for Wrapper {
fn clone(&self) -> Self {
Wrapper { n: self.n }
}
}
pub fn wrapper_clone() {
let w = Wrapper { n: source(73) };
match w {

View File

@@ -0,0 +1,13 @@
multipleCanonicalPaths
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord> |

View File

@@ -0,0 +1,13 @@
multipleCanonicalPaths
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord> |

View File

@@ -1,5 +1,6 @@
import rust
import utils.test.InlineExpectationsTest
import TestUtils
string describe(Expr op) {
op instanceof Operation and result = "Operation"
@@ -13,13 +14,50 @@ string describe(Expr op) {
op instanceof LogicalOperation and result = "LogicalOperation"
or
op instanceof RefExpr and result = "RefExpr"
or
op instanceof ComparisonOperation and result = "ComparisonOperation"
or
op instanceof EqualityOperation and result = "EqualityOperation"
or
op instanceof EqualsOperation and result = "EqualsOperation"
or
op instanceof NotEqualsOperation and result = "NotEqualsOperation"
or
op instanceof RelationalOperation and result = "RelationalOperation"
or
op instanceof LessThanOperation and result = "LessThanOperation"
or
op instanceof GreaterThanOperation and result = "GreaterThanOperation"
or
op instanceof LessOrEqualsOperation and result = "LessOrEqualsOperation"
or
op instanceof GreaterOrEqualsOperation and result = "GreaterOrEqualsOperation"
or
op instanceof ArithmeticOperation and result = "ArithmeticOperation"
or
op instanceof BinaryArithmeticOperation and result = "BinaryArithmeticOperation"
or
op instanceof AssignArithmeticOperation and result = "AssignArithmeticOperation"
or
op instanceof PrefixArithmeticOperation and result = "PrefixArithmeticOperation"
or
op instanceof BitwiseOperation and result = "BitwiseOperation"
or
op instanceof BinaryBitwiseOperation and result = "BinaryBitwiseOperation"
or
op instanceof AssignBitwiseOperation and result = "AssignBitwiseOperation"
or
op instanceof DerefExpr and result = "DerefExpr"
}
module OperationsTest implements TestSig {
string getARelevantTag() { result = describe(_) or result = ["Op", "Operands"] }
string getARelevantTag() {
result = describe(_) or result = ["Op", "Operands", "Greater", "Lesser"]
}
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(Expr op |
toBeTested(op) and
location = op.getLocation() and
location.getFile().getBaseName() != "" and
element = op.toString() and
@@ -33,6 +71,14 @@ module OperationsTest implements TestSig {
op instanceof Operation and
tag = "Operands" and
value = count(op.(Operation).getAnOperand()).toString()
or
op instanceof RelationalOperation and
tag = "Greater" and
value = op.(RelationalOperation).getGreaterOperand().toString()
or
op instanceof RelationalOperation and
tag = "Lesser" and
value = op.(RelationalOperation).getLesserOperand().toString()
)
)
}

View File

@@ -11,25 +11,25 @@ fn test_operations(
x = y; // $ Operation Op== Operands=2 AssignmentOperation BinaryExpr
// comparison operations
x == y; // $ Operation Op=== Operands=2 BinaryExpr
x != y; // $ Operation Op=!= Operands=2 BinaryExpr
x < y; // $ Operation Op=< Operands=2 BinaryExpr
x <= y; // $ Operation Op=<= Operands=2 BinaryExpr
x > y; // $ Operation Op=> Operands=2 BinaryExpr
x >= y; // $ Operation Op=>= Operands=2 BinaryExpr
x == y; // $ Operation Op=== Operands=2 BinaryExpr ComparisonOperation EqualityOperation EqualsOperation
x != y; // $ Operation Op=!= Operands=2 BinaryExpr ComparisonOperation EqualityOperation NotEqualsOperation
x < y; // $ Operation Op=< Operands=2 BinaryExpr ComparisonOperation RelationalOperation LessThanOperation Greater=y Lesser=x
x <= y; // $ Operation Op=<= Operands=2 BinaryExpr ComparisonOperation RelationalOperation LessOrEqualsOperation Greater=y Lesser=x
x > y; // $ Operation Op=> Operands=2 BinaryExpr ComparisonOperation RelationalOperation GreaterThanOperation Greater=x Lesser=y
x >= y; // $ Operation Op=>= Operands=2 BinaryExpr ComparisonOperation RelationalOperation GreaterOrEqualsOperation Greater=x Lesser=y
// arithmetic operations
x + y; // $ Operation Op=+ Operands=2 BinaryExpr
x - y; // $ Operation Op=- Operands=2 BinaryExpr
x * y; // $ Operation Op=* Operands=2 BinaryExpr
x / y; // $ Operation Op=/ Operands=2 BinaryExpr
x % y; // $ Operation Op=% Operands=2 BinaryExpr
x += y; // $ Operation Op=+= Operands=2 AssignmentOperation BinaryExpr
x -= y; // $ Operation Op=-= Operands=2 AssignmentOperation BinaryExpr
x *= y; // $ Operation Op=*= Operands=2 AssignmentOperation BinaryExpr
x /= y; // $ Operation Op=/= Operands=2 AssignmentOperation BinaryExpr
x %= y; // $ Operation Op=%= Operands=2 AssignmentOperation BinaryExpr
-x; // $ Operation Op=- Operands=1 PrefixExpr
x + y; // $ Operation Op=+ Operands=2 BinaryExpr ArithmeticOperation BinaryArithmeticOperation
x - y; // $ Operation Op=- Operands=2 BinaryExpr ArithmeticOperation BinaryArithmeticOperation
x * y; // $ Operation Op=* Operands=2 BinaryExpr ArithmeticOperation BinaryArithmeticOperation
x / y; // $ Operation Op=/ Operands=2 BinaryExpr ArithmeticOperation BinaryArithmeticOperation
x % y; // $ Operation Op=% Operands=2 BinaryExpr ArithmeticOperation BinaryArithmeticOperation
x += y; // $ Operation Op=+= Operands=2 AssignmentOperation BinaryExpr ArithmeticOperation AssignArithmeticOperation
x -= y; // $ Operation Op=-= Operands=2 AssignmentOperation BinaryExpr ArithmeticOperation AssignArithmeticOperation
x *= y; // $ Operation Op=*= Operands=2 AssignmentOperation BinaryExpr ArithmeticOperation AssignArithmeticOperation
x /= y; // $ Operation Op=/= Operands=2 AssignmentOperation BinaryExpr ArithmeticOperation AssignArithmeticOperation
x %= y; // $ Operation Op=%= Operands=2 AssignmentOperation BinaryExpr ArithmeticOperation AssignArithmeticOperation
-x; // $ Operation Op=- Operands=1 PrefixExpr ArithmeticOperation PrefixArithmeticOperation
// logical operations
a && b; // $ Operation Op=&& Operands=2 BinaryExpr LogicalOperation
@@ -37,20 +37,20 @@ fn test_operations(
!a; // $ Operation Op=! Operands=1 PrefixExpr LogicalOperation
// bitwise operations
x & y; // $ Operation Op=& Operands=2 BinaryExpr
x | y; // $ Operation Op=| Operands=2 BinaryExpr
x ^ y; // $ Operation Op=^ Operands=2 BinaryExpr
x << y; // $ Operation Op=<< Operands=2 BinaryExpr
x >> y; // $ Operation Op=>> Operands=2 BinaryExpr
x &= y; // $ Operation Op=&= Operands=2 AssignmentOperation BinaryExpr
x |= y; // $ Operation Op=|= Operands=2 AssignmentOperation BinaryExpr
x ^= y; // $ Operation Op=^= Operands=2 AssignmentOperation BinaryExpr
x <<= y; // $ Operation Op=<<= Operands=2 AssignmentOperation BinaryExpr
x >>= y; // $ Operation Op=>>= Operands=2 AssignmentOperation BinaryExpr
x & y; // $ Operation Op=& Operands=2 BinaryExpr BitwiseOperation BinaryBitwiseOperation
x | y; // $ Operation Op=| Operands=2 BinaryExpr BitwiseOperation BinaryBitwiseOperation
x ^ y; // $ Operation Op=^ Operands=2 BinaryExpr BitwiseOperation BinaryBitwiseOperation
x << y; // $ Operation Op=<< Operands=2 BinaryExpr BitwiseOperation BinaryBitwiseOperation
x >> y; // $ Operation Op=>> Operands=2 BinaryExpr BitwiseOperation BinaryBitwiseOperation
x &= y; // $ Operation Op=&= Operands=2 AssignmentOperation BinaryExpr BitwiseOperation AssignBitwiseOperation
x |= y; // $ Operation Op=|= Operands=2 AssignmentOperation BinaryExpr BitwiseOperation AssignBitwiseOperation
x ^= y; // $ Operation Op=^= Operands=2 AssignmentOperation BinaryExpr BitwiseOperation AssignBitwiseOperation
x <<= y; // $ Operation Op=<<= Operands=2 AssignmentOperation BinaryExpr BitwiseOperation AssignBitwiseOperation
x >>= y; // $ Operation Op=>>= Operands=2 AssignmentOperation BinaryExpr BitwiseOperation AssignBitwiseOperation
// miscellaneous expressions that might be operations
*ptr; // $ Operation Op=* Operands=1 PrefixExpr
&x; // $ RefExpr
*ptr; // $ Operation Op=* Operands=1 PrefixExpr DerefExpr
&x; // $ Operation Op=& Operands=1 RefExpr MISSING: PrefixExpr
res?;
return Ok(());

View File

@@ -16,13 +16,13 @@ mod my4 {
}
pub use my4::my5::f as nested_f; // $ item=I201
#[rustfmt::skip]
type Result<
T, // T
> = ::std::result::Result<
T, // $ item=T
String,
>; // my::Result
String,> // $ item=Result
; // my::Result
fn int_div(
x: i32, // $ item=i32
@@ -30,7 +30,7 @@ fn int_div(
) -> Result<i32> // $ item=my::Result $ item=i32
{
if y == 0 {
return Err("Div by zero".to_string());
return Err("Div by zero".to_string()); // $ item=Err
}
Ok(x / y)
Ok(x / y) // $ item=Ok
}

View File

@@ -352,15 +352,15 @@ resolvePath
| my.rs:18:9:18:16 | ...::my5 | my.rs:15:5:15:16 | mod my5 |
| my.rs:18:9:18:19 | ...::f | my/my4/my5/mod.rs:1:1:3:1 | fn f |
| my.rs:22:5:22:9 | std | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/std/src/lib.rs:0:0:0:0 | Crate(std@0.0.0) |
| my.rs:22:5:22:17 | ...::result | file://:0:0:0:0 | mod result |
| my.rs:22:5:25:1 | ...::Result::<...> | file://:0:0:0:0 | enum Result |
| my.rs:22:5:22:17 | ...::result | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/lib.rs:356:1:356:15 | mod result |
| my.rs:22:5:24:12 | ...::Result::<...> | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/result.rs:520:1:538:1 | enum Result |
| my.rs:23:5:23:5 | T | my.rs:21:5:21:5 | T |
| my.rs:28:8:28:10 | i32 | file:///BUILTINS/types.rs:12:1:12:15 | struct i32 |
| my.rs:29:8:29:10 | i32 | file:///BUILTINS/types.rs:12:1:12:15 | struct i32 |
| my.rs:30:6:30:16 | Result::<...> | my.rs:20:1:25:2 | type Result<...> |
| my.rs:30:6:30:16 | Result::<...> | my.rs:18:34:25:1 | type Result<...> |
| my.rs:30:13:30:15 | i32 | file:///BUILTINS/types.rs:12:1:12:15 | struct i32 |
| my.rs:33:16:33:18 | Err | file://:0:0:0:0 | Err |
| my.rs:35:5:35:6 | Ok | file://:0:0:0:0 | Ok |
| my.rs:33:16:33:18 | Err | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/result.rs:534:5:537:56 | Err |
| my.rs:35:5:35:6 | Ok | file:///RUSTUP_HOME/toolchain/lib/rustlib/src/rust/library/core/src/result.rs:529:5:532:55 | Ok |
| my/nested.rs:9:13:9:13 | f | my/nested.rs:3:9:5:9 | fn f |
| my/nested.rs:15:9:15:15 | nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
| my/nested.rs:15:9:15:18 | ...::f | my/nested.rs:3:9:5:9 | fn f |

View File

@@ -21,5 +21,7 @@ class ItemNodeLoc extends ItemNodeFinal {
}
query predicate resolvePath(Path p, ItemNodeLoc i) {
toBeTested(p) and not p.isInMacroExpansion() and i = resolvePath(p)
toBeTested(p) and
not p.isFromMacroExpansion() and
i = resolvePath(p)
}

View File

@@ -90,6 +90,32 @@ mod method_impl {
}
}
mod trait_impl {
#[derive(Debug)]
struct MyThing {
field: bool,
}
trait MyTrait<B> {
fn trait_method(self) -> B;
}
impl MyTrait<bool> for MyThing {
// MyThing::trait_method
fn trait_method(self) -> bool {
self.field // $ fieldof=MyThing
}
}
pub fn f() {
let x = MyThing { field: true };
let a = x.trait_method(); // $ type=a:bool method=MyThing::trait_method
let y = MyThing { field: false };
let b = MyTrait::trait_method(y); // $ type=b:bool method=MyThing::trait_method
}
}
mod method_non_parametric_impl {
#[derive(Debug)]
struct MyThing<A> {
@@ -1224,6 +1250,21 @@ mod builtins {
}
}
mod operators {
pub fn f() {
let x = true && false; // $ type=x:bool
let y = true || false; // $ type=y:bool
let mut a;
if 34 == 33 {
let z = (a = 1); // $ type=z:() type=a:i32
} else {
a = 2; // $ type=a:i32
}
a; // $ type=a:i32
}
}
fn main() {
field_access::f();
method_impl::f();
@@ -1242,4 +1283,5 @@ fn main() {
borrowed_typed::f();
try_expressions::f();
builtins::f();
operators::f();
}

View File

@@ -11,23 +11,27 @@ class TypeLoc extends TypeFinal {
) {
exists(string file |
this.getLocation().hasLocationInfo(file, startline, startcolumn, endline, endcolumn) and
filepath = file.regexpReplaceAll("^/.*/tools/builtins/", "/BUILTINS/")
filepath =
file.regexpReplaceAll("^/.*/tools/builtins/", "/BUILTINS/")
.regexpReplaceAll("^/.*/.rustup/toolchains/[^/]+/", "/RUSTUP_HOME/toolchain/")
)
}
}
query predicate inferType(AstNode n, TypePath path, TypeLoc t) {
t = TypeInference::inferType(n, path) and
n.fromSource()
n.fromSource() and
not n.isFromMacroExpansion()
}
module ResolveTest implements TestSig {
string getARelevantTag() { result = ["method", "fieldof"] }
private predicate functionHasValue(Function f, string value) {
f.getAPrecedingComment().getCommentText() = value
f.getAPrecedingComment().getCommentText() = value and
f.fromSource()
or
not exists(f.getAPrecedingComment()) and
not any(f.getAPrecedingComment()).fromSource() and
// TODO: Default to canonical path once that is available
value = f.getName().getText()
}
@@ -35,9 +39,11 @@ module ResolveTest implements TestSig {
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(AstNode source, AstNode target |
location = source.getLocation() and
element = source.toString()
element = source.toString() and
source.fromSource() and
not source.isFromMacroExpansion()
|
target = source.(MethodCallExpr).getStaticTarget() and
target = resolveMethodCallTarget(source) and
functionHasValue(target, value) and
tag = "method"
or

View File

@@ -4,31 +4,38 @@ import codeql.rust.controlflow.ControlFlowGraph
import codeql.rust.dataflow.Ssa
import codeql.rust.dataflow.internal.SsaImpl
import Impl::TestAdjacentRefs as RefTest
import TestUtils
query predicate definition(Ssa::Definition def, Variable v) { def.getSourceVariable() = v }
query predicate definition(Ssa::Definition def, Variable v) {
toBeTested(v.getEnclosingCfgScope()) and def.getSourceVariable() = v
}
query predicate read(Ssa::Definition def, Variable v, CfgNode read) {
def.getSourceVariable() = v and read = def.getARead()
toBeTested(v.getEnclosingCfgScope()) and def.getSourceVariable() = v and read = def.getARead()
}
query predicate firstRead(Ssa::Definition def, Variable v, CfgNode read) {
def.getSourceVariable() = v and read = def.getAFirstRead()
toBeTested(v.getEnclosingCfgScope()) and
def.getSourceVariable() = v and
read = def.getAFirstRead()
}
query predicate adjacentReads(Ssa::Definition def, Variable v, CfgNode read1, CfgNode read2) {
toBeTested(v.getEnclosingCfgScope()) and
def.getSourceVariable() = v and
def.hasAdjacentReads(read1, read2)
}
query predicate phi(Ssa::PhiDefinition phi, Variable v, Ssa::Definition input) {
phi.getSourceVariable() = v and input = phi.getAnInput()
toBeTested(v.getEnclosingCfgScope()) and phi.getSourceVariable() = v and input = phi.getAnInput()
}
query predicate phiReadNode(RefTest::Ref phi, Variable v) {
phi.isPhiRead() and phi.getSourceVariable() = v
toBeTested(v.getEnclosingCfgScope()) and phi.isPhiRead() and phi.getSourceVariable() = v
}
query predicate phiReadNodeFirstRead(RefTest::Ref phi, Variable v, CfgNode read) {
toBeTested(v.getEnclosingCfgScope()) and
exists(RefTest::Ref r, BasicBlock bb, int i |
phi.isPhiRead() and
RefTest::adjacentRefRead(phi, r) and

View File

@@ -1,29 +1,39 @@
import rust
import utils.test.InlineExpectationsTest
import codeql.rust.elements.internal.VariableImpl::Impl as VariableImpl
import TestUtils
query predicate variable(Variable v) { any() }
query predicate variable(Variable v) { toBeTested(v.getEnclosingCfgScope()) }
query predicate variableAccess(VariableAccess va, Variable v) { v = va.getVariable() }
query predicate variableAccess(VariableAccess va, Variable v) {
variable(v) and toBeTested(va) and v = va.getVariable()
}
query predicate variableWriteAccess(VariableWriteAccess va, Variable v) { v = va.getVariable() }
query predicate variableWriteAccess(VariableWriteAccess va, Variable v) {
variable(v) and toBeTested(va) and v = va.getVariable()
}
query predicate variableReadAccess(VariableReadAccess va, Variable v) { v = va.getVariable() }
query predicate variableReadAccess(VariableReadAccess va, Variable v) {
variable(v) and toBeTested(va) and v = va.getVariable()
}
query predicate variableInitializer(Variable v, Expr e) { e = v.getInitializer() }
query predicate variableInitializer(Variable v, Expr e) {
variable(v) and toBeTested(e) and e = v.getInitializer()
}
query predicate capturedVariable(Variable v) { v.isCaptured() }
query predicate capturedVariable(Variable v) { variable(v) and v.isCaptured() }
query predicate capturedAccess(VariableAccess va) { va.isCapture() }
query predicate capturedAccess(VariableAccess va) { toBeTested(va) and va.isCapture() }
query predicate nestedFunctionAccess(VariableImpl::NestedFunctionAccess nfa, Function f) {
f = nfa.getFunction()
toBeTested(f) and f = nfa.getFunction()
}
module VariableAccessTest implements TestSig {
string getARelevantTag() { result = ["", "write_", "read_"] + "access" }
private predicate declAt(Variable v, string filepath, int line, boolean inMacro) {
variable(v) and
v.getLocation().hasLocationInfo(filepath, _, _, line, _) and
if v.getPat().isInMacroExpansion() then inMacro = true else inMacro = false
}
@@ -46,6 +56,7 @@ module VariableAccessTest implements TestSig {
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(VariableAccess va |
toBeTested(va) and
location = va.getLocation() and
element = va.toString() and
decl(va.getVariable(), value)

View File

@@ -1 +1 @@
| 77 |
| 60 |

View File

@@ -9,7 +9,7 @@
| Inconsistencies - Path resolution | 0 |
| Inconsistencies - SSA | 0 |
| Inconsistencies - data flow | 0 |
| Lines of code extracted | 77 |
| Lines of code extracted | 60 |
| Lines of user code extracted | 60 |
| Macro calls - resolved | 8 |
| Macro calls - total | 9 |

View File

@@ -39,3 +39,16 @@ multiplePathResolutions
| src/main.rs:53:38:53:50 | ...::from | file://:0:0:0:0 | fn from |
| src/main.rs:53:38:53:50 | ...::from | file://:0:0:0:0 | fn from |
| src/main.rs:53:38:53:50 | ...::from | file://:0:0:0:0 | fn from |
multipleCanonicalPaths
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord> |

View File

@@ -0,0 +1,23 @@
multipleCanonicalPaths
| file://:0:0:0:0 | fn encode | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as der::encode::Encode>::encode |
| file://:0:0:0:0 | fn encode | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as sqlx_core::encode::Encode>::encode |
| file://:0:0:0:0 | fn encode_by_ref | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as der::encode::Encode>::encode_by_ref |
| file://:0:0:0:0 | fn encode_by_ref | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as sqlx_core::encode::Encode>::encode_by_ref |
| file://:0:0:0:0 | fn produces | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as der::encode::Encode>::produces |
| file://:0:0:0:0 | fn produces | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as sqlx_core::encode::Encode>::produces |
| file://:0:0:0:0 | fn size_hint | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as der::encode::Encode>::size_hint |
| file://:0:0:0:0 | fn size_hint | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as sqlx_core::encode::Encode>::size_hint |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord>::to_ordering |
| file://:0:0:0:0 | fn to_ordering | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord>::to_ordering |
| file://:0:0:0:0 | impl ...::Encode::<...> for Option::<...> { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as der::encode::Encode> |
| file://:0:0:0:0 | impl ...::Encode::<...> for Option::<...> { ... } | file://:0:0:0:0 | Crate(core@0.0.0) | <core::option::Option as sqlx_core::encode::Encode> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Equal { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Equal as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Greater { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Greater as typenum::marker_traits::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as core::cmp::Ord> |
| file://:0:0:0:0 | impl Ord for Less { ... } | file://:0:0:0:0 | Crate(typenum@1.18.0) | <typenum::Less as typenum::marker_traits::Ord> |

View File

@@ -1,220 +1,247 @@
#select
| test_logging.rs:42:5:42:36 | ...::log | test_logging.rs:42:28:42:35 | password | test_logging.rs:42:5:42:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:42:28:42:35 | password | password |
| test_logging.rs:43:5:43:36 | ...::log | test_logging.rs:43:28:43:35 | password | test_logging.rs:43:5:43:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:43:28:43:35 | password | password |
| test_logging.rs:44:5:44:35 | ...::log | test_logging.rs:44:27:44:34 | password | test_logging.rs:44:5:44:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:44:27:44:34 | password | password |
| test_logging.rs:45:5:45:36 | ...::log | test_logging.rs:45:28:45:35 | password | test_logging.rs:45:5:45:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:45:28:45:35 | password | password |
| test_logging.rs:46:5:46:35 | ...::log | test_logging.rs:46:27:46:34 | password | test_logging.rs:46:5:46:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:46:27:46:34 | password | password |
| test_logging.rs:47:5:47:48 | ...::log | test_logging.rs:47:40:47:47 | password | test_logging.rs:47:5:47:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:47:40:47:47 | password | password |
| test_logging.rs:52:5:52:36 | ...::log | test_logging.rs:52:28:52:35 | password | test_logging.rs:52:5:52:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:52:28:52:35 | password | password |
| test_logging.rs:54:5:54:49 | ...::log | test_logging.rs:54:41:54:48 | password | test_logging.rs:54:5:54:49 | ...::log | This operation writes $@ to a log file. | test_logging.rs:54:41:54:48 | password | password |
| test_logging.rs:56:5:56:47 | ...::log | test_logging.rs:56:39:56:46 | password | test_logging.rs:56:5:56:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:56:39:56:46 | password | password |
| test_logging.rs:57:5:57:34 | ...::log | test_logging.rs:57:24:57:31 | password | test_logging.rs:57:5:57:34 | ...::log | This operation writes $@ to a log file. | test_logging.rs:57:24:57:31 | password | password |
| test_logging.rs:58:5:58:36 | ...::log | test_logging.rs:58:24:58:31 | password | test_logging.rs:58:5:58:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:58:24:58:31 | password | password |
| test_logging.rs:60:5:60:54 | ...::log | test_logging.rs:60:46:60:53 | password | test_logging.rs:60:5:60:54 | ...::log | This operation writes $@ to a log file. | test_logging.rs:60:46:60:53 | password | password |
| test_logging.rs:61:5:61:55 | ...::log | test_logging.rs:61:21:61:28 | password | test_logging.rs:61:5:61:55 | ...::log | This operation writes $@ to a log file. | test_logging.rs:61:21:61:28 | password | password |
| test_logging.rs:65:5:65:48 | ...::log | test_logging.rs:65:40:65:47 | password | test_logging.rs:65:5:65:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:65:40:65:47 | password | password |
| test_logging.rs:67:5:67:66 | ...::log | test_logging.rs:67:58:67:65 | password | test_logging.rs:67:5:67:66 | ...::log | This operation writes $@ to a log file. | test_logging.rs:67:58:67:65 | password | password |
| test_logging.rs:68:5:68:67 | ...::log | test_logging.rs:68:19:68:26 | password | test_logging.rs:68:5:68:67 | ...::log | This operation writes $@ to a log file. | test_logging.rs:68:19:68:26 | password | password |
| test_logging.rs:72:5:72:47 | ...::log | test_logging.rs:72:39:72:46 | password | test_logging.rs:72:5:72:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:72:39:72:46 | password | password |
| test_logging.rs:74:5:74:65 | ...::log | test_logging.rs:74:57:74:64 | password | test_logging.rs:74:5:74:65 | ...::log | This operation writes $@ to a log file. | test_logging.rs:74:57:74:64 | password | password |
| test_logging.rs:75:5:75:51 | ...::log | test_logging.rs:75:21:75:28 | password | test_logging.rs:75:5:75:51 | ...::log | This operation writes $@ to a log file. | test_logging.rs:75:21:75:28 | password | password |
| test_logging.rs:76:5:76:47 | ...::log | test_logging.rs:76:39:76:46 | password | test_logging.rs:76:5:76:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:76:39:76:46 | password | password |
| test_logging.rs:82:5:82:44 | ...::log | test_logging.rs:82:36:82:43 | password | test_logging.rs:82:5:82:44 | ...::log | This operation writes $@ to a log file. | test_logging.rs:82:36:82:43 | password | password |
| test_logging.rs:84:5:84:62 | ...::log | test_logging.rs:84:54:84:61 | password | test_logging.rs:84:5:84:62 | ...::log | This operation writes $@ to a log file. | test_logging.rs:84:54:84:61 | password | password |
| test_logging.rs:85:5:85:48 | ...::log | test_logging.rs:85:21:85:28 | password | test_logging.rs:85:5:85:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:85:21:85:28 | password | password |
| test_logging.rs:86:5:86:44 | ...::log | test_logging.rs:86:36:86:43 | password | test_logging.rs:86:5:86:44 | ...::log | This operation writes $@ to a log file. | test_logging.rs:86:36:86:43 | password | password |
| test_logging.rs:94:5:94:29 | ...::log | test_logging.rs:93:15:93:22 | password | test_logging.rs:94:5:94:29 | ...::log | This operation writes $@ to a log file. | test_logging.rs:93:15:93:22 | password | password |
| test_logging.rs:97:5:97:19 | ...::log | test_logging.rs:96:42:96:49 | password | test_logging.rs:97:5:97:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:96:42:96:49 | password | password |
| test_logging.rs:100:5:100:19 | ...::log | test_logging.rs:99:38:99:45 | password | test_logging.rs:100:5:100:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:99:38:99:45 | password | password |
| test_logging.rs:118:5:118:42 | ...::log | test_logging.rs:118:28:118:41 | get_password(...) | test_logging.rs:118:5:118:42 | ...::log | This operation writes $@ to a log file. | test_logging.rs:118:28:118:41 | get_password(...) | get_password(...) |
| test_logging.rs:131:5:131:32 | ...::log | test_logging.rs:129:25:129:32 | password | test_logging.rs:131:5:131:32 | ...::log | This operation writes $@ to a log file. | test_logging.rs:129:25:129:32 | password | password |
| test_logging.rs:152:5:152:38 | ...::_print | test_logging.rs:152:30:152:37 | password | test_logging.rs:152:5:152:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:152:30:152:37 | password | password |
| test_logging.rs:153:5:153:38 | ...::_print | test_logging.rs:153:30:153:37 | password | test_logging.rs:153:5:153:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:153:30:153:37 | password | password |
| test_logging.rs:154:5:154:39 | ...::_eprint | test_logging.rs:154:31:154:38 | password | test_logging.rs:154:5:154:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:154:31:154:38 | password | password |
| test_logging.rs:155:5:155:39 | ...::_eprint | test_logging.rs:155:31:155:38 | password | test_logging.rs:155:5:155:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:155:31:155:38 | password | password |
| test_logging.rs:158:16:158:47 | ...::panic_fmt | test_logging.rs:158:39:158:46 | password | test_logging.rs:158:16:158:47 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:158:39:158:46 | password | password |
| test_logging.rs:159:16:159:46 | ...::panic_fmt | test_logging.rs:159:38:159:45 | password | test_logging.rs:159:16:159:46 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:159:38:159:45 | password | password |
| test_logging.rs:160:16:160:55 | ...::panic_fmt | test_logging.rs:160:47:160:54 | password | test_logging.rs:160:16:160:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:160:47:160:54 | password | password |
| test_logging.rs:161:16:161:53 | ...::panic_fmt | test_logging.rs:161:45:161:52 | password | test_logging.rs:161:16:161:53 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:161:45:161:52 | password | password |
| test_logging.rs:162:16:162:55 | ...::panic_fmt | test_logging.rs:162:47:162:54 | password | test_logging.rs:162:16:162:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:162:47:162:54 | password | password |
| test_logging.rs:163:16:163:57 | ...::assert_failed | test_logging.rs:163:49:163:56 | password | test_logging.rs:163:16:163:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:163:49:163:56 | password | password |
| test_logging.rs:164:16:164:57 | ...::assert_failed | test_logging.rs:164:49:164:56 | password | test_logging.rs:164:16:164:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:164:49:164:56 | password | password |
| test_logging.rs:165:16:165:61 | ...::panic_fmt | test_logging.rs:165:53:165:60 | password | test_logging.rs:165:16:165:61 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:165:53:165:60 | password | password |
| test_logging.rs:166:16:166:63 | ...::assert_failed | test_logging.rs:166:55:166:62 | password | test_logging.rs:166:16:166:63 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:166:55:166:62 | password | password |
| test_logging.rs:167:17:167:64 | ...::assert_failed | test_logging.rs:167:56:167:63 | password | test_logging.rs:167:17:167:64 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:167:56:167:63 | password | password |
| test_logging.rs:168:27:168:32 | expect | test_logging.rs:168:58:168:65 | password | test_logging.rs:168:27:168:32 | expect | This operation writes $@ to a log file. | test_logging.rs:168:58:168:65 | password | password |
| test_logging.rs:174:30:174:34 | write | test_logging.rs:174:62:174:69 | password | test_logging.rs:174:30:174:34 | write | This operation writes $@ to a log file. | test_logging.rs:174:62:174:69 | password | password |
| test_logging.rs:175:30:175:38 | write_all | test_logging.rs:175:66:175:73 | password | test_logging.rs:175:30:175:38 | write_all | This operation writes $@ to a log file. | test_logging.rs:175:66:175:73 | password | password |
| test_logging.rs:178:9:178:13 | write | test_logging.rs:178:41:178:48 | password | test_logging.rs:178:9:178:13 | write | This operation writes $@ to a log file. | test_logging.rs:178:41:178:48 | password | password |
| test_logging.rs:181:9:181:13 | write | test_logging.rs:181:41:181:48 | password | test_logging.rs:181:9:181:13 | write | This operation writes $@ to a log file. | test_logging.rs:181:41:181:48 | password | password |
| test_logging.rs:44:5:44:36 | ...::log | test_logging.rs:44:28:44:35 | password | test_logging.rs:44:5:44:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:44:28:44:35 | password | password |
| test_logging.rs:45:5:45:35 | ...::log | test_logging.rs:45:27:45:34 | password | test_logging.rs:45:5:45:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:45:27:45:34 | password | password |
| test_logging.rs:46:5:46:36 | ...::log | test_logging.rs:46:28:46:35 | password | test_logging.rs:46:5:46:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:46:28:46:35 | password | password |
| test_logging.rs:47:5:47:35 | ...::log | test_logging.rs:47:27:47:34 | password | test_logging.rs:47:5:47:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:47:27:47:34 | password | password |
| test_logging.rs:48:5:48:48 | ...::log | test_logging.rs:48:40:48:47 | password | test_logging.rs:48:5:48:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:48:40:48:47 | password | password |
| test_logging.rs:53:5:53:36 | ...::log | test_logging.rs:53:28:53:35 | password | test_logging.rs:53:5:53:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:53:28:53:35 | password | password |
| test_logging.rs:55:5:55:49 | ...::log | test_logging.rs:55:41:55:48 | password | test_logging.rs:55:5:55:49 | ...::log | This operation writes $@ to a log file. | test_logging.rs:55:41:55:48 | password | password |
| test_logging.rs:57:5:57:47 | ...::log | test_logging.rs:57:39:57:46 | password | test_logging.rs:57:5:57:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:57:39:57:46 | password | password |
| test_logging.rs:58:5:58:34 | ...::log | test_logging.rs:58:24:58:31 | password | test_logging.rs:58:5:58:34 | ...::log | This operation writes $@ to a log file. | test_logging.rs:58:24:58:31 | password | password |
| test_logging.rs:59:5:59:36 | ...::log | test_logging.rs:59:24:59:31 | password | test_logging.rs:59:5:59:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:59:24:59:31 | password | password |
| test_logging.rs:61:5:61:54 | ...::log | test_logging.rs:61:46:61:53 | password | test_logging.rs:61:5:61:54 | ...::log | This operation writes $@ to a log file. | test_logging.rs:61:46:61:53 | password | password |
| test_logging.rs:62:5:62:55 | ...::log | test_logging.rs:62:21:62:28 | password | test_logging.rs:62:5:62:55 | ...::log | This operation writes $@ to a log file. | test_logging.rs:62:21:62:28 | password | password |
| test_logging.rs:66:5:66:48 | ...::log | test_logging.rs:66:40:66:47 | password | test_logging.rs:66:5:66:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:66:40:66:47 | password | password |
| test_logging.rs:68:5:68:66 | ...::log | test_logging.rs:68:58:68:65 | password | test_logging.rs:68:5:68:66 | ...::log | This operation writes $@ to a log file. | test_logging.rs:68:58:68:65 | password | password |
| test_logging.rs:69:5:69:67 | ...::log | test_logging.rs:69:19:69:26 | password | test_logging.rs:69:5:69:67 | ...::log | This operation writes $@ to a log file. | test_logging.rs:69:19:69:26 | password | password |
| test_logging.rs:73:5:73:47 | ...::log | test_logging.rs:73:39:73:46 | password | test_logging.rs:73:5:73:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:73:39:73:46 | password | password |
| test_logging.rs:75:5:75:65 | ...::log | test_logging.rs:75:57:75:64 | password | test_logging.rs:75:5:75:65 | ...::log | This operation writes $@ to a log file. | test_logging.rs:75:57:75:64 | password | password |
| test_logging.rs:76:5:76:51 | ...::log | test_logging.rs:76:21:76:28 | password | test_logging.rs:76:5:76:51 | ...::log | This operation writes $@ to a log file. | test_logging.rs:76:21:76:28 | password | password |
| test_logging.rs:77:5:77:47 | ...::log | test_logging.rs:77:39:77:46 | password | test_logging.rs:77:5:77:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:77:39:77:46 | password | password |
| test_logging.rs:83:5:83:44 | ...::log | test_logging.rs:83:36:83:43 | password | test_logging.rs:83:5:83:44 | ...::log | This operation writes $@ to a log file. | test_logging.rs:83:36:83:43 | password | password |
| test_logging.rs:85:5:85:62 | ...::log | test_logging.rs:85:54:85:61 | password | test_logging.rs:85:5:85:62 | ...::log | This operation writes $@ to a log file. | test_logging.rs:85:54:85:61 | password | password |
| test_logging.rs:86:5:86:48 | ...::log | test_logging.rs:86:21:86:28 | password | test_logging.rs:86:5:86:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:86:21:86:28 | password | password |
| test_logging.rs:87:5:87:44 | ...::log | test_logging.rs:87:36:87:43 | password | test_logging.rs:87:5:87:44 | ...::log | This operation writes $@ to a log file. | test_logging.rs:87:36:87:43 | password | password |
| test_logging.rs:95:5:95:29 | ...::log | test_logging.rs:94:15:94:22 | password | test_logging.rs:95:5:95:29 | ...::log | This operation writes $@ to a log file. | test_logging.rs:94:15:94:22 | password | password |
| test_logging.rs:98:5:98:19 | ...::log | test_logging.rs:97:42:97:49 | password | test_logging.rs:98:5:98:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:97:42:97:49 | password | password |
| test_logging.rs:101:5:101:19 | ...::log | test_logging.rs:100:38:100:45 | password | test_logging.rs:101:5:101:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:100:38:100:45 | password | password |
| test_logging.rs:119:5:119:42 | ...::log | test_logging.rs:119:28:119:41 | get_password(...) | test_logging.rs:119:5:119:42 | ...::log | This operation writes $@ to a log file. | test_logging.rs:119:28:119:41 | get_password(...) | get_password(...) |
| test_logging.rs:132:5:132:32 | ...::log | test_logging.rs:130:25:130:32 | password | test_logging.rs:132:5:132:32 | ...::log | This operation writes $@ to a log file. | test_logging.rs:130:25:130:32 | password | password |
| test_logging.rs:171:22:171:31 | log_expect | test_logging.rs:171:70:171:78 | password2 | test_logging.rs:171:22:171:31 | log_expect | This operation writes $@ to a log file. | test_logging.rs:171:70:171:78 | password2 | password2 |
| test_logging.rs:175:24:175:33 | log_expect | test_logging.rs:175:72:175:80 | password2 | test_logging.rs:175:24:175:33 | log_expect | This operation writes $@ to a log file. | test_logging.rs:175:72:175:80 | password2 | password2 |
| test_logging.rs:183:25:183:34 | log_unwrap | test_logging.rs:182:51:182:59 | password2 | test_logging.rs:183:25:183:34 | log_unwrap | This operation writes $@ to a log file. | test_logging.rs:182:51:182:59 | password2 | password2 |
| test_logging.rs:187:5:187:38 | ...::_print | test_logging.rs:187:30:187:37 | password | test_logging.rs:187:5:187:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:187:30:187:37 | password | password |
| test_logging.rs:188:5:188:38 | ...::_print | test_logging.rs:188:30:188:37 | password | test_logging.rs:188:5:188:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:188:30:188:37 | password | password |
| test_logging.rs:189:5:189:39 | ...::_eprint | test_logging.rs:189:31:189:38 | password | test_logging.rs:189:5:189:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:189:31:189:38 | password | password |
| test_logging.rs:190:5:190:39 | ...::_eprint | test_logging.rs:190:31:190:38 | password | test_logging.rs:190:5:190:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:190:31:190:38 | password | password |
| test_logging.rs:193:16:193:47 | ...::panic_fmt | test_logging.rs:193:39:193:46 | password | test_logging.rs:193:16:193:47 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:193:39:193:46 | password | password |
| test_logging.rs:194:16:194:46 | ...::panic_fmt | test_logging.rs:194:38:194:45 | password | test_logging.rs:194:16:194:46 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:194:38:194:45 | password | password |
| test_logging.rs:195:16:195:55 | ...::panic_fmt | test_logging.rs:195:47:195:54 | password | test_logging.rs:195:16:195:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:195:47:195:54 | password | password |
| test_logging.rs:196:16:196:53 | ...::panic_fmt | test_logging.rs:196:45:196:52 | password | test_logging.rs:196:16:196:53 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:196:45:196:52 | password | password |
| test_logging.rs:197:16:197:55 | ...::panic_fmt | test_logging.rs:197:47:197:54 | password | test_logging.rs:197:16:197:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:197:47:197:54 | password | password |
| test_logging.rs:198:16:198:57 | ...::assert_failed | test_logging.rs:198:49:198:56 | password | test_logging.rs:198:16:198:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:198:49:198:56 | password | password |
| test_logging.rs:199:16:199:57 | ...::assert_failed | test_logging.rs:199:49:199:56 | password | test_logging.rs:199:16:199:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:199:49:199:56 | password | password |
| test_logging.rs:200:16:200:61 | ...::panic_fmt | test_logging.rs:200:53:200:60 | password | test_logging.rs:200:16:200:61 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:200:53:200:60 | password | password |
| test_logging.rs:201:16:201:63 | ...::assert_failed | test_logging.rs:201:55:201:62 | password | test_logging.rs:201:16:201:63 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:201:55:201:62 | password | password |
| test_logging.rs:202:17:202:64 | ...::assert_failed | test_logging.rs:202:56:202:63 | password | test_logging.rs:202:17:202:64 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:202:56:202:63 | password | password |
| test_logging.rs:203:27:203:32 | expect | test_logging.rs:203:58:203:65 | password | test_logging.rs:203:27:203:32 | expect | This operation writes $@ to a log file. | test_logging.rs:203:58:203:65 | password | password |
| test_logging.rs:209:30:209:34 | write | test_logging.rs:209:62:209:69 | password | test_logging.rs:209:30:209:34 | write | This operation writes $@ to a log file. | test_logging.rs:209:62:209:69 | password | password |
| test_logging.rs:210:30:210:38 | write_all | test_logging.rs:210:66:210:73 | password | test_logging.rs:210:30:210:38 | write_all | This operation writes $@ to a log file. | test_logging.rs:210:66:210:73 | password | password |
| test_logging.rs:213:9:213:13 | write | test_logging.rs:213:41:213:48 | password | test_logging.rs:213:9:213:13 | write | This operation writes $@ to a log file. | test_logging.rs:213:41:213:48 | password | password |
| test_logging.rs:216:9:216:13 | write | test_logging.rs:216:41:216:48 | password | test_logging.rs:216:9:216:13 | write | This operation writes $@ to a log file. | test_logging.rs:216:41:216:48 | password | password |
edges
| test_logging.rs:42:12:42:35 | MacroExpr | test_logging.rs:42:5:42:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:42:28:42:35 | password | test_logging.rs:42:12:42:35 | MacroExpr | provenance | |
| test_logging.rs:43:12:43:35 | MacroExpr | test_logging.rs:43:5:43:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:43:12:43:35 | MacroExpr | test_logging.rs:43:5:43:36 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:43:28:43:35 | password | test_logging.rs:43:12:43:35 | MacroExpr | provenance | |
| test_logging.rs:44:11:44:34 | MacroExpr | test_logging.rs:44:5:44:35 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:44:27:44:34 | password | test_logging.rs:44:11:44:34 | MacroExpr | provenance | |
| test_logging.rs:45:12:45:35 | MacroExpr | test_logging.rs:45:5:45:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:45:28:45:35 | password | test_logging.rs:45:12:45:35 | MacroExpr | provenance | |
| test_logging.rs:46:11:46:34 | MacroExpr | test_logging.rs:46:5:46:35 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:46:27:46:34 | password | test_logging.rs:46:11:46:34 | MacroExpr | provenance | |
| test_logging.rs:47:24:47:47 | MacroExpr | test_logging.rs:47:5:47:48 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:47:40:47:47 | password | test_logging.rs:47:24:47:47 | MacroExpr | provenance | |
| test_logging.rs:52:12:52:35 | MacroExpr | test_logging.rs:52:5:52:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:52:28:52:35 | password | test_logging.rs:52:12:52:35 | MacroExpr | provenance | |
| test_logging.rs:54:12:54:48 | MacroExpr | test_logging.rs:54:5:54:49 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:54:41:54:48 | password | test_logging.rs:54:12:54:48 | MacroExpr | provenance | |
| test_logging.rs:56:12:56:46 | MacroExpr | test_logging.rs:56:5:56:47 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:56:39:56:46 | password | test_logging.rs:56:12:56:46 | MacroExpr | provenance | |
| test_logging.rs:57:12:57:33 | MacroExpr | test_logging.rs:57:5:57:34 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:57:24:57:31 | password | test_logging.rs:57:12:57:33 | MacroExpr | provenance | |
| test_logging.rs:58:12:58:35 | MacroExpr | test_logging.rs:58:5:58:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:58:24:58:31 | password | test_logging.rs:58:12:58:35 | MacroExpr | provenance | |
| test_logging.rs:60:30:60:53 | MacroExpr | test_logging.rs:60:5:60:54 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:60:46:60:53 | password | test_logging.rs:60:30:60:53 | MacroExpr | provenance | |
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:61:20:61:28 | &password | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:61:20:61:28 | &password [&ref] | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password | provenance | Config |
| test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password [&ref] | provenance | |
| test_logging.rs:65:24:65:47 | MacroExpr | test_logging.rs:65:5:65:48 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:65:40:65:47 | password | test_logging.rs:65:24:65:47 | MacroExpr | provenance | |
| test_logging.rs:67:42:67:65 | MacroExpr | test_logging.rs:67:5:67:66 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:67:58:67:65 | password | test_logging.rs:67:42:67:65 | MacroExpr | provenance | |
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:68:18:68:26 | &password | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:68:18:68:26 | &password [&ref] | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password | provenance | Config |
| test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password [&ref] | provenance | |
| test_logging.rs:72:23:72:46 | MacroExpr | test_logging.rs:72:5:72:47 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:72:39:72:46 | password | test_logging.rs:72:23:72:46 | MacroExpr | provenance | |
| test_logging.rs:74:41:74:64 | MacroExpr | test_logging.rs:74:5:74:65 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:74:57:74:64 | password | test_logging.rs:74:41:74:64 | MacroExpr | provenance | |
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | test_logging.rs:75:5:75:51 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:75:20:75:28 | &password | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:75:20:75:28 | &password [&ref] | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password | provenance | Config |
| test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password [&ref] | provenance | |
| test_logging.rs:76:23:76:46 | MacroExpr | test_logging.rs:76:5:76:47 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:76:39:76:46 | password | test_logging.rs:76:23:76:46 | MacroExpr | provenance | |
| test_logging.rs:82:20:82:43 | MacroExpr | test_logging.rs:82:5:82:44 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:82:36:82:43 | password | test_logging.rs:82:20:82:43 | MacroExpr | provenance | |
| test_logging.rs:84:38:84:61 | MacroExpr | test_logging.rs:84:5:84:62 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:84:54:84:61 | password | test_logging.rs:84:38:84:61 | MacroExpr | provenance | |
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | test_logging.rs:85:5:85:48 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
| test_logging.rs:85:20:85:28 | &password | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:85:20:85:28 | &password [&ref] | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password | provenance | Config |
| test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password [&ref] | provenance | |
| test_logging.rs:86:20:86:43 | MacroExpr | test_logging.rs:86:5:86:44 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:86:36:86:43 | password | test_logging.rs:86:20:86:43 | MacroExpr | provenance | |
| test_logging.rs:93:9:93:10 | m1 | test_logging.rs:94:11:94:28 | MacroExpr | provenance | |
| test_logging.rs:93:14:93:22 | &password | test_logging.rs:93:9:93:10 | m1 | provenance | |
| test_logging.rs:93:15:93:22 | password | test_logging.rs:93:14:93:22 | &password | provenance | Config |
| test_logging.rs:94:11:94:28 | MacroExpr | test_logging.rs:94:5:94:29 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:96:9:96:10 | m2 | test_logging.rs:97:11:97:18 | MacroExpr | provenance | |
| test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:9:96:10 | m2 | provenance | |
| test_logging.rs:96:42:96:49 | password | test_logging.rs:96:41:96:49 | &password | provenance | Config |
| test_logging.rs:97:11:97:18 | MacroExpr | test_logging.rs:97:5:97:19 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:99:9:99:10 | m3 | test_logging.rs:100:11:100:18 | MacroExpr | provenance | |
| test_logging.rs:99:14:99:46 | res | test_logging.rs:99:22:99:45 | { ... } | provenance | |
| test_logging.rs:99:22:99:45 | ...::format(...) | test_logging.rs:99:14:99:46 | res | provenance | |
| test_logging.rs:99:22:99:45 | ...::must_use(...) | test_logging.rs:99:9:99:10 | m3 | provenance | |
| test_logging.rs:99:22:99:45 | MacroExpr | test_logging.rs:99:22:99:45 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:99:22:99:45 | { ... } | test_logging.rs:99:22:99:45 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:99:38:99:45 | password | test_logging.rs:99:22:99:45 | MacroExpr | provenance | |
| test_logging.rs:100:11:100:18 | MacroExpr | test_logging.rs:100:5:100:19 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:118:12:118:41 | MacroExpr | test_logging.rs:118:5:118:42 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:118:28:118:41 | get_password(...) | test_logging.rs:118:12:118:41 | MacroExpr | provenance | |
| test_logging.rs:129:9:129:10 | t1 [tuple.1] | test_logging.rs:131:28:131:29 | t1 [tuple.1] | provenance | |
| test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | test_logging.rs:129:9:129:10 | t1 [tuple.1] | provenance | |
| test_logging.rs:129:25:129:32 | password | test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | provenance | |
| test_logging.rs:131:12:131:31 | MacroExpr | test_logging.rs:131:5:131:32 | ...::log | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:131:28:131:29 | t1 [tuple.1] | test_logging.rs:131:28:131:31 | t1.1 | provenance | |
| test_logging.rs:131:28:131:31 | t1.1 | test_logging.rs:131:12:131:31 | MacroExpr | provenance | |
| test_logging.rs:152:12:152:37 | MacroExpr | test_logging.rs:152:5:152:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
| test_logging.rs:152:30:152:37 | password | test_logging.rs:152:12:152:37 | MacroExpr | provenance | |
| test_logging.rs:153:14:153:37 | MacroExpr | test_logging.rs:153:5:153:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
| test_logging.rs:153:30:153:37 | password | test_logging.rs:153:14:153:37 | MacroExpr | provenance | |
| test_logging.rs:154:13:154:38 | MacroExpr | test_logging.rs:154:5:154:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
| test_logging.rs:154:31:154:38 | password | test_logging.rs:154:13:154:38 | MacroExpr | provenance | |
| test_logging.rs:155:15:155:38 | MacroExpr | test_logging.rs:155:5:155:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
| test_logging.rs:155:31:155:38 | password | test_logging.rs:155:15:155:38 | MacroExpr | provenance | |
| test_logging.rs:158:23:158:46 | MacroExpr | test_logging.rs:158:16:158:47 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:158:39:158:46 | password | test_logging.rs:158:23:158:46 | MacroExpr | provenance | |
| test_logging.rs:159:22:159:45 | MacroExpr | test_logging.rs:159:16:159:46 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:159:38:159:45 | password | test_logging.rs:159:22:159:45 | MacroExpr | provenance | |
| test_logging.rs:160:31:160:54 | MacroExpr | test_logging.rs:160:16:160:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:160:47:160:54 | password | test_logging.rs:160:31:160:54 | MacroExpr | provenance | |
| test_logging.rs:161:29:161:52 | MacroExpr | test_logging.rs:161:16:161:53 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:161:45:161:52 | password | test_logging.rs:161:29:161:52 | MacroExpr | provenance | |
| test_logging.rs:162:31:162:54 | MacroExpr | test_logging.rs:162:16:162:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:162:47:162:54 | password | test_logging.rs:162:31:162:54 | MacroExpr | provenance | |
| test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | test_logging.rs:163:16:163:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:163:33:163:56 | MacroExpr | test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:163:49:163:56 | password | test_logging.rs:163:33:163:56 | MacroExpr | provenance | |
| test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | test_logging.rs:164:16:164:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:164:33:164:56 | MacroExpr | test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:164:49:164:56 | password | test_logging.rs:164:33:164:56 | MacroExpr | provenance | |
| test_logging.rs:165:37:165:60 | MacroExpr | test_logging.rs:165:16:165:61 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:165:53:165:60 | password | test_logging.rs:165:37:165:60 | MacroExpr | provenance | |
| test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | test_logging.rs:166:16:166:63 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:166:39:166:62 | MacroExpr | test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:166:55:166:62 | password | test_logging.rs:166:39:166:62 | MacroExpr | provenance | |
| test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | test_logging.rs:167:17:167:64 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:167:40:167:63 | MacroExpr | test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:167:56:167:63 | password | test_logging.rs:167:40:167:63 | MacroExpr | provenance | |
| test_logging.rs:168:34:168:66 | res | test_logging.rs:168:42:168:65 | { ... } | provenance | |
| test_logging.rs:168:34:168:75 | ... .as_str() | test_logging.rs:168:27:168:32 | expect | provenance | MaD:1 Sink:MaD:1 |
| test_logging.rs:168:42:168:65 | ...::format(...) | test_logging.rs:168:34:168:66 | res | provenance | |
| test_logging.rs:168:42:168:65 | ...::must_use(...) | test_logging.rs:168:34:168:75 | ... .as_str() | provenance | MaD:12 |
| test_logging.rs:168:42:168:65 | MacroExpr | test_logging.rs:168:42:168:65 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:168:42:168:65 | { ... } | test_logging.rs:168:42:168:65 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:168:58:168:65 | password | test_logging.rs:168:42:168:65 | MacroExpr | provenance | |
| test_logging.rs:174:36:174:70 | res | test_logging.rs:174:44:174:69 | { ... } | provenance | |
| test_logging.rs:174:36:174:81 | ... .as_bytes() | test_logging.rs:174:30:174:34 | write | provenance | MaD:5 Sink:MaD:5 |
| test_logging.rs:174:44:174:69 | ...::format(...) | test_logging.rs:174:36:174:70 | res | provenance | |
| test_logging.rs:174:44:174:69 | ...::must_use(...) | test_logging.rs:174:36:174:81 | ... .as_bytes() | provenance | MaD:11 |
| test_logging.rs:174:44:174:69 | MacroExpr | test_logging.rs:174:44:174:69 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:174:44:174:69 | { ... } | test_logging.rs:174:44:174:69 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:174:62:174:69 | password | test_logging.rs:174:44:174:69 | MacroExpr | provenance | |
| test_logging.rs:175:40:175:74 | res | test_logging.rs:175:48:175:73 | { ... } | provenance | |
| test_logging.rs:175:40:175:85 | ... .as_bytes() | test_logging.rs:175:30:175:38 | write_all | provenance | MaD:6 Sink:MaD:6 |
| test_logging.rs:175:48:175:73 | ...::format(...) | test_logging.rs:175:40:175:74 | res | provenance | |
| test_logging.rs:175:48:175:73 | ...::must_use(...) | test_logging.rs:175:40:175:85 | ... .as_bytes() | provenance | MaD:11 |
| test_logging.rs:175:48:175:73 | MacroExpr | test_logging.rs:175:48:175:73 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:175:48:175:73 | { ... } | test_logging.rs:175:48:175:73 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:175:66:175:73 | password | test_logging.rs:175:48:175:73 | MacroExpr | provenance | |
| test_logging.rs:178:15:178:49 | res | test_logging.rs:178:23:178:48 | { ... } | provenance | |
| test_logging.rs:178:15:178:60 | ... .as_bytes() | test_logging.rs:178:9:178:13 | write | provenance | MaD:5 Sink:MaD:5 |
| test_logging.rs:178:23:178:48 | ...::format(...) | test_logging.rs:178:15:178:49 | res | provenance | |
| test_logging.rs:178:23:178:48 | ...::must_use(...) | test_logging.rs:178:15:178:60 | ... .as_bytes() | provenance | MaD:11 |
| test_logging.rs:178:23:178:48 | MacroExpr | test_logging.rs:178:23:178:48 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:178:23:178:48 | { ... } | test_logging.rs:178:23:178:48 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:178:41:178:48 | password | test_logging.rs:178:23:178:48 | MacroExpr | provenance | |
| test_logging.rs:181:15:181:49 | res | test_logging.rs:181:23:181:48 | { ... } | provenance | |
| test_logging.rs:181:15:181:60 | ... .as_bytes() | test_logging.rs:181:9:181:13 | write | provenance | MaD:4 Sink:MaD:4 |
| test_logging.rs:181:23:181:48 | ...::format(...) | test_logging.rs:181:15:181:49 | res | provenance | |
| test_logging.rs:181:23:181:48 | ...::must_use(...) | test_logging.rs:181:15:181:60 | ... .as_bytes() | provenance | MaD:11 |
| test_logging.rs:181:23:181:48 | MacroExpr | test_logging.rs:181:23:181:48 | ...::format(...) | provenance | MaD:13 |
| test_logging.rs:181:23:181:48 | { ... } | test_logging.rs:181:23:181:48 | ...::must_use(...) | provenance | MaD:14 |
| test_logging.rs:181:41:181:48 | password | test_logging.rs:181:23:181:48 | MacroExpr | provenance | |
| test_logging.rs:44:12:44:35 | MacroExpr | test_logging.rs:44:5:44:36 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:44:28:44:35 | password | test_logging.rs:44:12:44:35 | MacroExpr | provenance | |
| test_logging.rs:45:11:45:34 | MacroExpr | test_logging.rs:45:5:45:35 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:45:27:45:34 | password | test_logging.rs:45:11:45:34 | MacroExpr | provenance | |
| test_logging.rs:46:12:46:35 | MacroExpr | test_logging.rs:46:5:46:36 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:46:28:46:35 | password | test_logging.rs:46:12:46:35 | MacroExpr | provenance | |
| test_logging.rs:47:11:47:34 | MacroExpr | test_logging.rs:47:5:47:35 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:47:27:47:34 | password | test_logging.rs:47:11:47:34 | MacroExpr | provenance | |
| test_logging.rs:48:24:48:47 | MacroExpr | test_logging.rs:48:5:48:48 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:48:40:48:47 | password | test_logging.rs:48:24:48:47 | MacroExpr | provenance | |
| test_logging.rs:53:12:53:35 | MacroExpr | test_logging.rs:53:5:53:36 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:53:28:53:35 | password | test_logging.rs:53:12:53:35 | MacroExpr | provenance | |
| test_logging.rs:55:12:55:48 | MacroExpr | test_logging.rs:55:5:55:49 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:55:41:55:48 | password | test_logging.rs:55:12:55:48 | MacroExpr | provenance | |
| test_logging.rs:57:12:57:46 | MacroExpr | test_logging.rs:57:5:57:47 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:57:39:57:46 | password | test_logging.rs:57:12:57:46 | MacroExpr | provenance | |
| test_logging.rs:58:12:58:33 | MacroExpr | test_logging.rs:58:5:58:34 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:58:24:58:31 | password | test_logging.rs:58:12:58:33 | MacroExpr | provenance | |
| test_logging.rs:59:12:59:35 | MacroExpr | test_logging.rs:59:5:59:36 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:59:24:59:31 | password | test_logging.rs:59:12:59:35 | MacroExpr | provenance | |
| test_logging.rs:61:30:61:53 | MacroExpr | test_logging.rs:61:5:61:54 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:61:46:61:53 | password | test_logging.rs:61:30:61:53 | MacroExpr | provenance | |
| test_logging.rs:62:20:62:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:62:5:62:55 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:62:20:62:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:62:5:62:55 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:62:20:62:28 | &... [&ref, tuple.0] | test_logging.rs:62:5:62:55 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:62:20:62:28 | &password | test_logging.rs:62:20:62:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:62:20:62:28 | &password [&ref] | test_logging.rs:62:20:62:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:62:20:62:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:62:20:62:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:62:20:62:28 | TupleExpr [tuple.0] | test_logging.rs:62:20:62:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:62:21:62:28 | password | test_logging.rs:62:20:62:28 | &password | provenance | Config |
| test_logging.rs:62:21:62:28 | password | test_logging.rs:62:20:62:28 | &password [&ref] | provenance | |
| test_logging.rs:66:24:66:47 | MacroExpr | test_logging.rs:66:5:66:48 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:66:40:66:47 | password | test_logging.rs:66:24:66:47 | MacroExpr | provenance | |
| test_logging.rs:68:42:68:65 | MacroExpr | test_logging.rs:68:5:68:66 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:68:58:68:65 | password | test_logging.rs:68:42:68:65 | MacroExpr | provenance | |
| test_logging.rs:69:18:69:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:69:5:69:67 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:69:18:69:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:69:5:69:67 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:69:18:69:26 | &... [&ref, tuple.0] | test_logging.rs:69:5:69:67 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:69:18:69:26 | &password | test_logging.rs:69:18:69:26 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:69:18:69:26 | &password [&ref] | test_logging.rs:69:18:69:26 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:69:18:69:26 | TupleExpr [tuple.0, &ref] | test_logging.rs:69:18:69:26 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:69:18:69:26 | TupleExpr [tuple.0] | test_logging.rs:69:18:69:26 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:69:19:69:26 | password | test_logging.rs:69:18:69:26 | &password | provenance | Config |
| test_logging.rs:69:19:69:26 | password | test_logging.rs:69:18:69:26 | &password [&ref] | provenance | |
| test_logging.rs:73:23:73:46 | MacroExpr | test_logging.rs:73:5:73:47 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:73:39:73:46 | password | test_logging.rs:73:23:73:46 | MacroExpr | provenance | |
| test_logging.rs:75:41:75:64 | MacroExpr | test_logging.rs:75:5:75:65 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:75:57:75:64 | password | test_logging.rs:75:41:75:64 | MacroExpr | provenance | |
| test_logging.rs:76:20:76:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:76:5:76:51 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:76:20:76:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:76:5:76:51 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:76:20:76:28 | &... [&ref, tuple.0] | test_logging.rs:76:5:76:51 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:76:20:76:28 | &password | test_logging.rs:76:20:76:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:76:20:76:28 | &password [&ref] | test_logging.rs:76:20:76:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:76:20:76:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:76:20:76:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:76:20:76:28 | TupleExpr [tuple.0] | test_logging.rs:76:20:76:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:76:21:76:28 | password | test_logging.rs:76:20:76:28 | &password | provenance | Config |
| test_logging.rs:76:21:76:28 | password | test_logging.rs:76:20:76:28 | &password [&ref] | provenance | |
| test_logging.rs:77:23:77:46 | MacroExpr | test_logging.rs:77:5:77:47 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:77:39:77:46 | password | test_logging.rs:77:23:77:46 | MacroExpr | provenance | |
| test_logging.rs:83:20:83:43 | MacroExpr | test_logging.rs:83:5:83:44 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:83:36:83:43 | password | test_logging.rs:83:20:83:43 | MacroExpr | provenance | |
| test_logging.rs:85:38:85:61 | MacroExpr | test_logging.rs:85:5:85:62 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:85:54:85:61 | password | test_logging.rs:85:38:85:61 | MacroExpr | provenance | |
| test_logging.rs:86:20:86:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:86:5:86:48 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:86:20:86:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:86:5:86:48 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:86:20:86:28 | &... [&ref, tuple.0] | test_logging.rs:86:5:86:48 | ...::log | provenance | MaD:13 Sink:MaD:13 Sink:MaD:13 |
| test_logging.rs:86:20:86:28 | &password | test_logging.rs:86:20:86:28 | TupleExpr [tuple.0] | provenance | |
| test_logging.rs:86:20:86:28 | &password [&ref] | test_logging.rs:86:20:86:28 | TupleExpr [tuple.0, &ref] | provenance | |
| test_logging.rs:86:20:86:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:86:20:86:28 | &... [&ref, tuple.0, &ref] | provenance | |
| test_logging.rs:86:20:86:28 | TupleExpr [tuple.0] | test_logging.rs:86:20:86:28 | &... [&ref, tuple.0] | provenance | |
| test_logging.rs:86:21:86:28 | password | test_logging.rs:86:20:86:28 | &password | provenance | Config |
| test_logging.rs:86:21:86:28 | password | test_logging.rs:86:20:86:28 | &password [&ref] | provenance | |
| test_logging.rs:87:20:87:43 | MacroExpr | test_logging.rs:87:5:87:44 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:87:36:87:43 | password | test_logging.rs:87:20:87:43 | MacroExpr | provenance | |
| test_logging.rs:94:9:94:10 | m1 | test_logging.rs:95:11:95:28 | MacroExpr | provenance | |
| test_logging.rs:94:14:94:22 | &password | test_logging.rs:94:9:94:10 | m1 | provenance | |
| test_logging.rs:94:15:94:22 | password | test_logging.rs:94:14:94:22 | &password | provenance | Config |
| test_logging.rs:95:11:95:28 | MacroExpr | test_logging.rs:95:5:95:29 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:97:9:97:10 | m2 | test_logging.rs:98:11:98:18 | MacroExpr | provenance | |
| test_logging.rs:97:41:97:49 | &password | test_logging.rs:97:9:97:10 | m2 | provenance | |
| test_logging.rs:97:42:97:49 | password | test_logging.rs:97:41:97:49 | &password | provenance | Config |
| test_logging.rs:98:11:98:18 | MacroExpr | test_logging.rs:98:5:98:19 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:100:9:100:10 | m3 | test_logging.rs:101:11:101:18 | MacroExpr | provenance | |
| test_logging.rs:100:14:100:46 | res | test_logging.rs:100:22:100:45 | { ... } | provenance | |
| test_logging.rs:100:22:100:45 | ...::format(...) | test_logging.rs:100:14:100:46 | res | provenance | |
| test_logging.rs:100:22:100:45 | ...::must_use(...) | test_logging.rs:100:9:100:10 | m3 | provenance | |
| test_logging.rs:100:22:100:45 | MacroExpr | test_logging.rs:100:22:100:45 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:100:22:100:45 | { ... } | test_logging.rs:100:22:100:45 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:100:38:100:45 | password | test_logging.rs:100:22:100:45 | MacroExpr | provenance | |
| test_logging.rs:101:11:101:18 | MacroExpr | test_logging.rs:101:5:101:19 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:119:12:119:41 | MacroExpr | test_logging.rs:119:5:119:42 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:119:28:119:41 | get_password(...) | test_logging.rs:119:12:119:41 | MacroExpr | provenance | |
| test_logging.rs:130:9:130:10 | t1 [tuple.1] | test_logging.rs:132:28:132:29 | t1 [tuple.1] | provenance | |
| test_logging.rs:130:14:130:33 | TupleExpr [tuple.1] | test_logging.rs:130:9:130:10 | t1 [tuple.1] | provenance | |
| test_logging.rs:130:25:130:32 | password | test_logging.rs:130:14:130:33 | TupleExpr [tuple.1] | provenance | |
| test_logging.rs:132:12:132:31 | MacroExpr | test_logging.rs:132:5:132:32 | ...::log | provenance | MaD:12 Sink:MaD:12 |
| test_logging.rs:132:28:132:29 | t1 [tuple.1] | test_logging.rs:132:28:132:31 | t1.1 | provenance | |
| test_logging.rs:132:28:132:31 | t1.1 | test_logging.rs:132:12:132:31 | MacroExpr | provenance | |
| test_logging.rs:171:33:171:79 | &... | test_logging.rs:171:22:171:31 | log_expect | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:171:33:171:79 | &... [&ref] | test_logging.rs:171:22:171:31 | log_expect | provenance | MaD:9 Sink:MaD:9 |
| test_logging.rs:171:34:171:79 | MacroExpr | test_logging.rs:171:33:171:79 | &... | provenance | Config |
| test_logging.rs:171:34:171:79 | MacroExpr | test_logging.rs:171:33:171:79 | &... [&ref] | provenance | |
| test_logging.rs:171:34:171:79 | res | test_logging.rs:171:42:171:78 | { ... } | provenance | |
| test_logging.rs:171:42:171:78 | ...::format(...) | test_logging.rs:171:34:171:79 | res | provenance | |
| test_logging.rs:171:42:171:78 | ...::must_use(...) | test_logging.rs:171:34:171:79 | MacroExpr | provenance | |
| test_logging.rs:171:42:171:78 | MacroExpr | test_logging.rs:171:42:171:78 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:171:42:171:78 | { ... } | test_logging.rs:171:42:171:78 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:171:70:171:78 | password2 | test_logging.rs:171:42:171:78 | MacroExpr | provenance | |
| test_logging.rs:175:35:175:81 | &... | test_logging.rs:175:24:175:33 | log_expect | provenance | MaD:10 Sink:MaD:10 |
| test_logging.rs:175:35:175:81 | &... [&ref] | test_logging.rs:175:24:175:33 | log_expect | provenance | MaD:10 Sink:MaD:10 |
| test_logging.rs:175:36:175:81 | MacroExpr | test_logging.rs:175:35:175:81 | &... | provenance | Config |
| test_logging.rs:175:36:175:81 | MacroExpr | test_logging.rs:175:35:175:81 | &... [&ref] | provenance | |
| test_logging.rs:175:36:175:81 | res | test_logging.rs:175:44:175:80 | { ... } | provenance | |
| test_logging.rs:175:44:175:80 | ...::format(...) | test_logging.rs:175:36:175:81 | res | provenance | |
| test_logging.rs:175:44:175:80 | ...::must_use(...) | test_logging.rs:175:36:175:81 | MacroExpr | provenance | |
| test_logging.rs:175:44:175:80 | MacroExpr | test_logging.rs:175:44:175:80 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:175:44:175:80 | { ... } | test_logging.rs:175:44:175:80 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:175:72:175:80 | password2 | test_logging.rs:175:44:175:80 | MacroExpr | provenance | |
| test_logging.rs:182:9:182:19 | err_result3 [Err] | test_logging.rs:183:13:183:23 | err_result3 [Err] | provenance | |
| test_logging.rs:182:47:182:60 | Err(...) [Err] | test_logging.rs:182:9:182:19 | err_result3 [Err] | provenance | |
| test_logging.rs:182:51:182:59 | password2 | test_logging.rs:182:47:182:60 | Err(...) [Err] | provenance | |
| test_logging.rs:183:13:183:23 | err_result3 [Err] | test_logging.rs:183:25:183:34 | log_unwrap | provenance | MaD:11 Sink:MaD:11 |
| test_logging.rs:187:12:187:37 | MacroExpr | test_logging.rs:187:5:187:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
| test_logging.rs:187:30:187:37 | password | test_logging.rs:187:12:187:37 | MacroExpr | provenance | |
| test_logging.rs:188:14:188:37 | MacroExpr | test_logging.rs:188:5:188:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
| test_logging.rs:188:30:188:37 | password | test_logging.rs:188:14:188:37 | MacroExpr | provenance | |
| test_logging.rs:189:13:189:38 | MacroExpr | test_logging.rs:189:5:189:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
| test_logging.rs:189:31:189:38 | password | test_logging.rs:189:13:189:38 | MacroExpr | provenance | |
| test_logging.rs:190:15:190:38 | MacroExpr | test_logging.rs:190:5:190:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
| test_logging.rs:190:31:190:38 | password | test_logging.rs:190:15:190:38 | MacroExpr | provenance | |
| test_logging.rs:193:23:193:46 | MacroExpr | test_logging.rs:193:16:193:47 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:193:39:193:46 | password | test_logging.rs:193:23:193:46 | MacroExpr | provenance | |
| test_logging.rs:194:22:194:45 | MacroExpr | test_logging.rs:194:16:194:46 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:194:38:194:45 | password | test_logging.rs:194:22:194:45 | MacroExpr | provenance | |
| test_logging.rs:195:31:195:54 | MacroExpr | test_logging.rs:195:16:195:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:195:47:195:54 | password | test_logging.rs:195:31:195:54 | MacroExpr | provenance | |
| test_logging.rs:196:29:196:52 | MacroExpr | test_logging.rs:196:16:196:53 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:196:45:196:52 | password | test_logging.rs:196:29:196:52 | MacroExpr | provenance | |
| test_logging.rs:197:31:197:54 | MacroExpr | test_logging.rs:197:16:197:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:197:47:197:54 | password | test_logging.rs:197:31:197:54 | MacroExpr | provenance | |
| test_logging.rs:198:33:198:56 | ...::Some(...) [Some] | test_logging.rs:198:16:198:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:198:33:198:56 | MacroExpr | test_logging.rs:198:33:198:56 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:198:49:198:56 | password | test_logging.rs:198:33:198:56 | MacroExpr | provenance | |
| test_logging.rs:199:33:199:56 | ...::Some(...) [Some] | test_logging.rs:199:16:199:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:199:33:199:56 | MacroExpr | test_logging.rs:199:33:199:56 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:199:49:199:56 | password | test_logging.rs:199:33:199:56 | MacroExpr | provenance | |
| test_logging.rs:200:37:200:60 | MacroExpr | test_logging.rs:200:16:200:61 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
| test_logging.rs:200:53:200:60 | password | test_logging.rs:200:37:200:60 | MacroExpr | provenance | |
| test_logging.rs:201:39:201:62 | ...::Some(...) [Some] | test_logging.rs:201:16:201:63 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:201:39:201:62 | MacroExpr | test_logging.rs:201:39:201:62 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:201:55:201:62 | password | test_logging.rs:201:39:201:62 | MacroExpr | provenance | |
| test_logging.rs:202:40:202:63 | ...::Some(...) [Some] | test_logging.rs:202:17:202:64 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
| test_logging.rs:202:40:202:63 | MacroExpr | test_logging.rs:202:40:202:63 | ...::Some(...) [Some] | provenance | |
| test_logging.rs:202:56:202:63 | password | test_logging.rs:202:40:202:63 | MacroExpr | provenance | |
| test_logging.rs:203:34:203:66 | res | test_logging.rs:203:42:203:65 | { ... } | provenance | |
| test_logging.rs:203:34:203:75 | ... .as_str() | test_logging.rs:203:27:203:32 | expect | provenance | MaD:1 Sink:MaD:1 |
| test_logging.rs:203:42:203:65 | ...::format(...) | test_logging.rs:203:34:203:66 | res | provenance | |
| test_logging.rs:203:42:203:65 | ...::must_use(...) | test_logging.rs:203:34:203:75 | ... .as_str() | provenance | MaD:15 |
| test_logging.rs:203:42:203:65 | MacroExpr | test_logging.rs:203:42:203:65 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:203:42:203:65 | { ... } | test_logging.rs:203:42:203:65 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:203:58:203:65 | password | test_logging.rs:203:42:203:65 | MacroExpr | provenance | |
| test_logging.rs:209:36:209:70 | res | test_logging.rs:209:44:209:69 | { ... } | provenance | |
| test_logging.rs:209:36:209:81 | ... .as_bytes() | test_logging.rs:209:30:209:34 | write | provenance | MaD:5 Sink:MaD:5 |
| test_logging.rs:209:44:209:69 | ...::format(...) | test_logging.rs:209:36:209:70 | res | provenance | |
| test_logging.rs:209:44:209:69 | ...::must_use(...) | test_logging.rs:209:36:209:81 | ... .as_bytes() | provenance | MaD:14 |
| test_logging.rs:209:44:209:69 | MacroExpr | test_logging.rs:209:44:209:69 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:209:44:209:69 | { ... } | test_logging.rs:209:44:209:69 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:209:62:209:69 | password | test_logging.rs:209:44:209:69 | MacroExpr | provenance | |
| test_logging.rs:210:40:210:74 | res | test_logging.rs:210:48:210:73 | { ... } | provenance | |
| test_logging.rs:210:40:210:85 | ... .as_bytes() | test_logging.rs:210:30:210:38 | write_all | provenance | MaD:6 Sink:MaD:6 |
| test_logging.rs:210:48:210:73 | ...::format(...) | test_logging.rs:210:40:210:74 | res | provenance | |
| test_logging.rs:210:48:210:73 | ...::must_use(...) | test_logging.rs:210:40:210:85 | ... .as_bytes() | provenance | MaD:14 |
| test_logging.rs:210:48:210:73 | MacroExpr | test_logging.rs:210:48:210:73 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:210:48:210:73 | { ... } | test_logging.rs:210:48:210:73 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:210:66:210:73 | password | test_logging.rs:210:48:210:73 | MacroExpr | provenance | |
| test_logging.rs:213:15:213:49 | res | test_logging.rs:213:23:213:48 | { ... } | provenance | |
| test_logging.rs:213:15:213:60 | ... .as_bytes() | test_logging.rs:213:9:213:13 | write | provenance | MaD:5 Sink:MaD:5 |
| test_logging.rs:213:23:213:48 | ...::format(...) | test_logging.rs:213:15:213:49 | res | provenance | |
| test_logging.rs:213:23:213:48 | ...::must_use(...) | test_logging.rs:213:15:213:60 | ... .as_bytes() | provenance | MaD:14 |
| test_logging.rs:213:23:213:48 | MacroExpr | test_logging.rs:213:23:213:48 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:213:23:213:48 | { ... } | test_logging.rs:213:23:213:48 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:213:41:213:48 | password | test_logging.rs:213:23:213:48 | MacroExpr | provenance | |
| test_logging.rs:216:15:216:49 | res | test_logging.rs:216:23:216:48 | { ... } | provenance | |
| test_logging.rs:216:15:216:60 | ... .as_bytes() | test_logging.rs:216:9:216:13 | write | provenance | MaD:4 Sink:MaD:4 |
| test_logging.rs:216:23:216:48 | ...::format(...) | test_logging.rs:216:15:216:49 | res | provenance | |
| test_logging.rs:216:23:216:48 | ...::must_use(...) | test_logging.rs:216:15:216:60 | ... .as_bytes() | provenance | MaD:14 |
| test_logging.rs:216:23:216:48 | MacroExpr | test_logging.rs:216:23:216:48 | ...::format(...) | provenance | MaD:16 |
| test_logging.rs:216:23:216:48 | { ... } | test_logging.rs:216:23:216:48 | ...::must_use(...) | provenance | MaD:17 |
| test_logging.rs:216:41:216:48 | password | test_logging.rs:216:23:216:48 | MacroExpr | provenance | |
models
| 1 | Sink: lang:core; <crate::option::Option>::expect; log-injection; Argument[0] |
| 2 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3].Field[crate::option::Option::Some(0)] |
@@ -224,218 +251,246 @@ models
| 6 | Sink: lang:std; <crate::io::stdio::StdoutLock as crate::io::Write>::write_all; log-injection; Argument[0] |
| 7 | Sink: lang:std; crate::io::stdio::_eprint; log-injection; Argument[0] |
| 8 | Sink: lang:std; crate::io::stdio::_print; log-injection; Argument[0] |
| 9 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[1] |
| 10 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[3] |
| 11 | Summary: lang:alloc; <crate::string::String>::as_bytes; Argument[self]; ReturnValue; value |
| 12 | Summary: lang:alloc; <crate::string::String>::as_str; Argument[self]; ReturnValue; value |
| 13 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint |
| 14 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value |
| 9 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; <crate::option::Option as crate::LogErrOption>::log_expect; log-injection; Argument[0] |
| 10 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; <crate::result::Result as crate::LogErrResult>::log_expect; log-injection; Argument[0] |
| 11 | Sink: repo:https://github.com/DesmondWillowbrook/rs-log_err:log_err; <crate::result::Result as crate::LogErrResult>::log_unwrap; log-injection; Argument[self].Field[crate::result::Result::Err(0)] |
| 12 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[1] |
| 13 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[3] |
| 14 | Summary: lang:alloc; <crate::string::String>::as_bytes; Argument[self]; ReturnValue; value |
| 15 | Summary: lang:alloc; <crate::string::String>::as_str; Argument[self]; ReturnValue; value |
| 16 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint |
| 17 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value |
nodes
| test_logging.rs:42:5:42:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:42:12:42:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:42:28:42:35 | password | semmle.label | password |
| test_logging.rs:43:5:43:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:43:12:43:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:43:28:43:35 | password | semmle.label | password |
| test_logging.rs:44:5:44:35 | ...::log | semmle.label | ...::log |
| test_logging.rs:44:11:44:34 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:44:27:44:34 | password | semmle.label | password |
| test_logging.rs:45:5:45:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:45:12:45:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:45:28:45:35 | password | semmle.label | password |
| test_logging.rs:46:5:46:35 | ...::log | semmle.label | ...::log |
| test_logging.rs:46:11:46:34 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:46:27:46:34 | password | semmle.label | password |
| test_logging.rs:47:5:47:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:47:24:47:47 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:47:40:47:47 | password | semmle.label | password |
| test_logging.rs:52:5:52:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:52:12:52:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:52:28:52:35 | password | semmle.label | password |
| test_logging.rs:54:5:54:49 | ...::log | semmle.label | ...::log |
| test_logging.rs:54:12:54:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:54:41:54:48 | password | semmle.label | password |
| test_logging.rs:56:5:56:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:56:12:56:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:56:39:56:46 | password | semmle.label | password |
| test_logging.rs:57:5:57:34 | ...::log | semmle.label | ...::log |
| test_logging.rs:57:12:57:33 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:57:24:57:31 | password | semmle.label | password |
| test_logging.rs:58:5:58:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:58:12:58:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:44:5:44:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:44:12:44:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:44:28:44:35 | password | semmle.label | password |
| test_logging.rs:45:5:45:35 | ...::log | semmle.label | ...::log |
| test_logging.rs:45:11:45:34 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:45:27:45:34 | password | semmle.label | password |
| test_logging.rs:46:5:46:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:46:12:46:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:46:28:46:35 | password | semmle.label | password |
| test_logging.rs:47:5:47:35 | ...::log | semmle.label | ...::log |
| test_logging.rs:47:11:47:34 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:47:27:47:34 | password | semmle.label | password |
| test_logging.rs:48:5:48:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:48:24:48:47 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:48:40:48:47 | password | semmle.label | password |
| test_logging.rs:53:5:53:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:53:12:53:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:53:28:53:35 | password | semmle.label | password |
| test_logging.rs:55:5:55:49 | ...::log | semmle.label | ...::log |
| test_logging.rs:55:12:55:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:55:41:55:48 | password | semmle.label | password |
| test_logging.rs:57:5:57:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:57:12:57:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:57:39:57:46 | password | semmle.label | password |
| test_logging.rs:58:5:58:34 | ...::log | semmle.label | ...::log |
| test_logging.rs:58:12:58:33 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:58:24:58:31 | password | semmle.label | password |
| test_logging.rs:60:5:60:54 | ...::log | semmle.label | ...::log |
| test_logging.rs:60:30:60:53 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:60:46:60:53 | password | semmle.label | password |
| test_logging.rs:61:5:61:55 | ...::log | semmle.label | ...::log |
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:61:20:61:28 | &password | semmle.label | &password |
| test_logging.rs:61:20:61:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:61:21:61:28 | password | semmle.label | password |
| test_logging.rs:65:5:65:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:65:24:65:47 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:65:40:65:47 | password | semmle.label | password |
| test_logging.rs:67:5:67:66 | ...::log | semmle.label | ...::log |
| test_logging.rs:67:42:67:65 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:67:58:67:65 | password | semmle.label | password |
| test_logging.rs:68:5:68:67 | ...::log | semmle.label | ...::log |
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:68:18:68:26 | &password | semmle.label | &password |
| test_logging.rs:68:18:68:26 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:68:19:68:26 | password | semmle.label | password |
| test_logging.rs:72:5:72:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:72:23:72:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:72:39:72:46 | password | semmle.label | password |
| test_logging.rs:74:5:74:65 | ...::log | semmle.label | ...::log |
| test_logging.rs:74:41:74:64 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:74:57:74:64 | password | semmle.label | password |
| test_logging.rs:75:5:75:51 | ...::log | semmle.label | ...::log |
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:75:20:75:28 | &password | semmle.label | &password |
| test_logging.rs:75:20:75:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:75:21:75:28 | password | semmle.label | password |
| test_logging.rs:76:5:76:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:76:23:76:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:76:39:76:46 | password | semmle.label | password |
| test_logging.rs:82:5:82:44 | ...::log | semmle.label | ...::log |
| test_logging.rs:82:20:82:43 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:82:36:82:43 | password | semmle.label | password |
| test_logging.rs:84:5:84:62 | ...::log | semmle.label | ...::log |
| test_logging.rs:84:38:84:61 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:84:54:84:61 | password | semmle.label | password |
| test_logging.rs:85:5:85:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:85:20:85:28 | &password | semmle.label | &password |
| test_logging.rs:85:20:85:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:85:21:85:28 | password | semmle.label | password |
| test_logging.rs:86:5:86:44 | ...::log | semmle.label | ...::log |
| test_logging.rs:86:20:86:43 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:86:36:86:43 | password | semmle.label | password |
| test_logging.rs:93:9:93:10 | m1 | semmle.label | m1 |
| test_logging.rs:93:14:93:22 | &password | semmle.label | &password |
| test_logging.rs:93:15:93:22 | password | semmle.label | password |
| test_logging.rs:94:5:94:29 | ...::log | semmle.label | ...::log |
| test_logging.rs:94:11:94:28 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:96:9:96:10 | m2 | semmle.label | m2 |
| test_logging.rs:96:41:96:49 | &password | semmle.label | &password |
| test_logging.rs:96:42:96:49 | password | semmle.label | password |
| test_logging.rs:97:5:97:19 | ...::log | semmle.label | ...::log |
| test_logging.rs:97:11:97:18 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:99:9:99:10 | m3 | semmle.label | m3 |
| test_logging.rs:99:14:99:46 | res | semmle.label | res |
| test_logging.rs:99:22:99:45 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:99:22:99:45 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:99:22:99:45 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:99:22:99:45 | { ... } | semmle.label | { ... } |
| test_logging.rs:99:38:99:45 | password | semmle.label | password |
| test_logging.rs:100:5:100:19 | ...::log | semmle.label | ...::log |
| test_logging.rs:100:11:100:18 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:118:5:118:42 | ...::log | semmle.label | ...::log |
| test_logging.rs:118:12:118:41 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:118:28:118:41 | get_password(...) | semmle.label | get_password(...) |
| test_logging.rs:129:9:129:10 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
| test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | semmle.label | TupleExpr [tuple.1] |
| test_logging.rs:129:25:129:32 | password | semmle.label | password |
| test_logging.rs:131:5:131:32 | ...::log | semmle.label | ...::log |
| test_logging.rs:131:12:131:31 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:131:28:131:29 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
| test_logging.rs:131:28:131:31 | t1.1 | semmle.label | t1.1 |
| test_logging.rs:152:5:152:38 | ...::_print | semmle.label | ...::_print |
| test_logging.rs:152:12:152:37 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:152:30:152:37 | password | semmle.label | password |
| test_logging.rs:153:5:153:38 | ...::_print | semmle.label | ...::_print |
| test_logging.rs:153:14:153:37 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:153:30:153:37 | password | semmle.label | password |
| test_logging.rs:154:5:154:39 | ...::_eprint | semmle.label | ...::_eprint |
| test_logging.rs:154:13:154:38 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:154:31:154:38 | password | semmle.label | password |
| test_logging.rs:155:5:155:39 | ...::_eprint | semmle.label | ...::_eprint |
| test_logging.rs:155:15:155:38 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:155:31:155:38 | password | semmle.label | password |
| test_logging.rs:158:16:158:47 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:158:23:158:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:158:39:158:46 | password | semmle.label | password |
| test_logging.rs:159:16:159:46 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:159:22:159:45 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:159:38:159:45 | password | semmle.label | password |
| test_logging.rs:160:16:160:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:160:31:160:54 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:160:47:160:54 | password | semmle.label | password |
| test_logging.rs:161:16:161:53 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:161:29:161:52 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:161:45:161:52 | password | semmle.label | password |
| test_logging.rs:162:16:162:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:162:31:162:54 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:162:47:162:54 | password | semmle.label | password |
| test_logging.rs:163:16:163:57 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:163:33:163:56 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:163:49:163:56 | password | semmle.label | password |
| test_logging.rs:164:16:164:57 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:164:33:164:56 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:164:49:164:56 | password | semmle.label | password |
| test_logging.rs:165:16:165:61 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:165:37:165:60 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:165:53:165:60 | password | semmle.label | password |
| test_logging.rs:166:16:166:63 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:166:39:166:62 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:166:55:166:62 | password | semmle.label | password |
| test_logging.rs:167:17:167:64 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:167:40:167:63 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:167:56:167:63 | password | semmle.label | password |
| test_logging.rs:168:27:168:32 | expect | semmle.label | expect |
| test_logging.rs:168:34:168:66 | res | semmle.label | res |
| test_logging.rs:168:34:168:75 | ... .as_str() | semmle.label | ... .as_str() |
| test_logging.rs:168:42:168:65 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:168:42:168:65 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:168:42:168:65 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:168:42:168:65 | { ... } | semmle.label | { ... } |
| test_logging.rs:168:58:168:65 | password | semmle.label | password |
| test_logging.rs:174:30:174:34 | write | semmle.label | write |
| test_logging.rs:174:36:174:70 | res | semmle.label | res |
| test_logging.rs:174:36:174:81 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:174:44:174:69 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:174:44:174:69 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:174:44:174:69 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:174:44:174:69 | { ... } | semmle.label | { ... } |
| test_logging.rs:174:62:174:69 | password | semmle.label | password |
| test_logging.rs:175:30:175:38 | write_all | semmle.label | write_all |
| test_logging.rs:175:40:175:74 | res | semmle.label | res |
| test_logging.rs:175:40:175:85 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:175:48:175:73 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:175:48:175:73 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:175:48:175:73 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:175:48:175:73 | { ... } | semmle.label | { ... } |
| test_logging.rs:175:66:175:73 | password | semmle.label | password |
| test_logging.rs:178:9:178:13 | write | semmle.label | write |
| test_logging.rs:178:15:178:49 | res | semmle.label | res |
| test_logging.rs:178:15:178:60 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:178:23:178:48 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:178:23:178:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:178:23:178:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:178:23:178:48 | { ... } | semmle.label | { ... } |
| test_logging.rs:178:41:178:48 | password | semmle.label | password |
| test_logging.rs:181:9:181:13 | write | semmle.label | write |
| test_logging.rs:181:15:181:49 | res | semmle.label | res |
| test_logging.rs:181:15:181:60 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:181:23:181:48 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:181:23:181:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:181:23:181:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:181:23:181:48 | { ... } | semmle.label | { ... } |
| test_logging.rs:181:41:181:48 | password | semmle.label | password |
| test_logging.rs:59:5:59:36 | ...::log | semmle.label | ...::log |
| test_logging.rs:59:12:59:35 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:59:24:59:31 | password | semmle.label | password |
| test_logging.rs:61:5:61:54 | ...::log | semmle.label | ...::log |
| test_logging.rs:61:30:61:53 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:61:46:61:53 | password | semmle.label | password |
| test_logging.rs:62:5:62:55 | ...::log | semmle.label | ...::log |
| test_logging.rs:62:20:62:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:62:20:62:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:62:20:62:28 | &password | semmle.label | &password |
| test_logging.rs:62:20:62:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:62:20:62:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:62:20:62:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:62:21:62:28 | password | semmle.label | password |
| test_logging.rs:66:5:66:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:66:24:66:47 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:66:40:66:47 | password | semmle.label | password |
| test_logging.rs:68:5:68:66 | ...::log | semmle.label | ...::log |
| test_logging.rs:68:42:68:65 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:68:58:68:65 | password | semmle.label | password |
| test_logging.rs:69:5:69:67 | ...::log | semmle.label | ...::log |
| test_logging.rs:69:18:69:26 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:69:18:69:26 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:69:18:69:26 | &password | semmle.label | &password |
| test_logging.rs:69:18:69:26 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:69:18:69:26 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:69:18:69:26 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:69:19:69:26 | password | semmle.label | password |
| test_logging.rs:73:5:73:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:73:23:73:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:73:39:73:46 | password | semmle.label | password |
| test_logging.rs:75:5:75:65 | ...::log | semmle.label | ...::log |
| test_logging.rs:75:41:75:64 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:75:57:75:64 | password | semmle.label | password |
| test_logging.rs:76:5:76:51 | ...::log | semmle.label | ...::log |
| test_logging.rs:76:20:76:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:76:20:76:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:76:20:76:28 | &password | semmle.label | &password |
| test_logging.rs:76:20:76:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:76:20:76:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:76:20:76:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:76:21:76:28 | password | semmle.label | password |
| test_logging.rs:77:5:77:47 | ...::log | semmle.label | ...::log |
| test_logging.rs:77:23:77:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:77:39:77:46 | password | semmle.label | password |
| test_logging.rs:83:5:83:44 | ...::log | semmle.label | ...::log |
| test_logging.rs:83:20:83:43 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:83:36:83:43 | password | semmle.label | password |
| test_logging.rs:85:5:85:62 | ...::log | semmle.label | ...::log |
| test_logging.rs:85:38:85:61 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:85:54:85:61 | password | semmle.label | password |
| test_logging.rs:86:5:86:48 | ...::log | semmle.label | ...::log |
| test_logging.rs:86:20:86:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
| test_logging.rs:86:20:86:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
| test_logging.rs:86:20:86:28 | &password | semmle.label | &password |
| test_logging.rs:86:20:86:28 | &password [&ref] | semmle.label | &password [&ref] |
| test_logging.rs:86:20:86:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
| test_logging.rs:86:20:86:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
| test_logging.rs:86:21:86:28 | password | semmle.label | password |
| test_logging.rs:87:5:87:44 | ...::log | semmle.label | ...::log |
| test_logging.rs:87:20:87:43 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:87:36:87:43 | password | semmle.label | password |
| test_logging.rs:94:9:94:10 | m1 | semmle.label | m1 |
| test_logging.rs:94:14:94:22 | &password | semmle.label | &password |
| test_logging.rs:94:15:94:22 | password | semmle.label | password |
| test_logging.rs:95:5:95:29 | ...::log | semmle.label | ...::log |
| test_logging.rs:95:11:95:28 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:97:9:97:10 | m2 | semmle.label | m2 |
| test_logging.rs:97:41:97:49 | &password | semmle.label | &password |
| test_logging.rs:97:42:97:49 | password | semmle.label | password |
| test_logging.rs:98:5:98:19 | ...::log | semmle.label | ...::log |
| test_logging.rs:98:11:98:18 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:100:9:100:10 | m3 | semmle.label | m3 |
| test_logging.rs:100:14:100:46 | res | semmle.label | res |
| test_logging.rs:100:22:100:45 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:100:22:100:45 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:100:22:100:45 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:100:22:100:45 | { ... } | semmle.label | { ... } |
| test_logging.rs:100:38:100:45 | password | semmle.label | password |
| test_logging.rs:101:5:101:19 | ...::log | semmle.label | ...::log |
| test_logging.rs:101:11:101:18 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:119:5:119:42 | ...::log | semmle.label | ...::log |
| test_logging.rs:119:12:119:41 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:119:28:119:41 | get_password(...) | semmle.label | get_password(...) |
| test_logging.rs:130:9:130:10 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
| test_logging.rs:130:14:130:33 | TupleExpr [tuple.1] | semmle.label | TupleExpr [tuple.1] |
| test_logging.rs:130:25:130:32 | password | semmle.label | password |
| test_logging.rs:132:5:132:32 | ...::log | semmle.label | ...::log |
| test_logging.rs:132:12:132:31 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:132:28:132:29 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
| test_logging.rs:132:28:132:31 | t1.1 | semmle.label | t1.1 |
| test_logging.rs:171:22:171:31 | log_expect | semmle.label | log_expect |
| test_logging.rs:171:33:171:79 | &... | semmle.label | &... |
| test_logging.rs:171:33:171:79 | &... [&ref] | semmle.label | &... [&ref] |
| test_logging.rs:171:34:171:79 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:171:34:171:79 | res | semmle.label | res |
| test_logging.rs:171:42:171:78 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:171:42:171:78 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:171:42:171:78 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:171:42:171:78 | { ... } | semmle.label | { ... } |
| test_logging.rs:171:70:171:78 | password2 | semmle.label | password2 |
| test_logging.rs:175:24:175:33 | log_expect | semmle.label | log_expect |
| test_logging.rs:175:35:175:81 | &... | semmle.label | &... |
| test_logging.rs:175:35:175:81 | &... [&ref] | semmle.label | &... [&ref] |
| test_logging.rs:175:36:175:81 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:175:36:175:81 | res | semmle.label | res |
| test_logging.rs:175:44:175:80 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:175:44:175:80 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:175:44:175:80 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:175:44:175:80 | { ... } | semmle.label | { ... } |
| test_logging.rs:175:72:175:80 | password2 | semmle.label | password2 |
| test_logging.rs:182:9:182:19 | err_result3 [Err] | semmle.label | err_result3 [Err] |
| test_logging.rs:182:47:182:60 | Err(...) [Err] | semmle.label | Err(...) [Err] |
| test_logging.rs:182:51:182:59 | password2 | semmle.label | password2 |
| test_logging.rs:183:13:183:23 | err_result3 [Err] | semmle.label | err_result3 [Err] |
| test_logging.rs:183:25:183:34 | log_unwrap | semmle.label | log_unwrap |
| test_logging.rs:187:5:187:38 | ...::_print | semmle.label | ...::_print |
| test_logging.rs:187:12:187:37 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:187:30:187:37 | password | semmle.label | password |
| test_logging.rs:188:5:188:38 | ...::_print | semmle.label | ...::_print |
| test_logging.rs:188:14:188:37 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:188:30:188:37 | password | semmle.label | password |
| test_logging.rs:189:5:189:39 | ...::_eprint | semmle.label | ...::_eprint |
| test_logging.rs:189:13:189:38 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:189:31:189:38 | password | semmle.label | password |
| test_logging.rs:190:5:190:39 | ...::_eprint | semmle.label | ...::_eprint |
| test_logging.rs:190:15:190:38 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:190:31:190:38 | password | semmle.label | password |
| test_logging.rs:193:16:193:47 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:193:23:193:46 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:193:39:193:46 | password | semmle.label | password |
| test_logging.rs:194:16:194:46 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:194:22:194:45 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:194:38:194:45 | password | semmle.label | password |
| test_logging.rs:195:16:195:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:195:31:195:54 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:195:47:195:54 | password | semmle.label | password |
| test_logging.rs:196:16:196:53 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:196:29:196:52 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:196:45:196:52 | password | semmle.label | password |
| test_logging.rs:197:16:197:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:197:31:197:54 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:197:47:197:54 | password | semmle.label | password |
| test_logging.rs:198:16:198:57 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:198:33:198:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:198:33:198:56 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:198:49:198:56 | password | semmle.label | password |
| test_logging.rs:199:16:199:57 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:199:33:199:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:199:33:199:56 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:199:49:199:56 | password | semmle.label | password |
| test_logging.rs:200:16:200:61 | ...::panic_fmt | semmle.label | ...::panic_fmt |
| test_logging.rs:200:37:200:60 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:200:53:200:60 | password | semmle.label | password |
| test_logging.rs:201:16:201:63 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:201:39:201:62 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:201:39:201:62 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:201:55:201:62 | password | semmle.label | password |
| test_logging.rs:202:17:202:64 | ...::assert_failed | semmle.label | ...::assert_failed |
| test_logging.rs:202:40:202:63 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
| test_logging.rs:202:40:202:63 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:202:56:202:63 | password | semmle.label | password |
| test_logging.rs:203:27:203:32 | expect | semmle.label | expect |
| test_logging.rs:203:34:203:66 | res | semmle.label | res |
| test_logging.rs:203:34:203:75 | ... .as_str() | semmle.label | ... .as_str() |
| test_logging.rs:203:42:203:65 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:203:42:203:65 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:203:42:203:65 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:203:42:203:65 | { ... } | semmle.label | { ... } |
| test_logging.rs:203:58:203:65 | password | semmle.label | password |
| test_logging.rs:209:30:209:34 | write | semmle.label | write |
| test_logging.rs:209:36:209:70 | res | semmle.label | res |
| test_logging.rs:209:36:209:81 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:209:44:209:69 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:209:44:209:69 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:209:44:209:69 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:209:44:209:69 | { ... } | semmle.label | { ... } |
| test_logging.rs:209:62:209:69 | password | semmle.label | password |
| test_logging.rs:210:30:210:38 | write_all | semmle.label | write_all |
| test_logging.rs:210:40:210:74 | res | semmle.label | res |
| test_logging.rs:210:40:210:85 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:210:48:210:73 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:210:48:210:73 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:210:48:210:73 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:210:48:210:73 | { ... } | semmle.label | { ... } |
| test_logging.rs:210:66:210:73 | password | semmle.label | password |
| test_logging.rs:213:9:213:13 | write | semmle.label | write |
| test_logging.rs:213:15:213:49 | res | semmle.label | res |
| test_logging.rs:213:15:213:60 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:213:23:213:48 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:213:23:213:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:213:23:213:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:213:23:213:48 | { ... } | semmle.label | { ... } |
| test_logging.rs:213:41:213:48 | password | semmle.label | password |
| test_logging.rs:216:9:216:13 | write | semmle.label | write |
| test_logging.rs:216:15:216:49 | res | semmle.label | res |
| test_logging.rs:216:15:216:60 | ... .as_bytes() | semmle.label | ... .as_bytes() |
| test_logging.rs:216:23:216:48 | ...::format(...) | semmle.label | ...::format(...) |
| test_logging.rs:216:23:216:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
| test_logging.rs:216:23:216:48 | MacroExpr | semmle.label | MacroExpr |
| test_logging.rs:216:23:216:48 | { ... } | semmle.label | { ... } |
| test_logging.rs:216:41:216:48 | password | semmle.label | password |
subpaths

View File

@@ -2,3 +2,4 @@ qltest_cargo_check: true
qltest_dependencies:
- log = { version = "0.4.25", features = ["kv"] }
- simple_logger = { version = "5.0.0" }
- log_err = { version = "1.1.1" }

View File

@@ -2,6 +2,7 @@
use log::{debug, error, info, trace, warn, log, Level};
use std::io::Write as _;
use std::fmt::Write as _;
use log_err::{LogErrOption, LogErrResult};
// --- tests ---
@@ -146,6 +147,40 @@ fn test_log(harmless: String, password: String, encrypted_password: String) {
warn!("message = {}", s2); // (this implementation does not output the password field)
warn!("message = {:?}", s2); // $ MISSING: Alert[rust/cleartext-logging]=s2
warn!("message = {:#?}", s2); // $ MISSING: Alert[rust/cleartext-logging]=s2
let password2 = "123456".to_string(); // Create new password for this test
// test `log_expect` with sensitive `Option.Some` (which is not output by `log_expect`)
let sensitive_opt: Option<String> = Some(password2.clone());
let _ = sensitive_opt.log_expect("Option is None");
// test `log_expect` with sensitive `Result.Ok` (which is not output by `log_expect`)
let sensitive_result: Result<String, &str> = Ok(password2.clone());
let _ = sensitive_result.log_expect("Result failed");
// test `log_unwrap` with sensitive `Option.Some` (which is not output by `log_unwrap`)
let sensitive_opt2: Option<String> = Some(password2.clone());
let _ = sensitive_opt2.log_unwrap();
// test `log_unwrap` with sensitive `Result.Ok` (which is not output by `log_unwrap`)
let sensitive_result2: Result<String, &str> = Ok(password2.clone());
let _ = sensitive_result2.log_unwrap();
// test `log_expect` on `Option` with sensitive message
let none_opt: Option<String> = None;
let _ = none_opt.log_expect(&format!("Failed with password: {}", password2)); // $ Alert[rust/cleartext-logging]
// test `log_expect` on `Result` with sensitive message
let err_result: Result<String, &str> = Err("");
let _ = err_result.log_expect(&format!("Failed with password: {}", password2)); // $ Alert[rust/cleartext-logging]
// test `log_expect` with sensitive `Result.Err`
let err_result2: Result<String, String> = Err(password2.clone());
let _ = err_result2.log_expect(""); // $ MISSING: Alert[rust/cleartext-logging]
// test `log_unwrap` with sensitive `Result.Err`
let err_result3: Result<String, String> = Err(password2); // $ Source=err_result3
let _ = err_result3.log_unwrap(); // $ Alert[rust/cleartext-logging]=err_result3
}
fn test_std(password: String, i: i32, opt_i: Option<i32>) {

Some files were not shown because too many files have changed in this diff Show More