Skip to content

Commit a7d4477

Browse files
committed
Rust: Rename Impl::getTrait to Impl::getTraitTy
1 parent 4c31866 commit a7d4477

21 files changed

Lines changed: 52 additions & 51 deletions

File tree

rust/ast-generator/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ fn property_name(type_name: &str, field_name: &str) -> String {
4545
(_, "ty") => "type_repr",
4646
("Function", "body") => "function_body",
4747
("ClosureExpr", "body") => "closure_body",
48+
("Impl", "trait_") => "trait_ty",
4849
_ if field_name.contains("record") => &field_name.replacen("record", "struct", 1),
4950
_ => field_name,
5051
};

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/lib/codeql/rust/elements/Impl.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/codeql/rust/elements/internal/ImplImpl.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private import codeql.rust.elements.internal.generated.Impl
1313
module Impl {
1414
// the following QLdoc is generated: if you need to edit it, do it in the schema file
1515
/**
16-
* An `impl`` block.
16+
* An `impl` block.
1717
*
1818
* For example:
1919
* ```rust
@@ -26,9 +26,9 @@ module Impl {
2626
override string toStringImpl() {
2727
exists(string trait |
2828
(
29-
trait = this.getTrait().toAbbreviatedString() + " for "
29+
trait = this.getTraitTy().toAbbreviatedString() + " for "
3030
or
31-
not this.hasTrait() and trait = ""
31+
not this.hasTraitTy() and trait = ""
3232
) and
3333
result = "impl " + trait + this.getSelfTy().toAbbreviatedString() + " { ... }"
3434
)
@@ -38,6 +38,6 @@ module Impl {
3838
* Holds if this is an inherent `impl` block, that is, one that does not implement a trait.
3939
*/
4040
pragma[nomagic]
41-
predicate isInherent() { not this.hasTrait() }
41+
predicate isInherent() { not this.hasTraitTy() }
4242
}
4343
}

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

Lines changed: 6 additions & 6 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/ParentChild.qll

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

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

0 commit comments

Comments
 (0)