Skip to content

Commit 054e943

Browse files
committed
Rust: Make Element.toString non-recursive
1 parent 279e9e2 commit 054e943

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

rust/ql/lib/codeql/rust/elements/internal/ModuleImpl.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ module Impl {
2424
* ```
2525
*/
2626
class Module extends Generated::Module {
27-
override string toStringImpl() { result = "mod " + this.getName() }
27+
override string toStringImpl() { result = "mod " + this.getName().getText() }
2828
}
2929
}

rust/ql/lib/codeql/rust/elements/internal/UseImpl.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ module Impl {
1919
* ```
2020
*/
2121
class Use extends Generated::Use {
22-
override string toStringImpl() { result = "use " + this.getUseTree() }
22+
override string toStringImpl() { result = "use " + this.getUseTree().toAbbreviatedString() }
2323
}
2424
}

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

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)