mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #19162 from hvitved/rust/to-string-non-rec
Rust: Make `Element.toString` non-recursive
This commit is contained in:
@@ -30,7 +30,11 @@ module Generated {
|
||||
* Gets the string representation of this element.
|
||||
*/
|
||||
cached
|
||||
final string toString() { result = this.toStringImpl() }
|
||||
final string toString() {
|
||||
result = this.toStringImpl() and
|
||||
// recursion guard to prevent `toString` from being defined recursively
|
||||
(exists(any(Element e).toStringImpl()) implies any())
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
|
||||
Reference in New Issue
Block a user