Skip to content

Commit 9f09454

Browse files
authored
Merge pull request #18107 from github/redsun82/rust-rename
Rust: rename `MatchExpr.expr` to `scrutinee` in all layers
2 parents cb0ac61 + 7a86257 commit 9f09454

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

rust/ast-generator/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ fn class_name(type_name: &str) -> String {
2929
fn property_name(type_name: &str, field_name: &str) -> String {
3030
let name = match (type_name, field_name) {
3131
("Path", "segment") => "part",
32+
("MatchExpr", "expr") => "scrutinee",
3233
(_, "then_branch") => "then",
3334
(_, "else_branch") => "else_",
3435
_ => field_name,

rust/extractor/src/generated/.generated.list

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/extractor/src/generated/top.rs

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

rust/extractor/src/translate/generated.rs

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

rust/ql/.generated.list

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/internal/generated/Raw.qll

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/rust.dbscheme

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,9 +1896,9 @@ match_expr_attrs(
18961896
);
18971897

18981898
#keyset[id]
1899-
match_expr_exprs(
1899+
match_expr_scrutinees(
19001900
int id: @match_expr ref,
1901-
int expr: @expr ref
1901+
int scrutinee: @expr ref
19021902
);
19031903

19041904
#keyset[id]

rust/schema/annotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class _:
289289
}
290290
```
291291
"""
292-
expr: _ | ql.name("scrutinee") | doc("scrutinee (the expression being matched) of this match expression")
292+
scrutinee: _ | doc("scrutinee (the expression being matched) of this match expression")
293293

294294

295295
@annotate(ContinueExpr, cfg = True)

rust/schema/ast.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)