mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'main' into redsun82/rust-tweaks
This commit is contained in:
@@ -72,7 +72,7 @@ repos:
|
||||
|
||||
- id: rust-codegen
|
||||
name: Run Rust checked in code generation
|
||||
files: ^misc/codegen/|^rust/(schema.py$|codegen/|.*/generated/|ql/lib/(rust\.dbscheme$|codeql/rust/elements)|\.generated.list)
|
||||
files: ^misc/codegen/|^rust/(prefix\.dbscheme|schema/|codegen/|.*/generated/|ql/lib/(rust\.dbscheme$|codeql/rust/elements)|\.generated.list)
|
||||
language: system
|
||||
entry: bazel run //rust/codegen -- --quiet
|
||||
pass_filenames: false
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* .NET 9 is now required to build the C# extractor.
|
||||
@@ -20,6 +20,7 @@ fn class_name(type_name: &str) -> String {
|
||||
"ElseBranch" => "Expr".to_owned(),
|
||||
"Fn" => "Function".to_owned(),
|
||||
"Literal" => "LiteralExpr".to_owned(),
|
||||
"ArrayExpr" => "ArrayExprInternal".to_owned(),
|
||||
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
|
||||
_ => type_name.to_owned(),
|
||||
}
|
||||
@@ -355,6 +356,13 @@ fn get_fields(node: &AstNodeSrc) -> Vec<FieldInfo> {
|
||||
is_many: false,
|
||||
});
|
||||
}
|
||||
"ArrayExpr" => {
|
||||
result.push(FieldInfo {
|
||||
name: "is_semicolon".to_string(),
|
||||
tp: "predicate".to_string(),
|
||||
is_many: false,
|
||||
});
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
||||
2
rust/extractor/src/generated/.generated.list
generated
2
rust/extractor/src/generated/.generated.list
generated
@@ -1,2 +1,2 @@
|
||||
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
||||
top.rs cbcc69736e11da46c1413f401ce98566e7b1e79c3d03c3285afee6c326fb0561 cbcc69736e11da46c1413f401ce98566e7b1e79c3d03c3285afee6c326fb0561
|
||||
top.rs aad41fc41df08b35aeca0700426e38538c23aef9030b42aeaac964dced524575 aad41fc41df08b35aeca0700426e38538c23aef9030b42aeaac964dced524575
|
||||
|
||||
44
rust/extractor/src/generated/top.rs
generated
44
rust/extractor/src/generated/top.rs
generated
@@ -2987,62 +2987,66 @@ impl From<trap::Label<WherePred>> for trap::Label<Locatable> {
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ArrayExpr {
|
||||
pub id: trap::TrapId<ArrayExpr>,
|
||||
pub struct ArrayExprInternal {
|
||||
pub id: trap::TrapId<ArrayExprInternal>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub exprs: Vec<trap::Label<Expr>>,
|
||||
pub is_semicolon: bool,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for ArrayExpr {
|
||||
impl trap::TrapEntry for ArrayExprInternal {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("array_exprs", vec![id.into()]);
|
||||
out.add_tuple("array_expr_internals", vec![id.into()]);
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("array_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
out.add_tuple("array_expr_internal_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.exprs.into_iter().enumerate() {
|
||||
out.add_tuple("array_expr_exprs", vec![id.into(), i.into(), v.into()]);
|
||||
out.add_tuple("array_expr_internal_exprs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if self.is_semicolon {
|
||||
out.add_tuple("array_expr_internal_is_semicolon", vec![id.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for ArrayExpr {
|
||||
fn class_name() -> &'static str { "ArrayExpr" }
|
||||
impl trap::TrapClass for ArrayExprInternal {
|
||||
fn class_name() -> &'static str { "ArrayExprInternal" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<ArrayExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<ArrayExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExpr is a subclass of AstNode
|
||||
impl From<trap::Label<ArrayExprInternal>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<ArrayExprInternal>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExprInternal is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<ArrayExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<ArrayExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExpr is a subclass of Element
|
||||
impl From<trap::Label<ArrayExprInternal>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<ArrayExprInternal>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExprInternal is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<ArrayExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<ArrayExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExpr is a subclass of Expr
|
||||
impl From<trap::Label<ArrayExprInternal>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<ArrayExprInternal>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExprInternal is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<ArrayExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<ArrayExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExpr is a subclass of Locatable
|
||||
impl From<trap::Label<ArrayExprInternal>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<ArrayExprInternal>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme ArrayExprInternal is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
|
||||
8
rust/extractor/src/translate/generated.rs
generated
8
rust/extractor/src/translate/generated.rs
generated
@@ -198,16 +198,18 @@ impl Translator<'_> {
|
||||
label
|
||||
}
|
||||
|
||||
pub(crate) fn emit_array_expr(&mut self, node: ast::ArrayExpr) -> Label<generated::ArrayExpr> {
|
||||
pub(crate) fn emit_array_expr(&mut self, node: ast::ArrayExpr) -> Label<generated::ArrayExprInternal> {
|
||||
let attrs = node.attrs().map(|x| self.emit_attr(x)).collect();
|
||||
let exprs = node.exprs().map(|x| self.emit_expr(x)).collect();
|
||||
let label = self.trap.emit(generated::ArrayExpr {
|
||||
let is_semicolon = node.semicolon_token().is_some();
|
||||
let label = self.trap.emit(generated::ArrayExprInternal {
|
||||
id: TrapId::Star,
|
||||
attrs,
|
||||
exprs,
|
||||
is_semicolon,
|
||||
});
|
||||
self.emit_location(label, &node);
|
||||
emit_detached!(ArrayExpr, self, node, label);
|
||||
emit_detached!(ArrayExprInternal, self, node, label);
|
||||
self.emit_tokens(&node, label.into(), node.syntax().children_with_tokens());
|
||||
label
|
||||
}
|
||||
|
||||
36
rust/ql/.generated.list
generated
36
rust/ql/.generated.list
generated
@@ -1,8 +1,10 @@
|
||||
lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll 340628813de8c752a8cebcd11d3360792ad03b021c5b8ed9f5c705b58fc8ba68 9fd9c4d6767c3b0e7d30bcba925615d08f7190b90adb976ca59bb2f28260bf96
|
||||
lib/codeql/rust/controlflow/internal/generated/CfgNodes.qll b0e9c10a3fdd62e355dcc74f9d5198e6f4d597cd957efd4dd7a3418115055c5c 14fc7e1beb4751897639c5c3a64d5eb234ff0dc753d2db0b8d4c1845a55959f0
|
||||
lib/codeql/rust/elements/Abi.qll 4c973d28b6d628f5959d1f1cc793704572fd0acaae9a97dfce82ff9d73f73476 250f68350180af080f904cd34cb2af481c5c688dc93edf7365fd0ae99855e893
|
||||
lib/codeql/rust/elements/Addressable.qll 13011bfd2e1556694c3d440cc34af8527da4df49ad92b62f2939d3699ff2cea5 ddb25935f7553a1a384b1abe2e4b4fa90ab50b952dadec32fd867afcb054f4be
|
||||
lib/codeql/rust/elements/ArgList.qll 661f5100f5d3ef8351452d9058b663a2a5c720eea8cf11bedd628969741486a2 28e424aac01a90fb58cd6f9f83c7e4cf379eea39e636bc0ba07efc818be71c71
|
||||
lib/codeql/rust/elements/ArrayExpr.qll a3e6e122632f4011644ec31b37f88b32fe3f2b7e388e7e878a6883309937049f 12ccb5873d95c433da5606fd371d182ef2f71b78d0c53c2d6dec10fa45852bdc
|
||||
lib/codeql/rust/elements/ArrayExpr.qll e4e7cff3518c50ec908271906dd46c1fbe9098faa1e8cd06a27f0a6e8d165ed1 fe02a4f4197f57ecd1e8e82d6c9384148ec29d8b106d7f696795b2f325e4a71b
|
||||
lib/codeql/rust/elements/ArrayListExpr.qll 451aedcecb479c385ff497588c7a07fda304fd5b873270223a4f2c804e96b245 a8cb008f6f732215623b5626c84b37b651ca01ccafb2cf4c835df35d5140c6ad
|
||||
lib/codeql/rust/elements/ArrayRepeatExpr.qll 4b7ed5be7d2caaf69f6fc0cd05b0e2416c52d547b1a73fb23d5a13007f75f4dd f6366f21cc48376b5fdf37e8c5c2b19415d4cbdeef09f33bb99cde5cb0f5b0e7
|
||||
lib/codeql/rust/elements/ArrayTypeRepr.qll 7d5148c9efaf13e6880b327ca426304f7574608a29e6b8a219ed291003cbe1ae 73a297b0307cd014d08ccb3c00fc57b6c115adadee72a0ebb4c01fcae9e47163
|
||||
lib/codeql/rust/elements/AsmExpr.qll 2f1c78e92b56d66a559543b2103d8f880dd4fa4c6907346f668b3714cf2355e9 12e174fc469c067c957f6c1a5969ab56a71a07c537ca930a564cce81c7ab4481
|
||||
lib/codeql/rust/elements/AssocItem.qll 5e514287bbe353d1d637991e7af836e5659ad66922df99af68ab61399e7f8f9a 3733af54938271161ee2720c32ac43228d519b5c46b7cea1e4bbe3dc634f8857
|
||||
@@ -174,7 +176,9 @@ lib/codeql/rust/elements/internal/AbiImpl.qll 01439712ecadc9dc8da6f74d2e19cee13c
|
||||
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/ArrayExprConstructor.qll f4ac4efefe5fe4fe1e666f35b1ee92d2243d977b3f3308151c89f61582203c09 4167ae58ec869f7dbd8467093c4a53afd7c1efcf1cc865efa62b4eb484bd7ff8
|
||||
lib/codeql/rust/elements/internal/ArrayExprInternal.qll 07a219b3d3fba3ff8b18e77686b2f58ab01acd99e0f5d5cad5d91af937e228f5 7528fc0e2064c481f0d6cbff3835950a044e429a2cd00c4d8442d2e132560d37
|
||||
lib/codeql/rust/elements/internal/ArrayExprInternalConstructor.qll f9756bc40beee99c5e4355bf157030b440c532dff5bdf43e848b3aa1a00fea90 39467f7f313e6f9ede1fe92375ee408098dc65291ca8ee50e36a3684a2767836
|
||||
lib/codeql/rust/elements/internal/ArrayExprInternalImpl.qll ae4488846c8309b2d4a51d54b36fce0a75107917c0b1f8af5ccf40797f570580 37838c7d6a04b95a16ed46e963d7e56def7a30b5e5ef1ab7e0dfdb5f256fa874
|
||||
lib/codeql/rust/elements/internal/ArrayTypeReprConstructor.qll 52fea288f2031ae4fd5e5fe62300311134ed1dec29e372500487bf2c294516c1 fa6484f548aa0b85867813166f4b6699517dda9906e42d361f5e8c6486bdcb81
|
||||
lib/codeql/rust/elements/internal/ArrayTypeReprImpl.qll ee16057197a489e6539c256d59f615636610022ec920fef93d36abf051c8687d 39a86b29d94f6d3b422161f0b1db6d0462c149bd465d60bfc82d383dd891c63b
|
||||
lib/codeql/rust/elements/internal/AsmExprConstructor.qll 36c68023b58beec30af9f05d9d902a4c49faa0206b5528d6aad494a91da07941 4d91b7d30def03e634b92c0d7b99b47c3aadd75f4499f425b80355bc775ea5b6
|
||||
@@ -414,7 +418,10 @@ lib/codeql/rust/elements/internal/YieldExprImpl.qll af184649a348ddd0be16dee9daae
|
||||
lib/codeql/rust/elements/internal/generated/Abi.qll 87e1ea6b2a8ebf60e1c69176632740e4e27fc56c3f173939b098ba376562b5fa 94b2121e71c4ec94d53a79f972c05a8484ef0d80ed638f53031e7cf4dc5343d5
|
||||
lib/codeql/rust/elements/internal/generated/Addressable.qll 96a8b45166dd035b8d2c6d36b8b67019f2d4d0b4ccff6d492677c0c87197613e d8f1ce29feafc8ff7179399fc7eac5db031a7e1a8bc6b2cd75cfce1da3132e9b
|
||||
lib/codeql/rust/elements/internal/generated/ArgList.qll 1b75b2d7dcf524eb468a0268af6293e9d17832d6bedf3feec49a535824339b57 2bcaf464454bdfdda45fbd24d063f0f1df0eb69f684197b37105adc8f72cd1ea
|
||||
lib/codeql/rust/elements/internal/generated/ArrayExpr.qll 2ca97b602a707fe2c566002d8709792bb166ae52fdb7da28d7c4b8e0d66dd4bc 1cae1ef017171ec9a1ca28b4f2993b1ee26d22b51b3b04816d9b4e89fdff1fb3
|
||||
lib/codeql/rust/elements/internal/generated/ArrayExpr.qll 73806a0de8168b38a9436fa6b8c6d68c92eeab3d64a1ae7edfff82f871929992 7ad998cdd8f4fed226473517ad7a5765cb35608033047aad53bf8aa3969fd03b
|
||||
lib/codeql/rust/elements/internal/generated/ArrayExprInternal.qll 67a7b0fae04b11cf771727ff39a123fb2d5ce6e2d650d32478fcb33a26ed5688 15833405fa85f6abe0e5146dac283cb5a142a07f08300ccc15a1dae30ed88942
|
||||
lib/codeql/rust/elements/internal/generated/ArrayListExpr.qll f325163c2bd401286305330482bee20d060cecd24afa9e49deab7ba7e72ca056 ae3f5b303e31fc6c48b38172304ee8dcf3af2b2ba693767824ea8a944b6be0eb
|
||||
lib/codeql/rust/elements/internal/generated/ArrayRepeatExpr.qll ac2035488d5b9328f01ce2dd5bd7598e3af1cbb383ddb48b648e1e8908ea82fc 3ec910b184115fb3750692287e8039560e20bd6a5fb26ac1f9c346424d8eaa48
|
||||
lib/codeql/rust/elements/internal/generated/ArrayTypeRepr.qll 0945bea9b40ebf871b9d5ac974e256cda985f05113cac63cf8af48da5e4eaace 4d8b67d3ce117f509f984d03ae0c44533d3880d4687c7614fed1e9eac9ce2e6f
|
||||
lib/codeql/rust/elements/internal/generated/AsmExpr.qll b5fef59589c02c17857a4a7f5c7b5efb747a1e98710167efa5c2e88cffd7bcbb b43b297a3b4894e8dd92ef3a23b76f2684c303d41e6030398e69b7754ebea9cd
|
||||
lib/codeql/rust/elements/internal/generated/AssocItem.qll aa7c06e001b67e4a59476fa7299e09f8da16c93f91aff0ec9812c64386e7c023 0032b45e34e6aba9c4b3d319b108efa0de8ad679b5f254a1ec7c606877ff5e95
|
||||
@@ -512,7 +519,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 7616fff35285c24fb5e6e208c0d62b1e3f3504a218a7c6cf0ba26058dbec684c 8dbb0392106515254efeaefecdf1ea91d9f498a8cc7e40543315babdd0d22e10
|
||||
lib/codeql/rust/elements/internal/generated/ParentChild.qll c3f6352ef56aabb6bc784deafc35807b32df6f41c3bca3437221166776885c2d 3f04580798ab351e5835957379ced2b45fec628b76578c0f33f571cf03abfc83
|
||||
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
|
||||
lib/codeql/rust/elements/internal/generated/Path.qll 4c1c8e840ed57880e574142b081b11d7a7428a009f10e3aa8f4645e211f6b2e0 989668cf0f1bdee7557e2f97c01e41d2a56848227fed41477833f5fc1e1d35f6
|
||||
lib/codeql/rust/elements/internal/generated/PathExpr.qll 4ff4b2ab77bce1dbfddb315e7d1ff13d6fcd6bb7c30c105402f8082d05f1d337 fbc4f4e05da75ab543af33cfb620cfe09239e2574b8312f2c5bedca8a65ea6e8
|
||||
@@ -522,10 +529,10 @@ lib/codeql/rust/elements/internal/generated/PathSegment.qll f6892724c0b516f7e04e
|
||||
lib/codeql/rust/elements/internal/generated/PathTypeRepr.qll b847fabe7059485c5194cbc144f38dae2433057771ff10fe0b6ae9876b33afd4 ee2fdcd86d78c389a2276ebe7e889f042b7bb39c3c611f56b951591600a60e8a
|
||||
lib/codeql/rust/elements/internal/generated/PrefixExpr.qll c9ede5f2deb7b41bc8240969e8554f645057018fe96e7e9ad9c2924c8b14722b 5ae2e3c3dc8fa73e7026ef6534185afa6b0b5051804435d8b741dd3640c864e1
|
||||
lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 51d1e9e683fc79dddbffadee9015b5351bf03ce48f879da98b1f6931a61166f8 122a9c4887aa24e3f3a587b2f37c4db32633f56df3c8b696db4b8a609d9d4a98
|
||||
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590 ea294a3ba33fd1bc632046c4fedbcb84dcb961a8e4599969d65893b19d90e590
|
||||
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 469fb76bc97c3c7363dd3334b235ffadca76a1c724efe870463a8c618554ba21 4d627f42a0ee72d8a546137431f7d70c561949307a0328786816fd919cac6d93
|
||||
lib/codeql/rust/elements/internal/generated/Raw.qll f52ff91f985848ca0e251efee1e246ae80fdca13f530df301f7090a5b18bcf13 136a84549b183d222fb6063d34d4b714b7dd42f6eb3f756894285bf405c24a22
|
||||
lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0
|
||||
@@ -551,8 +558,8 @@ lib/codeql/rust/elements/internal/generated/Static.qll ea22838e0b7d9796dfaf5deda
|
||||
lib/codeql/rust/elements/internal/generated/Stmt.qll 8473ff532dd5cc9d7decaddcd174b94d610f6ca0aec8e473cc051dad9f3db917 6ef7d2b5237c2dbdcacbf7d8b39109d4dc100229f2b28b5c9e3e4fbf673ba72b
|
||||
lib/codeql/rust/elements/internal/generated/StmtList.qll a667193e32341e17400867c6e359878c4e645ef9f5f4d97676afc0283a33a026 a320ed678ee359302e2fc1b70a9476705cd616fcfa44a499d32f0c7715627f73
|
||||
lib/codeql/rust/elements/internal/generated/Struct.qll 4d57f0db12dc7ad3e31e750a24172ef1505406b4dab16386af0674bd18bf8f4b 1a73c83df926b996f629316f74c61ea775be04532ab61b56af904223354f033e
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 8e665a4418a0c1a5ca5adfc7944e1cdd26a07e382269bcc05b60729ff2098f8f e144cb286ab92157370a18f7342865d9156c541b52d6005f2bc526ee2902f533
|
||||
lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 6d71bb448f5f2b568de7035278fdd4de8cf611ffbdfef027208c9b5bb0669d9f 6d71bb448f5f2b568de7035278fdd4de8cf611ffbdfef027208c9b5bb0669d9f
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 0bb53e7d628fcd74a28fb7b00c51dc7f212a775894a4dc485a68089a7c02d766 6c031f7c95974521f17d6fedd429d35a1aea142b7cef5123f34504a79c21670b
|
||||
lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 8f7f08d1599e2dcbe553a7e4428a8787cef76b1d12b88f1b5925a4c59d617fae 8f7f08d1599e2dcbe553a7e4428a8787cef76b1d12b88f1b5925a4c59d617fae
|
||||
lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b
|
||||
lib/codeql/rust/elements/internal/generated/TokenTree.qll 8577c2b097c1be2f0f7daa5acfcf146f78674a424d99563e08a84dd3e6d91b46 d2f30764e84dbfc0a6a5d3d8a5f935cd432413688cb32da9c94e420fbc10665c
|
||||
lib/codeql/rust/elements/internal/generated/Trait.qll 8fa41b50fa0f68333534f2b66bb4ec8e103ff09ac8fa5c2cc64bc04beafec205 ce1c9aa6d0e2f05d28aab8e1165c3b9fb8e24681ade0cf6a9df2e8617abeae7e
|
||||
@@ -586,14 +593,17 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll 7edf1f23fbf953a2baabcd
|
||||
lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499
|
||||
lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b
|
||||
lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85
|
||||
lib/codeql/rust/elements.qll cd0db4490bc6b93f2a12d05940842a8abbd1128f1d0571039c0d7e5d284ad6f9 cd0db4490bc6b93f2a12d05940842a8abbd1128f1d0571039c0d7e5d284ad6f9
|
||||
lib/codeql/rust/elements.qll 35959f2de54b6ee534fc592e1928c0829aa6e881e281a5acf724c10e4c685070 35959f2de54b6ee534fc592e1928c0829aa6e881e281a5acf724c10e4c685070
|
||||
test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871bd78b51997d3cffd969105e5fdd 2f936b6ca005c6157c755121584410c03e4a3949c23bee302fbe05ee10ce118f
|
||||
test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52
|
||||
test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684
|
||||
test/extractor-tests/generated/ArgList/ArgList_getArg.ql c07c946218489a0ad5fe89e5fd4a7f0ad84a73dc2e650729f48a340cb133be84 ff2382c0693f47e5eb1290aca325290e60c19d877b25b1d7e2ee96009f5fe934
|
||||
test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql fd4e504678714c99a987069e5013bda04313573cec2bab31b74bc4559bb73d7f 0b63120b61964a215ec451793a1b5aef525882484ad62193d7635b5a370881d4
|
||||
test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql ce143c8b416c35270cca839848baf6d8cda74251f3717314e0f332fcb74a9259 c86d282153feee3facad752ed0fc1638be0cbaafca4ec620f337ad61b694cade
|
||||
test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql e8b7e24db6fc6098131fea1053430920b2e2f33d2aa52b10d2ff29b9efd70a88 a52b6b2476104695b395d86bbd1a99068372ca56989ea94b150055e664ba034a
|
||||
test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql e6f9fe0dd6af5a1223e1e59827346aa2975bd665aeda36e8844ffb3a79c5e532 38576b6f7257c119917442e4f54fc883480e4da86d2542a1ac16d723ebbba039
|
||||
test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql f1ca0521f641bed17581121c0f07c7f8737d9891acdde2c68de59a0684e86a34 496da6513cfee28a31274a2e72b5a58d843407ac5e4870296da0f0b8e7fc85c1
|
||||
test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql 6920b532623e8c919701a83a059d9b1aac9e8673e7fdbe26e0a8af5ad6a34b8a 601137c715ce947d79f39d5b131d7ab167a16d29477eacdb1380cd647c4ebac4
|
||||
test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql 60a0df80fd34ca5c960b5e060c7090f8bbb8af83aba7099aa298a80e19a13346 c41f80601c7f50eee01c0ed7587e0198296d6a8a5b95c98dd8f865901d34ba5c
|
||||
test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql fc6ca212aa633b73ee21f7564631c9ad345f15839656d88940dc686cf076a344 d580a367305adbe168996a294329b1adec36956a500ae9717a4af78cb2bef4e6
|
||||
test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql 6b00037350fc36cc46345a290bda4c4d4ff99050b970d23eb94294313046a884 0687638b46e43bba9dda35d78ff7b40f976e5e38271eec77e7a21c28349dc42c
|
||||
test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql cfb831ccbc04092250931e0bd38c7b965fe0fd868081cd5f49fb11cd0da9aa0d 51e05a537928d7fd0aedd800f4d99c1f52630d75efe78bf7b016f1ad2380583b
|
||||
test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql 38db5e08b7a78f52247b9894fe2f3dd80b89efd2a3ddce446b782f92f6e2efad 8a4d38deac59fff090617e928fb698fc3d57f3651f47b06d3f40dd4ba92b2c93
|
||||
test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql f74222b11cc52d3ac79e16d2943c1281c574fee954298752a309abc683798dbb 9701ebe468d76f72b21a7772a9e9bb82d8fd0a4e317437341f31f8395780dc33
|
||||
|
||||
18
rust/ql/.gitattributes
generated
vendored
18
rust/ql/.gitattributes
generated
vendored
@@ -5,6 +5,8 @@
|
||||
/lib/codeql/rust/elements/Addressable.qll linguist-generated
|
||||
/lib/codeql/rust/elements/ArgList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/ArrayExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/ArrayListExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/ArrayRepeatExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/ArrayTypeRepr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/AsmExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/AssocItem.qll linguist-generated
|
||||
@@ -176,7 +178,9 @@
|
||||
/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/ArrayExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ArrayExprInternal.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ArrayExprInternalConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ArrayExprInternalImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ArrayTypeReprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/ArrayTypeReprImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/AsmExprConstructor.qll linguist-generated
|
||||
@@ -417,6 +421,9 @@
|
||||
/lib/codeql/rust/elements/internal/generated/Addressable.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArgList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArrayExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArrayExprInternal.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArrayListExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArrayRepeatExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/ArrayTypeRepr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/AsmExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/AssocItem.qll linguist-generated
|
||||
@@ -593,9 +600,12 @@
|
||||
/test/extractor-tests/generated/Abi/Abi_getAbiString.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArgList/ArgList.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArgList/ArgList_getArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayExpr/ArrayExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayExpr/ArrayExpr_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getConstArg.ql linguist-generated
|
||||
/test/extractor-tests/generated/ArrayTypeRepr/ArrayTypeRepr_getElementTypeRepr.ql linguist-generated
|
||||
|
||||
@@ -81,7 +81,7 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
}
|
||||
|
||||
/**
|
||||
* An array expression. For example:
|
||||
* The base class for array expressions. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* [1; 10];
|
||||
@@ -95,21 +95,6 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
/** Gets the underlying `ArrayExpr`. */
|
||||
ArrayExpr getArrayExpr() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { result = node.getAttr(index) }
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this array expression.
|
||||
*/
|
||||
Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this array expression.
|
||||
*/
|
||||
int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th expression of this array expression (0-based).
|
||||
*/
|
||||
@@ -126,6 +111,79 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
* Gets the number of expressions of this array expression.
|
||||
*/
|
||||
int getNumberOfExprs() { result = count(int i | exists(this.getExpr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { result = node.getAttr(index) }
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this array expression.
|
||||
*/
|
||||
Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this array expression.
|
||||
*/
|
||||
int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
}
|
||||
|
||||
final private class ParentArrayListExpr extends ParentAstNode, ArrayListExpr {
|
||||
override predicate relevantChild(AstNode child) { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* An array expression with a list of elements. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* ```
|
||||
*/
|
||||
final class ArrayListExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode {
|
||||
private ArrayListExpr node;
|
||||
|
||||
ArrayListExprCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `ArrayListExpr`. */
|
||||
ArrayListExpr getArrayListExpr() { result = node }
|
||||
}
|
||||
|
||||
final private class ParentArrayRepeatExpr extends ParentAstNode, ArrayRepeatExpr {
|
||||
override predicate relevantChild(AstNode child) {
|
||||
none()
|
||||
or
|
||||
child = this.getRepeatOperand()
|
||||
or
|
||||
child = this.getRepeatLength()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An array expression with a repeat operand and a repeat length. For example:
|
||||
* ```rust
|
||||
* [1; 10];
|
||||
* ```
|
||||
*/
|
||||
final class ArrayRepeatExprCfgNode extends CfgNodeFinal, ArrayExprCfgNode {
|
||||
private ArrayRepeatExpr node;
|
||||
|
||||
ArrayRepeatExprCfgNode() { node = this.getAstNode() }
|
||||
|
||||
/** Gets the underlying `ArrayRepeatExpr`. */
|
||||
ArrayRepeatExpr getArrayRepeatExpr() { result = node }
|
||||
|
||||
/**
|
||||
* Gets the repeat operand of this array repeat expression.
|
||||
*/
|
||||
ExprCfgNode getRepeatOperand() {
|
||||
any(ChildMapping mapping).hasCfgChild(node, node.getRepeatOperand(), this, result)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the repeat length of this array repeat expression.
|
||||
*/
|
||||
ExprCfgNode getRepeatLength() {
|
||||
any(ChildMapping mapping).hasCfgChild(node, node.getRepeatLength(), this, result)
|
||||
}
|
||||
}
|
||||
|
||||
final private class ParentAsmExpr extends ParentAstNode, AsmExpr {
|
||||
@@ -3127,6 +3185,30 @@ module MakeCfgNodes<LocationSig Loc, InputSig<Loc> Input> {
|
||||
cfgNode
|
||||
)
|
||||
or
|
||||
pred = "getRepeatOperand" and
|
||||
parent =
|
||||
any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode |
|
||||
astNode = cfgNode.getArrayRepeatExpr() and
|
||||
child = getDesugared(astNode.getRepeatOperand()) and
|
||||
i = -1 and
|
||||
hasCfgNode(child) and
|
||||
not child = cfgNode.getRepeatOperand().getAstNode()
|
||||
|
|
||||
cfgNode
|
||||
)
|
||||
or
|
||||
pred = "getRepeatLength" and
|
||||
parent =
|
||||
any(Nodes::ArrayRepeatExprCfgNode cfgNode, ArrayRepeatExpr astNode |
|
||||
astNode = cfgNode.getArrayRepeatExpr() and
|
||||
child = getDesugared(astNode.getRepeatLength()) and
|
||||
i = -1 and
|
||||
hasCfgNode(child) and
|
||||
not child = cfgNode.getRepeatLength().getAstNode()
|
||||
|
|
||||
cfgNode
|
||||
)
|
||||
or
|
||||
pred = "getExpr" and
|
||||
parent =
|
||||
any(Nodes::AsmExprCfgNode cfgNode, AsmExpr astNode |
|
||||
|
||||
@@ -13,7 +13,7 @@ private module Summaries {
|
||||
UnwrapSummary() { this = "lang:core::_::<crate::option::Option>::unwrap" }
|
||||
|
||||
override predicate propagatesFlow(string input, string output, boolean preservesValue) {
|
||||
input = "Argument[self].Variant[crate::std::option::Option::Some(0)]" and
|
||||
input = "Argument[self].Variant[crate::option::Option::Some(0)]" and
|
||||
output = "ReturnValue" and
|
||||
preservesValue = true
|
||||
}
|
||||
|
||||
@@ -788,9 +788,7 @@ module RustDataFlow implements InputSig<Location> {
|
||||
(
|
||||
LocalFlow::localFlowStepCommon(nodeFrom, nodeTo)
|
||||
or
|
||||
exists(SsaImpl::DefinitionExt def, boolean isUseStep |
|
||||
SsaFlow::localFlowStep(def, nodeFrom, nodeTo, isUseStep)
|
||||
|
|
||||
exists(boolean isUseStep | SsaFlow::localFlowStep(_, nodeFrom, nodeTo, isUseStep) |
|
||||
isUseStep = false
|
||||
or
|
||||
isUseStep = true and
|
||||
@@ -825,15 +823,13 @@ module RustDataFlow implements InputSig<Location> {
|
||||
exists(CrateOriginOption crate, string path |
|
||||
resolveExtendedCanonicalPath(p.getQualifier(), crate, path) and
|
||||
v = MkVariantCanonicalPath(crate, path, p.getPart().getNameRef().getText())
|
||||
or
|
||||
exists(string name |
|
||||
not p.hasQualifier() and
|
||||
resolveExtendedCanonicalPath(p, crate, path + "::" + name) and
|
||||
v = MkVariantCanonicalPath(crate, path, name)
|
||||
)
|
||||
)
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
not p.hasQualifier() and
|
||||
v = MkVariantCanonicalPath(_, "crate::std::option::Option", p.getPart().getNameRef().getText())
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
not p.hasQualifier() and
|
||||
v = MkVariantCanonicalPath(_, "crate::std::result::Result", p.getPart().getNameRef().getText())
|
||||
}
|
||||
|
||||
/** Holds if `p` destructs an enum variant `v`. */
|
||||
@@ -1099,20 +1095,22 @@ private module Cached {
|
||||
cached
|
||||
newtype TReturnKind = TNormalReturnKind()
|
||||
|
||||
private CrateOriginOption langCoreCrate() { result.asSome() = "lang:core" }
|
||||
|
||||
cached
|
||||
newtype TVariantCanonicalPath =
|
||||
MkVariantCanonicalPath(CrateOriginOption crate, string path, string name) {
|
||||
variantHasExtendedCanonicalPath(_, _, crate, path, name)
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
crate.isNone() and
|
||||
path = "crate::std::option::Option" and
|
||||
name = "Some"
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
crate.isNone() and
|
||||
path = "crate::std::result::Result" and
|
||||
name = ["Ok", "Err"]
|
||||
crate = langCoreCrate() and
|
||||
(
|
||||
path = "crate::option::Option" and
|
||||
name = "Some"
|
||||
or
|
||||
path = "crate::result::Result" and
|
||||
name = ["Ok", "Err"]
|
||||
)
|
||||
}
|
||||
|
||||
cached
|
||||
@@ -1127,11 +1125,11 @@ private module Cached {
|
||||
pos in [0 .. v.getVariant().getFieldList().(TupleFieldList).getNumberOfFields() - 1]
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
v = MkVariantCanonicalPath(_, "crate::std::option::Option", "Some") and
|
||||
v = MkVariantCanonicalPath(langCoreCrate(), "crate::option::Option", "Some") and
|
||||
pos = 0
|
||||
or
|
||||
// TODO: Remove once library types are extracted
|
||||
v = MkVariantCanonicalPath(_, "crate::std::result::Result", ["Ok", "Err"]) and
|
||||
v = MkVariantCanonicalPath(langCoreCrate(), "crate::result::Result", ["Ok", "Err"]) and
|
||||
pos = 0
|
||||
} or
|
||||
TVariantFieldContent(VariantCanonicalPath v, string field) {
|
||||
|
||||
2
rust/ql/lib/codeql/rust/elements.qll
generated
2
rust/ql/lib/codeql/rust/elements.qll
generated
@@ -7,6 +7,8 @@ import codeql.rust.elements.Abi
|
||||
import codeql.rust.elements.Addressable
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.ArrayExpr
|
||||
import codeql.rust.elements.ArrayListExpr
|
||||
import codeql.rust.elements.ArrayRepeatExpr
|
||||
import codeql.rust.elements.ArrayTypeRepr
|
||||
import codeql.rust.elements.AsmExpr
|
||||
import codeql.rust.elements.AssocItem
|
||||
|
||||
2
rust/ql/lib/codeql/rust/elements/ArrayExpr.qll
generated
2
rust/ql/lib/codeql/rust/elements/ArrayExpr.qll
generated
@@ -8,7 +8,7 @@ import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* An array expression. For example:
|
||||
* The base class for array expressions. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* [1; 10];
|
||||
|
||||
15
rust/ql/lib/codeql/rust/elements/ArrayListExpr.qll
generated
Normal file
15
rust/ql/lib/codeql/rust/elements/ArrayListExpr.qll
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `ArrayListExpr`.
|
||||
*/
|
||||
|
||||
private import internal.ArrayListExprImpl
|
||||
import codeql.rust.elements.ArrayExpr
|
||||
|
||||
/**
|
||||
* An array expression with a list of elements. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* ```
|
||||
*/
|
||||
final class ArrayListExpr = Impl::ArrayListExpr;
|
||||
16
rust/ql/lib/codeql/rust/elements/ArrayRepeatExpr.qll
generated
Normal file
16
rust/ql/lib/codeql/rust/elements/ArrayRepeatExpr.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `ArrayRepeatExpr`.
|
||||
*/
|
||||
|
||||
private import internal.ArrayRepeatExprImpl
|
||||
import codeql.rust.elements.ArrayExpr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* An array expression with a repeat operand and a repeat length. For example:
|
||||
* ```rust
|
||||
* [1; 10];
|
||||
* ```
|
||||
*/
|
||||
final class ArrayRepeatExpr = Impl::ArrayRepeatExpr;
|
||||
@@ -1,14 +0,0 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `ArrayExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ArrayExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructArrayExpr(Raw::ArrayExpr id) { any() }
|
||||
@@ -5,6 +5,8 @@
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.ArrayExpr
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ArrayExpr` and should not
|
||||
@@ -13,13 +15,24 @@ private import codeql.rust.elements.internal.generated.ArrayExpr
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An array expression. For example:
|
||||
* The base class for array expressions. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* [1; 10];
|
||||
* ```
|
||||
*/
|
||||
class ArrayExpr extends Generated::ArrayExpr {
|
||||
override string toString() { result = "[...]" }
|
||||
cached
|
||||
private Raw::ArrayExprInternal getUnderlyingEntity() {
|
||||
this = Synth::TArrayListExpr(result) or this = Synth::TArrayRepeatExpr(result)
|
||||
}
|
||||
|
||||
override Expr getExpr(int index) {
|
||||
result = Synth::convertExprFromRaw(this.getUnderlyingEntity().getExpr(index))
|
||||
}
|
||||
|
||||
override Attr getAttr(int index) {
|
||||
result = Synth::convertAttrFromRaw(this.getUnderlyingEntity().getAttr(index))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
13
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternal.qll
generated
Normal file
13
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternal.qll
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the class `ArrayExprInternal`.
|
||||
*/
|
||||
|
||||
private import ArrayExprInternalImpl
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
final class ArrayExprInternal = Impl::ArrayExprInternal;
|
||||
17
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternalConstructor.qll
generated
Normal file
17
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternalConstructor.qll
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `ArrayExprInternal` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
private import codeql.rust.elements.internal.generated.PureSynthConstructors
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ArrayExprInternal` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructArrayExprInternal(Raw::ArrayExprInternal id) {
|
||||
not constructArrayListExpr(id) and not constructArrayRepeatExpr(id)
|
||||
}
|
||||
16
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternalImpl.qll
generated
Normal file
16
rust/ql/lib/codeql/rust/elements/internal/ArrayExprInternalImpl.qll
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ArrayExprInternal`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.ArrayExprInternal
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ArrayExprInternal` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
class ArrayExprInternal extends Generated::ArrayExprInternal { }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `ArrayListExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ArrayListExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructArrayListExpr(Raw::ArrayExprInternal id) { not id.isSemicolon() }
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ArrayListExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.ArrayListExpr
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ArrayListExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An array expression with a list of elements. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* ```
|
||||
*/
|
||||
class ArrayListExpr extends Generated::ArrayListExpr {
|
||||
override string toString() { result = "[...]" }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* This module defines the hook used internally to tweak the characteristic predicate of
|
||||
* `ArrayRepeatExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
|
||||
/**
|
||||
* The characteristic predicate of `ArrayRepeatExpr` synthesized instances.
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
predicate constructArrayRepeatExpr(Raw::ArrayExprInternal id) { id.isSemicolon() }
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `ArrayRepeatExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.ArrayRepeatExpr
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `ArrayRepeatExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
// the following QLdoc is generated: if you need to edit it, do it in the schema file
|
||||
/**
|
||||
* An array expression with a repeat operand and a repeat length. For example:
|
||||
* ```rust
|
||||
* [1; 10];
|
||||
* ```
|
||||
*/
|
||||
class ArrayRepeatExpr extends Generated::ArrayRepeatExpr {
|
||||
override string toString() {
|
||||
result =
|
||||
"[" + this.getRepeatOperand().toAbbreviatedString() + "; " +
|
||||
this.getRepeatLength().toAbbreviatedString() + "]"
|
||||
}
|
||||
|
||||
override Expr getRepeatOperand() { result = this.getExpr(0) }
|
||||
|
||||
override Expr getRepeatLength() { result = this.getExpr(1) }
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* An array expression. For example:
|
||||
* The base class for array expressions. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* [1; 10];
|
||||
@@ -25,33 +25,10 @@ module Generated {
|
||||
* Use the subclass `ArrayExpr`, where the following predicates are available.
|
||||
*/
|
||||
class ArrayExpr extends Synth::TArrayExpr, ExprImpl::Expr {
|
||||
override string getAPrimaryQlClass() { result = "ArrayExpr" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertArrayExprToRaw(this).(Raw::ArrayExpr).getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this array expression.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this array expression.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th expression of this array expression (0-based).
|
||||
*/
|
||||
Expr getExpr(int index) {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertArrayExprToRaw(this).(Raw::ArrayExpr).getExpr(index))
|
||||
}
|
||||
Expr getExpr(int index) { none() }
|
||||
|
||||
/**
|
||||
* Gets any of the expressions of this array expression.
|
||||
@@ -62,5 +39,20 @@ module Generated {
|
||||
* Gets the number of expressions of this array expression.
|
||||
*/
|
||||
final int getNumberOfExprs() { result = count(int i | exists(this.getExpr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { none() }
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this array expression.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this array expression.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
}
|
||||
}
|
||||
|
||||
72
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExprInternal.qll
generated
Normal file
72
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayExprInternal.qll
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `ArrayExprInternal`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `ArrayExprInternal` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* INTERNAL: Do not reference the `Generated::ArrayExprInternal` class directly.
|
||||
* Use the subclass `ArrayExprInternal`, where the following predicates are available.
|
||||
*/
|
||||
class ArrayExprInternal extends Synth::TArrayExprInternal, ExprImpl::Expr {
|
||||
override string getAPrimaryQlClass() { result = "ArrayExprInternal" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression internal (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertArrayExprInternalToRaw(this)
|
||||
.(Raw::ArrayExprInternal)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this array expression internal.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this array expression internal.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th expression of this array expression internal (0-based).
|
||||
*/
|
||||
Expr getExpr(int index) {
|
||||
result =
|
||||
Synth::convertExprFromRaw(Synth::convertArrayExprInternalToRaw(this)
|
||||
.(Raw::ArrayExprInternal)
|
||||
.getExpr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the expressions of this array expression internal.
|
||||
*/
|
||||
final Expr getAnExpr() { result = this.getExpr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of expressions of this array expression internal.
|
||||
*/
|
||||
final int getNumberOfExprs() { result = count(int i | exists(this.getExpr(i))) }
|
||||
|
||||
/**
|
||||
* Holds if this array expression internal is semicolon.
|
||||
*/
|
||||
predicate isSemicolon() {
|
||||
Synth::convertArrayExprInternalToRaw(this).(Raw::ArrayExprInternal).isSemicolon()
|
||||
}
|
||||
}
|
||||
}
|
||||
27
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayListExpr.qll
generated
Normal file
27
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayListExpr.qll
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `ArrayListExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.ArrayExprImpl::Impl as ArrayExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `ArrayListExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* An array expression with a list of elements. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::ArrayListExpr` class directly.
|
||||
* Use the subclass `ArrayListExpr`, where the following predicates are available.
|
||||
*/
|
||||
class ArrayListExpr extends Synth::TArrayListExpr, ArrayExprImpl::ArrayExpr {
|
||||
override string getAPrimaryQlClass() { result = "ArrayListExpr" }
|
||||
}
|
||||
}
|
||||
38
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayRepeatExpr.qll
generated
Normal file
38
rust/ql/lib/codeql/rust/elements/internal/generated/ArrayRepeatExpr.qll
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `ArrayRepeatExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.internal.ArrayExprImpl::Impl as ArrayExprImpl
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `ArrayRepeatExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* An array expression with a repeat operand and a repeat length. For example:
|
||||
* ```rust
|
||||
* [1; 10];
|
||||
* ```
|
||||
* INTERNAL: Do not reference the `Generated::ArrayRepeatExpr` class directly.
|
||||
* Use the subclass `ArrayRepeatExpr`, where the following predicates are available.
|
||||
*/
|
||||
class ArrayRepeatExpr extends Synth::TArrayRepeatExpr, ArrayExprImpl::ArrayExpr {
|
||||
override string getAPrimaryQlClass() { result = "ArrayRepeatExpr" }
|
||||
|
||||
/**
|
||||
* Gets the repeat operand of this array repeat expression.
|
||||
*/
|
||||
Expr getRepeatOperand() { none() }
|
||||
|
||||
/**
|
||||
* Gets the repeat length of this array repeat expression.
|
||||
*/
|
||||
Expr getRepeatLength() { none() }
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import codeql.rust.elements
|
||||
import codeql.rust.elements.internal.ArrayExprInternal
|
||||
|
||||
private module Impl {
|
||||
private Element getImmediateChildOfElement(Element e, int index, string partialPredicateCall) {
|
||||
@@ -1196,6 +1197,29 @@ private module Impl {
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfArrayExpr(ArrayExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bExpr, int n, int nExpr, int nAttr |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
nExpr = n + 1 + max(int i | i = -1 or exists(e.getExpr(i)) | i) and
|
||||
nAttr = nExpr + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
result = e.getExpr(index - n) and
|
||||
partialPredicateCall = "Expr(" + (index - n).toString() + ")"
|
||||
or
|
||||
result = e.getAttr(index - nExpr) and
|
||||
partialPredicateCall = "Attr(" + (index - nExpr).toString() + ")"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfArrayExprInternal(
|
||||
ArrayExprInternal e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bExpr, int n, int nAttr, int nExpr |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
@@ -2826,6 +2850,44 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfArrayListExpr(
|
||||
ArrayListExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bArrayExpr, int n |
|
||||
b = 0 and
|
||||
bArrayExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfArrayExpr(e, i, _)) | i) and
|
||||
n = bArrayExpr and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfArrayExpr(e, index - b, partialPredicateCall)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfArrayRepeatExpr(
|
||||
ArrayRepeatExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bArrayExpr, int n, int nRepeatOperand, int nRepeatLength |
|
||||
b = 0 and
|
||||
bArrayExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfArrayExpr(e, i, _)) | i) and
|
||||
n = bArrayExpr and
|
||||
nRepeatOperand = n + 1 and
|
||||
nRepeatLength = nRepeatOperand + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfArrayExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getRepeatOperand() and partialPredicateCall = "RepeatOperand()"
|
||||
or
|
||||
index = nRepeatOperand and
|
||||
result = e.getRepeatLength() and
|
||||
partialPredicateCall = "RepeatLength()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfBlockExpr(BlockExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bLabelableExpr, int n, int nAttr, int nStmtList |
|
||||
b = 0 and
|
||||
@@ -3737,7 +3799,7 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfWherePred(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfArrayExpr(e, index, partialAccessor)
|
||||
result = getImmediateChildOfArrayExprInternal(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfArrayTypeRepr(e, index, partialAccessor)
|
||||
or
|
||||
@@ -3887,6 +3949,10 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfYieldExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfArrayListExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfArrayRepeatExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfBlockExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfCallExpr(e, index, partialAccessor)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
* This module exports all modules providing `Element` subclasses.
|
||||
*/
|
||||
|
||||
import codeql.rust.elements.internal.ArrayListExprConstructor
|
||||
import codeql.rust.elements.internal.ArrayRepeatExprConstructor
|
||||
import codeql.rust.elements.internal.FormatConstructor
|
||||
import codeql.rust.elements.internal.FormatArgumentConstructor
|
||||
import codeql.rust.elements.internal.FormatTemplateVariableAccessConstructor
|
||||
|
||||
@@ -1104,24 +1104,24 @@ module Raw {
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* An array expression. For example:
|
||||
* ```rust
|
||||
* [1, 2, 3];
|
||||
* [1; 10];
|
||||
* ```
|
||||
*/
|
||||
class ArrayExpr extends @array_expr, Expr {
|
||||
override string toString() { result = "ArrayExpr" }
|
||||
class ArrayExprInternal extends @array_expr_internal, Expr {
|
||||
override string toString() { result = "ArrayExprInternal" }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this array expression (0-based).
|
||||
* Gets the `index`th attr of this array expression internal (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { array_expr_attrs(this, index, result) }
|
||||
Attr getAttr(int index) { array_expr_internal_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th expression of this array expression (0-based).
|
||||
* Gets the `index`th expression of this array expression internal (0-based).
|
||||
*/
|
||||
Expr getExpr(int index) { array_expr_exprs(this, index, result) }
|
||||
Expr getExpr(int index) { array_expr_internal_exprs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Holds if this array expression internal is semicolon.
|
||||
*/
|
||||
predicate isSemicolon() { array_expr_internal_is_semicolon(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,15 @@ module Synth {
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TArrayExpr(Raw::ArrayExpr id) { constructArrayExpr(id) } or
|
||||
TArrayExprInternal(Raw::ArrayExprInternal id) { constructArrayExprInternal(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TArrayListExpr(Raw::ArrayExprInternal id) { constructArrayListExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
TArrayRepeatExpr(Raw::ArrayExprInternal id) { constructArrayRepeatExpr(id) } or
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -616,6 +624,11 @@ module Synth {
|
||||
*/
|
||||
class TAddressable = TItem or TVariant;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TArrayExpr = TArrayListExpr or TArrayRepeatExpr;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -650,8 +663,8 @@ module Synth {
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TExpr =
|
||||
TArrayExpr or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or TBreakExpr or
|
||||
TCallExprBase or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or
|
||||
TArrayExpr or TArrayExprInternal or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or
|
||||
TBreakExpr or TCallExprBase or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or
|
||||
TFormatArgsExpr or TIfExpr or TIndexExpr or TLabelableExpr or TLetExpr or TLiteralExpr or
|
||||
TMacroExpr or TMatchExpr or TOffsetOfExpr or TParenExpr or TPathExprBase or TPrefixExpr or
|
||||
TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or TTryExpr or TTupleExpr or
|
||||
@@ -760,9 +773,23 @@ module Synth {
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TArrayExpr`, if possible.
|
||||
* Converts a raw element to a synthesized `TArrayExprInternal`, if possible.
|
||||
*/
|
||||
TArrayExpr convertArrayExprFromRaw(Raw::Element e) { result = TArrayExpr(e) }
|
||||
TArrayExprInternal convertArrayExprInternalFromRaw(Raw::Element e) {
|
||||
result = TArrayExprInternal(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TArrayListExpr`, if possible.
|
||||
*/
|
||||
TArrayListExpr convertArrayListExprFromRaw(Raw::Element e) { result = TArrayListExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw element to a synthesized `TArrayRepeatExpr`, if possible.
|
||||
*/
|
||||
TArrayRepeatExpr convertArrayRepeatExprFromRaw(Raw::Element e) { result = TArrayRepeatExpr(e) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -1646,6 +1673,16 @@ module Synth {
|
||||
result = convertVariantFromRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw DB element to a synthesized `TArrayExpr`, if possible.
|
||||
*/
|
||||
TArrayExpr convertArrayExprFromRaw(Raw::Element e) {
|
||||
result = convertArrayListExprFromRaw(e)
|
||||
or
|
||||
result = convertArrayRepeatExprFromRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw DB element to a synthesized `TAssocItem`, if possible.
|
||||
@@ -1817,6 +1854,8 @@ module Synth {
|
||||
TExpr convertExprFromRaw(Raw::Element e) {
|
||||
result = convertArrayExprFromRaw(e)
|
||||
or
|
||||
result = convertArrayExprInternalFromRaw(e)
|
||||
or
|
||||
result = convertAsmExprFromRaw(e)
|
||||
or
|
||||
result = convertAwaitExprFromRaw(e)
|
||||
@@ -2148,9 +2187,23 @@ module Synth {
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TArrayExpr` to a raw DB element, if possible.
|
||||
* Converts a synthesized `TArrayExprInternal` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertArrayExprToRaw(TArrayExpr e) { e = TArrayExpr(result) }
|
||||
Raw::Element convertArrayExprInternalToRaw(TArrayExprInternal e) {
|
||||
e = TArrayExprInternal(result)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TArrayListExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertArrayListExprToRaw(TArrayListExpr e) { e = TArrayListExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TArrayRepeatExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertArrayRepeatExprToRaw(TArrayRepeatExpr e) { e = TArrayRepeatExpr(result) }
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
@@ -3032,6 +3085,16 @@ module Synth {
|
||||
result = convertVariantToRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TArrayExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertArrayExprToRaw(TArrayExpr e) {
|
||||
result = convertArrayListExprToRaw(e)
|
||||
or
|
||||
result = convertArrayRepeatExprToRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TAssocItem` to a raw DB element, if possible.
|
||||
@@ -3203,6 +3266,8 @@ module Synth {
|
||||
Raw::Element convertExprToRaw(TExpr e) {
|
||||
result = convertArrayExprToRaw(e)
|
||||
or
|
||||
result = convertArrayExprInternalToRaw(e)
|
||||
or
|
||||
result = convertAsmExprToRaw(e)
|
||||
or
|
||||
result = convertAwaitExprToRaw(e)
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
|
||||
import codeql.rust.elements.internal.AbiConstructor
|
||||
import codeql.rust.elements.internal.ArgListConstructor
|
||||
import codeql.rust.elements.internal.ArrayExprConstructor
|
||||
import codeql.rust.elements.internal.ArrayExprInternalConstructor
|
||||
import codeql.rust.elements.internal.ArrayListExprConstructor
|
||||
import codeql.rust.elements.internal.ArrayRepeatExprConstructor
|
||||
import codeql.rust.elements.internal.ArrayTypeReprConstructor
|
||||
import codeql.rust.elements.internal.AsmExprConstructor
|
||||
import codeql.rust.elements.internal.AssocItemListConstructor
|
||||
|
||||
@@ -303,7 +303,7 @@ closure_binder_generic_param_lists(
|
||||
);
|
||||
|
||||
@expr =
|
||||
@array_expr
|
||||
@array_expr_internal
|
||||
| @asm_expr
|
||||
| @await_expr
|
||||
| @become_expr
|
||||
@@ -1087,24 +1087,29 @@ where_pred_type_bound_lists(
|
||||
int type_bound_list: @type_bound_list ref
|
||||
);
|
||||
|
||||
array_exprs(
|
||||
unique int id: @array_expr
|
||||
array_expr_internals(
|
||||
unique int id: @array_expr_internal
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
array_expr_attrs(
|
||||
int id: @array_expr ref,
|
||||
array_expr_internal_attrs(
|
||||
int id: @array_expr_internal ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
array_expr_exprs(
|
||||
int id: @array_expr ref,
|
||||
array_expr_internal_exprs(
|
||||
int id: @array_expr_internal ref,
|
||||
int index: int ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
array_expr_internal_is_semicolon(
|
||||
int id: @array_expr_internal ref
|
||||
);
|
||||
|
||||
array_type_reprs(
|
||||
unique int id: @array_type_repr
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Abi/gen_abi.rs 5d2f6eccb2bab86080188be9700ab64a34fa6e8e8e7b08f65a5c97d1de0a900c 5d2f6eccb2bab86080188be9700ab64a34fa6e8e8e7b08f65a5c97d1de0a900c
|
||||
ArgList/gen_arg_list.rs 569d0b9b0479de5453ae0f89e4f90e32b02ee84dfb3d815821d722ece6f75b64 569d0b9b0479de5453ae0f89e4f90e32b02ee84dfb3d815821d722ece6f75b64
|
||||
ArrayExpr/gen_array_expr.rs e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff e4863b428ea2b5cfd59773f201e58fd905f7363512e54e4fdebd02c297bd85ff
|
||||
ArrayListExpr/gen_array_list_expr.rs 99a1233b77a6b6eb0a538025688ca5a0824118a123bef0fe3f92a81834b17924 99a1233b77a6b6eb0a538025688ca5a0824118a123bef0fe3f92a81834b17924
|
||||
ArrayRepeatExpr/gen_array_repeat_expr.rs 8cc7c0a435a02864290db6a498a5fcf227d8ee7ed87ee1943ad4d326c8314a0e 8cc7c0a435a02864290db6a498a5fcf227d8ee7ed87ee1943ad4d326c8314a0e
|
||||
ArrayTypeRepr/gen_array_type_repr.rs 9cf7a12a6f7da3342db4ab65dfb5deefb1ef57398e2236fbb49d3280dad944ae 9cf7a12a6f7da3342db4ab65dfb5deefb1ef57398e2236fbb49d3280dad944ae
|
||||
AsmExpr/gen_asm_expr.rs 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158 00b21fd66fe12785174bd0160d0317a6c78ff05dbba73313eb07b56531cf3158
|
||||
AssocTypeArg/gen_assoc_type_arg.rs 00ec0e22c4d73338de605dc3b1b1306bc83a95f87376ce976f08d2f9923cc2b4 00ec0e22c4d73338de605dc3b1b1306bc83a95f87376ce976f08d2f9923cc2b4
|
||||
|
||||
3
rust/ql/test/extractor-tests/generated/.gitattributes
generated
vendored
3
rust/ql/test/extractor-tests/generated/.gitattributes
generated
vendored
@@ -2,7 +2,8 @@
|
||||
/.gitattributes linguist-generated
|
||||
/Abi/gen_abi.rs linguist-generated
|
||||
/ArgList/gen_arg_list.rs linguist-generated
|
||||
/ArrayExpr/gen_array_expr.rs linguist-generated
|
||||
/ArrayListExpr/gen_array_list_expr.rs linguist-generated
|
||||
/ArrayRepeatExpr/gen_array_repeat_expr.rs linguist-generated
|
||||
/ArrayTypeRepr/gen_array_type_repr.rs linguist-generated
|
||||
/AsmExpr/gen_asm_expr.rs linguist-generated
|
||||
/AssocTypeArg/gen_assoc_type_arg.rs linguist-generated
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
| gen_array_expr.rs:5:5:5:13 | [...] | getNumberOfAttrs: | 0 | getNumberOfExprs: | 3 |
|
||||
| gen_array_expr.rs:6:5:6:11 | [...] | getNumberOfAttrs: | 0 | getNumberOfExprs: | 2 |
|
||||
@@ -1,11 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayExpr x, int getNumberOfAttrs, int getNumberOfExprs
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
getNumberOfAttrs = x.getNumberOfAttrs() and
|
||||
getNumberOfExprs = x.getNumberOfExprs()
|
||||
select x, "getNumberOfAttrs:", getNumberOfAttrs, "getNumberOfExprs:", getNumberOfExprs
|
||||
@@ -1,5 +0,0 @@
|
||||
| gen_array_expr.rs:5:5:5:13 | [...] | 0 | gen_array_expr.rs:5:6:5:6 | 1 |
|
||||
| gen_array_expr.rs:5:5:5:13 | [...] | 1 | gen_array_expr.rs:5:9:5:9 | 2 |
|
||||
| gen_array_expr.rs:5:5:5:13 | [...] | 2 | gen_array_expr.rs:5:12:5:12 | 3 |
|
||||
| gen_array_expr.rs:6:5:6:11 | [...] | 0 | gen_array_expr.rs:6:6:6:6 | 1 |
|
||||
| gen_array_expr.rs:6:5:6:11 | [...] | 1 | gen_array_expr.rs:6:9:6:10 | 10 |
|
||||
@@ -1,7 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_array_expr() -> () {
|
||||
// An array expression. For example:
|
||||
[1, 2, 3];
|
||||
[1; 10];
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
| gen_array_list_expr.rs:5:5:5:13 | [...] | getNumberOfExprs: | 3 | getNumberOfAttrs: | 0 |
|
||||
11
rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql
generated
Normal file
11
rust/ql/test/extractor-tests/generated/ArrayListExpr/ArrayListExpr.ql
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayListExpr x, int getNumberOfExprs, int getNumberOfAttrs
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
getNumberOfExprs = x.getNumberOfExprs() and
|
||||
getNumberOfAttrs = x.getNumberOfAttrs()
|
||||
select x, "getNumberOfExprs:", getNumberOfExprs, "getNumberOfAttrs:", getNumberOfAttrs
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayExpr x, int index
|
||||
from ArrayListExpr x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getAttr(index)
|
||||
@@ -0,0 +1,3 @@
|
||||
| gen_array_list_expr.rs:5:5:5:13 | [...] | 0 | gen_array_list_expr.rs:5:6:5:6 | 1 |
|
||||
| gen_array_list_expr.rs:5:5:5:13 | [...] | 1 | gen_array_list_expr.rs:5:9:5:9 | 2 |
|
||||
| gen_array_list_expr.rs:5:5:5:13 | [...] | 2 | gen_array_list_expr.rs:5:12:5:12 | 3 |
|
||||
@@ -2,6 +2,6 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayExpr x, int index
|
||||
from ArrayListExpr x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getExpr(index)
|
||||
6
rust/ql/test/extractor-tests/generated/ArrayListExpr/gen_array_list_expr.rs
generated
Normal file
6
rust/ql/test/extractor-tests/generated/ArrayListExpr/gen_array_list_expr.rs
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_array_list_expr() -> () {
|
||||
// An array expression with a list of elements. For example:
|
||||
[1, 2, 3];
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | getNumberOfExprs: | 2 | getNumberOfAttrs: | 0 | getRepeatOperand: | gen_array_repeat_expr.rs:5:6:5:6 | 1 | getRepeatLength: | gen_array_repeat_expr.rs:5:9:5:10 | 10 |
|
||||
16
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql
generated
Normal file
16
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr.ql
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from
|
||||
ArrayRepeatExpr x, int getNumberOfExprs, int getNumberOfAttrs, Expr getRepeatOperand,
|
||||
Expr getRepeatLength
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
getNumberOfExprs = x.getNumberOfExprs() and
|
||||
getNumberOfAttrs = x.getNumberOfAttrs() and
|
||||
getRepeatOperand = x.getRepeatOperand() and
|
||||
getRepeatLength = x.getRepeatLength()
|
||||
select x, "getNumberOfExprs:", getNumberOfExprs, "getNumberOfAttrs:", getNumberOfAttrs,
|
||||
"getRepeatOperand:", getRepeatOperand, "getRepeatLength:", getRepeatLength
|
||||
7
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getAttr.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayRepeatExpr x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getAttr(index)
|
||||
@@ -0,0 +1,2 @@
|
||||
| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 0 | gen_array_repeat_expr.rs:5:6:5:6 | 1 |
|
||||
| gen_array_repeat_expr.rs:5:5:5:11 | [1; 10] | 1 | gen_array_repeat_expr.rs:5:9:5:10 | 10 |
|
||||
7
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/ArrayRepeatExpr_getExpr.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ArrayRepeatExpr x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getExpr(index)
|
||||
6
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/gen_array_repeat_expr.rs
generated
Normal file
6
rust/ql/test/extractor-tests/generated/ArrayRepeatExpr/gen_array_repeat_expr.rs
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_array_repeat_expr() -> () {
|
||||
// An array expression with a repeat operand and a repeat length. For example:
|
||||
[1; 10];
|
||||
}
|
||||
@@ -123,227 +123,227 @@ localStep
|
||||
| main.rs:120:10:120:10 | b | main.rs:121:10:121:10 | b |
|
||||
| main.rs:121:10:121:10 | [post] b | main.rs:122:10:122:10 | b |
|
||||
| main.rs:121:10:121:10 | b | main.rs:122:10:122:10 | b |
|
||||
| main.rs:134:9:134:9 | [SSA] p | main.rs:138:10:138:10 | p |
|
||||
| main.rs:134:9:134:9 | [SSA] p | main.rs:135:10:135:10 | p |
|
||||
| main.rs:134:9:134:9 | p | main.rs:134:9:134:9 | [SSA] p |
|
||||
| main.rs:134:13:137:5 | Point {...} | main.rs:134:9:134:9 | p |
|
||||
| main.rs:138:10:138:10 | [post] p | main.rs:139:10:139:10 | p |
|
||||
| main.rs:138:10:138:10 | p | main.rs:139:10:139:10 | p |
|
||||
| main.rs:143:9:143:13 | [SSA] p | main.rs:147:10:147:10 | p |
|
||||
| main.rs:143:9:143:13 | p | main.rs:143:9:143:13 | [SSA] p |
|
||||
| main.rs:143:17:146:5 | Point {...} | main.rs:143:9:143:13 | p |
|
||||
| main.rs:147:10:147:10 | [post] p | main.rs:148:5:148:5 | p |
|
||||
| main.rs:147:10:147:10 | p | main.rs:148:5:148:5 | p |
|
||||
| main.rs:148:5:148:5 | [post] p | main.rs:149:10:149:10 | p |
|
||||
| main.rs:148:5:148:5 | p | main.rs:149:10:149:10 | p |
|
||||
| main.rs:148:11:148:20 | source(...) | main.rs:148:5:148:7 | p.y |
|
||||
| main.rs:153:9:153:9 | [SSA] p | main.rs:157:32:157:32 | p |
|
||||
| main.rs:153:9:153:9 | p | main.rs:153:9:153:9 | [SSA] p |
|
||||
| main.rs:153:13:156:5 | Point {...} | main.rs:153:9:153:9 | p |
|
||||
| main.rs:157:20:157:20 | [SSA] a | main.rs:158:10:158:10 | a |
|
||||
| main.rs:157:20:157:20 | a | main.rs:157:20:157:20 | [SSA] a |
|
||||
| main.rs:157:26:157:26 | [SSA] b | main.rs:159:10:159:10 | b |
|
||||
| main.rs:157:26:157:26 | b | main.rs:157:26:157:26 | [SSA] b |
|
||||
| main.rs:157:32:157:32 | p | main.rs:157:9:157:28 | Point {...} |
|
||||
| main.rs:168:9:168:9 | [SSA] p | main.rs:175:10:175:10 | p |
|
||||
| main.rs:168:9:168:9 | p | main.rs:168:9:168:9 | [SSA] p |
|
||||
| main.rs:168:13:174:5 | Point3D {...} | main.rs:168:9:168:9 | p |
|
||||
| main.rs:175:10:175:10 | [post] p | main.rs:176:10:176:10 | p |
|
||||
| main.rs:175:10:175:10 | p | main.rs:176:10:176:10 | p |
|
||||
| main.rs:176:10:176:10 | [post] p | main.rs:177:10:177:10 | p |
|
||||
| main.rs:176:10:176:10 | p | main.rs:177:10:177:10 | p |
|
||||
| main.rs:181:9:181:9 | [SSA] p | main.rs:188:11:188:11 | p |
|
||||
| main.rs:181:9:181:9 | p | main.rs:181:9:181:9 | [SSA] p |
|
||||
| main.rs:181:13:187:5 | Point3D {...} | main.rs:181:9:181:9 | p |
|
||||
| main.rs:188:5:194:5 | match p { ... } | main.rs:180:26:195:1 | { ... } |
|
||||
| main.rs:188:11:188:11 | p | main.rs:189:9:189:45 | Point3D {...} |
|
||||
| main.rs:189:34:189:34 | [SSA] x | main.rs:190:18:190:18 | x |
|
||||
| main.rs:189:34:189:34 | x | main.rs:189:34:189:34 | [SSA] x |
|
||||
| main.rs:189:37:189:37 | [SSA] y | main.rs:191:18:191:18 | y |
|
||||
| main.rs:189:37:189:37 | y | main.rs:189:37:189:37 | [SSA] y |
|
||||
| main.rs:189:42:189:42 | [SSA] z | main.rs:192:18:192:18 | z |
|
||||
| main.rs:189:42:189:42 | z | main.rs:189:42:189:42 | [SSA] z |
|
||||
| main.rs:189:50:193:9 | { ... } | main.rs:188:5:194:5 | match p { ... } |
|
||||
| main.rs:201:9:201:10 | [SSA] s1 | main.rs:203:11:203:12 | s1 |
|
||||
| main.rs:201:9:201:10 | s1 | main.rs:201:9:201:10 | [SSA] s1 |
|
||||
| main.rs:201:14:201:37 | ...::Some(...) | main.rs:201:9:201:10 | s1 |
|
||||
| main.rs:202:9:202:10 | [SSA] s2 | main.rs:207:11:207:12 | s2 |
|
||||
| main.rs:202:9:202:10 | s2 | main.rs:202:9:202:10 | [SSA] s2 |
|
||||
| main.rs:202:14:202:28 | ...::Some(...) | main.rs:202:9:202:10 | s2 |
|
||||
| main.rs:203:11:203:12 | s1 | main.rs:204:9:204:23 | TupleStructPat |
|
||||
| main.rs:203:11:203:12 | s1 | main.rs:205:9:205:20 | ...::None |
|
||||
| main.rs:204:22:204:22 | [SSA] n | main.rs:204:33:204:33 | n |
|
||||
| main.rs:204:22:204:22 | n | main.rs:204:22:204:22 | [SSA] n |
|
||||
| main.rs:204:28:204:34 | sink(...) | main.rs:203:5:206:5 | match s1 { ... } |
|
||||
| main.rs:205:25:205:31 | sink(...) | main.rs:203:5:206:5 | match s1 { ... } |
|
||||
| main.rs:207:5:210:5 | match s2 { ... } | main.rs:200:37:211:1 | { ... } |
|
||||
| main.rs:207:11:207:12 | s2 | main.rs:208:9:208:23 | TupleStructPat |
|
||||
| main.rs:207:11:207:12 | s2 | main.rs:209:9:209:20 | ...::None |
|
||||
| main.rs:208:22:208:22 | [SSA] n | main.rs:208:33:208:33 | n |
|
||||
| main.rs:208:22:208:22 | n | main.rs:208:22:208:22 | [SSA] n |
|
||||
| main.rs:208:28:208:34 | sink(...) | main.rs:207:5:210:5 | match s2 { ... } |
|
||||
| main.rs:209:25:209:31 | sink(...) | main.rs:207:5:210:5 | match s2 { ... } |
|
||||
| main.rs:214:9:214:10 | [SSA] s1 | main.rs:216:11:216:12 | s1 |
|
||||
| main.rs:214:9:214:10 | s1 | main.rs:214:9:214:10 | [SSA] s1 |
|
||||
| main.rs:214:14:214:29 | Some(...) | main.rs:214:9:214:10 | s1 |
|
||||
| main.rs:215:9:215:10 | [SSA] s2 | main.rs:220:11:220:12 | s2 |
|
||||
| main.rs:215:9:215:10 | s2 | main.rs:215:9:215:10 | [SSA] s2 |
|
||||
| main.rs:215:14:215:20 | Some(...) | main.rs:215:9:215:10 | s2 |
|
||||
| main.rs:216:11:216:12 | s1 | main.rs:217:9:217:15 | TupleStructPat |
|
||||
| main.rs:216:11:216:12 | s1 | main.rs:218:9:218:12 | None |
|
||||
| main.rs:217:14:217:14 | [SSA] n | main.rs:217:25:217:25 | n |
|
||||
| main.rs:217:14:217:14 | n | main.rs:217:14:217:14 | [SSA] n |
|
||||
| main.rs:217:20:217:26 | sink(...) | main.rs:216:5:219:5 | match s1 { ... } |
|
||||
| main.rs:218:17:218:23 | sink(...) | main.rs:216:5:219:5 | match s1 { ... } |
|
||||
| main.rs:220:5:223:5 | match s2 { ... } | main.rs:213:39:224:1 | { ... } |
|
||||
| main.rs:220:11:220:12 | s2 | main.rs:221:9:221:15 | TupleStructPat |
|
||||
| main.rs:220:11:220:12 | s2 | main.rs:222:9:222:12 | None |
|
||||
| main.rs:221:14:221:14 | [SSA] n | main.rs:221:25:221:25 | n |
|
||||
| main.rs:221:14:221:14 | n | main.rs:221:14:221:14 | [SSA] n |
|
||||
| main.rs:221:20:221:26 | sink(...) | main.rs:220:5:223:5 | match s2 { ... } |
|
||||
| main.rs:222:17:222:23 | sink(...) | main.rs:220:5:223:5 | match s2 { ... } |
|
||||
| main.rs:227:9:227:10 | [SSA] s1 | main.rs:228:10:228:11 | s1 |
|
||||
| main.rs:227:9:227:10 | s1 | main.rs:227:9:227:10 | [SSA] s1 |
|
||||
| main.rs:227:14:227:29 | Some(...) | main.rs:227:9:227:10 | s1 |
|
||||
| main.rs:237:9:237:10 | [SSA] s1 | main.rs:239:11:239:12 | s1 |
|
||||
| main.rs:237:9:237:10 | s1 | main.rs:237:9:237:10 | [SSA] s1 |
|
||||
| main.rs:237:14:237:39 | ...::A(...) | main.rs:237:9:237:10 | s1 |
|
||||
| main.rs:238:9:238:10 | [SSA] s2 | main.rs:246:11:246:12 | s2 |
|
||||
| main.rs:238:9:238:10 | s2 | main.rs:238:9:238:10 | [SSA] s2 |
|
||||
| main.rs:238:14:238:30 | ...::B(...) | main.rs:238:9:238:10 | s2 |
|
||||
| main.rs:239:11:239:12 | s1 | main.rs:240:9:240:25 | TupleStructPat |
|
||||
| main.rs:239:11:239:12 | s1 | main.rs:241:9:241:25 | TupleStructPat |
|
||||
| main.rs:239:11:239:12 | s1 | main.rs:243:11:243:12 | s1 |
|
||||
| main.rs:240:24:240:24 | [SSA] n | main.rs:240:35:240:35 | n |
|
||||
| main.rs:240:24:240:24 | n | main.rs:240:24:240:24 | [SSA] n |
|
||||
| main.rs:240:30:240:36 | sink(...) | main.rs:239:5:242:5 | match s1 { ... } |
|
||||
| main.rs:241:24:241:24 | [SSA] n | main.rs:241:35:241:35 | n |
|
||||
| main.rs:134:13:134:40 | Point {...} | main.rs:134:9:134:9 | p |
|
||||
| main.rs:135:10:135:10 | [post] p | main.rs:136:10:136:10 | p |
|
||||
| main.rs:135:10:135:10 | p | main.rs:136:10:136:10 | p |
|
||||
| main.rs:140:9:140:13 | [SSA] p | main.rs:141:10:141:10 | p |
|
||||
| main.rs:140:9:140:13 | p | main.rs:140:9:140:13 | [SSA] p |
|
||||
| main.rs:140:17:140:44 | Point {...} | main.rs:140:9:140:13 | p |
|
||||
| main.rs:141:10:141:10 | [post] p | main.rs:142:5:142:5 | p |
|
||||
| main.rs:141:10:141:10 | p | main.rs:142:5:142:5 | p |
|
||||
| main.rs:142:5:142:5 | [post] p | main.rs:143:10:143:10 | p |
|
||||
| main.rs:142:5:142:5 | p | main.rs:143:10:143:10 | p |
|
||||
| main.rs:142:11:142:20 | source(...) | main.rs:142:5:142:7 | p.y |
|
||||
| main.rs:147:9:147:9 | [SSA] p | main.rs:151:32:151:32 | p |
|
||||
| main.rs:147:9:147:9 | p | main.rs:147:9:147:9 | [SSA] p |
|
||||
| main.rs:147:13:150:5 | Point {...} | main.rs:147:9:147:9 | p |
|
||||
| main.rs:151:20:151:20 | [SSA] a | main.rs:152:10:152:10 | a |
|
||||
| main.rs:151:20:151:20 | a | main.rs:151:20:151:20 | [SSA] a |
|
||||
| main.rs:151:26:151:26 | [SSA] b | main.rs:153:10:153:10 | b |
|
||||
| main.rs:151:26:151:26 | b | main.rs:151:26:151:26 | [SSA] b |
|
||||
| main.rs:151:32:151:32 | p | main.rs:151:9:151:28 | Point {...} |
|
||||
| main.rs:162:9:162:9 | [SSA] p | main.rs:169:10:169:10 | p |
|
||||
| main.rs:162:9:162:9 | p | main.rs:162:9:162:9 | [SSA] p |
|
||||
| main.rs:162:13:168:5 | Point3D {...} | main.rs:162:9:162:9 | p |
|
||||
| main.rs:169:10:169:10 | [post] p | main.rs:170:10:170:10 | p |
|
||||
| main.rs:169:10:169:10 | p | main.rs:170:10:170:10 | p |
|
||||
| main.rs:170:10:170:10 | [post] p | main.rs:171:10:171:10 | p |
|
||||
| main.rs:170:10:170:10 | p | main.rs:171:10:171:10 | p |
|
||||
| main.rs:175:9:175:9 | [SSA] p | main.rs:182:11:182:11 | p |
|
||||
| main.rs:175:9:175:9 | p | main.rs:175:9:175:9 | [SSA] p |
|
||||
| main.rs:175:13:181:5 | Point3D {...} | main.rs:175:9:175:9 | p |
|
||||
| main.rs:182:5:191:5 | match p { ... } | main.rs:174:26:192:1 | { ... } |
|
||||
| main.rs:182:11:182:11 | p | main.rs:183:9:186:9 | Point3D {...} |
|
||||
| main.rs:184:28:184:28 | [SSA] x | main.rs:187:18:187:18 | x |
|
||||
| main.rs:184:28:184:28 | x | main.rs:184:28:184:28 | [SSA] x |
|
||||
| main.rs:184:31:184:31 | [SSA] y | main.rs:188:18:188:18 | y |
|
||||
| main.rs:184:31:184:31 | y | main.rs:184:31:184:31 | [SSA] y |
|
||||
| main.rs:185:13:185:13 | [SSA] z | main.rs:189:18:189:18 | z |
|
||||
| main.rs:185:13:185:13 | z | main.rs:185:13:185:13 | [SSA] z |
|
||||
| main.rs:186:14:190:9 | { ... } | main.rs:182:5:191:5 | match p { ... } |
|
||||
| main.rs:198:9:198:10 | [SSA] s1 | main.rs:200:11:200:12 | s1 |
|
||||
| main.rs:198:9:198:10 | s1 | main.rs:198:9:198:10 | [SSA] s1 |
|
||||
| main.rs:198:14:198:37 | ...::Some(...) | main.rs:198:9:198:10 | s1 |
|
||||
| main.rs:199:9:199:10 | [SSA] s2 | main.rs:204:11:204:12 | s2 |
|
||||
| main.rs:199:9:199:10 | s2 | main.rs:199:9:199:10 | [SSA] s2 |
|
||||
| main.rs:199:14:199:28 | ...::Some(...) | main.rs:199:9:199:10 | s2 |
|
||||
| main.rs:200:11:200:12 | s1 | main.rs:201:9:201:23 | TupleStructPat |
|
||||
| main.rs:200:11:200:12 | s1 | main.rs:202:9:202:20 | ...::None |
|
||||
| main.rs:201:22:201:22 | [SSA] n | main.rs:201:33:201:33 | n |
|
||||
| main.rs:201:22:201:22 | n | main.rs:201:22:201:22 | [SSA] n |
|
||||
| main.rs:201:28:201:34 | sink(...) | main.rs:200:5:203:5 | match s1 { ... } |
|
||||
| main.rs:202:25:202:31 | sink(...) | main.rs:200:5:203:5 | match s1 { ... } |
|
||||
| main.rs:204:5:207:5 | match s2 { ... } | main.rs:197:37:208:1 | { ... } |
|
||||
| main.rs:204:11:204:12 | s2 | main.rs:205:9:205:23 | TupleStructPat |
|
||||
| main.rs:204:11:204:12 | s2 | main.rs:206:9:206:20 | ...::None |
|
||||
| main.rs:205:22:205:22 | [SSA] n | main.rs:205:33:205:33 | n |
|
||||
| main.rs:205:22:205:22 | n | main.rs:205:22:205:22 | [SSA] n |
|
||||
| main.rs:205:28:205:34 | sink(...) | main.rs:204:5:207:5 | match s2 { ... } |
|
||||
| main.rs:206:25:206:31 | sink(...) | main.rs:204:5:207:5 | match s2 { ... } |
|
||||
| main.rs:211:9:211:10 | [SSA] s1 | main.rs:213:11:213:12 | s1 |
|
||||
| main.rs:211:9:211:10 | s1 | main.rs:211:9:211:10 | [SSA] s1 |
|
||||
| main.rs:211:14:211:29 | Some(...) | main.rs:211:9:211:10 | s1 |
|
||||
| main.rs:212:9:212:10 | [SSA] s2 | main.rs:217:11:217:12 | s2 |
|
||||
| main.rs:212:9:212:10 | s2 | main.rs:212:9:212:10 | [SSA] s2 |
|
||||
| main.rs:212:14:212:20 | Some(...) | main.rs:212:9:212:10 | s2 |
|
||||
| main.rs:213:11:213:12 | s1 | main.rs:214:9:214:15 | TupleStructPat |
|
||||
| main.rs:213:11:213:12 | s1 | main.rs:215:9:215:12 | None |
|
||||
| main.rs:214:14:214:14 | [SSA] n | main.rs:214:25:214:25 | n |
|
||||
| main.rs:214:14:214:14 | n | main.rs:214:14:214:14 | [SSA] n |
|
||||
| main.rs:214:20:214:26 | sink(...) | main.rs:213:5:216:5 | match s1 { ... } |
|
||||
| main.rs:215:17:215:23 | sink(...) | main.rs:213:5:216:5 | match s1 { ... } |
|
||||
| main.rs:217:5:220:5 | match s2 { ... } | main.rs:210:39:221:1 | { ... } |
|
||||
| main.rs:217:11:217:12 | s2 | main.rs:218:9:218:15 | TupleStructPat |
|
||||
| main.rs:217:11:217:12 | s2 | main.rs:219:9:219:12 | None |
|
||||
| main.rs:218:14:218:14 | [SSA] n | main.rs:218:25:218:25 | n |
|
||||
| main.rs:218:14:218:14 | n | main.rs:218:14:218:14 | [SSA] n |
|
||||
| main.rs:218:20:218:26 | sink(...) | main.rs:217:5:220:5 | match s2 { ... } |
|
||||
| main.rs:219:17:219:23 | sink(...) | main.rs:217:5:220:5 | match s2 { ... } |
|
||||
| main.rs:224:9:224:10 | [SSA] s1 | main.rs:225:10:225:11 | s1 |
|
||||
| main.rs:224:9:224:10 | s1 | main.rs:224:9:224:10 | [SSA] s1 |
|
||||
| main.rs:224:14:224:29 | Some(...) | main.rs:224:9:224:10 | s1 |
|
||||
| main.rs:234:9:234:10 | [SSA] s1 | main.rs:236:11:236:12 | s1 |
|
||||
| main.rs:234:9:234:10 | s1 | main.rs:234:9:234:10 | [SSA] s1 |
|
||||
| main.rs:234:14:234:39 | ...::A(...) | main.rs:234:9:234:10 | s1 |
|
||||
| main.rs:235:9:235:10 | [SSA] s2 | main.rs:243:11:243:12 | s2 |
|
||||
| main.rs:235:9:235:10 | s2 | main.rs:235:9:235:10 | [SSA] s2 |
|
||||
| main.rs:235:14:235:30 | ...::B(...) | main.rs:235:9:235:10 | s2 |
|
||||
| main.rs:236:11:236:12 | s1 | main.rs:237:9:237:25 | TupleStructPat |
|
||||
| main.rs:236:11:236:12 | s1 | main.rs:238:9:238:25 | TupleStructPat |
|
||||
| main.rs:236:11:236:12 | s1 | main.rs:240:11:240:12 | s1 |
|
||||
| main.rs:237:24:237:24 | [SSA] n | main.rs:237:35:237:35 | n |
|
||||
| main.rs:237:24:237:24 | n | main.rs:237:24:237:24 | [SSA] n |
|
||||
| main.rs:237:30:237:36 | sink(...) | main.rs:236:5:239:5 | match s1 { ... } |
|
||||
| main.rs:238:24:238:24 | [SSA] n | main.rs:238:35:238:35 | n |
|
||||
| main.rs:238:24:238:24 | n | main.rs:238:24:238:24 | [SSA] n |
|
||||
| main.rs:238:30:238:36 | sink(...) | main.rs:236:5:239:5 | match s1 { ... } |
|
||||
| main.rs:240:11:240:12 | s1 | main.rs:241:9:241:45 | ... \| ... |
|
||||
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:9:241:25 | TupleStructPat |
|
||||
| main.rs:241:9:241:45 | ... \| ... | main.rs:241:29:241:45 | TupleStructPat |
|
||||
| main.rs:241:9:241:45 | [SSA] [match(true)] phi | main.rs:241:55:241:55 | n |
|
||||
| main.rs:241:24:241:24 | [SSA] [input] [match(true)] phi | main.rs:241:9:241:45 | [SSA] [match(true)] phi |
|
||||
| main.rs:241:24:241:24 | [SSA] n | main.rs:241:24:241:24 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:241:24:241:24 | n | main.rs:241:24:241:24 | [SSA] n |
|
||||
| main.rs:241:30:241:36 | sink(...) | main.rs:239:5:242:5 | match s1 { ... } |
|
||||
| main.rs:243:11:243:12 | s1 | main.rs:244:9:244:45 | ... \| ... |
|
||||
| main.rs:244:9:244:45 | ... \| ... | main.rs:244:9:244:25 | TupleStructPat |
|
||||
| main.rs:244:9:244:45 | ... \| ... | main.rs:244:29:244:45 | TupleStructPat |
|
||||
| main.rs:244:9:244:45 | [SSA] [match(true)] phi | main.rs:244:55:244:55 | n |
|
||||
| main.rs:244:24:244:24 | [SSA] [input] [match(true)] phi | main.rs:244:9:244:45 | [SSA] [match(true)] phi |
|
||||
| main.rs:244:24:244:24 | [SSA] n | main.rs:244:24:244:24 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:241:44:241:44 | [SSA] [input] [match(true)] phi | main.rs:241:9:241:45 | [SSA] [match(true)] phi |
|
||||
| main.rs:241:44:241:44 | [SSA] n | main.rs:241:44:241:44 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:241:44:241:44 | n | main.rs:241:44:241:44 | [SSA] n |
|
||||
| main.rs:241:50:241:56 | sink(...) | main.rs:240:5:242:5 | match s1 { ... } |
|
||||
| main.rs:243:5:246:5 | match s2 { ... } | main.rs:233:48:247:1 | { ... } |
|
||||
| main.rs:243:11:243:12 | s2 | main.rs:244:9:244:25 | TupleStructPat |
|
||||
| main.rs:243:11:243:12 | s2 | main.rs:245:9:245:25 | TupleStructPat |
|
||||
| main.rs:244:24:244:24 | [SSA] n | main.rs:244:35:244:35 | n |
|
||||
| main.rs:244:24:244:24 | n | main.rs:244:24:244:24 | [SSA] n |
|
||||
| main.rs:244:44:244:44 | [SSA] [input] [match(true)] phi | main.rs:244:9:244:45 | [SSA] [match(true)] phi |
|
||||
| main.rs:244:44:244:44 | [SSA] n | main.rs:244:44:244:44 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:244:44:244:44 | n | main.rs:244:44:244:44 | [SSA] n |
|
||||
| main.rs:244:50:244:56 | sink(...) | main.rs:243:5:245:5 | match s1 { ... } |
|
||||
| main.rs:246:5:249:5 | match s2 { ... } | main.rs:236:48:250:1 | { ... } |
|
||||
| main.rs:246:11:246:12 | s2 | main.rs:247:9:247:25 | TupleStructPat |
|
||||
| main.rs:246:11:246:12 | s2 | main.rs:248:9:248:25 | TupleStructPat |
|
||||
| main.rs:247:24:247:24 | [SSA] n | main.rs:247:35:247:35 | n |
|
||||
| main.rs:247:24:247:24 | n | main.rs:247:24:247:24 | [SSA] n |
|
||||
| main.rs:247:30:247:36 | sink(...) | main.rs:246:5:249:5 | match s2 { ... } |
|
||||
| main.rs:248:24:248:24 | [SSA] n | main.rs:248:35:248:35 | n |
|
||||
| main.rs:248:24:248:24 | n | main.rs:248:24:248:24 | [SSA] n |
|
||||
| main.rs:248:30:248:36 | sink(...) | main.rs:246:5:249:5 | match s2 { ... } |
|
||||
| main.rs:255:9:255:10 | [SSA] s1 | main.rs:257:11:257:12 | s1 |
|
||||
| main.rs:255:9:255:10 | s1 | main.rs:255:9:255:10 | [SSA] s1 |
|
||||
| main.rs:255:14:255:26 | A(...) | main.rs:255:9:255:10 | s1 |
|
||||
| main.rs:256:9:256:10 | [SSA] s2 | main.rs:264:11:264:12 | s2 |
|
||||
| main.rs:256:9:256:10 | s2 | main.rs:256:9:256:10 | [SSA] s2 |
|
||||
| main.rs:256:14:256:17 | B(...) | main.rs:256:9:256:10 | s2 |
|
||||
| main.rs:257:11:257:12 | s1 | main.rs:258:9:258:12 | TupleStructPat |
|
||||
| main.rs:257:11:257:12 | s1 | main.rs:259:9:259:12 | TupleStructPat |
|
||||
| main.rs:257:11:257:12 | s1 | main.rs:261:11:261:12 | s1 |
|
||||
| main.rs:258:11:258:11 | [SSA] n | main.rs:258:22:258:22 | n |
|
||||
| main.rs:258:11:258:11 | n | main.rs:258:11:258:11 | [SSA] n |
|
||||
| main.rs:258:17:258:23 | sink(...) | main.rs:257:5:260:5 | match s1 { ... } |
|
||||
| main.rs:259:11:259:11 | [SSA] n | main.rs:259:22:259:22 | n |
|
||||
| main.rs:244:30:244:36 | sink(...) | main.rs:243:5:246:5 | match s2 { ... } |
|
||||
| main.rs:245:24:245:24 | [SSA] n | main.rs:245:35:245:35 | n |
|
||||
| main.rs:245:24:245:24 | n | main.rs:245:24:245:24 | [SSA] n |
|
||||
| main.rs:245:30:245:36 | sink(...) | main.rs:243:5:246:5 | match s2 { ... } |
|
||||
| main.rs:252:9:252:10 | [SSA] s1 | main.rs:254:11:254:12 | s1 |
|
||||
| main.rs:252:9:252:10 | s1 | main.rs:252:9:252:10 | [SSA] s1 |
|
||||
| main.rs:252:14:252:26 | A(...) | main.rs:252:9:252:10 | s1 |
|
||||
| main.rs:253:9:253:10 | [SSA] s2 | main.rs:261:11:261:12 | s2 |
|
||||
| main.rs:253:9:253:10 | s2 | main.rs:253:9:253:10 | [SSA] s2 |
|
||||
| main.rs:253:14:253:17 | B(...) | main.rs:253:9:253:10 | s2 |
|
||||
| main.rs:254:11:254:12 | s1 | main.rs:255:9:255:12 | TupleStructPat |
|
||||
| main.rs:254:11:254:12 | s1 | main.rs:256:9:256:12 | TupleStructPat |
|
||||
| main.rs:254:11:254:12 | s1 | main.rs:258:11:258:12 | s1 |
|
||||
| main.rs:255:11:255:11 | [SSA] n | main.rs:255:22:255:22 | n |
|
||||
| main.rs:255:11:255:11 | n | main.rs:255:11:255:11 | [SSA] n |
|
||||
| main.rs:255:17:255:23 | sink(...) | main.rs:254:5:257:5 | match s1 { ... } |
|
||||
| main.rs:256:11:256:11 | [SSA] n | main.rs:256:22:256:22 | n |
|
||||
| main.rs:256:11:256:11 | n | main.rs:256:11:256:11 | [SSA] n |
|
||||
| main.rs:256:17:256:23 | sink(...) | main.rs:254:5:257:5 | match s1 { ... } |
|
||||
| main.rs:258:11:258:12 | s1 | main.rs:259:9:259:19 | ... \| ... |
|
||||
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:9:259:12 | TupleStructPat |
|
||||
| main.rs:259:9:259:19 | ... \| ... | main.rs:259:16:259:19 | TupleStructPat |
|
||||
| main.rs:259:9:259:19 | [SSA] [match(true)] phi | main.rs:259:29:259:29 | n |
|
||||
| main.rs:259:11:259:11 | [SSA] [input] [match(true)] phi | main.rs:259:9:259:19 | [SSA] [match(true)] phi |
|
||||
| main.rs:259:11:259:11 | [SSA] n | main.rs:259:11:259:11 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:259:11:259:11 | n | main.rs:259:11:259:11 | [SSA] n |
|
||||
| main.rs:259:17:259:23 | sink(...) | main.rs:257:5:260:5 | match s1 { ... } |
|
||||
| main.rs:261:11:261:12 | s1 | main.rs:262:9:262:19 | ... \| ... |
|
||||
| main.rs:262:9:262:19 | ... \| ... | main.rs:262:9:262:12 | TupleStructPat |
|
||||
| main.rs:262:9:262:19 | ... \| ... | main.rs:262:16:262:19 | TupleStructPat |
|
||||
| main.rs:262:9:262:19 | [SSA] [match(true)] phi | main.rs:262:29:262:29 | n |
|
||||
| main.rs:262:11:262:11 | [SSA] [input] [match(true)] phi | main.rs:262:9:262:19 | [SSA] [match(true)] phi |
|
||||
| main.rs:262:11:262:11 | [SSA] n | main.rs:262:11:262:11 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:259:18:259:18 | [SSA] [input] [match(true)] phi | main.rs:259:9:259:19 | [SSA] [match(true)] phi |
|
||||
| main.rs:259:18:259:18 | [SSA] n | main.rs:259:18:259:18 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:259:18:259:18 | n | main.rs:259:18:259:18 | [SSA] n |
|
||||
| main.rs:259:24:259:30 | sink(...) | main.rs:258:5:260:5 | match s1 { ... } |
|
||||
| main.rs:261:5:264:5 | match s2 { ... } | main.rs:251:50:265:1 | { ... } |
|
||||
| main.rs:261:11:261:12 | s2 | main.rs:262:9:262:12 | TupleStructPat |
|
||||
| main.rs:261:11:261:12 | s2 | main.rs:263:9:263:12 | TupleStructPat |
|
||||
| main.rs:262:11:262:11 | [SSA] n | main.rs:262:22:262:22 | n |
|
||||
| main.rs:262:11:262:11 | n | main.rs:262:11:262:11 | [SSA] n |
|
||||
| main.rs:262:18:262:18 | [SSA] [input] [match(true)] phi | main.rs:262:9:262:19 | [SSA] [match(true)] phi |
|
||||
| main.rs:262:18:262:18 | [SSA] n | main.rs:262:18:262:18 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:262:18:262:18 | n | main.rs:262:18:262:18 | [SSA] n |
|
||||
| main.rs:262:24:262:30 | sink(...) | main.rs:261:5:263:5 | match s1 { ... } |
|
||||
| main.rs:264:5:267:5 | match s2 { ... } | main.rs:254:50:268:1 | { ... } |
|
||||
| main.rs:264:11:264:12 | s2 | main.rs:265:9:265:12 | TupleStructPat |
|
||||
| main.rs:264:11:264:12 | s2 | main.rs:266:9:266:12 | TupleStructPat |
|
||||
| main.rs:265:11:265:11 | [SSA] n | main.rs:265:22:265:22 | n |
|
||||
| main.rs:265:11:265:11 | n | main.rs:265:11:265:11 | [SSA] n |
|
||||
| main.rs:265:17:265:23 | sink(...) | main.rs:264:5:267:5 | match s2 { ... } |
|
||||
| main.rs:266:11:266:11 | [SSA] n | main.rs:266:22:266:22 | n |
|
||||
| main.rs:266:11:266:11 | n | main.rs:266:11:266:11 | [SSA] n |
|
||||
| main.rs:266:17:266:23 | sink(...) | main.rs:264:5:267:5 | match s2 { ... } |
|
||||
| main.rs:276:9:276:10 | [SSA] s1 | main.rs:280:11:280:12 | s1 |
|
||||
| main.rs:276:9:276:10 | s1 | main.rs:276:9:276:10 | [SSA] s1 |
|
||||
| main.rs:276:14:278:5 | ...::C {...} | main.rs:276:9:276:10 | s1 |
|
||||
| main.rs:279:9:279:10 | [SSA] s2 | main.rs:287:11:287:12 | s2 |
|
||||
| main.rs:279:9:279:10 | s2 | main.rs:279:9:279:10 | [SSA] s2 |
|
||||
| main.rs:279:14:279:43 | ...::D {...} | main.rs:279:9:279:10 | s2 |
|
||||
| main.rs:280:11:280:12 | s1 | main.rs:281:9:281:38 | ...::C {...} |
|
||||
| main.rs:280:11:280:12 | s1 | main.rs:282:9:282:38 | ...::D {...} |
|
||||
| main.rs:280:11:280:12 | s1 | main.rs:284:11:284:12 | s1 |
|
||||
| main.rs:281:36:281:36 | [SSA] n | main.rs:281:48:281:48 | n |
|
||||
| main.rs:281:36:281:36 | n | main.rs:281:36:281:36 | [SSA] n |
|
||||
| main.rs:281:43:281:49 | sink(...) | main.rs:280:5:283:5 | match s1 { ... } |
|
||||
| main.rs:282:36:282:36 | [SSA] n | main.rs:282:48:282:48 | n |
|
||||
| main.rs:262:17:262:23 | sink(...) | main.rs:261:5:264:5 | match s2 { ... } |
|
||||
| main.rs:263:11:263:11 | [SSA] n | main.rs:263:22:263:22 | n |
|
||||
| main.rs:263:11:263:11 | n | main.rs:263:11:263:11 | [SSA] n |
|
||||
| main.rs:263:17:263:23 | sink(...) | main.rs:261:5:264:5 | match s2 { ... } |
|
||||
| main.rs:273:9:273:10 | [SSA] s1 | main.rs:277:11:277:12 | s1 |
|
||||
| main.rs:273:9:273:10 | s1 | main.rs:273:9:273:10 | [SSA] s1 |
|
||||
| main.rs:273:14:275:5 | ...::C {...} | main.rs:273:9:273:10 | s1 |
|
||||
| main.rs:276:9:276:10 | [SSA] s2 | main.rs:284:11:284:12 | s2 |
|
||||
| main.rs:276:9:276:10 | s2 | main.rs:276:9:276:10 | [SSA] s2 |
|
||||
| main.rs:276:14:276:43 | ...::D {...} | main.rs:276:9:276:10 | s2 |
|
||||
| main.rs:277:11:277:12 | s1 | main.rs:278:9:278:38 | ...::C {...} |
|
||||
| main.rs:277:11:277:12 | s1 | main.rs:279:9:279:38 | ...::D {...} |
|
||||
| main.rs:277:11:277:12 | s1 | main.rs:281:11:281:12 | s1 |
|
||||
| main.rs:278:36:278:36 | [SSA] n | main.rs:278:48:278:48 | n |
|
||||
| main.rs:278:36:278:36 | n | main.rs:278:36:278:36 | [SSA] n |
|
||||
| main.rs:278:43:278:49 | sink(...) | main.rs:277:5:280:5 | match s1 { ... } |
|
||||
| main.rs:279:36:279:36 | [SSA] n | main.rs:279:48:279:48 | n |
|
||||
| main.rs:279:36:279:36 | n | main.rs:279:36:279:36 | [SSA] n |
|
||||
| main.rs:279:43:279:49 | sink(...) | main.rs:277:5:280:5 | match s1 { ... } |
|
||||
| main.rs:281:11:281:12 | s1 | main.rs:282:9:282:71 | ... \| ... |
|
||||
| main.rs:282:9:282:71 | ... \| ... | main.rs:282:9:282:38 | ...::C {...} |
|
||||
| main.rs:282:9:282:71 | ... \| ... | main.rs:282:42:282:71 | ...::D {...} |
|
||||
| main.rs:282:9:282:71 | [SSA] [match(true)] phi | main.rs:282:81:282:81 | n |
|
||||
| main.rs:282:36:282:36 | [SSA] [input] [match(true)] phi | main.rs:282:9:282:71 | [SSA] [match(true)] phi |
|
||||
| main.rs:282:36:282:36 | [SSA] n | main.rs:282:36:282:36 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:282:36:282:36 | n | main.rs:282:36:282:36 | [SSA] n |
|
||||
| main.rs:282:43:282:49 | sink(...) | main.rs:280:5:283:5 | match s1 { ... } |
|
||||
| main.rs:284:11:284:12 | s1 | main.rs:285:9:285:71 | ... \| ... |
|
||||
| main.rs:285:9:285:71 | ... \| ... | main.rs:285:9:285:38 | ...::C {...} |
|
||||
| main.rs:285:9:285:71 | ... \| ... | main.rs:285:42:285:71 | ...::D {...} |
|
||||
| main.rs:285:9:285:71 | [SSA] [match(true)] phi | main.rs:285:81:285:81 | n |
|
||||
| main.rs:285:36:285:36 | [SSA] [input] [match(true)] phi | main.rs:285:9:285:71 | [SSA] [match(true)] phi |
|
||||
| main.rs:285:36:285:36 | [SSA] n | main.rs:285:36:285:36 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:282:69:282:69 | [SSA] [input] [match(true)] phi | main.rs:282:9:282:71 | [SSA] [match(true)] phi |
|
||||
| main.rs:282:69:282:69 | [SSA] n | main.rs:282:69:282:69 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:282:69:282:69 | n | main.rs:282:69:282:69 | [SSA] n |
|
||||
| main.rs:282:76:282:82 | sink(...) | main.rs:281:5:283:5 | match s1 { ... } |
|
||||
| main.rs:284:5:287:5 | match s2 { ... } | main.rs:272:49:288:1 | { ... } |
|
||||
| main.rs:284:11:284:12 | s2 | main.rs:285:9:285:38 | ...::C {...} |
|
||||
| main.rs:284:11:284:12 | s2 | main.rs:286:9:286:38 | ...::D {...} |
|
||||
| main.rs:285:36:285:36 | [SSA] n | main.rs:285:48:285:48 | n |
|
||||
| main.rs:285:36:285:36 | n | main.rs:285:36:285:36 | [SSA] n |
|
||||
| main.rs:285:69:285:69 | [SSA] [input] [match(true)] phi | main.rs:285:9:285:71 | [SSA] [match(true)] phi |
|
||||
| main.rs:285:69:285:69 | [SSA] n | main.rs:285:69:285:69 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:285:69:285:69 | n | main.rs:285:69:285:69 | [SSA] n |
|
||||
| main.rs:285:76:285:82 | sink(...) | main.rs:284:5:286:5 | match s1 { ... } |
|
||||
| main.rs:287:5:290:5 | match s2 { ... } | main.rs:275:49:291:1 | { ... } |
|
||||
| main.rs:287:11:287:12 | s2 | main.rs:288:9:288:38 | ...::C {...} |
|
||||
| main.rs:287:11:287:12 | s2 | main.rs:289:9:289:38 | ...::D {...} |
|
||||
| main.rs:288:36:288:36 | [SSA] n | main.rs:288:48:288:48 | n |
|
||||
| main.rs:288:36:288:36 | n | main.rs:288:36:288:36 | [SSA] n |
|
||||
| main.rs:288:43:288:49 | sink(...) | main.rs:287:5:290:5 | match s2 { ... } |
|
||||
| main.rs:289:36:289:36 | [SSA] n | main.rs:289:48:289:48 | n |
|
||||
| main.rs:289:36:289:36 | n | main.rs:289:36:289:36 | [SSA] n |
|
||||
| main.rs:289:43:289:49 | sink(...) | main.rs:287:5:290:5 | match s2 { ... } |
|
||||
| main.rs:296:9:296:10 | [SSA] s1 | main.rs:300:11:300:12 | s1 |
|
||||
| main.rs:296:9:296:10 | s1 | main.rs:296:9:296:10 | [SSA] s1 |
|
||||
| main.rs:296:14:298:5 | C {...} | main.rs:296:9:296:10 | s1 |
|
||||
| main.rs:299:9:299:10 | [SSA] s2 | main.rs:307:11:307:12 | s2 |
|
||||
| main.rs:299:9:299:10 | s2 | main.rs:299:9:299:10 | [SSA] s2 |
|
||||
| main.rs:299:14:299:29 | D {...} | main.rs:299:9:299:10 | s2 |
|
||||
| main.rs:300:11:300:12 | s1 | main.rs:301:9:301:24 | C {...} |
|
||||
| main.rs:300:11:300:12 | s1 | main.rs:302:9:302:24 | D {...} |
|
||||
| main.rs:300:11:300:12 | s1 | main.rs:304:11:304:12 | s1 |
|
||||
| main.rs:301:22:301:22 | [SSA] n | main.rs:301:34:301:34 | n |
|
||||
| main.rs:301:22:301:22 | n | main.rs:301:22:301:22 | [SSA] n |
|
||||
| main.rs:301:29:301:35 | sink(...) | main.rs:300:5:303:5 | match s1 { ... } |
|
||||
| main.rs:302:22:302:22 | [SSA] n | main.rs:302:34:302:34 | n |
|
||||
| main.rs:285:43:285:49 | sink(...) | main.rs:284:5:287:5 | match s2 { ... } |
|
||||
| main.rs:286:36:286:36 | [SSA] n | main.rs:286:48:286:48 | n |
|
||||
| main.rs:286:36:286:36 | n | main.rs:286:36:286:36 | [SSA] n |
|
||||
| main.rs:286:43:286:49 | sink(...) | main.rs:284:5:287:5 | match s2 { ... } |
|
||||
| main.rs:293:9:293:10 | [SSA] s1 | main.rs:297:11:297:12 | s1 |
|
||||
| main.rs:293:9:293:10 | s1 | main.rs:293:9:293:10 | [SSA] s1 |
|
||||
| main.rs:293:14:295:5 | C {...} | main.rs:293:9:293:10 | s1 |
|
||||
| main.rs:296:9:296:10 | [SSA] s2 | main.rs:304:11:304:12 | s2 |
|
||||
| main.rs:296:9:296:10 | s2 | main.rs:296:9:296:10 | [SSA] s2 |
|
||||
| main.rs:296:14:296:29 | D {...} | main.rs:296:9:296:10 | s2 |
|
||||
| main.rs:297:11:297:12 | s1 | main.rs:298:9:298:24 | C {...} |
|
||||
| main.rs:297:11:297:12 | s1 | main.rs:299:9:299:24 | D {...} |
|
||||
| main.rs:297:11:297:12 | s1 | main.rs:301:11:301:12 | s1 |
|
||||
| main.rs:298:22:298:22 | [SSA] n | main.rs:298:34:298:34 | n |
|
||||
| main.rs:298:22:298:22 | n | main.rs:298:22:298:22 | [SSA] n |
|
||||
| main.rs:298:29:298:35 | sink(...) | main.rs:297:5:300:5 | match s1 { ... } |
|
||||
| main.rs:299:22:299:22 | [SSA] n | main.rs:299:34:299:34 | n |
|
||||
| main.rs:299:22:299:22 | n | main.rs:299:22:299:22 | [SSA] n |
|
||||
| main.rs:299:29:299:35 | sink(...) | main.rs:297:5:300:5 | match s1 { ... } |
|
||||
| main.rs:301:11:301:12 | s1 | main.rs:302:9:302:43 | ... \| ... |
|
||||
| main.rs:302:9:302:43 | ... \| ... | main.rs:302:9:302:24 | C {...} |
|
||||
| main.rs:302:9:302:43 | ... \| ... | main.rs:302:28:302:43 | D {...} |
|
||||
| main.rs:302:9:302:43 | [SSA] [match(true)] phi | main.rs:302:53:302:53 | n |
|
||||
| main.rs:302:22:302:22 | [SSA] [input] [match(true)] phi | main.rs:302:9:302:43 | [SSA] [match(true)] phi |
|
||||
| main.rs:302:22:302:22 | [SSA] n | main.rs:302:22:302:22 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:302:22:302:22 | n | main.rs:302:22:302:22 | [SSA] n |
|
||||
| main.rs:302:29:302:35 | sink(...) | main.rs:300:5:303:5 | match s1 { ... } |
|
||||
| main.rs:304:11:304:12 | s1 | main.rs:305:9:305:43 | ... \| ... |
|
||||
| main.rs:305:9:305:43 | ... \| ... | main.rs:305:9:305:24 | C {...} |
|
||||
| main.rs:305:9:305:43 | ... \| ... | main.rs:305:28:305:43 | D {...} |
|
||||
| main.rs:305:9:305:43 | [SSA] [match(true)] phi | main.rs:305:53:305:53 | n |
|
||||
| main.rs:305:22:305:22 | [SSA] [input] [match(true)] phi | main.rs:305:9:305:43 | [SSA] [match(true)] phi |
|
||||
| main.rs:305:22:305:22 | [SSA] n | main.rs:305:22:305:22 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:302:41:302:41 | [SSA] [input] [match(true)] phi | main.rs:302:9:302:43 | [SSA] [match(true)] phi |
|
||||
| main.rs:302:41:302:41 | [SSA] n | main.rs:302:41:302:41 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:302:41:302:41 | n | main.rs:302:41:302:41 | [SSA] n |
|
||||
| main.rs:302:48:302:54 | sink(...) | main.rs:301:5:303:5 | match s1 { ... } |
|
||||
| main.rs:304:5:307:5 | match s2 { ... } | main.rs:292:51:308:1 | { ... } |
|
||||
| main.rs:304:11:304:12 | s2 | main.rs:305:9:305:24 | C {...} |
|
||||
| main.rs:304:11:304:12 | s2 | main.rs:306:9:306:24 | D {...} |
|
||||
| main.rs:305:22:305:22 | [SSA] n | main.rs:305:34:305:34 | n |
|
||||
| main.rs:305:22:305:22 | n | main.rs:305:22:305:22 | [SSA] n |
|
||||
| main.rs:305:41:305:41 | [SSA] [input] [match(true)] phi | main.rs:305:9:305:43 | [SSA] [match(true)] phi |
|
||||
| main.rs:305:41:305:41 | [SSA] n | main.rs:305:41:305:41 | [SSA] [input] [match(true)] phi |
|
||||
| main.rs:305:41:305:41 | n | main.rs:305:41:305:41 | [SSA] n |
|
||||
| main.rs:305:48:305:54 | sink(...) | main.rs:304:5:306:5 | match s1 { ... } |
|
||||
| main.rs:307:5:310:5 | match s2 { ... } | main.rs:295:51:311:1 | { ... } |
|
||||
| main.rs:307:11:307:12 | s2 | main.rs:308:9:308:24 | C {...} |
|
||||
| main.rs:307:11:307:12 | s2 | main.rs:309:9:309:24 | D {...} |
|
||||
| main.rs:308:22:308:22 | [SSA] n | main.rs:308:34:308:34 | n |
|
||||
| main.rs:308:22:308:22 | n | main.rs:308:22:308:22 | [SSA] n |
|
||||
| main.rs:308:29:308:35 | sink(...) | main.rs:307:5:310:5 | match s2 { ... } |
|
||||
| main.rs:309:22:309:22 | [SSA] n | main.rs:309:34:309:34 | n |
|
||||
| main.rs:309:22:309:22 | n | main.rs:309:22:309:22 | [SSA] n |
|
||||
| main.rs:309:29:309:35 | sink(...) | main.rs:307:5:310:5 | match s2 { ... } |
|
||||
| main.rs:305:29:305:35 | sink(...) | main.rs:304:5:307:5 | match s2 { ... } |
|
||||
| main.rs:306:22:306:22 | [SSA] n | main.rs:306:34:306:34 | n |
|
||||
| main.rs:306:22:306:22 | n | main.rs:306:22:306:22 | [SSA] n |
|
||||
| main.rs:306:29:306:35 | sink(...) | main.rs:304:5:307:5 | match s2 { ... } |
|
||||
storeStep
|
||||
| main.rs:94:14:94:22 | source(...) | tuple.0 | main.rs:94:13:94:26 | TupleExpr |
|
||||
| main.rs:94:25:94:25 | 2 | tuple.1 | main.rs:94:13:94:26 | TupleExpr |
|
||||
@@ -358,30 +358,36 @@ storeStep
|
||||
| main.rs:118:17:118:26 | source(...) | tuple.1 | main.rs:118:13:118:27 | TupleExpr |
|
||||
| main.rs:119:14:119:14 | a | tuple.0 | main.rs:119:13:119:18 | TupleExpr |
|
||||
| main.rs:119:17:119:17 | 3 | tuple.1 | main.rs:119:13:119:18 | TupleExpr |
|
||||
| main.rs:135:12:135:20 | source(...) | Point.x | main.rs:134:13:137:5 | Point {...} |
|
||||
| main.rs:136:12:136:12 | 2 | Point.y | main.rs:134:13:137:5 | Point {...} |
|
||||
| main.rs:144:12:144:20 | source(...) | Point.x | main.rs:143:17:146:5 | Point {...} |
|
||||
| main.rs:145:12:145:12 | 2 | Point.y | main.rs:143:17:146:5 | Point {...} |
|
||||
| main.rs:154:12:154:21 | source(...) | Point.x | main.rs:153:13:156:5 | Point {...} |
|
||||
| main.rs:155:12:155:12 | 2 | Point.y | main.rs:153:13:156:5 | Point {...} |
|
||||
| main.rs:169:16:172:9 | Point {...} | Point3D.plane | main.rs:168:13:174:5 | Point3D {...} |
|
||||
| main.rs:170:16:170:16 | 2 | Point.x | main.rs:169:16:172:9 | Point {...} |
|
||||
| main.rs:171:16:171:25 | source(...) | Point.y | main.rs:169:16:172:9 | Point {...} |
|
||||
| main.rs:173:12:173:12 | 4 | Point3D.z | main.rs:168:13:174:5 | Point3D {...} |
|
||||
| main.rs:182:16:185:9 | Point {...} | Point3D.plane | main.rs:181:13:187:5 | Point3D {...} |
|
||||
| main.rs:183:16:183:16 | 2 | Point.x | main.rs:182:16:185:9 | Point {...} |
|
||||
| main.rs:184:16:184:25 | source(...) | Point.y | main.rs:182:16:185:9 | Point {...} |
|
||||
| main.rs:186:12:186:12 | 4 | Point3D.z | main.rs:181:13:187:5 | Point3D {...} |
|
||||
| main.rs:214:19:214:28 | source(...) | Some | main.rs:214:14:214:29 | Some(...) |
|
||||
| main.rs:215:19:215:19 | 2 | Some | main.rs:215:14:215:20 | Some(...) |
|
||||
| main.rs:227:19:227:28 | source(...) | Some | main.rs:227:14:227:29 | Some(...) |
|
||||
| main.rs:237:29:237:38 | source(...) | A | main.rs:237:14:237:39 | ...::A(...) |
|
||||
| main.rs:238:29:238:29 | 2 | B | main.rs:238:14:238:30 | ...::B(...) |
|
||||
| main.rs:277:18:277:27 | source(...) | C | main.rs:276:14:278:5 | ...::C {...} |
|
||||
| main.rs:279:41:279:41 | 2 | D | main.rs:279:14:279:43 | ...::D {...} |
|
||||
| main.rs:317:27:317:27 | 0 | Some | main.rs:317:22:317:28 | Some(...) |
|
||||
| main.rs:134:24:134:32 | source(...) | Point.x | main.rs:134:13:134:40 | Point {...} |
|
||||
| main.rs:134:38:134:38 | 2 | Point.y | main.rs:134:13:134:40 | Point {...} |
|
||||
| main.rs:140:28:140:36 | source(...) | Point.x | main.rs:140:17:140:44 | Point {...} |
|
||||
| main.rs:140:42:140:42 | 2 | Point.y | main.rs:140:17:140:44 | Point {...} |
|
||||
| main.rs:148:12:148:21 | source(...) | Point.x | main.rs:147:13:150:5 | Point {...} |
|
||||
| main.rs:149:12:149:12 | 2 | Point.y | main.rs:147:13:150:5 | Point {...} |
|
||||
| main.rs:163:16:166:9 | Point {...} | Point3D.plane | main.rs:162:13:168:5 | Point3D {...} |
|
||||
| main.rs:164:16:164:16 | 2 | Point.x | main.rs:163:16:166:9 | Point {...} |
|
||||
| main.rs:165:16:165:25 | source(...) | Point.y | main.rs:163:16:166:9 | Point {...} |
|
||||
| main.rs:167:12:167:12 | 4 | Point3D.z | main.rs:162:13:168:5 | Point3D {...} |
|
||||
| main.rs:176:16:179:9 | Point {...} | Point3D.plane | main.rs:175:13:181:5 | Point3D {...} |
|
||||
| main.rs:177:16:177:16 | 2 | Point.x | main.rs:176:16:179:9 | Point {...} |
|
||||
| main.rs:178:16:178:25 | source(...) | Point.y | main.rs:176:16:179:9 | Point {...} |
|
||||
| main.rs:180:12:180:12 | 4 | Point3D.z | main.rs:175:13:181:5 | Point3D {...} |
|
||||
| main.rs:198:27:198:36 | source(...) | Some | main.rs:198:14:198:37 | ...::Some(...) |
|
||||
| main.rs:199:27:199:27 | 2 | Some | main.rs:199:14:199:28 | ...::Some(...) |
|
||||
| main.rs:211:19:211:28 | source(...) | Some | main.rs:211:14:211:29 | Some(...) |
|
||||
| main.rs:212:19:212:19 | 2 | Some | main.rs:212:14:212:20 | Some(...) |
|
||||
| main.rs:224:19:224:28 | source(...) | Some | main.rs:224:14:224:29 | Some(...) |
|
||||
| main.rs:234:29:234:38 | source(...) | A | main.rs:234:14:234:39 | ...::A(...) |
|
||||
| main.rs:235:29:235:29 | 2 | B | main.rs:235:14:235:30 | ...::B(...) |
|
||||
| main.rs:252:16:252:25 | source(...) | A | main.rs:252:14:252:26 | A(...) |
|
||||
| main.rs:253:16:253:16 | 2 | B | main.rs:253:14:253:17 | B(...) |
|
||||
| main.rs:274:18:274:27 | source(...) | C | main.rs:273:14:275:5 | ...::C {...} |
|
||||
| main.rs:276:41:276:41 | 2 | D | main.rs:276:14:276:43 | ...::D {...} |
|
||||
| main.rs:294:18:294:27 | source(...) | C | main.rs:293:14:295:5 | C {...} |
|
||||
| main.rs:296:27:296:27 | 2 | D | main.rs:296:14:296:29 | D {...} |
|
||||
| main.rs:314:27:314:27 | 0 | Some | main.rs:314:22:314:28 | Some(...) |
|
||||
readStep
|
||||
| file://:0:0:0:0 | [summary param] self in lang:core::_::<crate::option::Option>::unwrap | Some | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::std::option::Option::Some(0)] in lang:core::_::<crate::option::Option>::unwrap |
|
||||
| file://:0:0:0:0 | [summary param] self in lang:core::_::<crate::option::Option>::unwrap | Some | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::option::Option::Some(0)] in lang:core::_::<crate::option::Option>::unwrap |
|
||||
| main.rs:33:9:33:15 | TupleStructPat | Some | main.rs:33:14:33:14 | _ |
|
||||
| main.rs:95:10:95:10 | a | tuple.0 | main.rs:95:10:95:12 | a.0 |
|
||||
| main.rs:96:10:96:10 | a | tuple.1 | main.rs:96:10:96:12 | a.1 |
|
||||
@@ -392,24 +398,38 @@ readStep
|
||||
| main.rs:113:10:113:10 | a | tuple.0 | main.rs:113:10:113:12 | a.0 |
|
||||
| main.rs:114:10:114:10 | a | tuple.1 | main.rs:114:10:114:12 | a.1 |
|
||||
| main.rs:120:10:120:10 | b | tuple.0 | main.rs:120:10:120:12 | b.0 |
|
||||
| main.rs:120:10:120:12 | b.0 | tuple.0 | main.rs:120:10:120:14 | ... .0 |
|
||||
| main.rs:120:10:120:12 | b.0 | tuple.0 | main.rs:120:10:120:15 | ... .0 |
|
||||
| main.rs:121:10:121:10 | b | tuple.0 | main.rs:121:10:121:12 | b.0 |
|
||||
| main.rs:121:10:121:12 | b.0 | tuple.1 | main.rs:121:10:121:14 | ... .1 |
|
||||
| main.rs:121:10:121:12 | b.0 | tuple.1 | main.rs:121:10:121:15 | ... .1 |
|
||||
| main.rs:122:10:122:10 | b | tuple.1 | main.rs:122:10:122:12 | b.1 |
|
||||
| main.rs:157:9:157:28 | Point {...} | Point.x | main.rs:157:20:157:20 | a |
|
||||
| main.rs:157:9:157:28 | Point {...} | Point.y | main.rs:157:26:157:26 | b |
|
||||
| main.rs:189:9:189:45 | Point3D {...} | Point3D.plane | main.rs:189:26:189:39 | Point {...} |
|
||||
| main.rs:217:9:217:15 | TupleStructPat | Some | main.rs:217:14:217:14 | n |
|
||||
| main.rs:221:9:221:15 | TupleStructPat | Some | main.rs:221:14:221:14 | n |
|
||||
| main.rs:240:9:240:25 | TupleStructPat | A | main.rs:240:24:240:24 | n |
|
||||
| main.rs:241:9:241:25 | TupleStructPat | B | main.rs:241:24:241:24 | n |
|
||||
| main.rs:151:9:151:28 | Point {...} | Point.x | main.rs:151:20:151:20 | a |
|
||||
| main.rs:151:9:151:28 | Point {...} | Point.y | main.rs:151:26:151:26 | b |
|
||||
| main.rs:183:9:186:9 | Point3D {...} | Point3D.plane | main.rs:184:20:184:33 | Point {...} |
|
||||
| main.rs:201:9:201:23 | TupleStructPat | Some | main.rs:201:22:201:22 | n |
|
||||
| main.rs:205:9:205:23 | TupleStructPat | Some | main.rs:205:22:205:22 | n |
|
||||
| main.rs:214:9:214:15 | TupleStructPat | Some | main.rs:214:14:214:14 | n |
|
||||
| main.rs:218:9:218:15 | TupleStructPat | Some | main.rs:218:14:218:14 | n |
|
||||
| main.rs:237:9:237:25 | TupleStructPat | A | main.rs:237:24:237:24 | n |
|
||||
| main.rs:238:9:238:25 | TupleStructPat | B | main.rs:238:24:238:24 | n |
|
||||
| main.rs:241:9:241:25 | TupleStructPat | A | main.rs:241:24:241:24 | n |
|
||||
| main.rs:241:29:241:45 | TupleStructPat | B | main.rs:241:44:241:44 | n |
|
||||
| main.rs:244:9:244:25 | TupleStructPat | A | main.rs:244:24:244:24 | n |
|
||||
| main.rs:244:29:244:45 | TupleStructPat | B | main.rs:244:44:244:44 | n |
|
||||
| main.rs:247:9:247:25 | TupleStructPat | A | main.rs:247:24:247:24 | n |
|
||||
| main.rs:248:9:248:25 | TupleStructPat | B | main.rs:248:24:248:24 | n |
|
||||
| main.rs:281:9:281:38 | ...::C {...} | C | main.rs:281:36:281:36 | n |
|
||||
| main.rs:282:9:282:38 | ...::D {...} | D | main.rs:282:36:282:36 | n |
|
||||
| main.rs:245:9:245:25 | TupleStructPat | B | main.rs:245:24:245:24 | n |
|
||||
| main.rs:255:9:255:12 | TupleStructPat | A | main.rs:255:11:255:11 | n |
|
||||
| main.rs:256:9:256:12 | TupleStructPat | B | main.rs:256:11:256:11 | n |
|
||||
| main.rs:259:9:259:12 | TupleStructPat | A | main.rs:259:11:259:11 | n |
|
||||
| main.rs:259:16:259:19 | TupleStructPat | B | main.rs:259:18:259:18 | n |
|
||||
| main.rs:262:9:262:12 | TupleStructPat | A | main.rs:262:11:262:11 | n |
|
||||
| main.rs:263:9:263:12 | TupleStructPat | B | main.rs:263:11:263:11 | n |
|
||||
| main.rs:278:9:278:38 | ...::C {...} | C | main.rs:278:36:278:36 | n |
|
||||
| main.rs:279:9:279:38 | ...::D {...} | D | main.rs:279:36:279:36 | n |
|
||||
| main.rs:282:9:282:38 | ...::C {...} | C | main.rs:282:36:282:36 | n |
|
||||
| main.rs:282:42:282:71 | ...::D {...} | D | main.rs:282:69:282:69 | n |
|
||||
| main.rs:285:9:285:38 | ...::C {...} | C | main.rs:285:36:285:36 | n |
|
||||
| main.rs:285:42:285:71 | ...::D {...} | D | main.rs:285:69:285:69 | n |
|
||||
| main.rs:288:9:288:38 | ...::C {...} | C | main.rs:288:36:288:36 | n |
|
||||
| main.rs:289:9:289:38 | ...::D {...} | D | main.rs:289:36:289:36 | n |
|
||||
| main.rs:286:9:286:38 | ...::D {...} | D | main.rs:286:36:286:36 | n |
|
||||
| main.rs:298:9:298:24 | C {...} | C | main.rs:298:22:298:22 | n |
|
||||
| main.rs:299:9:299:24 | D {...} | D | main.rs:299:22:299:22 | n |
|
||||
| main.rs:302:9:302:24 | C {...} | C | main.rs:302:22:302:22 | n |
|
||||
| main.rs:302:28:302:43 | D {...} | D | main.rs:302:41:302:41 | n |
|
||||
| main.rs:305:9:305:24 | C {...} | C | main.rs:305:22:305:22 | n |
|
||||
| main.rs:306:9:306:24 | D {...} | D | main.rs:306:22:306:22 | n |
|
||||
|
||||
@@ -20,32 +20,50 @@ edges
|
||||
| main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | main.rs:121:10:121:10 | b [tuple.0, tuple.1] | provenance | |
|
||||
| main.rs:119:14:119:14 | a [tuple.1] | main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | provenance | |
|
||||
| main.rs:121:10:121:10 | b [tuple.0, tuple.1] | main.rs:121:10:121:12 | b.0 [tuple.1] | provenance | |
|
||||
| main.rs:121:10:121:12 | b.0 [tuple.1] | main.rs:121:10:121:14 | ... .1 | provenance | |
|
||||
| main.rs:153:13:156:5 | Point {...} [Point.x] | main.rs:157:9:157:28 | Point {...} [Point.x] | provenance | |
|
||||
| main.rs:154:12:154:21 | source(...) | main.rs:153:13:156:5 | Point {...} [Point.x] | provenance | |
|
||||
| main.rs:157:9:157:28 | Point {...} [Point.x] | main.rs:157:20:157:20 | a | provenance | |
|
||||
| main.rs:157:20:157:20 | a | main.rs:158:10:158:10 | a | provenance | |
|
||||
| main.rs:214:14:214:29 | Some(...) [Some] | main.rs:217:9:217:15 | TupleStructPat [Some] | provenance | |
|
||||
| main.rs:214:19:214:28 | source(...) | main.rs:214:14:214:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:217:9:217:15 | TupleStructPat [Some] | main.rs:217:14:217:14 | n | provenance | |
|
||||
| main.rs:217:14:217:14 | n | main.rs:217:25:217:25 | n | provenance | |
|
||||
| main.rs:227:14:227:29 | Some(...) [Some] | main.rs:228:10:228:11 | s1 [Some] | provenance | |
|
||||
| main.rs:227:19:227:28 | source(...) | main.rs:227:14:227:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:228:10:228:11 | s1 [Some] | main.rs:228:10:228:20 | ... .unwrap(...) | provenance | |
|
||||
| main.rs:237:14:237:39 | ...::A(...) [A] | main.rs:240:9:240:25 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:237:14:237:39 | ...::A(...) [A] | main.rs:244:9:244:25 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:237:29:237:38 | source(...) | main.rs:237:14:237:39 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:240:9:240:25 | TupleStructPat [A] | main.rs:240:24:240:24 | n | provenance | |
|
||||
| main.rs:240:24:240:24 | n | main.rs:240:35:240:35 | n | provenance | |
|
||||
| main.rs:244:9:244:25 | TupleStructPat [A] | main.rs:244:24:244:24 | n | provenance | |
|
||||
| main.rs:244:24:244:24 | n | main.rs:244:55:244:55 | n | provenance | |
|
||||
| main.rs:276:14:278:5 | ...::C {...} [C] | main.rs:281:9:281:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:276:14:278:5 | ...::C {...} [C] | main.rs:285:9:285:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:277:18:277:27 | source(...) | main.rs:276:14:278:5 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:281:9:281:38 | ...::C {...} [C] | main.rs:281:36:281:36 | n | provenance | |
|
||||
| main.rs:281:36:281:36 | n | main.rs:281:48:281:48 | n | provenance | |
|
||||
| main.rs:285:9:285:38 | ...::C {...} [C] | main.rs:285:36:285:36 | n | provenance | |
|
||||
| main.rs:285:36:285:36 | n | main.rs:285:81:285:81 | n | provenance | |
|
||||
| main.rs:121:10:121:12 | b.0 [tuple.1] | main.rs:121:10:121:15 | ... .1 | provenance | |
|
||||
| main.rs:147:13:150:5 | Point {...} [Point.x] | main.rs:151:9:151:28 | Point {...} [Point.x] | provenance | |
|
||||
| main.rs:148:12:148:21 | source(...) | main.rs:147:13:150:5 | Point {...} [Point.x] | provenance | |
|
||||
| main.rs:151:9:151:28 | Point {...} [Point.x] | main.rs:151:20:151:20 | a | provenance | |
|
||||
| main.rs:151:20:151:20 | a | main.rs:152:10:152:10 | a | provenance | |
|
||||
| main.rs:198:14:198:37 | ...::Some(...) [Some] | main.rs:201:9:201:23 | TupleStructPat [Some] | provenance | |
|
||||
| main.rs:198:27:198:36 | source(...) | main.rs:198:14:198:37 | ...::Some(...) [Some] | provenance | |
|
||||
| main.rs:201:9:201:23 | TupleStructPat [Some] | main.rs:201:22:201:22 | n | provenance | |
|
||||
| main.rs:201:22:201:22 | n | main.rs:201:33:201:33 | n | provenance | |
|
||||
| main.rs:211:14:211:29 | Some(...) [Some] | main.rs:214:9:214:15 | TupleStructPat [Some] | provenance | |
|
||||
| main.rs:211:19:211:28 | source(...) | main.rs:211:14:211:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:214:9:214:15 | TupleStructPat [Some] | main.rs:214:14:214:14 | n | provenance | |
|
||||
| main.rs:214:14:214:14 | n | main.rs:214:25:214:25 | n | provenance | |
|
||||
| main.rs:224:14:224:29 | Some(...) [Some] | main.rs:225:10:225:11 | s1 [Some] | provenance | |
|
||||
| main.rs:224:19:224:28 | source(...) | main.rs:224:14:224:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:225:10:225:11 | s1 [Some] | main.rs:225:10:225:20 | ... .unwrap(...) | provenance | |
|
||||
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:237:9:237:25 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:234:14:234:39 | ...::A(...) [A] | main.rs:241:9:241:25 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:234:29:234:38 | source(...) | main.rs:234:14:234:39 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:237:9:237:25 | TupleStructPat [A] | main.rs:237:24:237:24 | n | provenance | |
|
||||
| main.rs:237:24:237:24 | n | main.rs:237:35:237:35 | n | provenance | |
|
||||
| main.rs:241:9:241:25 | TupleStructPat [A] | main.rs:241:24:241:24 | n | provenance | |
|
||||
| main.rs:241:24:241:24 | n | main.rs:241:55:241:55 | n | provenance | |
|
||||
| main.rs:252:14:252:26 | A(...) [A] | main.rs:255:9:255:12 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:252:14:252:26 | A(...) [A] | main.rs:259:9:259:12 | TupleStructPat [A] | provenance | |
|
||||
| main.rs:252:16:252:25 | source(...) | main.rs:252:14:252:26 | A(...) [A] | provenance | |
|
||||
| main.rs:255:9:255:12 | TupleStructPat [A] | main.rs:255:11:255:11 | n | provenance | |
|
||||
| main.rs:255:11:255:11 | n | main.rs:255:22:255:22 | n | provenance | |
|
||||
| main.rs:259:9:259:12 | TupleStructPat [A] | main.rs:259:11:259:11 | n | provenance | |
|
||||
| main.rs:259:11:259:11 | n | main.rs:259:29:259:29 | n | provenance | |
|
||||
| main.rs:273:14:275:5 | ...::C {...} [C] | main.rs:278:9:278:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:273:14:275:5 | ...::C {...} [C] | main.rs:282:9:282:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:274:18:274:27 | source(...) | main.rs:273:14:275:5 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:278:9:278:38 | ...::C {...} [C] | main.rs:278:36:278:36 | n | provenance | |
|
||||
| main.rs:278:36:278:36 | n | main.rs:278:48:278:48 | n | provenance | |
|
||||
| main.rs:282:9:282:38 | ...::C {...} [C] | main.rs:282:36:282:36 | n | provenance | |
|
||||
| main.rs:282:36:282:36 | n | main.rs:282:81:282:81 | n | provenance | |
|
||||
| main.rs:293:14:295:5 | C {...} [C] | main.rs:298:9:298:24 | C {...} [C] | provenance | |
|
||||
| main.rs:293:14:295:5 | C {...} [C] | main.rs:302:9:302:24 | C {...} [C] | provenance | |
|
||||
| main.rs:294:18:294:27 | source(...) | main.rs:293:14:295:5 | C {...} [C] | provenance | |
|
||||
| main.rs:298:9:298:24 | C {...} [C] | main.rs:298:22:298:22 | n | provenance | |
|
||||
| main.rs:298:22:298:22 | n | main.rs:298:34:298:34 | n | provenance | |
|
||||
| main.rs:302:9:302:24 | C {...} [C] | main.rs:302:22:302:22 | n | provenance | |
|
||||
| main.rs:302:22:302:22 | n | main.rs:302:53:302:53 | n | provenance | |
|
||||
nodes
|
||||
| main.rs:15:10:15:18 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:19:13:19:21 | source(...) | semmle.label | source(...) |
|
||||
@@ -77,37 +95,58 @@ nodes
|
||||
| main.rs:119:14:119:14 | a [tuple.1] | semmle.label | a [tuple.1] |
|
||||
| main.rs:121:10:121:10 | b [tuple.0, tuple.1] | semmle.label | b [tuple.0, tuple.1] |
|
||||
| main.rs:121:10:121:12 | b.0 [tuple.1] | semmle.label | b.0 [tuple.1] |
|
||||
| main.rs:121:10:121:14 | ... .1 | semmle.label | ... .1 |
|
||||
| main.rs:153:13:156:5 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] |
|
||||
| main.rs:154:12:154:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:157:9:157:28 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] |
|
||||
| main.rs:157:20:157:20 | a | semmle.label | a |
|
||||
| main.rs:158:10:158:10 | a | semmle.label | a |
|
||||
| main.rs:214:14:214:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:214:19:214:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:217:9:217:15 | TupleStructPat [Some] | semmle.label | TupleStructPat [Some] |
|
||||
| main.rs:217:14:217:14 | n | semmle.label | n |
|
||||
| main.rs:217:25:217:25 | n | semmle.label | n |
|
||||
| main.rs:227:14:227:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:227:19:227:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:228:10:228:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:228:10:228:20 | ... .unwrap(...) | semmle.label | ... .unwrap(...) |
|
||||
| main.rs:237:14:237:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:237:29:237:38 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:240:9:240:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:240:24:240:24 | n | semmle.label | n |
|
||||
| main.rs:240:35:240:35 | n | semmle.label | n |
|
||||
| main.rs:244:9:244:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:244:24:244:24 | n | semmle.label | n |
|
||||
| main.rs:244:55:244:55 | n | semmle.label | n |
|
||||
| main.rs:276:14:278:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:277:18:277:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:281:9:281:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:281:36:281:36 | n | semmle.label | n |
|
||||
| main.rs:281:48:281:48 | n | semmle.label | n |
|
||||
| main.rs:285:9:285:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:285:36:285:36 | n | semmle.label | n |
|
||||
| main.rs:285:81:285:81 | n | semmle.label | n |
|
||||
| main.rs:121:10:121:15 | ... .1 | semmle.label | ... .1 |
|
||||
| main.rs:147:13:150:5 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] |
|
||||
| main.rs:148:12:148:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:151:9:151:28 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] |
|
||||
| main.rs:151:20:151:20 | a | semmle.label | a |
|
||||
| main.rs:152:10:152:10 | a | semmle.label | a |
|
||||
| main.rs:198:14:198:37 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| main.rs:198:27:198:36 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:201:9:201:23 | TupleStructPat [Some] | semmle.label | TupleStructPat [Some] |
|
||||
| main.rs:201:22:201:22 | n | semmle.label | n |
|
||||
| main.rs:201:33:201:33 | n | semmle.label | n |
|
||||
| main.rs:211:14:211:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:211:19:211:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:214:9:214:15 | TupleStructPat [Some] | semmle.label | TupleStructPat [Some] |
|
||||
| main.rs:214:14:214:14 | n | semmle.label | n |
|
||||
| main.rs:214:25:214:25 | n | semmle.label | n |
|
||||
| main.rs:224:14:224:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:224:19:224:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:225:10:225:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:225:10:225:20 | ... .unwrap(...) | semmle.label | ... .unwrap(...) |
|
||||
| main.rs:234:14:234:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:234:29:234:38 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:237:9:237:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:237:24:237:24 | n | semmle.label | n |
|
||||
| main.rs:237:35:237:35 | n | semmle.label | n |
|
||||
| main.rs:241:9:241:25 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:241:24:241:24 | n | semmle.label | n |
|
||||
| main.rs:241:55:241:55 | n | semmle.label | n |
|
||||
| main.rs:252:14:252:26 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:252:16:252:25 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:255:9:255:12 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:255:11:255:11 | n | semmle.label | n |
|
||||
| main.rs:255:22:255:22 | n | semmle.label | n |
|
||||
| main.rs:259:9:259:12 | TupleStructPat [A] | semmle.label | TupleStructPat [A] |
|
||||
| main.rs:259:11:259:11 | n | semmle.label | n |
|
||||
| main.rs:259:29:259:29 | n | semmle.label | n |
|
||||
| main.rs:273:14:275:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:274:18:274:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:278:9:278:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:278:36:278:36 | n | semmle.label | n |
|
||||
| main.rs:278:48:278:48 | n | semmle.label | n |
|
||||
| main.rs:282:9:282:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:282:36:282:36 | n | semmle.label | n |
|
||||
| main.rs:282:81:282:81 | n | semmle.label | n |
|
||||
| main.rs:293:14:295:5 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:294:18:294:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:298:9:298:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:298:22:298:22 | n | semmle.label | n |
|
||||
| main.rs:298:34:298:34 | n | semmle.label | n |
|
||||
| main.rs:302:9:302:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:302:22:302:22 | n | semmle.label | n |
|
||||
| main.rs:302:53:302:53 | n | semmle.label | n |
|
||||
subpaths
|
||||
testFailures
|
||||
#select
|
||||
@@ -120,11 +159,16 @@ testFailures
|
||||
| main.rs:95:10:95:12 | a.0 | main.rs:94:14:94:22 | source(...) | main.rs:95:10:95:12 | a.0 | $@ | main.rs:94:14:94:22 | source(...) | source(...) |
|
||||
| main.rs:110:10:110:12 | a.1 | main.rs:108:21:108:30 | source(...) | main.rs:110:10:110:12 | a.1 | $@ | main.rs:108:21:108:30 | source(...) | source(...) |
|
||||
| main.rs:113:10:113:12 | a.0 | main.rs:111:11:111:20 | source(...) | main.rs:113:10:113:12 | a.0 | $@ | main.rs:111:11:111:20 | source(...) | source(...) |
|
||||
| main.rs:121:10:121:14 | ... .1 | main.rs:118:17:118:26 | source(...) | main.rs:121:10:121:14 | ... .1 | $@ | main.rs:118:17:118:26 | source(...) | source(...) |
|
||||
| main.rs:158:10:158:10 | a | main.rs:154:12:154:21 | source(...) | main.rs:158:10:158:10 | a | $@ | main.rs:154:12:154:21 | source(...) | source(...) |
|
||||
| main.rs:217:25:217:25 | n | main.rs:214:19:214:28 | source(...) | main.rs:217:25:217:25 | n | $@ | main.rs:214:19:214:28 | source(...) | source(...) |
|
||||
| main.rs:228:10:228:20 | ... .unwrap(...) | main.rs:227:19:227:28 | source(...) | main.rs:228:10:228:20 | ... .unwrap(...) | $@ | main.rs:227:19:227:28 | source(...) | source(...) |
|
||||
| main.rs:240:35:240:35 | n | main.rs:237:29:237:38 | source(...) | main.rs:240:35:240:35 | n | $@ | main.rs:237:29:237:38 | source(...) | source(...) |
|
||||
| main.rs:244:55:244:55 | n | main.rs:237:29:237:38 | source(...) | main.rs:244:55:244:55 | n | $@ | main.rs:237:29:237:38 | source(...) | source(...) |
|
||||
| main.rs:281:48:281:48 | n | main.rs:277:18:277:27 | source(...) | main.rs:281:48:281:48 | n | $@ | main.rs:277:18:277:27 | source(...) | source(...) |
|
||||
| main.rs:285:81:285:81 | n | main.rs:277:18:277:27 | source(...) | main.rs:285:81:285:81 | n | $@ | main.rs:277:18:277:27 | source(...) | source(...) |
|
||||
| main.rs:121:10:121:15 | ... .1 | main.rs:118:17:118:26 | source(...) | main.rs:121:10:121:15 | ... .1 | $@ | main.rs:118:17:118:26 | source(...) | source(...) |
|
||||
| main.rs:152:10:152:10 | a | main.rs:148:12:148:21 | source(...) | main.rs:152:10:152:10 | a | $@ | main.rs:148:12:148:21 | source(...) | source(...) |
|
||||
| main.rs:201:33:201:33 | n | main.rs:198:27:198:36 | source(...) | main.rs:201:33:201:33 | n | $@ | main.rs:198:27:198:36 | source(...) | source(...) |
|
||||
| main.rs:214:25:214:25 | n | main.rs:211:19:211:28 | source(...) | main.rs:214:25:214:25 | n | $@ | main.rs:211:19:211:28 | source(...) | source(...) |
|
||||
| main.rs:225:10:225:20 | ... .unwrap(...) | main.rs:224:19:224:28 | source(...) | main.rs:225:10:225:20 | ... .unwrap(...) | $@ | main.rs:224:19:224:28 | source(...) | source(...) |
|
||||
| main.rs:237:35:237:35 | n | main.rs:234:29:234:38 | source(...) | main.rs:237:35:237:35 | n | $@ | main.rs:234:29:234:38 | source(...) | source(...) |
|
||||
| main.rs:241:55:241:55 | n | main.rs:234:29:234:38 | source(...) | main.rs:241:55:241:55 | n | $@ | main.rs:234:29:234:38 | source(...) | source(...) |
|
||||
| main.rs:255:22:255:22 | n | main.rs:252:16:252:25 | source(...) | main.rs:255:22:255:22 | n | $@ | main.rs:252:16:252:25 | source(...) | source(...) |
|
||||
| main.rs:259:29:259:29 | n | main.rs:252:16:252:25 | source(...) | main.rs:259:29:259:29 | n | $@ | main.rs:252:16:252:25 | source(...) | source(...) |
|
||||
| main.rs:278:48:278:48 | n | main.rs:274:18:274:27 | source(...) | main.rs:278:48:278:48 | n | $@ | main.rs:274:18:274:27 | source(...) | source(...) |
|
||||
| main.rs:282:81:282:81 | n | main.rs:274:18:274:27 | source(...) | main.rs:282:81:282:81 | n | $@ | main.rs:274:18:274:27 | source(...) | source(...) |
|
||||
| main.rs:298:34:298:34 | n | main.rs:294:18:294:27 | source(...) | main.rs:298:34:298:34 | n | $@ | main.rs:294:18:294:27 | source(...) | source(...) |
|
||||
| main.rs:302:53:302:53 | n | main.rs:294:18:294:27 | source(...) | main.rs:302:53:302:53 | n | $@ | main.rs:294:18:294:27 | source(...) | source(...) |
|
||||
|
||||
@@ -117,8 +117,8 @@ fn tuple_mutation() {
|
||||
fn tuple_nested() {
|
||||
let a = (3, source(59));
|
||||
let b = (a, 3);
|
||||
sink(b.0.0);
|
||||
sink(b.0.1); // $ hasValueFlow=59
|
||||
sink(b.0 .0);
|
||||
sink(b.0 .1); // $ hasValueFlow=59
|
||||
sink(b.1);
|
||||
}
|
||||
|
||||
@@ -131,19 +131,13 @@ struct Point {
|
||||
}
|
||||
|
||||
fn struct_field() {
|
||||
let p = Point {
|
||||
x: source(9),
|
||||
y: 2,
|
||||
};
|
||||
let p = Point { x: source(9), y: 2 };
|
||||
sink(p.x); // $ MISSING: hasValueFlow=9
|
||||
sink(p.y);
|
||||
}
|
||||
|
||||
fn struct_mutation() {
|
||||
let mut p = Point {
|
||||
x: source(9),
|
||||
y: 2,
|
||||
};
|
||||
let mut p = Point { x: source(9), y: 2 };
|
||||
sink(p.y);
|
||||
p.y = source(54);
|
||||
sink(p.y); // $ MISSING: hasValueFlow=54
|
||||
@@ -161,7 +155,7 @@ fn struct_pattern_match() {
|
||||
|
||||
struct Point3D {
|
||||
plane: Point,
|
||||
z: i64
|
||||
z: i64,
|
||||
}
|
||||
|
||||
fn struct_nested_field() {
|
||||
@@ -170,7 +164,7 @@ fn struct_nested_field() {
|
||||
x: 2,
|
||||
y: source(77),
|
||||
},
|
||||
z: 4
|
||||
z: 4,
|
||||
};
|
||||
sink(p.plane.x);
|
||||
sink(p.plane.y); // $ MISSING: hasValueFlow=77
|
||||
@@ -183,10 +177,13 @@ fn struct_nested_match() {
|
||||
x: 2,
|
||||
y: source(93),
|
||||
},
|
||||
z: 4
|
||||
z: 4,
|
||||
};
|
||||
match p {
|
||||
Point3D { plane: Point { x, y }, z, } => {
|
||||
Point3D {
|
||||
plane: Point { x, y },
|
||||
z,
|
||||
} => {
|
||||
sink(x);
|
||||
sink(y); // MISSING: hasValueFlow=93
|
||||
sink(z);
|
||||
@@ -201,7 +198,7 @@ fn option_pattern_match_qualified() {
|
||||
let s1 = Option::Some(source(13));
|
||||
let s2 = Option::Some(2);
|
||||
match s1 {
|
||||
Option::Some(n) => sink(n), // $ MISSING: hasValueFlow=13
|
||||
Option::Some(n) => sink(n), // $ hasValueFlow=13
|
||||
Option::None => sink(0),
|
||||
}
|
||||
match s2 {
|
||||
@@ -255,11 +252,11 @@ fn custom_tuple_enum_pattern_match_unqualified() {
|
||||
let s1 = A(source(16));
|
||||
let s2 = B(2);
|
||||
match s1 {
|
||||
A(n) => sink(n), // $ MISSING: hasValueFlow=16
|
||||
A(n) => sink(n), // $ hasValueFlow=16
|
||||
B(n) => sink(n),
|
||||
}
|
||||
match s1 {
|
||||
A(n) | B(n) => sink(n), // $ MISSING: hasValueFlow=16
|
||||
A(n) | B(n) => sink(n), // $ hasValueFlow=16
|
||||
}
|
||||
match s2 {
|
||||
A(n) => sink(n),
|
||||
@@ -298,11 +295,11 @@ fn custom_record_enum_pattern_match_unqualified() {
|
||||
};
|
||||
let s2 = D { field_d: 2 };
|
||||
match s1 {
|
||||
C { field_c: n } => sink(n), // $ MISSING: hasValueFlow=18
|
||||
C { field_c: n } => sink(n), // $ hasValueFlow=18
|
||||
D { field_d: n } => sink(n),
|
||||
}
|
||||
match s1 {
|
||||
C { field_c: n } | D { field_d: n } => sink(n), // $ MISSING: hasValueFlow=18
|
||||
C { field_c: n } | D { field_d: n } => sink(n), // $ hasValueFlow=18
|
||||
}
|
||||
match s2 {
|
||||
C { field_c: n } => sink(n),
|
||||
|
||||
@@ -86,4 +86,5 @@ fn main() {
|
||||
test_set_var_pos();
|
||||
test_get_var_field();
|
||||
test_set_var_field();
|
||||
let dummy = Some(0); // ensure that the the `lang:core` crate is extracted
|
||||
}
|
||||
|
||||
@@ -550,15 +550,45 @@ class _:
|
||||
"""
|
||||
|
||||
|
||||
@annotate(ArrayExpr, cfg = True)
|
||||
@annotate(ArrayExprInternal)
|
||||
@ql.internal
|
||||
@qltest.skip
|
||||
class _:
|
||||
pass
|
||||
|
||||
class ArrayExpr(Expr):
|
||||
"""
|
||||
An array expression. For example:
|
||||
The base class for array expressions. For example:
|
||||
```rust
|
||||
[1, 2, 3];
|
||||
[1; 10];
|
||||
```
|
||||
"""
|
||||
exprs: list[Expr] | child
|
||||
attrs: list[Attr] | child
|
||||
|
||||
@synth.from_class(ArrayExprInternal)
|
||||
class ArrayListExpr(ArrayExpr):
|
||||
"""
|
||||
An array expression with a list of elements. For example:
|
||||
```rust
|
||||
[1, 2, 3];
|
||||
```
|
||||
"""
|
||||
__cfg__ = True
|
||||
|
||||
@synth.from_class(ArrayExprInternal)
|
||||
class ArrayRepeatExpr(ArrayExpr):
|
||||
"""
|
||||
An array expression with a repeat operand and a repeat length. For example:
|
||||
```rust
|
||||
[1; 10];
|
||||
```
|
||||
"""
|
||||
__cfg__ = True
|
||||
|
||||
repeat_operand: Expr | child
|
||||
repeat_length: Expr | child
|
||||
|
||||
|
||||
@annotate(LiteralExpr, cfg = True)
|
||||
|
||||
3
rust/schema/ast.py
generated
3
rust/schema/ast.py
generated
@@ -38,9 +38,10 @@ class Abi(AstNode):
|
||||
class ArgList(AstNode):
|
||||
args: list["Expr"] | child
|
||||
|
||||
class ArrayExpr(Expr):
|
||||
class ArrayExprInternal(Expr):
|
||||
attrs: list["Attr"] | child
|
||||
exprs: list["Expr"] | child
|
||||
is_semicolon: predicate
|
||||
|
||||
class ArrayTypeRepr(TypeRepr):
|
||||
const_arg: optional["ConstArg"] | child
|
||||
|
||||
Reference in New Issue
Block a user