Skip to content

Commit 7e78d64

Browse files
committed
Rust: Fix grammar and add documentation comments
1 parent db1b698 commit 7e78d64

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rust/ql/lib/codeql/rust/controlflow/internal/Scope.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ abstract private class CfgScopeImpl extends AstNode {
1515
final class CfgScope = CfgScopeImpl;
1616

1717
final class AsyncBlockScope extends CfgScopeImpl, AsyncBlockExpr {
18+
/* Holds if `first` is executed first when entering `scope`. */
1819
override predicate scopeFirst(AstNode first) {
1920
first(this.(ExprTrees::AsyncBlockExprTree).getFirstChildNode(), first)
2021
}
2122

23+
/* Holds if `scope` is exited when `last` finishes with completion `c`. */
2224
override predicate scopeLast(AstNode last, Completion c) {
2325
last(this.(ExprTrees::AsyncBlockExprTree).getLastChildElement(), last, c)
2426
}

rust/ql/lib/codeql/rust/elements/AsyncBlockExpr.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
/**
2+
* This module provides the public class `AsyncBlockExpr`.
3+
*/
4+
15
private import codeql.rust.elements.BlockExpr
26

37
/**
4-
* A async block expression. For example:
8+
* An async block expression. For example:
59
* ```rust
610
* async {
711
* let x = 42;

0 commit comments

Comments
 (0)