From 39ce47828321d7adfa92ea3f7713d97f8660a4f1 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Wed, 26 Mar 2025 18:48:57 +0800 Subject: [PATCH] docs: document unsafeGetAttrPos --- src/libexpr/primops.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 54682ea31..61e948549 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -2775,7 +2775,13 @@ static void prim_unsafeGetAttrPos(EvalState & state, const PosIdx pos, Value * * static RegisterPrimOp primop_unsafeGetAttrPos(PrimOp { .name = "__unsafeGetAttrPos", + .args = {"s", "set"}, .arity = 2, + .doc = R"( + `unsafeGetAttrPos` returns the position of the attribute named *s* + from *set*. This is used by Nixpkgs to provide location information + in error messages. + )", .fun = prim_unsafeGetAttrPos, });