Skip to content

Commit aca70cd

Browse files
authored
Merge pull request #18675 from hvitved/rust/struct-tuple-field
Rust: Implement data flow through tuple structs
2 parents 40851ae + 95ab48d commit aca70cd

File tree

22 files changed

+981
-870
lines changed

22 files changed

+981
-870
lines changed

rust/ql/.generated.list

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/.gitattributes

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/controlflow/CfgNodes.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,8 @@ final class RecordPatCfgNode extends Nodes::RecordPatCfgNode {
265265
PatCfgNode getFieldPat(string field) {
266266
exists(RecordPatField rpf |
267267
rpf = node.getRecordPatFieldList().getAField() and
268-
any(ChildMapping mapping).hasCfgChild(node, rpf.getPat(), this, result)
269-
|
270-
field = rpf.getNameRef().getText()
271-
or
272-
not rpf.hasNameRef() and
273-
field = result.(IdentPatCfgNode).getName().getText()
268+
any(ChildMapping mapping).hasCfgChild(node, rpf.getPat(), this, result) and
269+
field = rpf.getFieldName()
274270
)
275271
}
276272
}

rust/ql/lib/codeql/rust/dataflow/DataFlow.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ module DataFlow {
2525

2626
final class Content = DataFlowImpl::Content;
2727

28-
final class VariantContent = DataFlowImpl::VariantContent;
29-
3028
final class ContentSet = DataFlowImpl::ContentSet;
3129

3230
/**

0 commit comments

Comments
 (0)