From bf4b47abc7deb373b5b09a7ae1d8968a0421483f Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 1 Sep 2025 16:51:58 +0200 Subject: [PATCH] lib.attrsets.unionOfDisjoint: simplify explanation The whole business of `// z` is a confusing implementation detail for the reader. --- lib/attrsets.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index fe51c8149a61..d47e72bb2910 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -2085,10 +2085,8 @@ rec { dontRecurseIntoAttrs = attrs: attrs // { recurseForDerivations = false; }; /** - `unionOfDisjoint x y` is equal to `x // y // z` where the - attrnames in `z` are the intersection of the attrnames in `x` and - `y`, and all values `assert` with an error message. This - operator is commutative, unlike (//). + `unionOfDisjoint x y` is equal to `x // y`, but accessing attributes present + in both `x` and `y` will throw an error. This operator is commutative, unlike `//`. # Inputs