Skip to content

Commit b48d9a2

Browse files
author
Paolo Tranquilli
committed
Rust: undo rename of Path::segment to Path::part
1 parent a762e51 commit b48d9a2

File tree

22 files changed

+69
-68
lines changed

22 files changed

+69
-68
lines changed

rust/ast-generator/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ fn property_name(type_name: &str, field_name: &str) -> String {
3636
("CallExpr", "expr") => "function",
3737
("LetExpr", "expr") => "scrutinee",
3838
("MatchExpr", "expr") => "scrutinee",
39-
("Path", "segment") => "part",
4039
(_, "then_branch") => "then",
4140
(_, "else_branch") => "else_",
4241
("ArrayType", "ty") => "element_type_repr",

rust/extractor/src/crate_graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ fn make_qualified_path(
953953
id: trap::TrapId::Star,
954954
text: Some(name),
955955
}));
956-
let part = Some(trap.emit(generated::PathSegment {
956+
let segment = Some(trap.emit(generated::PathSegment {
957957
id: trap::TrapId::Star,
958958
generic_arg_list: None,
959959
name_ref,
@@ -964,7 +964,7 @@ fn make_qualified_path(
964964
trap.emit(generated::Path {
965965
id: trap::TrapId::Star,
966966
qualifier,
967-
part,
967+
segment,
968968
})
969969
}
970970
path.into_iter()

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: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/.gitattributes

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/PathImpl.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ module Impl {
3232
result = "...::"
3333
or
3434
index = 1 and
35-
result = this.getPart().toAbbreviatedString()
35+
result = this.getSegment().toAbbreviatedString()
3636
}
3737

3838
/**
3939
* Gets the text of this path, if it exists.
4040
*/
4141
pragma[nomagic]
42-
string getText() { result = this.getPart().getNameRef().getText() }
42+
string getText() { result = this.getSegment().getNameRef().getText() }
4343
}
4444

4545
/** A simple identifier path. */
@@ -49,7 +49,7 @@ module Impl {
4949
IdentPath() {
5050
not this.hasQualifier() and
5151
exists(PathSegment ps |
52-
ps = this.getPart() and
52+
ps = this.getSegment() and
5353
not ps.hasGenericArgList() and
5454
not ps.hasParenthesizedArgList() and
5555
not ps.hasTypeRepr() and

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

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/ql/lib/codeql/rust/elements/internal/generated/Path.qll

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

0 commit comments

Comments
 (0)