Rust: Ensure singleton

This commit is contained in:
Simon Friis Vindum
2025-09-22 14:23:50 +02:00
parent 4244a6569c
commit 45b84ffb31
2 changed files with 5 additions and 2 deletions

View File

@@ -709,6 +709,9 @@ module Make<
this = TConsSummaryComponentStack(result, _)
}
/** Gets the head of this stack if it is a singleton. */
SummaryComponent headOfSingleton() { this = TSingletonSummaryComponentStack(result) }
/** Gets the tail of this stack, if any. */
SummaryComponentStack tail() { this = TConsSummaryComponentStack(_, result) }