From 06efbc37cb777907178217e8f994737736b27b74 Mon Sep 17 00:00:00 2001 From: Nils Juto Date: Wed, 7 Oct 2026 14:22:00 +0200 Subject: [PATCH] document `File.Atomic.sub_path` lifetime requirement --- lib/std/Io/Dir.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/Io/Dir.zig b/lib/std/Io/Dir.zig index 414e63c99cea565c4176dfa2dc0a327fe2ebec63..a5bce6c76fdcf848b4f63e0d9100454804f5bb3f 100644 --- a/lib/std/Io/Dir.zig +++ b/lib/std/Io/Dir.zig @@ -1917,7 +1917,8 @@ pub const CreateFileAtomicError = error{ } || Io.Dir.PathNameError || Io.Cancelable || Io.UnexpectedError; /// Create an unnamed ephemeral file that can eventually be atomically -/// materialized into `sub_path`. +/// materialized into `sub_path`. `sub_path` must be valid until the atomic +/// file is materialized. /// /// The returned `File.Atomic` provides API to emulate the behavior in case it /// is not directly supported by the underlying operating system. -- 2.54.0