Skip to content

Commit

Permalink
Rust: Add labelled block example
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Sep 30, 2024
1 parent 4513643 commit 5ae6699
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 5 deletions.
8 changes: 4 additions & 4 deletions rust/ql/.generated.list

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions rust/ql/lib/codeql/rust/elements/BreakExpr.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions rust/ql/lib/codeql/rust/elements/internal/BreakExprImpl.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
| gen_break_expr.rs:7:13:7:17 | BreakExpr | getNumberOfAttrs: | 0 | hasExpr: | no | hasLifetime: | no |
| gen_break_expr.rs:12:13:12:27 | BreakExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes |
| gen_break_expr.rs:17:13:17:27 | BreakExpr | getNumberOfAttrs: | 0 | hasExpr: | yes | hasLifetime: | yes |
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:26:12:27 | 42 |
| gen_break_expr.rs:17:13:17:27 | BreakExpr | gen_break_expr.rs:17:26:17:27 | 42 |
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
| gen_break_expr.rs:12:13:12:27 | BreakExpr | gen_break_expr.rs:12:19:12:24 | Lifetime |
| gen_break_expr.rs:17:13:17:27 | BreakExpr | gen_break_expr.rs:17:19:17:24 | Lifetime |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions rust/schema/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,14 @@ class _:
}
};
```
```rust
let x = 'label: {
if exit() {
break 'label 42;
}
0;
};
```
"""


Expand Down

0 comments on commit 5ae6699

Please sign in to comment.