Rust: Fix bad join

This commit is contained in:
Tom Hvitved
2025-07-08 16:00:09 +02:00
parent 2a207f9f6f
commit 22b833fbda

View File

@@ -1044,6 +1044,9 @@ private Type inferTryExprType(TryExpr te, TypePath path) {
)
}
pragma[nomagic]
private StructType getStrStruct() { result = TStruct(any(Builtins::Str s)) }
pragma[nomagic]
private Type inferLiteralType(LiteralExpr le, TypePath path) {
path.isEmpty() and
@@ -1074,7 +1077,7 @@ private Type inferLiteralType(LiteralExpr le, TypePath path) {
path.isEmpty() and result = TRefType()
or
path = TypePath::singleton(TRefTypeParameter()) and
result = TStruct(any(Builtins::Str s))
result = getStrStruct()
)
}