Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Fable.Compiler/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ module Reflection =
candidate
else
failwith
$"Cannot find implementation DLL for reference assembly {r.DllPath}, expected at {candidate}"
$"Cannot find implementation DLL for reference assembly %s{r.DllPath}, expected at %s{candidate}"
else
r.DllPath

Expand Down
16 changes: 8 additions & 8 deletions src/Fable.Transforms/Rust/Fable2Rust.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1942,7 +1942,7 @@
sb.Append(List.head parts) |> ignore

List.tail parts
|> List.iteri (fun i part -> sb.Append($"{{{i}}}" + part) |> ignore)
|> List.iteri (fun i part -> sb.Append("{" + string i + "}" + part) |> ignore)
Comment thread Fixed

sb.ToString()

Expand Down Expand Up @@ -2583,7 +2583,7 @@
match fableExpr with
| Fable.IdentExpr ident when isArmScoped ctx ident.Name ->
// if arm scoped, just output the ident value
let name = $"{ident.Name}_{0}_{0}"
let name = $"%s{ident.Name}_%d{0}_%d{0}"
mkGenericPathExpr [ name ] None
| _ ->
// libCall com ctx range [] "Option" "getValue" [ fableExpr ]
Expand All @@ -2599,7 +2599,7 @@
match fableExpr with
| Fable.IdentExpr ident when isArmScoped ctx ident.Name ->
// if ident is match arm scoped, just output the ident value
let name = $"{ident.Name}_{info.CaseIndex}_{info.FieldIndex}"
let name = $"%s{ident.Name}_%d{info.CaseIndex}_%d{info.FieldIndex}"
mkGenericPathExpr [ name ] None
| _ ->
// Compile as: "match opt { MyUnion::Case(x, _) => x.clone() }"
Expand Down Expand Up @@ -2973,7 +2973,7 @@
| 0 ->
match nameOpt with
| Some identName ->
let fieldName = $"{identName}_{caseIndex}_{0}"
let fieldName = $"%s{identName}_%d{caseIndex}_%d{0}"
[ makeFullNameIdentPat fieldName ]
| _ -> [ WILD_PAT ]
| _ -> []
Expand All @@ -2996,7 +2996,7 @@
| Some identName ->
unionCase.UnionCaseFields
|> List.mapi (fun i _field ->
let fieldName = $"{identName}_{caseIndex}_{i}"
let fieldName = $"%s{identName}_%d{caseIndex}_%d{i}"
makeFullNameIdentPat fieldName
)
| _ -> unionCase.UnionCaseFields |> List.map (fun _field -> WILD_PAT)
Expand Down Expand Up @@ -3594,8 +3594,8 @@

let strBody =
[
$"let args = std::env::args().skip(1).map({asStr}).collect()"
$"{mainName}({asArr}(args))"
$"let args = std::env::args().skip(1).map(%s{asStr}).collect()"
$"%s{mainName}(%s{asArr}(args))"
]

let fnBody = strBody |> Seq.map mkEmitSemiStmt |> mkBlock |> Some
Expand Down Expand Up @@ -4593,7 +4593,7 @@
memb.CurriedParameterGroups
|> List.collect id
|> List.mapi (fun i p ->
let name = defaultArg p.Name $"arg{i}"
let name = defaultArg p.Name $"arg%d{i}"
let typ = FableTransforms.uncurryType p.Type
makeTypedIdent typ name
)
Expand Down
Loading