Skip to content

Commit 7a9f23c

Browse files
committed
Rust: fix sphinx error
1 parent e011475 commit 7a9f23c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-rust.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,23 @@ You can use the local data flow library by importing the ``codeql.rust.dataflow.
2626
Common ``Node`` types include expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``).
2727
You can use the ``asExpr`` member predicate to map a data flow ``ExprNode`` to its corresponding ``ExprCfgNode`` in the control-flow library.
2828
Similarly, you can map a data flow ``ParameterNode`` to its corresponding ``Parameter`` AST node using the ``asParameter`` member predicate.
29+
2930
.. code-block:: ql
3031
31-
class Node {
32-
/** Gets the expression corresponding to this node, if any. */
33-
CfgNodes::ExprCfgNode asExpr() { ... }
32+
class Node {
33+
/**
34+
* Gets the expression corresponding to this node, if any.
35+
*/
36+
CfgNodes::ExprCfgNode asExpr() { ... }
3437
35-
/** Gets the parameter corresponding to this node, if any. */
36-
Parameter asParameter() { ... }
38+
/**
39+
* Gets the parameter corresponding to this node, if any.
40+
*/
41+
Parameter asParameter() { ... }
3742
3843
...
39-
}
44+
}
45+
4046
4147
Note that since ``asExpr`` maps from data-flow to control-flow nodes, you then need to call the ``getExpr`` member predicate on the control-flow node to map to the corresponding AST node,
4248
for example by writing ``node.asExpr().getExpr()``.

0 commit comments

Comments
 (0)