@@ -843,6 +843,15 @@ final class ElementContent extends Content, TElementContent {
843843 override Location getLocation ( ) { result instanceof EmptyLocation }
844844}
845845
846+ /**
847+ * A value that a future resolves to.
848+ */
849+ final class FutureContent extends Content , TFutureContent {
850+ override string toString ( ) { result = "future" }
851+
852+ override Location getLocation ( ) { result instanceof EmptyLocation }
853+ }
854+
846855/**
847856 * Content stored at a position in a tuple.
848857 *
@@ -1194,6 +1203,12 @@ module RustDataFlow implements InputSig<Location> {
11941203 c instanceof FunctionCallReturnContent
11951204 )
11961205 or
1206+ exists ( AwaitExprCfgNode await |
1207+ c instanceof FutureContent and
1208+ node1 .asExpr ( ) = await .getExpr ( ) and
1209+ node2 .asExpr ( ) = await
1210+ )
1211+ or
11971212 VariableCapture:: readStep ( node1 , c , node2 )
11981213 )
11991214 or
@@ -1553,7 +1568,8 @@ private module Cached {
15531568 [
15541569 any ( IndexExprCfgNode i ) .getBase ( ) , any ( FieldExprCfgNode access ) .getExpr ( ) ,
15551570 any ( TryExprCfgNode try ) .getExpr ( ) ,
1556- any ( PrefixExprCfgNode pe | pe .getOperatorName ( ) = "*" ) .getExpr ( )
1571+ any ( PrefixExprCfgNode pe | pe .getOperatorName ( ) = "*" ) .getExpr ( ) ,
1572+ any ( AwaitExprCfgNode a ) .getExpr ( )
15571573 ]
15581574 } or
15591575 TSsaNode ( SsaImpl:: DataFlowIntegration:: SsaNode node ) or
@@ -1609,6 +1625,7 @@ private module Cached {
16091625 // TODO: Remove once library types are extracted
16101626 TVariantInLibTupleFieldContent ( VariantInLib:: VariantInLib v , int pos ) { pos = v .getAPosition ( ) } or
16111627 TElementContent ( ) or
1628+ TFutureContent ( ) or
16121629 TTuplePositionContent ( int pos ) {
16131630 pos in [ 0 .. max ( [
16141631 any ( TuplePat pat ) .getNumberOfFields ( ) ,
0 commit comments