From be0c42bd2245c258e801557998405d9d9580e71f Mon Sep 17 00:00:00 2001 From: ASDAlexander77 Date: Fri, 27 Nov 2026 08:35:16 +0000 Subject: [PATCH] Temporal.Now: @owned, as every other declaration in lib.d.ts Its four functions were the library's only heap results the compiler could not classify. One such declaration is enough to turn off, for the whole module, the rule that a call through a function value hands its result over owned, so under -mm=rc no program linking the library gave back the result of a callback or of an object literal's method (a leak per call) since #108 added Temporal. Co-Authored-By: Claude Opus 5.5 --- src/lib.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.d.ts b/src/lib.d.ts index be9b2b8..d6866db 100644 --- a/src/lib.d.ts +++ b/src/lib.d.ts @@ -1040,6 +1040,10 @@ declare namespace Temporal { toJSON(): string; } + // @owned as every other declaration here (see the top of this file): without it these four were the + // library's only heap results the compiler could say nothing of, and under -mm=rc no call through a + // function value in any program gave its result back (a callback's, an object literal's method's) + @owned declare namespace Now { declare function instant(): Temporal.Instant; declare function plainDateTimeISO(): Temporal.PlainDateTime;