aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fromTOML.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-04-29 00:12:25 +0200
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-04-29 00:12:25 +0200
commite93b59fbc5ada40e77d6f2b2a8bbd8e482418d6a (patch)
treef9436753bba299d648a6721845a9465b34a50062 /src/libexpr/primops/fromTOML.cc
parentf6baa4d18845297f3f7fc2434b7ade93a45718e7 (diff)
parent35393dc2c65765acb6cc99d6a976eab62c28a51d (diff)
Merge remote-tracking branch 'origin/master' into coerce-string
Diffstat (limited to 'src/libexpr/primops/fromTOML.cc')
-rw-r--r--src/libexpr/primops/fromTOML.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops/fromTOML.cc b/src/libexpr/primops/fromTOML.cc
index 336cfe5cc..8a5231781 100644
--- a/src/libexpr/primops/fromTOML.cc
+++ b/src/libexpr/primops/fromTOML.cc
@@ -5,7 +5,7 @@
namespace nix {
-static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Value & val)
+static void prim_fromTOML(EvalState & state, const PosIdx pos, Value * * args, Value & val)
{
auto toml = state.forceStringNoCtx(*args[0], pos, "while evaluating the argument passed to builtins.fromTOML");
@@ -73,7 +73,7 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
} catch (std::exception & e) { // TODO: toml::syntax_error
throw EvalError({
.msg = hintfmt("while parsing a TOML string: %s", e.what()),
- .errPos = pos
+ .errPos = state.positions[pos]
});
}
}