1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

docs: document unsafeGetAttrPos

This commit is contained in:
Sizhe Zhao 2025-03-26 18:48:57 +08:00
parent 9b0f455609
commit 39ce478283
No known key found for this signature in database
GPG key ID: ED1807251A7DA08F

View file

@ -2775,7 +2775,13 @@ static void prim_unsafeGetAttrPos(EvalState & state, const PosIdx pos, Value * *
static RegisterPrimOp primop_unsafeGetAttrPos(PrimOp { static RegisterPrimOp primop_unsafeGetAttrPos(PrimOp {
.name = "__unsafeGetAttrPos", .name = "__unsafeGetAttrPos",
.args = {"s", "set"},
.arity = 2, .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, .fun = prim_unsafeGetAttrPos,
}); });